/* ==========================================================================
   Header Styles
   ========================================================================== */

/* --- Site Header --- */
.site-header {
    background-color: var(--color-white, #ffffff);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 1px solid rgba(15, 27, 45, 0.06);
}

.site-header.is-sticky {
    padding: 0.45rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* --- Inner Container --- */
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.75rem, 1.4vw, 1.5rem);
    max-width: none;
    width: 100%;
    margin: 0 auto;
    padding-left: var(--container-pad-left, var(--container-padding, 1.5rem));
    padding-right: var(--container-pad-right, var(--container-padding, 1.5rem));
}

/* --- Logo --- */
.site-header__logo {
    flex: 0 0 auto;
}

.site-header__logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-header__logo img,
.site-header__logo .site-header__logo-img {
    max-height: 62px;
    width: auto;
    display: block;
}

.site-header__site-name {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-secondary, #1B2A4A);
    text-decoration: none;
}

/* --- Primary Navigation --- */
.site-header__nav {
    flex: 0 1 auto;
    display: flex;
    justify-content: flex-end;
    margin-left: auto;
    min-width: 0;
}

.site-header__nav .nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: clamp(1rem, 1.5vw, 1.8rem);
}

.nav-menu li a {
    color: var(--color-secondary, #1B2A4A);
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
    line-height: 1.2;
}

.nav-menu li a:hover {
    color: var(--color-primary, #00B4D8);
}

.nav-menu li.current-menu-item a,
.nav-menu li.current_page_item a {
    color: var(--color-primary, #00B4D8);
}

/* --- Actions --- */
.site-header__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    margin-left: 0.5rem;
    gap: 0.65rem;
}

/* --- Language Switcher --- */
.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.language-switcher__link {
    color: var(--color-text-light, #6B7280);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
    letter-spacing: 0.05em;
}

.language-switcher__link:hover {
    color: var(--color-primary, #00B4D8);
}

.language-switcher__link.is-active {
    color: var(--color-primary, #00B4D8);
}

/* --- CTA Button --- */
.site-header__cta {
    padding: 0.68rem 1.2rem;
    font-size: 0.92rem;
    white-space: nowrap;
    border-radius: 10px;
}

.site-header__mobile-cta-wrap {
    display: none;
}

.site-header__mobile-cta {
    display: none;
}

/* --- Large Tablet / Small Desktop --- */
@media (max-width: 1199px) {
    .site-header__logo img,
    .site-header__logo .site-header__logo-img {
        max-height: 56px;
    }

    .site-header__nav .nav-menu {
        gap: 0.95rem;
    }

    .nav-menu li a {
        font-size: 0.94rem;
    }

    .site-header__cta {
        padding: 0.62rem 1.1rem;
        font-size: 0.88rem;
    }
}

/* --- Hamburger Toggle --- */
.site-header__toggle {
    display: none;
    position: relative;
    color: var(--color-secondary, #1B2A4A);
    background: #ffffff;
    border: 1px solid rgba(26, 38, 52, 0.2);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    width: auto;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.68rem;
    gap: 0.46rem;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    box-shadow: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.site-header__toggle-label {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
    color: currentColor;
    transition: opacity 0.18s ease, max-width 0.2s ease, margin 0.2s ease;
    max-width: 4.8rem;
    overflow: hidden;
}

.site-header__toggle:hover,
.site-header__toggle:focus-visible {
    border-color: rgba(26, 38, 52, 0.48);
    color: var(--color-secondary, #1B2A4A);
    background: #f7fafc;
}

.site-header__toggle:focus-visible {
    outline: 2px solid rgba(0, 163, 166, 0.45);
    outline-offset: 2px;
}

.hamburger {
    display: block;
    width: 20px;
    height: 2.2px;
    background-color: currentColor;
    position: relative;
    border-radius: 999px;
    transition: background-color 0.22s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 20px;
    height: 2.2px;
    background-color: currentColor;
    position: absolute;
    left: 0;
    border-radius: 999px;
    transition:
        transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        top 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        left 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.22s ease;
}

.hamburger::before {
    top: -6px;
    width: 13px;
    left: 7px;
}

.hamburger::after {
    top: 6px;
    width: 16px;
    left: 0;
}

/* Hamburger X animation */
[aria-expanded="true"] .hamburger {
    background-color: transparent;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-label {
    opacity: 0;
    max-width: 0;
    margin-right: -0.18rem;
}

[aria-expanded="true"] .hamburger::before {
    top: 0;
    left: 0;
    width: 20px;
    transform: rotate(45deg);
}

[aria-expanded="true"] .hamburger::after {
    top: 0;
    left: 0;
    width: 20px;
    transform: rotate(-45deg);
}

/* --- Skip Link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-primary, #00B4D8);
    color: var(--color-white, #ffffff);
    padding: 0.5rem 1rem;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* --- Tablet + Mobile Navigation --- */
@media (max-width: 1024px) {
    .site-header {
        padding: 0.6rem 0;
    }

    .site-header__inner {
        gap: 0.65rem;
        padding-left: var(--container-pad-left, var(--container-padding, 1.5rem));
        padding-right: var(--container-pad-right, var(--container-padding, 1.5rem));
    }

    .site-header__logo img,
    .site-header__logo .site-header__logo-img {
        max-height: 52px;
    }

    .site-header__toggle {
        display: inline-flex;
        margin-left: auto;
        width: auto;
        min-width: 2.5rem;
        height: 2.5rem;
        padding: 0 0.68rem;
        align-items: center;
        justify-content: center;
    }

    .site-header__nav {
        display: flex;
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: min(88vw, 380px);
        background:
            linear-gradient(180deg, rgba(250, 253, 255, 0.98) 0%, rgba(241, 248, 252, 0.98) 100%);
        z-index: 1002;
        flex-direction: column;
        justify-content: flex-start;
        margin-left: 0;
        min-width: 0;
        padding: 5.3rem 1.15rem 1.2rem;
        transform: translateX(108%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.22s ease, visibility 0s linear 0.3s;
        box-shadow: -16px 0 34px rgba(7, 14, 23, 0.18);
        border-left: 1px solid rgba(0, 163, 166, 0.2);
        overflow-y: auto;
    }

    .site-header__nav.is-open {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: transform 0.3s ease, opacity 0.22s ease;
    }

    .site-header__nav::before {
        content: 'Menu';
        position: absolute;
        top: 1.2rem;
        left: 1.1rem;
        font-family: 'Montserrat', sans-serif;
        font-size: 0.84rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.11em;
        color: var(--color-primary, #00A3A6);
    }

    .site-header__nav .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0.42rem;
    }

    .site-header__nav .nav-menu li {
        width: 100%;
        border-bottom: 0;
    }

    .site-header__nav .nav-menu li a {
        display: block;
        width: 100%;
        padding: 0.78rem 0.84rem;
        font-size: 1.02rem;
        line-height: 1.34;
        border-radius: 10px;
        color: var(--color-secondary, #1B2A4A);
        background: rgba(255, 255, 255, 0.74);
        border: 1px solid rgba(15, 27, 45, 0.08);
        transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
    }

    .site-header__nav .nav-menu li a:hover,
    .site-header__nav .nav-menu li a:focus-visible {
        background: rgba(0, 163, 166, 0.12);
        border-color: rgba(0, 163, 166, 0.4);
        color: #0f2238;
    }

    .site-header__nav .nav-menu li.current-menu-item a,
    .site-header__nav .nav-menu li.current_page_item a {
        color: #ffffff;
        background: linear-gradient(140deg, #00a3a6 0%, #007f94 100%);
        border-color: transparent;
        box-shadow: 0 8px 18px rgba(0, 120, 138, 0.28);
    }

    .site-header__nav .nav-menu li a::after {
        content: '›';
        float: right;
        font-size: 1.05em;
        opacity: 0.66;
        transform: translateX(0);
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .site-header__nav .nav-menu li a:hover::after,
    .site-header__nav .nav-menu li a:focus-visible::after {
        opacity: 1;
        transform: translateX(3px);
    }

    .site-header.is-menu-open .site-header__toggle {
        position: fixed;
        top: 0.76rem;
        right: var(--container-pad-right, var(--container-padding, 1.5rem));
        z-index: 1003;
        width: 2.5rem;
        min-width: 2.5rem;
        padding: 0;
        gap: 0;
        border-color: rgba(0, 163, 166, 0.7);
        color: #ffffff;
        background: #0f2238;
        box-shadow: none;
    }

    .site-header.is-menu-open .hamburger,
    .site-header.is-menu-open .hamburger::before,
    .site-header.is-menu-open .hamburger::after {
        background-color: #ffffff;
    }

    .site-header__actions {
        display: none;
    }

    .site-header__mobile-cta-wrap {
        display: block;
        margin-top: 1rem;
        width: 100%;
        padding-top: 0.9rem;
        border-top: 1px solid rgba(15, 27, 45, 0.1);
    }

    .site-header__mobile-cta {
        display: inline-flex;
        width: 100%;
        align-items: center;
        justify-content: center;
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    body.menu-open {
        overflow: hidden;
    }
}

@media (max-width: 767px) {
    .site-header__logo img,
    .site-header__logo .site-header__logo-img {
        max-height: 46px;
    }

    .site-header__nav {
        width: 100%;
        max-width: 350px;
        padding: 4.75rem 0.92rem 1.25rem;
    }

    .site-header__nav .nav-menu li a {
        font-size: 0.98rem;
        padding: 0.72rem 0.74rem;
        border-radius: 9px;
    }

    .site-header__toggle {
        padding: 0 0.62rem;
        gap: 0.4rem;
    }

    .site-header__toggle-label {
        font-size: 0.7rem;
        letter-spacing: 0.07em;
    }

    .site-header__mobile-cta-wrap {
        margin-top: 0.85rem;
        padding-top: 0.76rem;
    }

    .site-header__mobile-cta {
        font-size: 0.86rem;
        padding: 0.64rem 0.86rem;
    }
}
