:root {
    --ai-timing: cubic-bezier(0.65, 0, 0.35, 1);
    --ai-speed: 0.6s;
    --ai-nav-w: 500px;
    --ai-photo-w: 400px;
    --ai-photo-overlap: 150px;
    --ai-max-w: 1200px;
    --ai-margin: 30px;
}

.ai-menu-wrapper * {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

.ai-back-arrow {
    display: none;
    width: 20px;
    height: 20px;
    color: rgba(50, 50, 50, 1);
    cursor: pointer;
}

.ai-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 40px 0 40px;
    z-index: 20000;
}

.ai-header-container {
    width: 100%;
    max-width: var(--ai-max-w);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-logo-container {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    flex-shrink: 0;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Soporte para el SVG negro que se subirá */
.ai-logo-container svg, 
.ai-logo-container img {
    width: 100%;
    height: 100%;
    display: block;
    transition: filter 0.3s ease;
}

.ai-company-name {
    font-family: 'euclid_circular_asemibold';
    font-size: 20px;
    line-height: 24px;
    letter-spacing: 0.25px;
    color: rgba(50, 50, 50, 1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease, color 0.3s ease;
}

.ai-company-name.scrolled {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ai-dual-badge {
    position: fixed;
    top: 30px;
    right: calc((100vw - var(--ai-max-w)) / 2);
    z-index: 30000;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    border: none;
    padding: 0;
    height: 54px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: opacity 0.4s ease, visibility 0.4s ease;
    transform: translateY(-25%);
    overflow: hidden;
}

.has-open .ai-dual-badge {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ai-badge-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 25px;
    height: 100%;
    transition: all 0.3s ease;
}

.ai-badge-contact {
    border-top-left-radius: 50px;
    border-bottom-left-radius: 50px;
    color: rgba(50, 50, 50, 1);
}

.ai-badge-menu {
    border-top-right-radius: 50px;
    border-bottom-right-radius: 50px;
}

.ai-badge-text {
    font-family: 'euclid_circular_asemibold';
    font-size: 11px;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-badge-icon-svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: fill 0.3s ease;
}

.ai-badge-divider {
    width: 1px;
    height: 24px;
    background: rgb(235, 235, 235);
    flex-shrink: 0;
}

.ai-badge-contact:hover {
    background: rgba(50, 50, 50, 1);
    color: #fff;
}

.ai-badge-menu:hover {
    background: rgba(50, 50, 50, 1);
    color: #fff;
}

.ai-hamburger-lines {
    display: none;
}

.ai-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    visibility: hidden;
    z-index: 15000;
    transition: visibility 0s linear var(--ai-speed);
}

.ai-overlay.is-open {
    visibility: visible;
    transition-delay: 0s;
}

.ai-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    opacity: 0;
    transition: opacity var(--ai-speed) var(--ai-timing);
}

.is-open .ai-backdrop {
    opacity: 1;
}

.ai-panels {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    display: flex;
    transform: translateX(100%);
    transition: transform var(--ai-speed) var(--ai-timing);
}

.is-open .ai-panels {
    transform: translateX(0);
}

.ai-nav-panel {
    width: var(--ai-nav-w);
    height: 100%;
    background: #fff;
    position: relative;
    z-index: 100;
    border-bottom-left-radius: 150px;
    pointer-events: auto !important;
}

.ai-scroll-area {
    padding: 80px 40px 40px var(--ai-margin);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ai-link-main.is-active {
    color: #ff00dd;
    pointer-events: none;
    cursor: default;
}

.ai-sec-group {
    padding-top: 15px;
}

.ai-social-row {
    margin-top: 60px;
    display: flex;
    gap: 30px;
    align-items: center;
}

.ai-social-icon {
    color: #111;
    transition: opacity 0.3s;
}

.ai-photo-panel {
    width: var(--ai-photo-w);
    height: 100%;
    background: transparent;
    position: relative;
    z-index: 5;
    margin-right: calc(var(--ai-photo-overlap) * -1); 
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.4s var(--ai-timing), opacity 0.4s var(--ai-timing);
    pointer-events: none !important;
}

.ai-countries-panel, .ai-photo-panel {
    z-index: 10;
    pointer-events: none; 
}

.ai-photo-panel.show {
    transform: translateX(calc(var(--ai-photo-overlap) * -1));
    opacity: 1;
}

.ai-photo-inner {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 1;
}

.ai-link-country {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #323232;
    margin-bottom: 15px;
    margin-right: 20px;
}

.ai-link-country img {
    width: 24px;
    height: 24px;
    object-fit: cover;
    vertical-align: middle;
}

.ai-link-country span {
    font-family: 'euclid_circular_asemibold';
    font-size: 14px;
    letter-spacing: -0.25px;
    padding-left: 10px;
}

.menu_principal {
    font-family: 'euclid_circular_abold';
    font-size: 18px;
    line-height: 0.8;
    letter-spacing: 0px;
    color: rgba(50, 50, 50, 1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: block;
    width: 100%;
    padding: 9px 0;
    text-decoration: none;
    transition: all 0.3s ease; 
}

.menu_secundario {
    font-family: 'Open Sans';
    font-size: 13px;
    line-height: 0.8;
    letter-spacing: 0px;
    color: rgba(50, 50, 50, 1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: block;
    width: 100%;
    padding: 7px 0;
    text-decoration: none;
    transition: all 0.3s ease; 
}

.ai-countries-panel {
    width: var(--ai-photo-w);
    height: 100%;
    background: rgb(245, 245, 245);
    position: relative;
    z-index: 10;
    margin-right: calc(var(--ai-photo-overlap) * -1);
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.4s var(--ai-timing), opacity 0.4s var(--ai-timing);
    pointer-events: none;
}

.ai-countries-panel.show {
    transform: translateX(0); 
    opacity: 1;
    pointer-events: auto !important;
    visibility: visible;
}

.ai-countries-inner {
    width: 270px;
    height: 100%;
    padding: 95px 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    z-index: 20;
}

.ai-photo-panel, .ai-countries-panel {
    position: absolute;
    top: 0;
    right: 0; 
    height: 100%;
    width: var(--ai-photo-w);
    z-index: 10;
    margin-right: calc(var(--ai-nav-w) - var(--ai-photo-overlap));
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.4s var(--ai-timing), opacity 0.4s var(--ai-timing);
    pointer-events: none;
}

.ai-photo-panel.show, .ai-countries-panel.show {
    transform: translateX(0); 
    opacity: 1;
}

.ai-link-country {
    display: block;
    color: #323232;
    text-decoration: none;
    font-family: 'euclid_circular_asemibold';
    font-size: 18px;
    z-index: 30;
    padding-bottom: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(215, 215, 215, 1);
}

.ai-link-country:last-child {
    border-bottom: none;
}










@media (max-width: 1200px) {
    .ai-header {
        padding: 0 20px !important;
    }

    .ai-header-container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .ai-logo-container {
        margin-top: 5px;
    }

    .ai-brand {
        margin-left: 0 !important;
        gap: 12px;
    }

    .ai-company-name {
        font-family: 'euclid_circular_asemibold';
        font-size: 18px;
        line-height: 24px;
        letter-spacing: -0.25px;
        color: rgba(50, 50, 50, 1);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        margin-top: 5px;
        transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease, color 0.3s ease;
    }

    .ai-dual-badge {
        display: flex;
        padding: 0 18px;
        gap: 18px;
        right: 20px;
        top: 25px;
        height: 54px;
        align-items: center;
        justify-content: center;
        pointer-events: auto;
        transform: translateY(-25%);
        overflow: visible;
        width: auto;
        background: #fff;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .has-open .ai-dual-badge {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        background: transparent;
        box-shadow: none;
    }

    .ai-badge-contact {
        padding: 0;
        order: 1;
        transition: opacity 0.3s ease;
    }

    .has-open .ai-badge-contact {
        opacity: 0;
        pointer-events: none;
    }

    .ai-badge-text, 
    .ai-badge-divider {
        display: none !important;
    }

    .ai-badge-section:hover {
        background: transparent !important;
        color: inherit !important;
    }

    .ai-badge-menu {
        padding: 0;
        order: 2;
    }

    .ai-hamburger-lines {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 18px;
    }

    .ai-hamburger-lines span {
        display: block;
        width: 100%;
        height: 2px;
        background: rgba(50, 50, 50, 1);
        transition: all 0.3s ease;
    }

    .has-open .ai-hamburger-lines span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .has-open .ai-hamburger-lines span:nth-child(2) {
        opacity: 0;
    }
    .has-open .ai-hamburger-lines span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .ai-nav-panel {
        width: 100vw;
        border-bottom-left-radius: 0 !important;
        transition: transform var(--ai-speed) var(--ai-timing);
    }

    .submenu-active .ai-nav-panel {
        transform: translateX(-100%);
    }

    .ai-countries-panel {
        display: block !important;
        width: 100vw !important;
        background: rgb(35, 35, 35) !important;
        position: fixed !important;
        top: 0;
        right: 0;
        margin-right: 0 !important;
        transform: translateX(100%);
        transition: transform var(--ai-speed) var(--ai-timing) !important;
        z-index: 1000;
        opacity: 1 !important;
    }

    .submenu-active .ai-countries-panel {
        transform: translateX(0);
        pointer-events: auto !important;
    }

    .ai-countries-inner {
        width: 100% !important;
        padding: 80px 20px 40px 20px !important;
        gap: 0 !important;
    }

    .submenu-active .ai-hamburger-lines {
        display: none !important;
    }

    .submenu-active .ai-back-arrow {
        display: block !important;
        color: rgb(255, 255, 255) !important;
    }

   /* Inversión del SVG negro a blanco */
    .submenu-active .ai-logo-container svg,
    .submenu-active .ai-logo-container img {
        filter: invert(1);
    }

    .submenu-active .ai-company-name {
        color: #fff !important;
    }

    .ai-scroll-area {
        padding: 80px 20px 40px 20px !important;
    }

    .ai-photo-panel {
        display: none;
    }

    .ai-link-country img {
        display: none !important;
    }

    .ai-link-country, .menu_principal {
        display: block !important;
        width: 100% !important;
        font-family: 'euclid_circular_abold' !important;
        font-size: 26px !important;
        letter-spacing: -0.5px !important;
        color: rgba(50, 50, 50, 1) !important;
        text-decoration: none !important;
        line-height: 26px !important;     /* Interlineado flexible (antes era 20px) */
        padding: 10px 0 !important;      /* Ajusta el "alto" del cuerpo del botón */
        border-bottom: none !important;
        margin: 0 !important;            /* Elimina márgenes extra */
    }

    .ai-link-country {
        color: rgb(255, 255, 255) !important;
    }
    
    .ai-link-country span {
        padding-left: 0 !important;      /* Quita el desplazamiento lateral */
        line-height: inherit !important; /* Hereda el 1.2 del padre */
        font-family: inherit !important;
        font-size: inherit !important;
    }
}