/* ============================================================
   COL Radio — Unified Responsive Navbar
   No Bootstrap required. Pure CSS + minimal vanilla JS toggle.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
    --nb-red: #c0392b;
    --nb-red-dark: #962d22;
    --nb-white: #ffffff;
    --nb-text: #444;
    --nb-border: #e8e8e8;
    --nb-bg-hover: #fdf3f3;
    --nb-height: 64px; /* desktop nav height */
    --nb-z: 9999;
    --nb-shadow: 0 4px 20px rgba(0,0,0,0.10);
    --nb-drop-shadow: 0 8px 32px rgba(0,0,0,0.13);
    --nb-font: 'Source Sans 3', sans-serif;
}

/* ============================================================
   RESET (scoped to navbar elements only)
   ============================================================ */
.site-navbar *,
.site-navbar *::before,
.site-navbar *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================================
   NAVBAR SHELL
   ============================================================ */
.site-navbar {
    width: 100%;
    background: var(--nb-white);
    border-bottom: 1px solid var(--nb-border);
    box-shadow: var(--nb-shadow);
    position: sticky;
    top: 0;
    z-index: var(--nb-z);
    font-family: var(--nb-font);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nb-height);
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
    position: relative;
}

/* ============================================================
   LOGO
   ============================================================ */
.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-logo {
    height: 42px;
    width: auto;
    display: block;
}

/* ============================================================
   HAMBURGER BUTTON  (hidden on desktop)
   ============================================================ */
.navbar-toggle {
    display: none; /* hidden ≥ 992px */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: none;
    border: 2px solid var(--nb-red);
    border-radius: 4px;
    cursor: pointer;
    padding: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
}

    .navbar-toggle:hover,
    .navbar-toggle[aria-expanded="true"] {
        background: var(--nb-red);
    }

.hb-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--nb-red);
    border-radius: 2px;
    transition: background 0.2s, transform 0.25s, opacity 0.2s;
}

.navbar-toggle:hover .hb-bar,
.navbar-toggle[aria-expanded="true"] .hb-bar {
    background: var(--nb-white);
}

    /* Animated X when open */
    .navbar-toggle[aria-expanded="true"] .hb-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .navbar-toggle[aria-expanded="true"] .hb-bar:nth-child(2) {
        opacity: 0;
    }

    .navbar-toggle[aria-expanded="true"] .hb-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

/* ============================================================
   NAV MENU  (desktop: horizontal flex row)
   ============================================================ */
.navbar-menu {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0;
}

/* ============================================================
   NAV ITEMS & LINKS
   ============================================================ */
.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 15px;
    height: 100%;
    color: var(--nb-text);
    text-decoration: none;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s;
    /* Red bottom indicator */
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

    .nav-link:hover {
        color: var(--nb-red);
        border-bottom-color: var(--nb-red);
    }

.nav-link-active {
    color: var(--nb-red);
    border-bottom-color: var(--nb-red);
}

.nav-caret {
    font-size: 1.65rem;
    line-height: 1;
    transition: transform 0.22s ease;
    display: inline-block;
}

/* Rotate caret when dropdown open */
.has-dropdown:hover .nav-caret,
.has-dropdown.is-open .nav-caret {
    transform: rotate(180deg);
}

/* ============================================================
   MEGA DROPDOWN  (desktop)
   ============================================================ */
.mega-dropdown {
    display: none;
    position: absolute;
    top: calc(var(--nb-height) - 3px); /* flush below the nav bottom border */
    left: 0;
    min-width: 560px;
    background: var(--nb-white);
    border-top: 3px solid var(--nb-red);
    border-bottom: 1px solid var(--nb-border);
    box-shadow: var(--nb-drop-shadow);
    border-radius: 0 0 6px 6px;
    padding: 24px;
    gap: 0;
    z-index: calc(var(--nb-z) + 1);
    /* Flex: 4 columns */
    flex-direction: row;
    flex-wrap: wrap;
}

/* Show on hover (desktop) */
.has-dropdown:hover .mega-dropdown {
    display: flex;
}

/* Show when .is-open class added (mobile JS toggle) */
.has-dropdown.is-open .mega-dropdown {
    display: flex;
}

