/* ==========================================================================
   NAVBAR & NAVEGACIÓN CORPORATIVA EJECUTIVA ACL (PC & MÓVIL)
   Diseño de Alta Gama con Glassmorphism, Estados Dinámicos y Menú Móvil Fluido
   ========================================================================== */

.site-header {
    background: rgba(6, 38, 79, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
    background: rgba(6, 38, 79, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
    border-bottom-color: rgba(255, 255, 255, 0.18);
}

.navbar {
    height: 84px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: height 0.3s ease;
}

.site-header.is-scrolled .navbar {
    height: 70px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1260px;
    padding: 0 24px;
}

/* --- Logotipo Oficial --- */
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.25s ease;
}

.nav-logo-badge {
    background: #ffffff;
    padding: 7px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
}

.nav-logo:hover .nav-logo-badge {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.25);
}

.nav-logo img {
    height: 48px;
    width: auto;
    max-width: 165px;
    display: block;
    object-fit: contain;
    transition: height 0.3s ease;
}

.site-header.is-scrolled .nav-logo img {
    height: 42px;
}

/* --- Menú de Navegación en Escritorio --- */
.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: 0.2px;
    transition: all 0.25s ease;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    position: relative;
}

.nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.12);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: #ff5f1f;
    border-radius: 2px;
}

/* Botón Destacado de Ubicación en Desktop */
.nav-link.btn-cta {
    background: linear-gradient(135deg, #ff5f1f 0%, #e0480a 100%);
    color: #ffffff !important;
    padding: 9px 22px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13.5px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 15px rgba(255, 95, 31, 0.35);
    margin-left: 12px;
    transition: all 0.25s ease;
}

.nav-link.btn-cta::after {
    display: none;
}

.nav-link.btn-cta:hover {
    background: linear-gradient(135deg, #ff7235 0%, #eb5212 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255, 95, 31, 0.5);
}

/* --- Dropdown de Servicios (Desktop) --- */
.nav-dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 350px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(0, 15, 45, 0.22);
    padding: 10px;
    border: 1px solid #e2e8f0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1050;
}

.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 28px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    transform: rotate(45deg);
    border-left: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.dropdown-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    background: rgba(255, 95, 31, 0.1);
    color: #ff5f1f;
    border: 1px solid rgba(255, 95, 31, 0.25);
    transition: all 0.2s ease;
}

.dropdown-item:hover .dropdown-icon {
    background: #ff5f1f;
    color: #ffffff;
    border-color: #ff5f1f;
    transform: scale(1.06);
}

.dropdown-text strong {
    color: #0a1d56;
    font-size: 14px;
    font-weight: 700;
    display: block;
    line-height: 1.25;
}

.dropdown-text small {
    color: #64748b;
    font-size: 12px;
    display: block;
    margin-top: 2px;
    line-height: 1.3;
}

/* Ocultar elementos de contacto móvil en desktop */
.nav-mobile-contact-wrapper {
    display: none;
}

/* --- Botón Hamburguesa Móvil --- */
.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.25s ease;
}

.menu-btn span {
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.menu-btn.active {
    background: rgba(255, 95, 31, 0.15);
    border-color: rgba(255, 95, 31, 0.4);
}

.menu-btn.active span {
    background: #ff8533;
}

.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0.5);
}

.menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   ADAPTACIÓN MÓVIL MINIMALISTA (SIN MENÚ DESPLEGABLE / NAVEGACIÓN DIRECTA)
   Diseño Limpio, Fluido y Compacto con los Enlaces Visibles Directamente
   ========================================================================== */

/* Asegurar que el botón hamburguesa permanezca oculto en todos los anchos */
.menu-btn {
    display: none !important;
}

/* Ocultar botones extra de contacto en el nav */
.nav-mobile-contact-wrapper {
    display: none !important;
}

/* Desplazamiento suave con compensación para el header pegajoso */
html {
    scroll-padding-top: 88px;
}

