/* ==========================================================================
   1. CONFIGURACIÓN GLOBAL Y RESET
   ========================================================================== */
html, body {
    overflow-x: hidden; /* Evita el desplazamiento lateral en móviles */
    width: 100%;
    position: relative;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5; 
    margin: 0;
    /* Importante: Espacio para que el header fijo no tape el contenido */
    padding-top: 120px; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #111111; /* Texto base casi negro */
}

/* --- Tipografía de Alto Contraste --- */
h1, h2, h3, h4, h5, h6 {
    color: #000000; /* Títulos negro puro */
    font-weight: 700;
}

p.lead {
    color: #2c2c2c !important; /* Gris oscuro sólido */
    font-weight: 500;
}

/* Enlaces */
a { text-decoration: none; }

/* Color de marca (Accesible) */
.text-primary-brand {
    color: #0056b3 !important; /* Azul oscurecido para WCAG AA */
}

/* Utilidad de espaciado de letras */
.ls-1 { letter-spacing: 1px; }


/* ==========================================================================
   2. HEADER (Glassmorphism & Fixed - Transparencia 0.15)
   ========================================================================== */
.header-glass {
    position: fixed; 
    top: 20px; 
    z-index: 1000;
    
    /* Centrado horizontal */
    left: 0;
    right: 0;
    margin: 0 auto; 
    
    width: 95%; 
    max-width: 1200px; 
    
    /* Efecto Cristal */
    background-color: rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); 
    
    border: 1px solid rgba(255, 255, 255, 0.2); 
    border-radius: 15px; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 
    
    padding: 15px 30px; 
}

/* --- Logo --- */
.logo {
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.95rem; 
    text-decoration: none;
    letter-spacing: -0.5px; 
    line-height: 1;
}

.logo:hover { opacity: 0.8; }

