/* ── Header scroll animation ── */
.site-header {
    transition: background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header-inner {
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header--scrolled {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 6, 21, 0.08);
    border-color: rgba(69, 96, 130, 0.12);
}

.site-header--scrolled .site-header-inner {
    height: 4rem;
}

/* Desktop nav link underline animation */
.site-nav-link {
    position: relative;
}

.site-nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.site-nav-link--active::after,
.site-nav-link.border-b-2::after {
    display: none;
}

/* Hamburger → X animation */
.hamburger-line {
    display: block;
    width: 1.25rem;
    height: 2px;
    background: #000615;
    border-radius: 1px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.25s ease,
        margin 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-line + .hamburger-line {
    margin-top: 5px;
}

#mobile-menu-btn.is-open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#mobile-menu-btn.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#mobile-menu-btn.is-open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu panel */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease;
    border-top: 1px solid transparent;
}

.mobile-menu.is-open {
    max-height: 90vh;
    overflow-y: auto;
    opacity: 1;
    border-top-color: rgba(69, 96, 130, 0.1);
}

.mobile-menu-link {
    display: block;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #1A1A2E;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    opacity: 0;
    transform: translateY(-8px);
}

.mobile-menu.is-open .mobile-menu-link {
    animation: mobileLinkIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.mobile-menu.is-open .mobile-menu-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu.is-open .mobile-menu-link:nth-child(2) { animation-delay: 0.08s; }
.mobile-menu.is-open .mobile-menu-link:nth-child(3) { animation-delay: 0.11s; }
.mobile-menu.is-open .mobile-services { animation-delay: 0.14s; }
.mobile-menu.is-open .mobile-menu-link:nth-child(5) { animation-delay: 0.17s; }
.mobile-menu.is-open .mobile-menu-link:nth-child(6) { animation-delay: 0.2s; }

@keyframes mobileLinkIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-link:hover,
.mobile-menu-link--active {
    background-color: #f2f3f6;
    color: #b17d14;
}

.mobile-services {
    opacity: 0;
    transform: translateY(-8px);
}

.mobile-menu.is-open .mobile-services {
    animation: mobileLinkIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.14s forwards;
}

.mobile-services-toggle {
    transition: color 0.2s ease, background-color 0.2s ease;
}

.mobile-services-toggle .expand-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-services.is-expanded .expand-icon {
    transform: rotate(180deg);
}

.mobile-services-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-services.is-expanded .mobile-services-panel {
    max-height: 24rem;
}

.mobile-services-panel a {
    display: block;
    padding: 0.625rem 1rem 0.625rem 1.5rem;
    font-size: 13px;
    font-weight: 500;
    color: #44474d;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-services-panel a:hover,
.mobile-services-panel a.mobile-menu-link--active {
    background-color: #f2f3f6;
    color: #b17d14;
}

body.mobile-menu-open {
    overflow: hidden;
}

/* ── Mobile responsive utilities ── */
@media (max-width: 767px) {
    .py-section-padding-lg {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .text-display-lg {
        font-size: 28px !important;
        line-height: 36px !important;
    }

    .text-headline-lg {
        font-size: 24px !important;
        line-height: 32px !important;
    }

    /* Side support widget — smaller on mobile */
    #sideNavContent {
        max-width: calc(100vw - 2rem);
    }

    /* Prevent horizontal scroll from wide tables */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 639px) {
    .px-gutter {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .fixed.bottom-8.right-8 {
        bottom: 1rem;
        right: 1rem;
    }
}

/* Searchable country dropdown */
.country-search {
    position: relative;
    width: 100%;
}

.country-search-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.country-search-input {
    width: 100%;
}

.country-search-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 60;
    max-height: 240px;
    overflow-y: auto;
    margin: 0;
    padding: 0.375rem 0;
    list-style: none;
    background: #ffffff;
    border: 1px solid rgba(69, 96, 130, 0.15);
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 6, 21, 0.12);
}

.country-search-option {
    padding: 0.625rem 1rem;
    font-size: 16px;
    line-height: 24px;
    color: #191c1e;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.country-search-option:hover,
.country-search-option.is-active {
    background-color: #f2f3f6;
    color: #b17d14;
}

.country-search-empty {
    padding: 0.75rem 1rem;
    font-size: 14px;
    color: #75777e;
    cursor: default;
}
