/* /css/navigationA.css
 *
 * Styles for navigationA() output.
 *
 * Desktop (>= 768px): horizontal bar, parent items reveal children on hover.
 * Mobile  (< 768px):  hamburger button toggles a slide-in drawer from the
 *                     right. Children are indented within the same list.
 *
 * Entirely CSS-driven — the open/closed state is held by a hidden checkbox
 * (#nav-a-toggle), so no JavaScript is required.
 *
 * This file is a starting point for developers to restyle freely.
 */

/* ─── Shared / base ───────────────────────────────────────────────────────── */

.nav-a {
    position: relative;
}

.nav-a ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-a__link {
    display: block;
    text-decoration: none;
    color: #1d202b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
    font-size: 1em;
    padding: 12px 16px;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-a__item.active > .nav-a__link {
    font-weight: 700;
}

/* The checkbox that drives the mobile drawer is never shown itself */
.nav-a__toggle {
    display: none;
}

/* Hamburger + overlay are hidden on desktop, shown on mobile (below) */
.nav-a__hamburger,
.nav-a__overlay {
    display: none;
}

/* ─── Desktop (>= 768px): horizontal bar with hover dropdowns ─────────────── */

@media (min-width: 768px) {

    .nav-a__list--top {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    .nav-a__list--top > .nav-a__item {
        position: relative;
    }

    .nav-a__link:hover {
        color: #1b7a8c;
    }

    /* Submenu: hidden by default, revealed on hover of the parent item */
    .nav-a__submenu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        background: #ffffff;
        border: 1px solid #e2e6e8;
        border-radius: 4px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
        opacity: 0;
        visibility: hidden;
        transform: translateY(4px);
        transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
        z-index: 100;
    }

    .nav-a__item.has-children:hover > .nav-a__submenu,
    .nav-a__item.has-children:focus-within > .nav-a__submenu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-a__submenu .nav-a__link {
        padding: 10px 16px;
        white-space: nowrap;
    }

    .nav-a__submenu .nav-a__link:hover {
        background: #f3f7f8;
    }

    /* Small caret to indicate a parent has children */
    .nav-a__item.has-children > .nav-a__link::after {
        content: "";
        display: inline-block;
        margin-left: 6px;
        border: 4px solid transparent;
        border-top-color: currentColor;
        vertical-align: middle;
    }
}

/* ─── Mobile (< 768px): hamburger + slide-in drawer ──────────────────────── */

@media (max-width: 767px) {

    /* Hamburger button */
    .nav-a__hamburger {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 10px;
        cursor: pointer;
        position: relative;
        z-index: 300;
    }

    .nav-a__hamburger span {
        display: block;
        height: 3px;
        width: 100%;
        background: #1d202b;
        border-radius: 2px;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    /* Animate hamburger into an "X" when the drawer is open */
    .nav-a__toggle:checked ~ .nav-a__hamburger span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .nav-a__toggle:checked ~ .nav-a__hamburger span:nth-child(2) {
        opacity: 0;
    }
    .nav-a__toggle:checked ~ .nav-a__hamburger span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* The drawer itself — off-screen to the right by default */
    .nav-a__list--top {
        position: fixed;
        top: 0;
        right: 0;
        width: 78%;
        max-width: 320px;
        height: 100vh;
        background: #ffffff;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        padding: 80px 0 24px;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.28s ease;
        z-index: 200;
    }

    .nav-a__toggle:checked ~ .nav-a__list--top {
        transform: translateX(0);
    }

    /* Dark overlay behind the drawer */
    .nav-a__overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.28s ease, visibility 0.28s ease;
        z-index: 150;
    }

    .nav-a__toggle:checked ~ .nav-a__overlay {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    /* Lock body scroll region visually — links stack full width */
    .nav-a__list--top .nav-a__link {
        padding: 14px 24px;
        border-bottom: 1px solid #f0f0f0;
    }

    /* Children indented within the same list (no flyout on mobile) */
    .nav-a__submenu .nav-a__link {
        padding-left: 44px;
        background: #fafbfb;
        font-size: 0.95em;
    }
}

/* ─── Header layout: logo + nav ──────────────────────────────────────────── */

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.site-logo img {
    display: block;
    max-height: 48px;
    width: auto;
}

/* Mobile: logo centred above the nav */
@media (max-width: 767px) {
    .site-header__inner {
        flex-direction: column;
        gap: 12px;
        position: relative;
    }

    .site-logo {
        margin: 0 auto;
    }

    /* Hamburger sits top-right while the logo is centred */
    .site-header__inner .nav-a {
        position: static;
    }

    .nav-a__hamburger {
        position: absolute;
        top: 0;
        right: 0;
    }
}