/* ============================================
   MASCOUTAH FIRE DEPARTMENT — SHARED STYLES
   shared.css — loaded by every page
   ============================================ */

/* ---------- CSS Variables (master palette) ---------- */
:root {
    --fire-red: #C41E3A;
    --deep-red: #8B0000;
    --ember-orange: #FF4500;
    --smoke-dark: #1a1a1a;
    --smoke-medium: #2d2d2d;
    --ash-gray: #4a4a4a;
    --off-white: #f5f5f5;
    --gold-accent: #FFD700;
    --explorer-blue: #1e3a5f;
    --navy: #1A2332;
    --gold: #D4A843;
}

/* ---------- Skip Navigation (Accessibility) ---------- */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--fire-red);
    color: #fff;
    padding: 0.75rem 1.5rem;
    z-index: 10000;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    font-family: 'Source Sans 3', sans-serif;
}
.skip-nav:focus {
    top: 0;
}

/* ---------- Current Conditions Banner ---------- */
.conditions-banner {
    background: linear-gradient(90deg, #1a3a1a, #2a5a2a, #1a3a1a);
    color: #fff;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-family: 'Source Sans 3', sans-serif;
    position: relative;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.conditions-banner.burn-ban {
    background: linear-gradient(90deg, #8B0000, #a02020, #8B0000);
}
.conditions-banner-icon { font-size: 1.1rem; }
.conditions-banner-status { font-weight: 700; }
.conditions-banner-detail { opacity: 0.9; font-size: 0.85rem; }
.conditions-banner .ealert-link {
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 3px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 3px;
    text-decoration: none;
    transition: background 0.3s;
    white-space: nowrap;
}
.conditions-banner .ealert-link:hover { background: rgba(255,255,255,0.3); }
@media (max-width: 600px) {
    .conditions-banner { font-size: 0.82rem; padding: 6px 12px; text-align: center; }
}

/* ---------- Announcement Banner ---------- */
.announcement-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(90deg, #1e3a5f, #2a5080, #1e3a5f);
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 0.95rem;
    font-family: 'Source Sans 3', sans-serif;
    position: relative;
    z-index: 1001;
    transition: all 0.3s;
}
.announcement-banner:hover { background: linear-gradient(90deg, #2a5080, #3a6090, #2a5080); }
.announcement-icon { font-size: 1.2rem; }
.announcement-text strong { color: #FFD700; }
.announcement-cta {
    background: #FFD700;
    color: #1e3a5f;
    padding: 4px 12px;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 3px;
}
.announcement-banner:hover .announcement-cta { background: #fff; }
@media (max-width: 600px) {
    .announcement-banner { flex-wrap: wrap; text-align: center; padding: 8px 12px; font-size: 0.85rem; }
    .announcement-cta { margin-top: 4px; }
}

/* ---------- Shared Navigation ---------- */
.shared-nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(26,26,26,0.98) 0%, rgba(26,26,26,0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--fire-red);
}
.shared-nav .nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.shared-nav .logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--off-white);
}
.shared-nav .logo-img { height: 50px; width: auto; }
.shared-nav .logo-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: var(--off-white);
}
.shared-nav .logo-text span { color: var(--fire-red); }
.shared-nav .nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}
.shared-nav .nav-links > li { position: relative; }
.shared-nav .nav-links > li > a {
    color: var(--off-white);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Source Sans 3', sans-serif;
}
.shared-nav .nav-links > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.75rem;
    right: 0.75rem;
    height: 2px;
    background: var(--fire-red);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.shared-nav .nav-links > li > a:hover::after,
.shared-nav .nav-links > li:hover > a::after { transform: scaleX(1); }
.shared-nav .nav-links > li > a:hover,
.shared-nav .nav-links > li:hover > a { color: var(--fire-red); }
.shared-nav .dropdown-arrow { font-size: 0.55rem; transition: transform 0.3s ease; }
.shared-nav .nav-links > li:hover .dropdown-arrow { transform: rotate(180deg); }
.shared-nav .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: rgba(26,26,26,0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--ash-gray);
    border-top: 3px solid var(--fire-red);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.3s ease;
    z-index: 1001;
    list-style: none;
}
.shared-nav .nav-links > li:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.shared-nav .dropdown a {
    display: block;
    padding: 0.6rem 1.25rem;
    color: var(--off-white);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Source Sans 3', sans-serif;
}
.shared-nav .dropdown a:hover { background: var(--fire-red); color: var(--off-white); padding-left: 1.5rem; }
.shared-nav .nav-search-btn {
    background: none;
    border: 2px solid var(--ash-gray);
    color: var(--off-white);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.3s;
    margin-left: 0.5rem;
}
.shared-nav .nav-search-btn:hover { border-color: var(--fire-red); color: var(--fire-red); }
.shared-nav .mobile-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    background: none;
    border: none;
}
.shared-nav .mobile-menu span { width: 25px; height: 3px; background: var(--off-white); display: block; transition: all 0.3s ease; }

