/**
 * Ajustes finales de jerarquía y utilidades para las cabeceras V2.
 */

.et-l--header:has(#mega-menu-wrap-max_mega_menu_1) .os-header-v2__brand h5 {
    font-size: clamp(21px, 1.67vw, 25px) !important;
}

.et-l--header:has(#mega-menu-wrap-max_mega_menu_1) .os-header-v2__brand .et_pb_text_inner {
    font-size: 13px !important;
}

.et-l--header:has(#mega-menu-wrap-max_mega_menu_1) .os-header-v2__nav-group {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    justify-content: stretch !important;
}

.et-l--header:has(#mega-menu-wrap-max_mega_menu_1) .os-header-v2__nav-group > .maxmegamenu_location {
    min-width: 0;
    border-right: 0 !important;
}

.os-header-v2__main-tools {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    min-height: 44px;
    padding-left: 16px;
    border-left: 1px solid var(--os-v2-line);
}

.os-header-v2__main-tools .os-header-v2__language {
    gap: 9px;
    color: var(--os-v2-muted);
    font-size: 13px;
    font-weight: 600;
}

.os-header-v2__main-tools .os-header-v2__language [aria-current="page"] {
    color: var(--os-v2-ink);
    font-weight: 750;
}

.os-header-v2--transparent:not(.is-scrolled) .os-header-v2__main-tools {
    border-left-color: rgba(255, 255, 255, 0.32);
}

.os-header-v2--transparent:not(.is-scrolled) .os-header-v2__main-tools .os-header-v2__language {
    color: rgba(255, 255, 255, 0.62);
}

.os-header-v2--transparent:not(.is-scrolled) .os-header-v2__main-tools .os-header-v2__language [aria-current="page"] {
    color: var(--os-v2-paper);
}

#mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__emergency > a.mega-menu-link {
    border: 1px solid transparent;
    background: transparent !important;
    box-shadow: none;
    color: var(--os-v2-paper);
    transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms var(--os-v2-ease-out);
}

#mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__emergency > a.mega-menu-link:active,
#mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__emergency > a.mega-menu-link:focus-visible {
    border-color: rgba(255, 255, 255, 0.24);
    background: var(--os-v2-accent) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

@media (hover: hover) and (pointer: fine) {
    #mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__emergency > a.mega-menu-link:hover {
        border-color: rgba(255, 255, 255, 0.24);
        background: var(--os-v2-accent) !important;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
        filter: none;
    }
}

#mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__trip > a.mega-menu-link {
    font-weight: 750;
    transition: background-color 150ms ease, color 150ms ease, transform 150ms var(--os-v2-ease-out);
}

#mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__trip > a.mega-menu-link:active,
#mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__trip > a.mega-menu-link:focus-visible {
    background: var(--color-verde-bosque, #2E6B3A) !important;
    color: var(--os-v2-paper, #fff) !important;
}

@media (hover: hover) and (pointer: fine) {
    #mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__trip > a.mega-menu-link:hover {
        background: var(--color-verde-bosque, #2E6B3A) !important;
        color: var(--os-v2-paper, #fff) !important;
    }
}

.os-header-v2__socials {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.os-header-v2__social-link {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff !important;
    text-decoration: none;
    transition: background-color 140ms ease, color 140ms ease, transform 140ms var(--os-v2-ease-out);
}

.os-header-v2__social-link svg {
    display: block;
    width: 20px;
    height: 20px;
}

.os-header-v2__social-link--instagram svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.os-header-v2__social-link--facebook svg {
    fill: currentColor !important;
}

.os-header-v2__social-link--google svg {
    overflow: visible;
    color: #fff !important;
}

.os-header-v2__social-link--google text {
    fill: currentColor !important;
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.os-header-v2__social-link:focus-visible {
    outline: 3px solid var(--os-v2-paper);
    outline-offset: 1px;
    background: rgba(255, 255, 255, 0.14);
    color: var(--os-v2-paper);
}

.os-header-v2__social-link:active {
    transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
    .os-header-v2__social-link:hover {
        background: rgba(255, 255, 255, 0.12);
        color: var(--os-v2-paper);
    }
}

.et_pb_scroll_top.et-pb-icon {
    background: rgba(51, 51, 51, 0.58) !important;
    color: var(--os-v2-paper, #fff) !important;
    transition: background-color 150ms ease, opacity 150ms ease, transform 150ms var(--os-v2-ease-out) !important;
}

.et_pb_scroll_top.et-pb-icon:focus-visible {
    outline: 3px solid var(--os-v2-paper, #fff);
    outline-offset: -5px;
    background: rgba(232, 101, 26, 0.84) !important;
}

.et_pb_scroll_top.et-pb-icon:active {
    transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
    .et_pb_scroll_top.et-pb-icon:hover {
        background: rgba(232, 101, 26, 0.84) !important;
    }
}

@media (max-width: 1120px) {
    .et-l--header:has(#mega-menu-wrap-max_mega_menu_1) .os-header-v2__nav-group {
        grid-template-columns: auto auto;
        gap: 10px;
        width: auto !important;
    }

    .et-l--header:has(#mega-menu-wrap-max_mega_menu_1) .os-header-v2__nav-group > .maxmegamenu_location {
        width: auto !important;
    }

    .os-header-v2__main-tools {
        min-height: 38px;
        padding-left: 10px;
    }

    .os-header-v2__main-tools .os-header-v2__language {
        gap: 7px;
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    .et-l--header:has(#mega-menu-wrap-max_mega_menu_1) .os-header-v2__main-row {
        gap: 8px;
        width: calc(100% - 24px) !important;
    }

    .et-l--header:has(#mega-menu-wrap-max_mega_menu_1) .os-header-v2__logo-column {
        min-width: 0;
    }

    .et-l--header:has(#mega-menu-wrap-max_mega_menu_1) .os-header-v2__nav-group {
        position: static !important;
        display: block !important;
        width: 0 !important;
    }

    .et-l--header:has(#mega-menu-wrap-max_mega_menu_1) .os-header-v2__nav-group > .maxmegamenu_location {
        position: absolute !important;
        top: 14px;
        right: 84px;
        width: 48px !important;
    }

    .os-header-v2__main-tools {
        position: absolute;
        top: 16px;
        right: 0;
        min-height: 44px;
        padding-left: 8px;
    }

    .os-header-v2__main-tools .os-header-v2__language {
        gap: 5px;
        font-size: 11px;
    }

    .et-l--header:has(#mega-menu-wrap-max_mega_menu_1) .os-header-v2__topbar-row,
    .et-l--header:has(#mega-menu-wrap-max_mega_menu_1) .os-header-v2__top-grid,
    .os-header-v2__utility-menu,
    #mega-menu-wrap-max_mega_menu_2,
    #mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .os-header-v2__top-grid--menu .os-header-v2__top-right {
        right: 0;
        display: flex !important;
    }

    #mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__trip {
        right: 38px;
        left: auto;
    }
    .et-l--header:has(#mega-menu-wrap-max_mega_menu_1) .os-header-v2__brand h5 {
        font-size: 21px !important;
    }

    .et-l--header:has(#mega-menu-wrap-max_mega_menu_1) .os-header-v2__brand .et_pb_text_inner {
        font-size: 11px !important;
    }

    .os-header-v2__socials {
        display: none;
    }

    .os-header-v2__main-tools .os-header-v2__language [aria-disabled="true"] {
        display: inline;
    }
}

@media (prefers-reduced-motion: reduce) {
    .os-header-v2__social-link,
    .et_pb_scroll_top.et-pb-icon,
    #mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__emergency > a.mega-menu-link {
        transition-duration: 0.01ms !important;
    }
}

/*
 * Emergencias y Mi Viaje se desplazan como un único bloque: se conserva el
 * hueco entre ambos y el centro de ese hueco coincide con el centro óptico.
 */
#mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__emergency > a.mega-menu-link,
#mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__trip > a.mega-menu-link {
    position: relative;
}

#mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__emergency > a.mega-menu-link::after,
#mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__trip > a.mega-menu-link::after {
    position: absolute;
    inset: -4px 0;
    content: "";
}

@media (min-width: 641px) and (max-width: 919px) {
    #mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__trip {
        left: max(50%, 500.8px);
        transform: translateX(-50%);
    }

    #mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__emergency {
        left: max(calc(25% + 81.2px), 332.2px);
    }
}

@media (min-width: 920px) {
    #mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 {
        --os-v2-pair-half-gap: max(11.7px, calc(11.25% - 101.25px));
    }

    #mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__emergency {
        left: calc(50% - 89.25px - var(--os-v2-pair-half-gap));
    }

    #mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__trip {
        left: calc(50% + 55.9px + var(--os-v2-pair-half-gap));
        transform: translateX(-50%);
    }
}

@media (max-width: 640px) {
    #mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__emergency {
        left: calc(50% - 88.65px);
    }

    #mega-menu-wrap-max_mega_menu_2 #mega-menu-max_mega_menu_2 > li.os-top-v2__trip {
        right: auto;
        left: calc(50% + 37.15px);
        transform: translateX(-50%);
    }
}
