
/* =====================================================
   ALANONA GLOBAL HEADER
   File: /assets/css/main-header.css
   ===================================================== */

.main-header,
.main-header * {
    box-sizing: border-box;
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid rgba(16, 45, 58, 0.08);
}

.header-container {
    width: min(1440px, 100%);
    min-height: 82px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}

/* BRAND */

.main-header .brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.main-header .brand img {
    display: block;
    width: auto;
    max-width: 155px;
    max-height: 48px;
    object-fit: contain;
}

/* NAVIGATION */

.main-header .main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 29px;
    flex: 1;
}

.main-header .main-nav > a,
.nav-dropdown > summary {
    position: relative;
    color: #263d48;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease;
}

.main-header .main-nav > a:hover,
.nav-dropdown > summary:hover,
.main-header .main-nav > a.active {
    color: #008b91;
}

.main-header .main-nav > a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;
    height: 2px;
    background: #008b91;
}

/* MORE DROPDOWN */

.nav-dropdown {
    position: relative;
}

.nav-dropdown > summary {
    display: flex;
    align-items: center;
    gap: 7px;
    list-style: none;
}

.nav-dropdown > summary::-webkit-details-marker {
    display: none;
}

.dropdown-arrow {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.nav-dropdown[open] .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown[data-active="true"] > summary {
    color: #008b91;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 22px);
    left: -18px;
    min-width: 215px;
    padding: 9px;
    background: #ffffff;
    border: 1px solid rgba(16, 45, 58, 0.09);
    border-radius: 10px;
    box-shadow: 0 12px 35px rgba(16, 45, 58, 0.12);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-menu a {
    display: block;
    padding: 11px 13px;
    color: #334a55;
    font-size: 13px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: #edf7f7;
    color: #008b91;
}

/* DESKTOP CTA */

.header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 12px 22px;
    background: #087e83;
    color: #ffffff;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.header-cta:hover {
    background: #065f64;
}

.mobile-nav-cta,
.mobile-menu-toggle {
    display: none;
}


/* =====================================================
   MOBILE NAVIGATION
   ===================================================== */

@media (max-width: 950px) {

    .header-container {
        min-height: 72px;
        padding: 0 22px;
        position: relative;
        flex-wrap: wrap;
        gap: 0;
    }

    .main-header .brand img {
        max-width: 140px;
        max-height: 43px;
    }

    /* BURGER BUTTON */

    .mobile-menu-toggle {
        display: flex;
        width: 42px;
        height: 42px;
        padding: 10px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: #102d3a;
        border-radius: 3px;
        transition: transform 0.25s ease, opacity 0.2s ease;
    }

    .mobile-menu-toggle[aria-expanded="true"] span:first-child {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle[aria-expanded="true"] span:last-child {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* MOBILE MENU PANEL */

    .main-header .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        padding: 14px 22px 22px;
        background: #ffffff;
        border-top: 1px solid #edf0f1;
        box-shadow: 0 14px 25px rgba(16, 45, 58, 0.10);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }

    .main-header .main-nav.is-open {
        display: flex;
    }

    .main-header .main-nav > a {
        display: block;
        padding: 14px 2px;
        font-size: 14px;
        border-bottom: 1px solid #f0f2f3;
    }

    .main-header .main-nav > a.active::after {
        display: none;
    }

    /* MOBILE MORE */

    .nav-dropdown {
        width: 100%;
        border-bottom: 1px solid #f0f2f3;
    }

    .nav-dropdown > summary {
        padding: 14px 2px;
        justify-content: space-between;
        font-size: 14px;
    }

    .dropdown-menu {
        position: static;
        min-width: 0;
        padding: 0 0 8px 13px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: #ffffff;
    }

    .dropdown-menu a {
        padding: 11px 12px;
        font-size: 13px;
    }

    /* MOBILE CTA */

    .header-cta {
        display: none;
    }

    .mobile-nav-cta {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-top: 18px;
        padding: 15px;
        background: #087e83;
        color: #ffffff !important;
        border-radius: 5px;
        font-size: 13px !important;
        font-weight: 600;
        text-align: center;
        text-decoration: none;
        border-bottom: 0 !important;
    }

    .mobile-nav-cta:hover {
        background: #065f64;
    }

}

@media (max-width: 380px) {

    .header-container {
        padding: 0 16px;
    }

    .main-header .main-nav {
        padding-left: 18px;
        padding-right: 18px;
    }

}