.logo-part-1 { font-weight: 800; color: #111; }
.logo-part-2 { font-weight: 400; color: #555; }
.logo-part-3 { font-weight: 700; color: #0071e3; }


/* ==========================================================================
   3. NAVEGACIÓN (Desktop & Mobile Logic)
   ========================================================================== */
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.nav-menu li a {
    text-decoration: none;
    color: #1d1d1f;
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.3s ease;
}

.nav-menu li a:hover { color: #0071e3; }

/* Checkbox Hack (Oculto siempre) */
.nav-toggle { display: none; }

/* Botón Hamburguesa (Estilos base) */
.nav-toggle-label {
    display: none; /* Oculto en PC */
    cursor: pointer;
    padding: 10px;
}

.nav-toggle-label span {
    display: block;
    width: 25px;
    height: 3px;
    background: #1d1d1f;
    margin: 5px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* --- RESPONSIVE (Móviles < 991px) --- */
@media (max-width: 991px) {
    
    /* 1. Ocultar texto del logo, dejar solo icono */
    .logo div { display: none; }
    
    /* 2. Posicionar botón hamburguesa a la derecha */
    .nav-toggle-label {
        display: block;
        position: absolute; 
        right: 30px; 
        top: 50%; 
        transform: translateY(-50%); 
    }

    /* 3. Menú Desplegable estilo Cristal */
    .nav-menu {
        display: none; /* Oculto por defecto */
        position: absolute;
        top: 100%; 
        left: 0;
        right: 0;
        
        background-color: rgba(255, 255, 255, 0.95); 
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        margin-top: 15px; 
    }

    .nav-menu li { width: 100%; text-align: center; }
    
    .nav-menu li a {
        display: block;
        padding: 15px;
        font-size: 1.2rem; 
        border-bottom: 1px solid rgba(0,0,0,0.05); 
    }
    
    .nav-menu li:last-child a { border-bottom: none; }

    /* Mostrar menú al marcar checkbox */
    .nav-toggle:checked ~ nav .nav-menu { display: flex; }
}


/* ==========================================================================
   4. HERO SECTION (Estático con Zoom en Hover)
   ========================================================================== */

/* Animación de entrada del texto (Mantenemos esta para que se vea suave al cargar) */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-section {
    padding: 60px 0 100px; 
    background-color: #f0f2f5; 
    overflow: hidden; 
}

.hero-content {
    animation: fadeInUp 0.8s ease-out forwards;
    text-align: center; /* Centrado en móvil */
}

/* Badge */
.hero-badge {
    display: inline-block;
    background-color: #e8f2ff; 
    color: #003876; 
    font-size: 0.875rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 50px;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid rgba(0, 56, 118, 0.1);
}

.hero-title {
    font-size: 2.5rem; 
    font-weight: 800;
    line-height: 1.1;
    color: #111;
    letter-spacing: -1px;
    margin-bottom: 24px;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #444; 
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
}

/* --- IMAGEN HERO (ESTÁTICA) --- */
.hero-img-floating {
    width: 100%;       
    max-width: 700px;  
    height: auto;      
    object-fit: contain; 
    
    /* Sombra suave fija (sin movimiento) */
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.1));
    
    /* Preparamos la transición para el zoom */
    transition: transform 0.3s ease;
    
    display: block;
    margin: 0 auto;
}

/* EFECTO HOVER: SOLO ZOOM */
.hero-img-floating:hover {
    cursor: pointer;
    /* Efecto botón: crece un 5% */
    transform: scale(1.05); 
}

/* --- Ajustes Hero Desktop --- */
@media (min-width: 992px) {
    .hero-section { 
        /* Espacio superior ajustado (80px) */
        padding: 80px 0 100px; 
    }
    
    .hero-content { 
        text-align: left; 
        max-width: 100%; 
        margin: 0; 
        padding-right: 20px;
    }

    .hero-title { 
        font-size: 3.8rem; 
    }
    
    .hero-description { 
        font-size: 1.25rem; 
        margin-left: 0; 
        margin-right: 0; 
    }
    
    .hero-actions { 
        flex-direction: row; 
        justify-content: flex-start; 
    }
}

/* ==========================================================================
   5. COMPONENTES Y UTILIDADES
   ========================================================================== */

/* Botones Accesibles (44px+) */
.btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary-brand {
    background-color: #0071e3;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,113,227,0.39);
}
.btn-primary-brand:hover {
    background-color: #005bb5;
    transform: translateY(-2px);
    color: #fff;
}

.btn-outline-brand {
    background-color: transparent;
    color: #111;
    border: 2px solid #e5e5e5;
}
.btn-outline-brand:hover {
    border-color: #111;
    background-color: #fff;
}


/* ==========================================================================
   6. SECCIÓN: ESTÁNDARES DE CALIDAD (Métricas Limpias)
   ========================================================================== */

.metrics-section {
    padding: 100px 0;
    background-color: #f8f9fa; 
}

/* Tarjeta Sólida (Centrada) */
.metric-card {
    background-color: #ffffff;
    border: 1px solid #eef0f2;
    border-radius: 24px;
    padding: 40px 20px;
    height: 100%;
    text-align: center; /* Alineación centrada vital */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Círculo de Progreso */
.score-circle {
    position: relative;
    width: 130px; 
    height: 130px;
    margin: 0 auto 25px;
}

.score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: #f0f0f0; 
    stroke-width: 5;
}

.circle-progress {
    fill: none;
    stroke: #0cce6b;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 251;
    stroke-dashoffset: 251;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Animación activada por JS */
.circle-progress.play-animation {
    opacity: 1;
    animation: fillCircle 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.score-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    font-weight: 700;
    color: #003876;
    font-family: monospace, sans-serif;
}

.metric-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
}

.metric-desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

@keyframes fillCircle {
    to { stroke-dashoffset: var(--target-offset); }
}

/* Valores de Porcentaje */
.score-100 { --target-offset: 0; }
.score-98  { --target-offset: 5; }
.score-95  { --target-offset: 12.5; }
.score-92  { --target-offset: 20; }


/* ==========================================================================
   7. SECCIÓN: ESTRATEGIAS (Diseño Limpio y Escaneable)
   ========================================================================== */

.use-cases-section {
    padding: 100px 0;
    background-color: #f8f9fa; /* Fondo gris suave para contraste */
}

/* Tarjeta Limpia (Sin bordes visibles, solo sombra al hover) */
.strategy-card {
    background: #ffffff;
    border: none; /* Quitamos el borde gris para limpiar */
    border-radius: 20px;
    overflow: hidden; 
    height: 100%;
    /* Sombra muy suave inicial */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.strategy-card:hover {
    transform: translateY(-5px);
    /* Sombra más pronunciada al flotar */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Contenedor de imagen (Ratio 378/238) */
.project-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 378 / 238; 
    background-color: #f0f2f5;
    overflow: hidden;
}

/* Imagen Real */
.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: top center; 
    transition: transform 0.5s ease;
}

.strategy-card:hover .project-img-wrapper img {
    transform: scale(1.03); /* Zoom muy sutil */
}

/* Cuerpo de la tarjeta */
.strategy-body {
    padding: 30px 25px; /* Más espacio interno */
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}

/* Título */
.strategy-title {
    font-size: 1.4rem; 
    font-weight: 800;
    color: #111;
    margin-bottom: 20px;
}

/* LISTA DE BENEFICIOS (Reemplaza al párrafo largo) */
.strategy-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.strategy-list li {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 12px;
    padding-left: 28px; /* Espacio para el icono */
    position: relative;
}

/* Icono de Check personalizado con CSS */
.strategy-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #0cce6b; /* Verde confirmación */
    font-weight: 900;
    font-size: 1rem;
}

/* Enlace simple y limpio */
.strategy-link {
    margin-top: auto; 
    color: #0056b3;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.strategy-link:hover {
    gap: 12px; 
    text-decoration: none; /* Sin subrayado para mantenerlo limpio */
}

/* ==========================================================================
   ELEMENTOS NUEVOS (BADGES & TAGS)
   ========================================================================== */

/* Píldora Outline (Más compacta) */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Espacio entre punto y texto */
    
    /* CAMBIO AQUÍ: Reduje el relleno para acercar el borde */
    padding: 6px 14px; 
    
    background-color: transparent;
    border: 1px solid #0071e3;     
    color: #0071e3; 
    
    border-radius: 50px; 
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
}

/* El "Puntito" (Sin cambios) */
.section-tag::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background-color: #0071e3; 
    border-radius: 50%;        
    flex-shrink: 0;
}

