/* ==========================================================================
   VARIABLES CSS - Sistema de diseño centralizado
   ========================================================================== */
:root {
    /* Colores principales */
    --primary-green: #10b981;      /* Verde esmeralda - color principal */
    --primary-blue: #3b82f6;       /* Azul brillante - color secundario */
    --primary-dark: #0f172a;       /* Fondo oscuro principal */
    --primary-card: #1e293b;       /* Fondo para tarjetas */
    
    /* Colores de acento */
    --accent-orange: #f59e0b;      /* Naranja para calibración */
    --accent-purple: #8b5cf6;      /* Púrpura para elementos especiales */
    --accent-red: #ef4444;         /* Rojo para alertas/énfasis */
    --accent-cyan: #06b6d4;        /* Cian para detalles */
    
    /* Escala de grises */
    --white: #e2e8f0;              /* Texto blanco/iluminado */
    --gray-light: #94a3b8;         /* Texto secundario */
    --gray-dark: #475569;          /* Bordes y detalles */
    
    /* Sistema de sombras */
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);    /* Sombra grande */
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.3);    /* Sombra media */
    --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.2);     /* Sombra pequeña */
    
    /* Propiedades reutilizables */
    --border-radius: 15px;         /* Radio de bordes consistente */
    --transition: all 0.3s ease;   /* Transición por defecto */
}

/* ==========================================================================
   RESET Y ESTILOS BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Modelo de caja consistente */
}

html {
    scroll-behavior: smooth;       /* Desplazamiento suave */
    scroll-padding-top: 80px;      /* Espacio para navbar fijo */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-dark);
    color: var(--white);
    overflow-x: hidden;            /* Evita scroll horizontal */
    line-height: 1.6;              /* Espaciado de línea legible */
}

/* ==========================================================================
   TIPOGRAFÍA
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ==========================================================================
   UTILIDADES REUTILIZABLES
   ========================================================================== */
.highlight-text {
    color: var(--primary-green);  /* Destacar texto importante */
}

.brand-icon {
    color: var(--primary-green);  /* Íconos de marca */
}

/* ==========================================================================
   COMPONENTE: NAVEGACIÓN
   ========================================================================== */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);   /* Efecto de vidrio esmerilado */
    padding: 1rem 0;
    transition: var(--transition);
    border-bottom: 2px solid rgba(16, 185, 129, 0.3);
    z-index: 1000;                 /* Siempre visible */
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow-md);  /* Sombra al hacer scroll */
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
}

/* Enlaces de navegación con efecto hover */
.nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-green) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 80%; /* Línea que crece al hacer hover */
}

/* Botón principal de llamada a la acción */
.cta-btn {
    transition: var(--transition) !important;
}

.cta-btn:hover {
    transform: translateY(-2px);   /* Efecto de levitación */
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   SECCIÓN: HERO / PORTADA
   ========================================================================== */
.hero-section {
    min-height: 100vh;             /* Altura completa de la ventana */
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;             /* Compensa el navbar fijo */
}

/* Imagen de fondo con animación sutil */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1581094794329-c8112a89af12?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80') center/cover;
    opacity: 0.1;
    animation: backgroundPan 20s linear infinite;
}

@keyframes backgroundPan {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.hero-content {
    position: relative;
    z-index: 2;                     /* Encima del fondo */
}

/* Badge animado del eslogan */
.slogan-badge {
    background: linear-gradient(90deg, var(--primary-green), var(--primary-blue));
    border-radius: 50px;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    display: inline-block;
    margin-bottom: 2rem;
    font-weight: 600;
    letter-spacing: 1px;
    animation: pulse 3s infinite;   /* Animación de pulso constante */
    box-shadow: var(--shadow-sm);
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 5px 15px rgba(16, 185, 129, 0.2); 
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3); 
    }
}

/* Estadísticas destacadas */
.hero-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 2rem;
    backdrop-filter: blur(10px);    /* Efecto vidrio */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary-green);
    box-shadow: var(--shadow-md);
}

.stat-number {
    color: var(--primary-green);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-card {
    background: rgba(16, 185, 129, 0.1);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);    /* Efecto de levitación */
    background: rgba(16, 185, 129, 0.2);
}