/* Mega columns */
.mega-col {
    flex: 1 1 120px;
    padding: 0 16px;
    border-right: 1px solid var(--nb-border);
}

    .mega-col:first-child {
        padding-left: 0;
    }

    .mega-col:last-child {
        border-right: none;
        padding-right: 0;
    }

.mega-heading {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--nb-red);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--nb-border);
}

.mega-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .mega-col ul li a {
        display: block;
        padding: 5px 0;
        font-size: 1.5rem;
        font-weight: 400;
        color: #555;
        text-decoration: none;
        transition: color 0.15s, padding-left 0.15s;
    }

        .mega-col ul li a:hover {
            color: var(--nb-red);
            padding-left: 5px;
        }

/* ============================================================
   RESPONSIVE — TABLET + MOBILE  (≤ 991px)
   ============================================================ */
@media (max-width: 991px) {

    /* Show hamburger */
    .navbar-toggle {
        display: flex;
    }

    /* Nav bar row height */
    .navbar-inner {
        height: 52px;
        padding: 0 16px;
    }

    /* -------------------------------------------------------
       MOBILE MENU
       Use fixed positioning so it is NEVER clipped by the
       sticky-header-wrap's overflow or stacking context.
       It drops down from the very bottom of the navbar bar.
    ------------------------------------------------------- */
    .navbar-menu {
        display: none;
        position: fixed; /* fixed = never clipped */
        top: auto; /* overridden by JS below */
        left: 0;
        width: 100%;
        background: var(--nb-white);
        border-top: 3px solid var(--nb-red);
        border-bottom: 2px solid var(--nb-red);
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        /* Allow full scroll through all menu items */
        max-height: 75vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 99999; /* always on top */
    }

        /* Shown when JS adds .is-open */
        .navbar-menu.is-open {
            display: flex;
        }

    /* Vertical stack of items */
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        width: 100%;
        padding: 6px 0 16px;
    }

    .nav-item {
        height: auto;
        flex-direction: column;
        align-items: stretch;
    }

    /* Each nav link row */
    .nav-link {
        height: auto;
        padding: 14px 20px;
        border-bottom: 1px solid var(--nb-border);
        border-left: 4px solid transparent;
        border-top: none;
        font-size: 2rem;
        font-weight: 600;
        justify-content: space-between;
        color: var(--nb-text);
        letter-spacing: 0.02em;
    }

        .nav-link:hover,
        .nav-link-active {
            color: var(--nb-red);
            border-left-color: var(--nb-red);
            background: var(--nb-bg-hover);
        }

    /* Last link: no bottom border */
    .nav-item:last-child > .nav-link {
        border-bottom: none;
    }

    /* ---- Mobile mega dropdown — inline stacked ---- */
    .mega-dropdown {
        position: static !important;
        display: none;
        flex-direction: column !important;
        min-width: 100%;
        width: 100%;
        border-top: none;
        border-left: 4px solid var(--nb-red);
        border-bottom: none;
        border-radius: 0;
        box-shadow: none;
        padding: 6px 0 6px 16px;
        background: #fdf5f5;
    }

    /* Show via JS .is-open on parent li */
    .has-dropdown.is-open .mega-dropdown {
        display: flex !important;
    }

    /* Never show on hover on mobile */
    .has-dropdown:hover .mega-dropdown {
        display: none;
    }

    .has-dropdown.is-open .mega-dropdown {
        display: flex !important;
    }

    .mega-col {
        border-right: none;
        border-bottom: 1px solid var(--nb-border);
        padding: 10px 12px 10px 0;
        flex: none;
        width: 100%;
    }

        .mega-col:last-child {
            border-bottom: none;
            padding-bottom: 4px;
        }

    .mega-heading {
        font-size: 1.2rem;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    .mega-col ul li a {
        font-size: 1.2rem;
        padding: 6px 0;
        color: var(--nb-text);
    }

        .mega-col ul li a:hover {
            color: var(--nb-red);
            padding-left: 6px;
        }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE  (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
    .navbar-inner {
        padding: 0 12px;
        height: 50px;
    }

    .navbar-logo {
        height: 32px;
    }

    .nav-link {
        font-size: 2rem;
        padding: 13px 16px;
    }

    .navbar-menu {
        max-height: 80vh;
    }
}