/* ==========================================================================
   SECCIÓN CTA (MINIMALISTA)
   ========================================================================== */

.cta-minimal-section {
    padding: 120px 0; /* Mucho aire arriba y abajo para elegancia */
    background-color: #ffffff;
    border-top: 1px solid #f0f0f0; /* Una línea sutil para separar de lo gris */
    position: relative;
}

/* Opcional: Un pequeño efecto de fondo muy sutil (Glow) */
.cta-minimal-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(0,113,227,0.04) 0%, rgba(255,255,255,0) 70%);
    z-index: 0;
    pointer-events: none; /* Para que no interfiera con clicks */
}

/* Asegurar que el contenido esté por encima del glow */
.cta-minimal-section .container {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   BOTÓN FLOTANTE WHATSAPP
   ========================================================================== */

.btn-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999; /* Siempre encima de todo */
    
    width: 60px;
    height: 60px;
    
    background-color: #25d366; /* Verde oficial WhatsApp */
    color: #ffffff;
    
    border-radius: 50%; /* Círculo perfecto */
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); /* Sombra verde difusa */
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 32px; /* Tamaño del icono */
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Efecto Hover: Crece un poco y sube */
.btn-whatsapp:hover {
    transform: scale(1.1) translateY(-5px);
    background-color: #20b858; /* Un verde un poco más oscuro */
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.6);
}