/* ==========================================================================
   COMPONENTE: TARJETAS DE SERVICIOS
   ========================================================================== */
.service-card {
    background: var(--primary-card);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    height: 100%;                   /* Altura uniforme */
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-sm);
}

/* Línea superior animada */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-blue));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);          /* Línea que se expande */
}

.service-card:hover {
    transform: translateY(-10px);   /* Efecto de elevación */
    box-shadow: var(--shadow-lg);
}

/* Contenedor de íconos de servicio */
.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1);          /* Ícono que crece */
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(59, 130, 246, 0.2));
}

/* ==========================================================================
   SECCIÓN: CALIBRACIÓN
   ========================================================================== */
.calibration-section {
    background: rgba(30, 41, 59, 0.5); /* Fondo semitransparente */
}

.calibration-card {
    background: linear-gradient(135deg, #1e293b 0%, #312e81 100%);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    height: 100%;
    border-left: 4px solid var(--accent-orange); /* Acorde naranja */
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Patrón de fondo animado */
.calibration-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: floatBackground 20s linear infinite;
}

@keyframes floatBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

/* Badges de certificación */
.certification-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.certification-badge.nom {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-orange);
}

.certification-badge.usa {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary-blue);
}

.certification-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   SECCIÓN: SOFTWARE
   ========================================================================== */
.software-feature {
    background: linear-gradient(135deg, #1e293b 0%, #312e81 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    height: 100%;
    border-left: 4px solid var(--primary-green); /* Acorde verde */
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.software-feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   SECCIÓN: INDUSTRIAS
   ========================================================================== */
.industries-section {
    background: rgba(30, 41, 59, 0.5);
}

.industry-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
}

.industry-card:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-5px);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   SECCIÓN: COBERTURA
   ========================================================================== */
.coverage-map {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: var(--border-radius);
    padding: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Forma decorativa de fondo */
.coverage-map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(16,185,129,0.03)"/></svg>');
    background-size: cover;
}

/* Barras de progreso personalizadas */
.progress-container .progress {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    height: 10px;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-green), var(--primary-blue));
    border-radius: 10px;
}

/* ==========================================================================
   SECCIÓN: CONTACTO (CTA)
   ========================================================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e1b4b 100%);
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Estilos del formulario */
.contact-form-container {
    box-shadow: var(--shadow-lg);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--white) !important;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: var(--primary-green) !important;
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25) !important;
    transform: translateY(-2px); /* Elevación al enfocar */
}

/* ==========================================================================
   COMPONENTE: PIE DE PÁGINA
   ========================================================================== */
footer {
    background: rgba(15, 23, 42, 0.95);
}

/* Enlaces sociales */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--gray-light);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.social-link:hover {
    color: var(--primary-green);
    background: rgba(16, 185, 129, 0.1);
    transform: translateY(-3px);
}

/* Enlaces del footer */
.footer-links {
    list-style: none;
    padding: 0;
}

.footer-link {
    color: var(--gray-light);
    transition: var(--transition);
    display: inline-block;
}

.footer-link:hover {
    color: var(--primary-green);
    padding-left: 5px; /* Efecto de desplazamiento */
}

/* ==========================================================================
   COMPONENTE: BOTÓN DE WHATSAPP FLOTANTE
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    z-index: 1000;
    animation: pulseWhatsapp 2s infinite; /* Pulso constante */
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

@keyframes pulseWhatsapp {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ==========================================================================
   ANIMACIONES GENERALES
   ========================================================================== */
.floating-element {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Animación de entrada */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   DISEÑO RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        margin-top: 2rem;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
    
    .coverage-map {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .slogan-badge {
        font-size: 0.9rem;
        padding: 0.6rem 1.5rem;
    }
    
    .hero-buttons .btn {
        width: 100%;                 /* Botones a ancho completo */
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;      /* Apilar botones verticalmente */
    }
}

/* ==========================================================================
   AJUSTES PARA MODO OSCURO (compatibilidad)
   ========================================================================== */
[data-bs-theme="dark"] {
    color-scheme: dark;
}

/* ==========================================================================
   LOADER (OPCIONAL)
   ========================================================================== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;           /* Desactiva interacciones */
}