/* Mobile Nav */
@media (max-width: 968px) {
    .shared-nav .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26,26,26,0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem 0;
        gap: 0;
        border-bottom: 3px solid var(--fire-red);
    }
    .shared-nav .nav-links.active { display: flex; }
    .shared-nav .nav-links > li > a { padding: 0.75rem 2rem; }
    .shared-nav .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        border-top: none;
        padding: 0;
        background: rgba(45,45,45,0.5);
        display: none;
        min-width: 100%;
    }
    .shared-nav .nav-links > li.mobile-open .dropdown { display: block; }
    .shared-nav .dropdown a { padding-left: 3rem; font-size: 0.8rem; }
    .shared-nav .mobile-menu { display: flex; }
    .shared-nav .logo-text { display: none; }
    .shared-nav .nav-search-btn { margin-left: auto; margin-right: 0.5rem; }
}

/* ---------- Search Modal ---------- */
.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
}
.search-overlay.active { display: flex; }
.search-box {
    background: var(--smoke-medium);
    border: 2px solid var(--fire-red);
    border-radius: 8px;
    width: 90%;
    max-width: 620px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    font-family: 'Source Sans 3', sans-serif;
}
.search-input-wrap {
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--ash-gray);
}
.search-input-wrap .search-icon { font-size: 1.2rem; margin-right: 0.75rem; opacity: 0.6; }
.search-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--off-white);
    font-size: 1.15rem;
    padding: 1.1rem 0;
    outline: none;
    font-family: 'Source Sans 3', sans-serif;
}
.search-input::placeholder { color: rgba(245,245,245,0.4); }
.search-close {
    background: none;
    border: none;
    color: var(--off-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.search-close:hover { opacity: 1; }
.search-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.5rem;
}
.search-results:empty::after {
    content: '';
    display: none;
}
.search-result-item {
    display: block;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--off-white);
    border-radius: 6px;
    transition: background 0.2s;
}
.search-result-item:hover { background: rgba(196,30,58,0.15); }
.search-result-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.search-result-title .result-icon { font-size: 1.1rem; }
.search-result-desc { font-size: 0.85rem; color: rgba(245,245,245,0.6); line-height: 1.4; }
.search-no-results {
    padding: 2rem 1.25rem;
    text-align: center;
    color: rgba(245,245,245,0.5);
    font-size: 0.95rem;
}
.search-hint {
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
    color: rgba(245,245,245,0.35);
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ---------- E-Alerts CTA (used in footer & contact) ---------- */
.ealert-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #2a5080, #1e3a5f);
    color: #fff;
    padding: 0.6rem 1.25rem;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}
.ealert-cta:hover { background: linear-gradient(135deg, #3a6090, #2a5080); transform: translateY(-2px); }

/* ---------- Shared Footer ---------- */
.shared-footer {
    background: var(--smoke-medium);
    border-top: 4px solid var(--fire-red);
    padding: 3rem 2rem 1.5rem;
    font-family: 'Source Sans 3', sans-serif;
    color: var(--off-white);
}
.shared-footer .footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.shared-footer .footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--ash-gray);
}
.shared-footer .footer-col h4 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    color: var(--fire-red);
}
.shared-footer .footer-col a {
    display: block;
    color: rgba(245,245,245,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    transition: color 0.2s;
}
.shared-footer .footer-col a:hover { color: var(--fire-red); }
.shared-footer .footer-col p {
    color: rgba(245,245,245,0.7);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}
.shared-footer .footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.shared-footer .footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.shared-footer .footer-logo { height: 45px; width: auto; }
.shared-footer .footer-brand-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 3px;
}
.shared-footer .footer-brand-text span { color: var(--fire-red); }
.shared-footer .footer-legal {
    color: rgba(245,245,245,0.5);
    font-size: 0.8rem;
}
@media (max-width: 768px) {
    .shared-footer .footer-top { grid-template-columns: 1fr; gap: 2rem; }
    .shared-footer .footer-bottom { flex-direction: column; text-align: center; }
}

/* ---------- Google Map Container ---------- */
.map-container {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid var(--ash-gray);
}
.map-container iframe {
    width: 100%;
    height: 300px;
    border: 0;
    display: block;
}

/* ---------- ARIA & Focus Styles ---------- */
*:focus-visible {
    outline: 3px solid var(--fire-red);
    outline-offset: 2px;
}
[role="main"] { outline: none; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