/* Ajuste para móviles (un poco más pequeño para no estorbar) */
@media (max-width: 768px) {
    .btn-whatsapp {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 28px;
    }
}

/* ==========================================================================
   CORRECCIÓN DE SCROLL (Para que el header no tape el título)
   ========================================================================== */
#servicios {
    /* Esto hace que el navegador "frene" 120px antes de llegar a la sección */
    scroll-margin-top: 130px; 
}

/* O para que el scroll sea suave en toda la web */
html {
    scroll-behavior: smooth;
}

/* ==========================================================================
   HEADER PRECIOS (ESTILO OVERLAP AJUSTADO)
   ========================================================================== */

.pricing-header {
    background: linear-gradient(135deg, #001a33 0%, #004080 100%);
    
    /* CAMBIO: Reducido de 150px a 110px para subir el texto */
    padding-top: 110px; 
    
    padding-bottom: 150px; 
    position: relative;
    border-bottom: 5px solid #0056b3; 
}

/* Patrón de fondo (Sin cambios) */
.pricing-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
}

/* Overlap (Sin cambios) */
.pricing-overlap {
    margin-top: -100px;
    position: relative;
    z-index: 10;
}

/* Ajuste móvil */
@media (max-width: 768px) {
    .pricing-header {
        padding-top: 100px; /* Ajuste también para móvil */
        padding-bottom: 60px;
    }
    .pricing-overlap {
        margin-top: 0;
    }
}

/* ==========================================================================
   8. FOOTER PREMIUM
   ========================================================================== */
.footer-section {
    background-color: #1d1d1f;
    color: #f5f5f7;
    padding-top: 80px;
    padding-bottom: 30px;
    margin-top: auto; 
    font-size: 0.95rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.footer-logo:hover { color: white; }

.footer-heading {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links li { margin-bottom: 12px; }
.footer-links a {
    color: #a1a1a6; 
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-links a:hover {
    color: #0071e3; 
    padding-left: 5px; 
}

/* Redes Sociales */
.social-icons {
    display: flex;
    gap: 15px;
    justify-content: center;
}
@media (min-width: 768px) {
    .social-icons { justify-content: flex-start; }
}

.social-icons a {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}
.social-icons a:hover {
    background-color: #0071e3;
    transform: translateY(-3px);
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 50px 0 30px;
}
.copyright-text {
    color: #86868b;
    font-size: 0.85rem;
}


/* ==========================================================================
   9. OPTIMIZACIÓN DE RENDIMIENTO MÓVIL (PAGESPEED 100)
   ========================================================================== */

@media (max-width: 768px) {
    
    /* 1. ELIMINAR EFECTO VIDRIO EN MÓVIL (Ahorro GPU) */
    .header-glass {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(255, 255, 255, 0.98) !important;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    /* 2. ELIMINAR ANIMACIONES DE ENTRADA (LCP instantáneo) */
    .hero-content, 
    .hero-image-wrapper, 
    .circle-progress.play-animation {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Círculos llenos estáticamente */
    .circle-progress {
        opacity: 1 !important;
        stroke-dashoffset: var(--target-offset) !important;
        transition: none !important;
    }

    /* 3. OPTIMIZAR TIPOGRAFÍA */
    .hero-title {
        font-size: 2.2rem; 
        margin-bottom: 16px;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 24px;
    }
    
    /* 4. OPTIMIZAR BOTONES */
    .btn-primary-brand {
        box-shadow: none !important;
    }
}

/* =========================================
   ESTILOS DE CONTACTO Y FORMULARIOS
   ========================================= */

/* Inputs flotantes modernos */
.form-floating > .form-control,
.form-floating > .form-select {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background-color: #f9f9f9;
}

/* Al hacer clic (Focus) */
.form-control:focus,
.form-select:focus {
    border-color: #0071e3; /* Azul marca */
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1); /* Resplandor suave */
}

/* Color de etiquetas */
.form-floating label {
    color: #888;
}