@media (max-width: 900px) {
    html {
        scroll-padding-top: 72px;
    }

    .navbar {
        height: 68px;
    }

    .site-header.is-scrolled .navbar {
        height: 58px;
    }

    .nav-container {
        padding: 0 16px;
        gap: 12px;
        justify-content: space-between;
    }

    .nav-logo-badge {
        padding: 5px 10px;
        border-radius: 9px;
    }

    .nav-logo img {
        height: 38px;
        max-width: 125px;
    }

    .site-header.is-scrolled .nav-logo img {
        height: 32px;
    }

    /* Lista Horizontal Minimalista Directa en la Barra */
    .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        max-height: none !important;
        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        gap: 4px;
        align-items: center;
        list-style: none;
    }

    .nav-item {
        width: auto;
        margin: 0;
    }

    .nav-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        padding: 6px 10px;
        border-radius: 8px;
        background: transparent;
        border: none;
        font-size: 13.5px;
        color: rgba(255, 255, 255, 0.88);
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
        transition: all 0.2s ease;
        position: relative;
    }

    .nav-link:hover,
    .nav-link:active {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.08);
    }

    .nav-link.active {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.12);
    }

    .nav-link.active::after {
        content: "";
        position: absolute;
        bottom: 1px;
        left: 8px;
        right: 8px;
        height: 2px;
        background: #ff5f1f;
        border-radius: 2px;
    }

    /* Botón Minimalista de Ubicación */
    .nav-link.btn-cta {
        margin: 0 0 0 4px;
        padding: 6px 13px;
        border-radius: 50px;
        font-size: 12.5px;
        font-weight: 700;
        background: #ff5f1f;
        color: #ffffff !important;
        box-shadow: 0 2px 10px rgba(255, 95, 31, 0.35);
        gap: 5px;
        display: inline-flex;
        align-items: center;
    }

    .nav-link.btn-cta:hover {
        background: #e0480a;
    }

    .nav-link.btn-cta::after {
        display: none;
    }

    /* Ocultar flecha y dropdown de Servicios en móvil para mantener la navegación directa y minimalista */
    .dropdown-arrow {
        display: none !important;
    }

    .dropdown-menu {
        display: none !important;
    }
}

/* Pantallas de Smartphone Estándar (<= 640px) */
@media (max-width: 640px) {
    html {
        scroll-padding-top: 66px;
    }

    .navbar {
        height: 62px;
    }

    .site-header.is-scrolled .navbar {
        height: 54px;
    }

    .nav-container {
        padding: 0 12px;
        gap: 8px;
    }

    .nav-logo-badge {
        padding: 4px 8px;
        border-radius: 8px;
    }

    .nav-logo img {
        height: 32px;
        max-width: 100px;
    }

    .site-header.is-scrolled .nav-logo img {
        height: 28px;
    }

    .nav-menu {
        gap: 2px;
    }

    .nav-link {
        font-size: 12.5px;
        padding: 5px 7px;
        gap: 4px;
    }

    .nav-link.btn-cta {
        padding: 5px 11px;
        font-size: 11.5px;
        margin-left: 2px;
    }

    .nav-link.btn-cta i {
        font-size: 10.5px;
    }
}

/* Smartphones Compactos (<= 420px) */
@media (max-width: 420px) {
    html {
        scroll-padding-top: 62px;
    }

    .navbar {
        height: 58px;
    }

    .site-header.is-scrolled .navbar {
        height: 50px;
    }

    .nav-container {
        padding: 0 8px;
        gap: 4px;
    }

    .nav-logo-badge {
        padding: 3px 6px;
    }

    .nav-logo img {
        height: 27px;
        max-width: 82px;
    }

    .nav-menu {
        gap: 1px;
    }

    .nav-link {
        font-size: 11px;
        padding: 4px 5px;
    }

    /* En pantallas muy angostas mostrar "Nosotros" en lugar de "Sobre Nosotros" */
    .nav-word-sobre {
        display: none;
    }

    .nav-link.btn-cta {
        padding: 5px 8px;
        font-size: 10.5px;
        margin-left: 1px;
    }

    .nav-link.btn-cta i {
        font-size: 9.5px;
    }
}
