/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
    z-index: 1000;
    background: #1f345c;
    border-bottom: 1px solid #162847;
    width: 100%;
}

.site-header__inner {
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* Top row — logo + right side */
.site-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    min-height: 95px;
}

/* Mobile utility row — hidden on desktop */
.site-header__utility--mobile {
    display: none;
}

/* Desktop utility row — shown on desktop */
.site-header__utility--desktop {
    display: flex;
}


/* ==========================================================================
   BRAND / LOGO
   ========================================================================== */

.site-header__brand a {
    display: flex;
    align-items: center;
}

.site-header__brand img {
    display: block;
    width: 300px;
    max-width: 100%;
    height: auto;
    padding-top: 0.25rem;
}


/* ==========================================================================
   RIGHT SIDE — utility + nav stacked
   ========================================================================== */

.site-header__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0.5rem 0;
}


/* ==========================================================================
   UTILITY BAR
   ========================================================================== */

.site-header__utility {
    align-items: center;
    gap: 0.75rem;
}

/* Language button */
.site-header__lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.site-header__lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.site-header__lang-btn svg {
    flex-shrink: 0;
    color: #fff;
}

/* Phone */
.site-header__phone {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.9rem;
    font-weight: 400;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    transition: all 0.2s ease;
}

.site-header__phone:hover {
    color: #d16725;
}


/* ==========================================================================
   NAV
   ========================================================================== */

.site-nav {
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.site-nav__list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: right;
}

/* Top level items */
.site-nav__list>li {
    position: relative;
    display: inline-block;
}

.site-nav__list>li>a {
    display: block;
    padding: 0.625rem 0.75rem 0.125rem;
    font-weight: 400;
    font-size: 1rem;
    color: #dde1e6;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.1s ease;
}

.site-nav__list>li>a:hover {
    color: #fff;
}

/* Last item no extra right padding */
.site-nav__list>li:last-of-type>a {
    padding-right: 0.2rem;
}

/* Active/current page */
.site-nav__list .current-menu-item>a,
.site-nav__list .current-page-ancestor>a {
    color: #fff;
}

/* Caret for top level items with children */
.site-nav__list>li.menu-item-has-children>a::after {
    content: "";
    display: inline-block;
    position: relative;
    top: -0.05em;
    left: 0.2em;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #dde1e6;
    border-radius: 2px;
    margin-right: 0.3rem;
    vertical-align: middle;
}

.site-nav__list>li.menu-item-has-children>a:hover::after {
    border-top-color: #fff;
}


/* ==========================================================================
   DROPDOWNS
   ========================================================================== */

.site-nav__list li {
    position: relative;
}

.site-nav__list .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1001;
    background: #1f345c;
    width: 15rem;
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.site-nav__list li:hover>.sub-menu,
.site-nav__list li.focus>.sub-menu {
    display: block;
}

/* Dropdown links */
.site-nav__list .sub-menu li {
    width: 100%;
}

.site-nav__list .sub-menu a {
    display: block;
    width: 100%;
    padding: 0.7rem 1.2rem;
    font-size: 1rem;
    font-weight: 400;
    color: #dde1e6;
    text-decoration: none;
    text-align: left;
    white-space: normal;
    transition: all 0.1s ease;
}

.site-nav__list .sub-menu a:hover {
    background: #b85619;
    color: #fff;
}

/* Nested sub-menu (3rd level) */
.site-nav__list .sub-menu .sub-menu {
    top: 0;
    left: 100%;
}

/* Right-pointing caret for sub-menu items with children */
.site-nav__list .sub-menu .menu-item-has-children>a::after {
    content: "";
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid #fff;
    border-radius: 2px;
}


/* ==========================================================================
   HAMBURGER
   ========================================================================== */

.site-nav__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.site-nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

