/*
 * AGB Cargo V71
 * Restaurar header anterior y corregir SOLO:
 * - doble logo al cargar
 * - luz/resplandor del logo por CSS
 * - hamburguesa móvil
 */

/* =========================================================
   1) Logo: no glow, no luz, no doble logo
   ========================================================= */

html body .site-header .brand,
html body .site-header .brand img,
html body .brand,
html body .brand img,
html body img.brand-logo,
html body .footer__logo,
html body .footer__brand-badge img {
    filter: none !important;
    -webkit-filter: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    text-shadow: none !important;
    mix-blend-mode: normal !important;
    background: transparent !important;
}

html body .site-header .brand::before,
html body .site-header .brand::after,
html body .brand::before,
html body .brand::after,
html body .footer__brand-badge::before,
html body .footer__brand-badge::after {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    box-shadow: none !important;
    filter: none !important;
}

html body .site-header .brand img.brand-logo--main,
html body .brand img.brand-logo--main {
    opacity: 1 !important;
    visibility: visible !important;
}

html body .site-header .brand img.brand-logo--scrolled,
html body .brand img.brand-logo--scrolled {
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

html body .site-header.is-scrolled .brand img.brand-logo--main,
html body.inner-page .site-header .brand img.brand-logo--main {
    opacity: 0 !important;
    visibility: hidden !important;
}

html body .site-header.is-scrolled .brand img.brand-logo--scrolled,
html body.inner-page .site-header .brand img.brand-logo--scrolled {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Si algún CSS antiguo usa variables con drop-shadow */
:root {
    --site-logo-filter: none !important;
    --logo-shadow: none !important;
    --logo-filter: none !important;
    --header-logo-shadow: none !important;
}

/* =========================================================
   2) Menú móvil: usa la estructura original
   ========================================================= */

@media (max-width: 991px) {
    body.agb-mobile-menu-open {
        overflow: hidden !important;
    }

    html body .site-header {
        z-index: 9999 !important;
    }

    html body .nav-toggle {
        display: flex !important;
        position: relative !important;
        z-index: 10002 !important;
        cursor: pointer !important;
        pointer-events: auto !important;
    }

    html body .nav-toggle span {
        transition: transform .22s ease, opacity .22s ease !important;
    }

    html body.agb-mobile-menu-open .nav-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg) !important;
    }

    html body.agb-mobile-menu-open .nav-toggle span:nth-child(2) {
        opacity: 0 !important;
    }

    html body.agb-mobile-menu-open .nav-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg) !important;
    }

    html body .site-header .main-nav {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        top: 100% !important;
        display: none !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 4px !important;
        background: #fff !important;
        padding: 14px !important;
        border-radius: 0 0 24px 24px !important;
        border: 1px solid rgba(8, 40, 63, .10) !important;
        box-shadow: 0 22px 45px rgba(8, 40, 63, .16) !important;
        max-height: calc(100vh - 86px) !important;
        overflow-y: auto !important;
        z-index: 10001 !important;
    }

    html body .site-header .main-nav.is-open,
    html body.agb-mobile-menu-open .site-header .main-nav {
        display: flex !important;
    }

    html body .site-header .main-nav .nav-link,
    html body .site-header .main-nav .nav-link--parent,
    html body .site-header .main-nav .nav-link-group,
    html body .site-header .main-nav .dropdown-trigger {
        color: var(--navy, #08283f) !important;
        text-shadow: none !important;
    }

    html body .site-header .main-nav .nav-link,
    html body .site-header .main-nav .nav-link--parent {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        padding: 14px 16px !important;
        border-radius: 14px !important;
        background: transparent !important;
        font-size: 16px !important;
        font-weight: 800 !important;
    }

    html body .site-header .main-nav .nav-link-group {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        justify-content: space-between !important;
        border-radius: 14px !important;
    }

    html body .site-header .main-nav .nav-link-group .nav-link {
        flex: 1 1 auto !important;
    }

    html body .site-header .main-nav .dropdown-trigger {
        flex: 0 0 42px !important;
        width: 42px !important;
        height: 42px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #eff5fa !important;
        border-radius: 50% !important;
        border: 0 !important;
        cursor: pointer !important;
        margin-right: 6px !important;
    }

    html body .site-header .main-nav .dropdown-menu {
        position: static !important;
        display: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        padding: 6px 0 4px 18px !important;
        box-shadow: none !important;
        border: 0 !important;
        min-width: 100% !important;
        background: #fff !important;
    }

    html body .site-header .main-nav .dropdown.is-open .dropdown-menu {
        display: grid !important;
    }

    html body .site-header .main-nav .dropdown-menu a {
        color: #23384a !important;
        background: #fff !important;
        padding: 12px 16px !important;
        border-radius: 14px !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        text-decoration: none !important;
    }

    html body .site-header .main-nav .dropdown-menu a:hover,
    html body .site-header .main-nav .dropdown-menu a.is-current {
        background: #f2f7fb !important;
        color: var(--theme-accent, var(--red, #cd6a33)) !important;
    }

    html body .site-header .main-nav .nav-link:hover,
    html body .site-header .main-nav .nav-link.is-active,
    html body .site-header .main-nav .nav-link-group.is-active .nav-link,
    html body .site-header .main-nav .dropdown.is-open > .nav-link-group .nav-link,
    html body .site-header .main-nav .dropdown.is-open > .nav-link-group .dropdown-trigger {
        color: var(--theme-accent, var(--red, #cd6a33)) !important;
        background: transparent !important;
    }

    .agb-v71-backdrop {
        position: fixed;
        inset: 0;
        z-index: 9990;
        background: rgba(8, 40, 63, .45);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    body.agb-mobile-menu-open .agb-v71-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (min-width: 992px) {
    .agb-v71-backdrop {
        display: none !important;
    }
}
