/* =========================================
   HERO SECTION SERVICIOS
   ========================================= */
.services-hero {
    position: relative;
    height: 50vh;
    min-height: 450px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../img/services-banner.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #15233A;
    margin-top: 0;
    text-align: center;
}

.services-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(21,35,58,0.85) 0%, rgba(21,35,58,0.7) 50%, rgba(21,35,58,0.9) 100%);
    z-index: 1;
}

.services-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: center;
}

.services-text-box-center {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.services-text-box-center h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.services-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    line-height: 1.6;
    color: #cbd5e1;
    font-weight: 300;
}

@media (max-width: 768px) {
    .services-hero {
        padding: 4rem 0;
        height: auto;
    }
    .services-text-box-center h1 {
        font-size: 2.2rem;
    }
}

/* =========================================
   SECCIÓN DESAFÍOS (Tarjeta Contenida)
   ========================================= */
.challenges-section {
    padding-top: 6rem !important;
    padding-bottom: 2rem !important;
    background-color: #ffffff;
}

.challenge-card {
    background-color: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: 16px;
    padding: 3rem;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 3rem;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(186, 230, 253, 0.2);
}

/* ILUSTRACIÓN TECH */
.challenge-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 250px;
}

.tech-network {
    position: relative;
    width: 200px;
    height: 200px;
}

.tech-node {
    position: absolute;
    background-color: #ffffff;
    border: 2px solid #187495;
    color: #187495;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(24, 116, 149, 0.15);
}

.tech-node svg {
    width: 50%;
    height: 50%;
}

.center-node {
    width: 80px;
    height: 80px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #187495;
    color: #ffffff;
    border: 4px solid #e0f2fe;
}

.sat-node-1 { width: 50px; height: 50px; top: 5%; left: 50%; transform: translateX(-50%); }
.sat-node-2 { width: 50px; height: 50px; bottom: 20%; left: 10%; }
.sat-node-3 { width: 50px; height: 50px; bottom: 20%; right: 10%; }

.tech-line {
    position: absolute;
    background-color: #cbd5e1;
    z-index: 1;
    transform-origin: top left;
}

.line-1 { width: 2px; height: 60px; top: 30%; left: 50%; transform: translateX(-50%); }
.line-2 { width: 2px; height: 60px; top: 60%; left: 40%; transform: rotate(45deg); }
.line-3 { width: 2px; height: 60px; top: 60%; right: 40%; transform: rotate(-45deg); }

/* CONTENIDO */
.challenge-content h2 {
    font-size: 1.8rem;
    color: #15233A;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.challenge-list-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.challenge-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.challenge-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: #475569;
    font-weight: 500;
}

