/* ===== Hartbeeshoek Fire Watch - Site Styles ===== */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html { font-size: 16px; }
}

body {
    margin-bottom: 0;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* --- Color Variables --- */
:root {
    --fire-dark: #1a1a2e;
    --fire-red: #e63946;
    --fire-orange: #f77f00;
    --fire-yellow: #fcbf49;
    --fire-amber: #d4a017;
    --fdi-blue: #2196F3;
    --fdi-green: #4CAF50;
    --fdi-yellow: #FFC107;
    --fdi-orange: #FF9800;
    --fdi-red: #f44336;
    --text-light: #f8f9fa;
    --bg-warm: #fff8f0;
}

/* --- Disclaimer Bar --- */
.disclaimer-bar {
    background-color: var(--fire-yellow);
    color: #333;
    padding: 0.4rem 0;
    font-size: 0.8rem;
    text-align: center;
    border-bottom: 2px solid var(--fire-orange);
}

.disclaimer-bar .disclaimer-link {
    color: #333;
    font-weight: 600;
    text-decoration: underline;
    margin-left: 0.5rem;
}

/* --- Navbar --- */
.bg-dark-fire {
    background: linear-gradient(135deg, var(--fire-dark) 0%, #16213e 100%) !important;
}

.brand-icon {
    font-size: 1.8rem;
    margin-right: 0.5rem;
}

.brand-text small {
    font-size: 0.65rem;
    opacity: 0.8;
    display: block;
    margin-top: -2px;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

.navbar .nav-link:hover {
    color: var(--fire-yellow) !important;
}

/* --- FDI Widget --- */
.fdi-widget {
    margin-left: 1rem;
}

.fdi-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.fdi-safe { background-color: var(--fdi-blue); color: white; }
.fdi-moderate { background-color: var(--fdi-green); color: white; }
.fdi-dangerous { background-color: var(--fdi-yellow); color: #333; }
.fdi-very-dangerous { background-color: var(--fdi-orange); color: white; }
.fdi-extremely-dangerous { background-color: var(--fdi-red); color: white; }
.fdi-unknown { background-color: #6c757d; color: white; }

/* --- Page Content --- */
.page-header {
    border-bottom: 3px solid var(--fire-orange);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    color: var(--fire-dark);
    font-size: 1.75rem;
}

.source-attribution {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.community-notice {
    background-color: var(--bg-warm);
    border-left: 4px solid var(--fire-orange);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* --- Emergency Contacts --- */
.emergency-card {
    border: 2px solid var(--fire-red);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem;
    transition: transform 0.2s;
}

.emergency-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.emergency-card .phone-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fire-red);
}

.emergency-card .phone-number a {
    color: var(--fire-red);
    text-decoration: none;
}

.emergency-link {
    color: var(--fire-red);
    font-weight: 600;
}

/* --- FDI Display Table --- */
.fdi-table th, .fdi-table td {
    vertical-align: middle;
    text-align: center;
}

.fdi-table .fdi-row-blue { background-color: rgba(33, 150, 243, 0.15); }
.fdi-table .fdi-row-green { background-color: rgba(76, 175, 80, 0.15); }
.fdi-table .fdi-row-yellow { background-color: rgba(255, 193, 7, 0.15); }
.fdi-table .fdi-row-orange { background-color: rgba(255, 152, 0, 0.15); }
.fdi-table .fdi-row-red { background-color: rgba(244, 67, 54, 0.15); }

/* --- Regulation Tables --- */
.reg-table {
    font-size: 0.9rem;
}

.reg-table th {
    background-color: var(--fire-dark);
    color: white;
}

/* --- Golden Rules --- */
.golden-rule {
    background: linear-gradient(135deg, var(--bg-warm) 0%, #fff 100%);
    border-left: 4px solid var(--fire-amber);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.golden-rule .rule-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fire-amber);
    float: left;
    margin-right: 0.75rem;
    line-height: 1;
}

/* --- Alert Cards --- */
.alert-fire {
    border-left: 5px solid var(--fire-red);
    background-color: #fff5f5;
}

.alert-fire-warning {
    border-left: 5px solid var(--fire-orange);
    background-color: #fff8f0;
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(135deg, var(--fire-dark) 0%, #0f3460 50%, #16213e 100%);
    color: white;
    padding: 3rem 0;
    margin: -1rem -12px 2rem -12px;
    border-radius: 0 0 1rem 1rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.hero-section .subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
}

/* --- Footer --- */
.site-footer {
    background-color: #f8f9fa;
    border-top: 3px solid var(--fire-orange);
    padding: 2rem 0 1rem;
}

.site-footer h6 {
    color: var(--fire-dark);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.site-footer a {
    color: #555;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--fire-red);
}

.footer-disclaimer {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 0.25rem;
    padding: 0.75rem;
    margin-top: 1rem;
}

/* --- Print Styles --- */
@media print {
    .disclaimer-bar, .navbar, .site-footer, .fdi-widget { display: none !important; }
    .container { max-width: 100% !important; }
    a[href]:after { content: " (" attr(href) ")"; font-size: 0.8em; }
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .hero-section h1 { font-size: 1.75rem; }
    .hero-section { padding: 2rem 0; }
    .fdi-widget { margin: 0.5rem 0; }
}
