/* 
   NETMAULE PREMIUM - Design System (Option C: Visual Journey Blue)
   Corporate Colors: #1568ac (Blue), #001622 (Deep Blue), #FFFFFF (White)
*/

:root {
    --primary: #1568ac;
    --primary-light: #2087db;
    --primary-dark: #001622;
    --accent: #baff00;
    --text: #ffffff;
    --text-muted: rgba(255,255,255,0.7);
    --glass: rgba(0, 22, 34, 0.4);
    --glass-heavy: rgba(0, 22, 34, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --radius: 12px;
}

* { box-sizing: border-box; }

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; margin: 0; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--primary-dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

/* REUSABLE CLASSES */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* HEADER */
.nm-header {
    position: fixed;
    top: 0; width: 100%; z-index: 1000;
    padding: 25px 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}
.nm-header.scrolled {
    padding: 15px 0;
    background: var(--glass-heavy);
    border-bottom: 1px solid var(--glass-border);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { font-size: 1.8rem; font-weight: 800; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.bg-light-header .logo-nm { color: #001622 !important; }
.bg-light-header .nav-links a { color: #001622 !important; }
.logo span { color: var(--primary); }

.logo-nm {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 900 !important;
    font-size: 2rem !important;
    letter-spacing: -2px !important;
    color: #fff !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
}
.logo-nm::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    margin-left: 5px;
}
.logo-nm span { display: none !important; } /* Eliminar spans antiguos */

.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a { color: #fff; text-decoration: none; font-weight: 500; font-size: 0.95rem; opacity: 0.8; transition: 0.3s; }
.nav-links a:hover { opacity: 1; color: var(--primary); }

/* HERO */
.hero-premium {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 40% 50%, rgba(0,22,34,0.3) 0%, rgba(0,22,34,0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: left;
    max-width: 1200px;
    padding-left: 150px;
}

.hero-content h1 {
    font-size: 5.5rem;
    font-weight: 800;
    line-height: 0.95;
    margin-bottom: 15px;
    letter-spacing: -3px;
    color: #ffffff;
}

.hero-content p {
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 30px; /* Reducido */
    max-width: 800px;
    line-height: 1.7; /* Mejorado */
    background: var(--glass);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 20px 30px;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    display: inline-block;
}

/* BUTTONS */
.nm-btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
    cursor: pointer;
    border: none;
}
.nm-btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 24px rgba(21, 104, 172, 0.4);
}
.nm-btn-primary:hover {
    transform: translateY(-3px);
    background: var(--primary-light);
}

.nm-btn-secondary {
    background: var(--glass);
    color: #fff;
    border: 1px solid var(--glass-border);
    margin-left: 15px;
}
.nm-btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

/* SECTIONS */
.nm-section { padding: 70px 0; }
.bg-light { background-color: #ffffff; color: #001622; }
.bg-graphite { background-color: #001622; color: #ffffff; }

.bg-light .nm-h2, .bg-light h3 { color: #001622; }
.bg-light .nm-card p { color: rgba(0, 22, 34, 0.7); }
.bg-light .nm-card { background: rgba(0, 22, 34, 0.03); border-color: rgba(0, 22, 34, 0.1); }
.bg-light .nm-card:hover { background: rgba(21, 104, 172, 0.05); }

.section-tag { color: var(--primary); font-weight: 800; font-size: 0.9rem; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 15px; display: block; }
.nm-h2 { font-size: 3.5rem; font-weight: 800; margin-bottom: 35px; line-height: 1.1; }

/* SERVICES GRID */
.nm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.nm-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Ajuste para que el último elemento impar se centre en grillas de 2 */
.nm-grid-2 > div:last-child:nth-child(odd) {
    grid-column: span 2;
    width: 100%;
    max-width: 585px; /* Un poco menos de la mitad para que no se deforme demasiado */
    margin-left: auto;
    margin-right: auto;
}

.nm-flex-cols {
    display: flex;
    align-items: center;
    gap: 80px;
}

.nm-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: var(--radius);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}
.nm-card:hover {
    background: rgba(21, 104, 172, 0.1);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.nm-card img { 
    width: 100%; 
    height: 220px; /* Aumentado de 180px para mostrar más contenido */
    margin-bottom: 25px; 
    object-fit: cover; 
    object-position: center;
    border-radius: calc(var(--radius) - 4px);
    border: 1px solid var(--glass-border);
    background: rgba(0, 22, 34, 0.2);
    transition: all 0.3s ease;
}

/* Clase para imágenes que necesitan mostrarse completas (alejar) */
.nm-img-wide {
    object-fit: contain !important;
    padding: 15px; /* Crea el efecto de alejamiento */
    background: rgba(0, 22, 34, 0.4) !important;
}
.nm-card h3 { font-size: 1.6rem; margin-bottom: 20px; color: inherit; }
.nm-card p { 
    font-size: 1rem; 
    color: var(--text-muted); 
    line-height: 1.7; 
    margin-bottom: 0px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nm-card.expanded p {
    max-height: 500px;
    opacity: 1;
    margin-bottom: 20px;
    padding-top: 10px;
}

.nm-card .nm-btn-text {
    transition: transform 0.3s ease;
}

.nm-card.expanded .nm-btn-text {
    transform: translateX(5px);
}

/* CONTACT SECTION */
.nm-contact-info { color: #fff; font-weight: 600; }
.nm-contact-info p { margin-bottom: 15px; }

.nm-contact-card {
    flex: 1.2;
    background: #fff;
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid rgba(0,22,34,0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}
.nm-contact-card form { display: grid; gap: 20px; }
.nm-contact-card input, 
.nm-contact-card textarea {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
}
.nm-contact-card .nm-btn { width: 100%; }

/* FOOTER */
.footer-premium {
    background: #000b11;
    padding: 80px 0 40px;
    border-top: 1px solid var(--glass-border);
}
.footer-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.footer-info { max-width: 400px; }
.footer-info p { color: var(--text-muted); font-size: 0.9rem; margin-top: 15px; }

.copyright { border-top: 1px solid var(--glass-border); padding-top: 30px; text-align: center; color: rgba(255,255,255,0.3); font-size: 0.8rem; }

/* ANIMATIONS */
.animate-in { opacity: 0; transform: translateY(30px); animation: fadeInUp 0.8s forwards; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 991px) {
    .container { padding: 0 15px; }

    /* BOTÓN HAMBURGUESA SIEMPRE VISIBLE EN MÓVIL */
    .nm-menu-toggle {
        display: flex !important;
        flex-direction: column;
        gap: 6px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        z-index: 1001;
    }
    .nm-menu-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background: #fff;
        border-radius: 10px;
        transition: 0.3s;
    }

    .nm-header {
        padding: 8px 0 !important; /* Siempre compacto en móvil */
        background: var(--glass-heavy) !important; /* Siempre oscuro en móvil para legibilidad */
        backdrop-filter: blur(15px);
        transition: none !important; /* Evitar sensación de retraso al cargar */
    }

    .nav-wrapper {
        flex-direction: row !important; /* Siempre paralelo para hamburguesa */
        justify-content: space-between !important;
        align-items: center !important;
        padding: 5px 0;
    }

    .logo-nm { 
        font-size: 1.5rem !important; /* Siempre reducido en móvil */
        margin: 0 !important; 
    }

    /* OCULTAR LINKS POR DEFECTO EN MÓVIL (FUERZA REDUCCIÓN TOTAL) */
    .nav-links, .nav-cta {
        display: none !important;
    }

    /* MENU ABIERTO (OVERLAY) - Restablecido para permitir navegación */
    .menu-open .nav-links {
        display: flex !important;
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100vh;
        background: rgba(0, 11, 17, 0.98);
        flex-direction: column !important;
        justify-content: center;
        align-items: center;
        gap: 30px !important;
        z-index: 1000;
        backdrop-filter: blur(15px);
        animation: fadeInUp 0.4s ease forwards;
    }

    .menu-open .nav-links a { font-size: 1.5rem !important; font-weight: 800; display: block !important; opacity: 1; }
    
    .menu-open .nav-cta {
        display: block !important;
        position: fixed;
        bottom: 50px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1001;
        width: 80%;
    }

    /* Animación Hamburguesa (X) */
    .menu-open .nm-menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-open .nm-menu-toggle span:nth-child(2) { opacity: 0; }
    .menu-open .nm-menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    .hero-content { padding: 0 10px; text-align: center; }
    .hero-content h1 { font-size: 2.4rem; letter-spacing: -1px; line-height: 1.1; }
    .hero-content p { font-size: 0.95rem; padding: 12px 15px; margin-bottom: 25px; }
    .nm-btns { display: flex; flex-direction: column; gap: 10px; align-items: center; }
    .nm-btns .nm-btn { margin: 0; width: 90%; }
    
    .nm-grid, .nm-grid-2 { 
        display: flex !important; 
        flex-direction: column !important; 
        gap: 25px; 
    }
    .nm-grid-2 > div:last-child:nth-child(odd) {
        grid-column: auto !important;
        max-width: 100% !important;
    }
    .nm-card { padding: 25px; width: 100%; }
    .nm-card img { height: 180px; width: 100%; }
    
    .nm-flex-cols { flex-direction: column; gap: 30px; text-align: center; }
    .nm-section { padding: 60px 0; }
    .nm-h2 { font-size: 1.8rem; margin-bottom: 25px; line-height: 1.2; }
    
    /* Pymes section specific fixes */
    #apoyo .nm-h2 { font-size: 1.6rem; }
    #apoyo p { font-size: 0.95rem; }

    /* Contact form mobile square */
    .nm-contact-card {
        padding: 30px 20px;
        border-radius: 12px;
        width: 100%;
    }
    .nm-contact-info {
        text-align: left;
        margin-bottom: 20px;
    }
}

/* SLIDER FIJO - Estilo Premium Pasos */
.nm-slider-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    height: 700px; /* Altura fija para evitar saltos */
    overflow: hidden;
}

.nm-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.nm-step-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 60px;
    border-radius: 40px;
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    opacity: 0;
    transform: translateX(50px);
    pointer-events: none;
    z-index: 1;
    display: flex;
    flex-direction: row; /* Imagen a la izquierda */
    align-items: center;
    justify-content: center;
    gap: 50px;
}

.nm-step-card.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    z-index: 2;
    background: rgba(255,255,255,0.07);
    border-color: var(--primary);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.nm-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 10px 20px rgba(21,104,172,0.3);
    transition: 0.3s;
}

.nm-nav-btn:hover { background: var(--primary-light); transform: translateY(-50%) scale(1.1); }
.nm-nav-prev { left: 20px; }
.nm-nav-next { right: 20px; }

@media (max-width: 768px) {
    .nm-slider-wrapper { height: 600px; }
    .nm-step-card { padding: 40px 20px; border-radius: 30px; }
    .nm-nav-btn { width: 40px; height: 40px; font-size: 1.2rem; }
    .nm-nav-prev { left: 10px; }
    .nm-nav-next { right: 10px; }
}

.nm-step-num {
    font-size: 5rem;
    font-weight: 900;
    color: var(--primary);
    opacity: 0.1;
    position: absolute;
    top: -10px;
    right: 10px;
    line-height: 1;
}

.nm-step-content {
    flex: 1;
    text-align: left;
}

.nm-step-card h3 {
    font-size: 2.8rem;
    color: #fff;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
    text-align: left;
}

.nm-step-card p {
    font-size: 1.35rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
    position: relative;
    z-index: 2;
    text-align: left;
}

.nm-step-img {
    flex: 0 0 500px; /* Ancho fijo para la imagen */
    height: 450px;
    object-fit: cover;
    border-radius: 20px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 991px) {
    .nm-slider-wrapper { height: auto; min-height: 550px; }
    .nm-step-card { 
        flex-direction: column !important; 
        padding: 40px 20px; 
        gap: 20px;
        text-align: center;
        justify-content: flex-start;
    }
    .nm-step-img { 
        flex: 0 0 200px; 
        height: 200px; 
        width: 100%; 
        border-radius: 15px;
        margin-bottom: 5px;
    }
    .nm-step-card h3 { 
        font-size: 1.6rem !important; 
        text-align: center;
        margin-bottom: 10px;
    }
    .nm-step-card p { 
        font-size: 0.95rem !important; 
        text-align: center;
    }
    .nm-step-num {
        font-size: 2.5rem;
        top: 5px;
        right: 15px;
    }
    .nm-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        background: rgba(21, 104, 172, 0.9) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .nm-nav-prev { left: 5px; }
    .nm-nav-next { right: 5px; }
}

/* DESBLOQUEO TOTAL SLIDER (Patrón Sibarita) */
.nm-slider-wrapper {
    z-index: 5;
    overflow: visible !important;
}

.nm-slider-container {
    pointer-events: none !important; /* El contenedor no recibe clics */
    position: relative;
    z-index: 1;
}

.nm-step-card {
    pointer-events: none !important;
    visibility: hidden;
    z-index: 1;
}

.nm-step-card.active {
    pointer-events: auto !important; /* Solo la activa es interactiva */
    visibility: visible;
    z-index: 2;
}

.nm-nav-btn {
    pointer-events: auto !important;
    z-index: 9999 !important; /* Por encima de las tarjetas */
    cursor: pointer !important;
}

.nm-nav-btn:active {
    transform: translateY(-50%) scale(0.9);
}

.nm-step-img-placeholder {
    width: 100%;
    height: 180px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255,255,255,0.1);
}

.nm-step-img-placeholder::after {
    content: 'Imagen en preparación';
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
}