.challenge-list li::before {
    content: '✔';
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    background-color: #187495;
    color: white;
    font-size: 0.7rem;
    border-radius: 50%;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .challenge-card {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 2rem;
    }
    .challenge-list-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* =========================================
   SECCIÓN DÚO DE SERVICIOS
   ========================================= */
.services-split-section {
    padding-top: 2rem !important;
    background-color: #ffffff;
}

.services-duo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.service-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-visual-container {
    height: 160px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 2rem;
    animation: floatIcon 6s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.service-col h3 {
    font-size: 1.8rem;
    color: #15233A;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.service-text-block {
    color: #5B5A63;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 350px;
}

.service-list-block {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
    text-align: left;
}

.service-list-block li {
    margin-bottom: 0.8rem;
    color: #5B5A63;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-list-block li::before {
    content: ''; 
    display: block;
    width: 8px;
    height: 8px;
    background-color: #187495;
    border-radius: 50%;
}

.btn-service-rounded {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    margin-top: auto;
    background-color: transparent;
    border: 2px solid #15233A;
    color: #15233A;
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 30px; 
    transition: all 0.3s ease;
}

.btn-service-rounded:hover {
    background-color: #15233A;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(21, 35, 58, 0.2);
}

@media (max-width: 768px) {
    .services-duo-grid {
        grid-template-columns: 1fr;
        gap: 5rem;
    }
}

/* =========================================
   ENCABEZADOS DE SECCIÓN (Centrado Global)
   ========================================= */
.section-header-center {
    text-align: center !important;
    margin-bottom: 3rem;
    width: 100%;
}

.section-header-center h2 {
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    color: #15233A;
}

.subtitle-center {
    text-align: center !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 700px;
    color: #5B5A63;
}

/* =========================================
   SECCIÓN ESTADÍSTICAS (Corregido)
   ========================================= */
.stats-section {
    padding: 6rem 0;
    background-color: #ffffff;
    text-align: center;
}

.highlight-text {
    color: #187495;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 4rem;
    /* Ajustes para asegurar centrado */
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrar contenido horizontalmente */
    justify-content: flex-start;
    padding: 1rem;
    text-align: center; /* Asegura que el texto interno se centre */
}

.stat-icon {
    width: 60px;
    height: 60px;
    background-color: #F0F9FF;
    color: #187495;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.stat-icon svg {
    width: 30px;
    height: 30px;
}

.stat-number-wrapper {
    font-size: 3.5rem;
    font-weight: 800;
    color: #15233A;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: 'Outfit', sans-serif;
    display: flex;
    justify-content: center; /* Centrar número */
    align-items: baseline;
    width: 100%; /* Ocupar ancho para poder centrar */
}

.stat-label {
    font-size: 1.1rem;
    color: #5B5A63;
    max-width: 250px;
    margin: 0 auto;
    line-height: 1.4;
    text-align: center; /* Refuerzo de alineación */
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    .stat-number-wrapper {
        font-size: 3rem;
    }
}


/* --- HERO SECTION para la versión movil --- */
/* --- HERO SECTION para la versión movil --- */

/* =========================================
   CORRECCIÓN HERO SERVICIOS (Responsive)
   Centrado + Subtítulo más pequeño
   ========================================= */

@media (max-width: 1024px) {

    /* 1. CONTENEDOR PRINCIPAL */
    .services-hero {
        height: auto !important;
        min-height: 400px !important;
        padding: 6rem 0 !important;
    }

    /* 2. CAJA DE TEXTO (Ancho controlado) */
    .services-text-box-center {
        width: 80% !important; /* Tablet: 80% */
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    /* 3. TÍTULO */
    .services-text-box-center h1 {
        font-size: 2.2rem !important; 
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }

    /* 4. SUBTÍTULO (AJUSTE: Fuente más pequeña) */
    .services-subtitle {
        font-size: 1rem !important; /* Antes era más grande, ahora es más fino */
        line-height: 1.5 !important;
        font-weight: 300 !important; /* Mantenemos el estilo ligero */
        color: #cbd5e1 !important;
    }
}

/* 5. AJUSTE MÓVIL (Menos de 600px) */
@media (max-width: 600px) {
    .services-text-box-center {
        width: 90% !important; /* Móvil: 90% */
    }
}

/* --- ENTORNO SECTION para la versión movil --- */
/* --- ENTORNO SECTION para la versión movil --- */

/* =========================================
   FORZADO DEFINITIVO: DISEÑO HORIZONTAL (LADO A LADO)
   Aplica para Tablet y Móvil para ahorrar espacio vertical
   ========================================= */

@media (max-width: 1024px) {
    
    /* 1. CONTENEDOR DE LA SECCIÓN (Reducir aire) */
    .challenges-section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* 2. TARJETA: SIEMPRE GRID DE 2 COLUMNAS */
    .challenge-card {
        display: grid !important;
        /* Columna 1 (Icono) fija pequeña | Columna 2 (Texto) el resto */
        grid-template-columns: 120px 1fr !important; 
        gap: 1.5rem !important;
        padding: 1.5rem !important;
        align-items: center !important; /* Centrado vertical */
        text-align: left !important; /* Texto a la izquierda siempre */
    }

    /* 3. ICONO/VISUAL: AJUSTAR AL HUECO PEQUEÑO */
    .challenge-visual {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important; /* Quitar altura mínima que estorba */
        display: flex !important;
        justify-content: center !important;
        margin: 0 !important;
    }

    /* Hacemos el dibujo mucho más pequeño */
    .tech-network {
        transform: scale(0.55) !important; /* Reducir al 55% */
        transform-origin: center center !important;
        width: 120px !important; /* Forzar ancho contenedor */
        height: 120px !important; /* Forzar alto contenedor */
    }

    /* 4. TEXTO: AJUSTAR TAMAÑOS */
    .challenge-content h2 {
        font-size: 1.2rem !important; /* Título compacto */
        margin-bottom: 0.8rem !important;
        line-height: 1.3 !important;
        text-align: left !important; /* Alinear izquierda */
    }

    /* 5. LISTA: SIEMPRE 2 COLUMNAS (TABLA) */
    .challenge-list-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }

    .challenge-list li {
        font-size: 0.8rem !important; /* Letra pequeña legible */
        margin-bottom: 0.3rem !important;
        line-height: 1.2 !important;
    }
}

/* AJUSTE EXTRA-FINO PARA MÓVILES MUY ANGOSTOS (< 400px) */
@media (max-width: 450px) {
    .challenge-card {
        /* Hacemos la columna del icono aún más angosta */
        grid-template-columns: 80px 1fr !important; 
        gap: 1rem !important;
        padding: 1rem !important;
    }
    
    .tech-network {
        transform: scale(0.4) !important; /* Icono miniatura */
        width: 80px !important;
        height: 80px !important;
    }
}

/* =========================================
   SOLUCIÓN FINAL: OCULTAR IMAGEN EN MÓVIL
   ========================================= */

@media (max-width: 768px) {
    
    /* 1. Desaparecemos la imagen/icono por completo */
    .challenge-visual {
        display: none !important;
    }

    /* 2. Reconfiguramos la tarjeta para usar todo el espacio */
    .challenge-card {
        display: block !important; /* Quitamos el modo "lado a lado" */
        text-align: center !important; /* Centramos título y contenido */
        padding: 2rem 1.5rem !important; /* Relleno cómodo */
        height: auto !important;
    }

    /* 3. Ajuste del Título para que luzca bien solo */
    .challenge-content h2 {
        font-size: 1.4rem !important;
        margin-bottom: 1.5rem !important;
        text-align: center !important;
    }

    /* 4. Lista: Mantenemos las 2 columnas pero alineadas */
    .challenge-list-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; 
        gap: 1rem !important;
        text-align: left !important; /* Los items se leen mejor a la izquierda */
        margin-top: 1rem !important;
    }
}


/* --- SERVICE SECTION para la versión movil --- */
/* --- SERVICE SECTION para la versión movil --- */

/* =========================================
   CORRECCIÓN SECCIÓN PRODUCTOS (DUO GRID)
   Tablet: 2 Columnas | Móvil: 1 Columna
   ========================================= */

/* 1. TABLETA (Entre 601px y 1024px) -> FORZAR 2 COLUMNAS */
@media (min-width: 601px) and (max-width: 1024px) {
    .services-duo-grid {
        grid-template-columns: 1fr 1fr !important; /* Lado a lado */
        gap: 2rem !important; /* Espacio reducido para que quepan bien */
        padding: 0 2rem; /* Margen lateral para que no toquen bordes */
    }

    /* Ajustamos un poco las imágenes para que no roben tanto espacio en tablet */
    .service-visual-container svg {
        width: 140px; /* Reducimos ligeramente el SVG */
        height: auto;
    }
}

/* 2. MÓVIL (Menos de 600px) -> 1 COLUMNA */
@media (max-width: 600px) {
    .services-duo-grid {
        grid-template-columns: 1fr !important; /* Uno debajo del otro */
        gap: 4rem !important; /* Espacio generoso entre productos */
    }
}


/* --- HERO SECTION SERVICIOS (Video de Fondo) --- */

/* 1. ESTILOS BASE (Escritorio) */
.services-hero {
    position: relative;
    width: 100%;
    height: 50vh;       /* Altura elegante para PC */
    min-height: 450px;  /* Mínimo para que no se vea chiquito */
    overflow: hidden;
    
    /* Centrado total (Horizontal y Vertical) */
    display: flex;
    align-items: center; 
    justify-content: center; 
    
    margin-top: 0;
    background-color: #15233A; /* Fondo de seguridad */
}

/* Video de Fondo */
.services-video-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Overlay */
.services-hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(21, 35, 58, 0.85); /* Un poco más oscuro para leer bien */
    z-index: 1;
}

/* Contenido */
.services-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 5%; /* Margen de seguridad lateral */
}

.services-text-box-center {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: #ffffff;
}

.services-text-box-center h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.services-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #cbd5e1;
    font-weight: 300;
}

/* =========================================
   2. CORRECCIÓN MÓVIL Y TABLET
   ========================================= */

@media (max-width: 1024px) {
    .services-hero {
        /* IMPORTANTE: En móvil quitamos la altura fija */
        height: auto !important;
        min-height: auto !important;
        
        /* Agregamos aire arriba y abajo */
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    .services-hero-content {
        width: 90%; /* Usamos más ancho en móvil */
        padding: 0; /* Quitamos padding extra */
        margin: 0 auto;
    }

    .services-text-box-center h1 {
        font-size: 2rem; /* Texto más pequeño para que quepa */
    }

    .services-subtitle {
        font-size: 1rem; /* Subtítulo legible */
    }
}