/* Hamburger → X */
.site-nav__toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-nav__toggle.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.site-nav__toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 768px) {

    .site-header__top {
        padding: 0.75rem 1rem;
        min-height: unset;
    }

    .site-header__brand img {
        width: 200px;
    }

    /* Right side — row on mobile */
    .site-header__right {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        padding: 0;
    }

    /* Hide desktop utility bar */
    .site-header__utility--desktop {
        display: none;
    }

    /* Show mobile utility bar when at top */
    .site-header__utility--mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        padding: 0.5rem 1rem 0.6rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        transition: opacity 0.2s ease, max-height 0.2s ease;
        overflow: hidden;
        max-height: 60px;
        opacity: 1;
    }

    /* Hide mobile utility bar when sticky */
    .site-header.is-scrolled .site-header__utility--mobile {
        max-height: 0;
        opacity: 0;
        padding: 0;
        border: none;
    }

    .site-header__phone {
        font-size: 1.405rem;
        background: #b85619;
        border-radius: 4px;
        padding: 0.3rem 0.85rem;
    }

    .site-header__phone:hover {
        background: #9e4a15;
        color: #fff;
    }

    /* Show hamburger */
    .site-nav__toggle {
        display: flex;
    }

    /* Hide nav by default on mobile */
    .site-nav {
        display: none;
        position: fixed;
        left: 0;
        right: 0;
        background: #f9f9f9;
        border-top: 1px solid #e5e7eb;
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        overflow-y: auto;
        box-shadow: rgba(0, 0, 0, 0.27) 0px 0px 10px;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav__list {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        text-align: left;
    }

    .site-nav__list li {
        width: 100%;
    }

    .site-nav__list>li>a {
        padding: 0.75rem 0.5rem;
        width: 100%;
        font-size: 1rem;
        color: #1f345c;
        border-bottom: 1px solid #e5e7eb;
    }

    .site-nav__list>li>a:hover {
        color: #b85619;
    }

    /* Override active/current page colors on mobile */
    .site-nav__list .current-menu-item>a,
    .site-nav__list .current-page-ancestor>a {
        color: #1f345c;
    }

    .site-nav__list .current-menu-item>a:hover,
    .site-nav__list .current-page-ancestor>a:hover {
        color: #b85619;
    }

    /* Mobile dropdowns — stacked */
    .site-nav__list .sub-menu {
        display: block;
        position: static;
        box-shadow: none;
        border: none;
        width: 100%;
        background: transparent;
        padding: 0 0 0 1rem;
    }

    .site-nav__list .sub-menu a {
        color: #374151;
        border-left: none;
        border-bottom: 1px solid #e5e7eb;
        font-weight: 400;
        padding: 0.6rem 0.5rem;
    }

    .site-nav__list .sub-menu a:hover {
        color: #b85619;
        background: transparent;
    }

    .site-nav__list .sub-menu .sub-menu {
        left: 0;
        padding-left: 1rem;
    }

    /* Hide carets on mobile */
    .menu-item-has-children>a::after {
        display: none !important;
    }

    /* Accordion toggle button */
    .nav-accordion-btn {
        position: absolute;
        right: 0;
        top: 0;
        width: 44px;
        height: 44px;
        background: none;
        border: none;
        border-left: 1px solid #e5e7eb;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #1f345c;
        font-size: 1.5rem;
        font-weight: 300;
        line-height: 1;
        flex-shrink: 0;
    }

    .nav-accordion-btn:hover {
        background: #f0f0f0;
        color: #b85619;
    }

    /* Hide sub-menus by default on mobile */
    .site-nav__list>li.menu-item-has-children>.sub-menu {
        display: none;
    }

    /* Show sub-menu when parent is open */
    .site-nav__list>li.menu-item-has-children.nav-open>.sub-menu {
        display: block;
    }
}


/* ==========================================================================
   TRANSPARENT HEADER — always sits on top of banner
   ========================================================================== */

.site-header {
    position: absolute;
    background: #1f345c;
    border-bottom: 1px solid #162847;
    width: 100%;
}

/* Goes fixed + solid on scroll */
.site-header.is-scrolled {
    position: fixed;
    background: #1f345c;
    border-bottom: 1px solid #162847;
    transition: background 0.3s ease;
}

/* Transparent when banner has image */
.has-banner-image .site-header {
    background: transparent;
    border-bottom: none;
}

.has-banner-image .site-header.is-scrolled {
    background: #1f345c;
    border-bottom: 1px solid #162847;
}