#masthead {
    z-index: 10;
}

.header-nav {
    font-family: 'Work Sans', sans-serif !important;
}

/* If menu is on the left and CTA on the right */
.header-inner > *:first-child {
    position: absolute;
    left: 24px;
}

.header-inner > *:last-child {
    position: absolute;
    right: 4px;
}

.header-inner {
    height: 56px;
    padding: 4px;
    justify-content: center;


    .header-nav .collapse-item:focus {
        outline: none;
    }

    .header-nav .dropdown-items {
        margin-left: -24px;
        margin-top: 16px;
        width: 407px;
        padding: 24px 40px 24px 24px;
        font-size: 16px;
        font-weight: 600;
        line-height: 24px;
    }

    .header-nav .dropdown-items a +a  {
        margin-top: 12px;
    }

    .header-cta {
        border-radius: 2px;
    }
}

.header-cta .btn {
    padding: 12px 32px;
}

/* ── EN site-specific layout ────────────────────────────────────────────── */
/* Applies only when body has .site-en — does not affect the Spanish site    */

/* Container-xl: replicates Bootstrap behaviour in case CDN fails to load    */
.site-en #masthead > .container-xl {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 1400px) {
    .site-en #masthead > .container-xl {
        max-width: 1320px;
    }
}

/* EN header height: 80px per production design */
.site-en .header-inner {
    height: 80px;
}

/* EN teal banner strip: fixed 32px height keeps the dropdown alignment stable */
.site-en .header-en-banner {
    height: 32px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 14px;
}

/* CTA button: fills the full height of header-inner, flush to the edge */
.site-en .header-inner > *:last-child {
    top: 0;
    bottom: 0;
    right: 0;      /* override right: 4px from base CSS */
    height: auto;  /* top + bottom determine the height */
}

/* EN CTA: relative positioning for the teal background pseudo-element */
.site-en .header-inner .header-cta {
    position: relative;
    z-index: 1;
}

/* EN CTA teal background that extends the button to the viewport edge */
.site-en .header-inner .header-cta::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 100%;
    right: 0 !important;
    background: var(--bs-secondary-500);
    z-index: -1;
}

@media (min-width: 992px) {
    .site-en .header-inner .header-cta::after {
        left: 0;
        right: 0;
    }
}

/* header-cta stretches on its own (global-en stays centered) */
.site-en .header-cta {
    align-self: stretch;
    display: flex !important;
    align-items: stretch;
    border-radius: 0 !important;
}

.site-en .header-cta > a.btn {
    height: 100%;
    border-radius: 0;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Mega menu arrows: vertical indicator adjustment only */
.site-en .mega-menu-item > a.mega-menu-link .mega-indicator {
    vertical-align: middle;
    display: inline-block;
    line-height: 1;
    margin-top: -2px;
}

#mega-menu-wrap-main_header #mega-menu-main_header li.mega-menu-item-has-children > a.mega-menu-link > span.mega-indicator {
    content: "";
    font-family: dashicons;
    font-weight: normal;
    display: inline-block;
    margin: 0;
    vertical-align: top;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: rotate(0);
    color: inherit;
    position: relative;
    background: transparent;
    height: auto;
    width: auto;
    right: auto;
    line-height: inherit;
}

.header-en-banner {
    padding: 6px 0;
    font-size: 14px;
    font-style: italic;
    font-weight: 600;
    line-height: 20px;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: 10%;
    text-underline-offset: auto;
    text-underline-position: from-font;
    color: var(--bs-black) !important;
}

.header-en-banner a {
    color: var(--bs-black);
}

.collapsing {
  transition: height 0.9s ease-in-out !important;
  overflow: hidden;
}

.dropdown-items.collapse.show {
  transition: height 0.9s ease-in-out !important;
}

.header-phone-text {
    position: relative;
    display: inline-block;
    overflow: hidden;
    line-height: 1.2;
}

.header-phone-text span {
    display: block;
    transition: transform 0.3s ease;
    white-space: nowrap;
}

.header-phone-text span:last-child {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
}

/* Hover */
.btn:hover .header-phone-text span:first-child {
    transform: translateY(-100%);
}

.btn:hover .header-phone-text span:last-child {
    transform: translateY(-100%);
}

li.mega-menu-item > a.mega-menu-link:active,
li.mega-menu-item > a.mega-menu-link:focus {
    color: var(--bs-black) !important;
}

.global-en {
    .global-link:visited {
        color: var(--bs-secondary-500);
    }

    .global-link {
        text-decoration: none;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 5px;
        color: var(--bs-secondary-500);
    }

    .global-link svg {
        width: 20px;
        height: 20px;
    }

    .global-link:hover {
        color: var(--bs-main-500)
    }

    .lang-label {
        font-size: 18px;
        line-height: 20px;
    }
}


@media screen and (max-width: 1400px) and (min-width: 992px) {
    .menu-wrapper {
        gap: 8px !important;
    }

    .hero-title {
        font-size: 64px !important;
        line-height: 72px !important;
    }

    .hero-character {
        width: 360px !important;
    }

    .hero-logos {
        gap: 4px !important;
    }

    .dropdown a {
        gap: 0 !important;
    }
}


.logo-desktop {
    max-height: 45px;
}

.mobile-header-wrapper {
    z-index: 1050;
}
