@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;700;800&display=swap');

:root {
    --bg-main: #f8fafc;
    --bg-white: #ffffff;
    --blue-dark: #0f172a; 
    --blue-accent: #2563eb;
    --blue-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-soft: rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    background-image: radial-gradient(circle at top right, rgba(59, 130, 246, 0.04) 0%, transparent 40%),
                      radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.04) 0%, transparent 40%);
    color: var(--text-dark);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--blue-dark);
}

.text-gradient {
    background: var(--blue-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-blue-dark {
    background-color: var(--blue-dark) !important;
    color: #ffffff;
}

.bg-blue-dark h1, .bg-blue-dark h2, .bg-blue-dark h3, .bg-blue-dark h4, .bg-blue-dark h5, .bg-blue-dark h6, .bg-blue-dark p, .bg-blue-dark li {
    color: #ffffff !important;
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-soft);
    border-radius: 30px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.08);
}

.btn-gradient {
    background: var(--blue-gradient);
    color: #ffffff !important;
    border: none;
    border-radius: 100px;
    padding: 14px 32px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
    transform: scale(1.02);
}

.btn-outline-glow {
    background: transparent;
    border: 2px solid var(--blue-accent);
    color: var(--blue-accent);
    border-radius: 100px;
    padding: 12px 24px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: 0.3s;
}

.btn-outline-glow:hover {
    background: var(--blue-accent);
    color: #fff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.mobile-menu-modal .modal-content {
    background-color: var(--bg-white);
    border: none;
    border-radius: 0;
    height: 100vh;
}

.mobile-menu-modal .modal-header {
    border-bottom: 1px solid var(--border-soft);
}

.mobile-menu-modal .nav-link {
    font-size: 1.8rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-soft);
}

.mobile-menu-modal .nav-link:hover {
    color: var(--blue-accent);
    padding-left: 10px;
    transition: 0.3s;
}

/* Estilos de Acordeón FAQ */
.faq-accordion .accordion-item {
    background-color: var(--bg-white);
    border: 1px solid var(--border-soft);
    border-radius: 20px !important;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: 0.3s;
}

.faq-accordion .accordion-item:hover {
    border-color: var(--blue-accent);
    box-shadow: 0 8px 15px rgba(37, 99, 235, 0.08);
}

.faq-accordion .accordion-button {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    background-color: transparent;
    padding: 1.5rem;
    box-shadow: none !important;
}

.faq-accordion .accordion-button:not(.collapsed) {
    color: var(--blue-accent);
    background-color: rgba(37, 99, 235, 0.03);
}

.faq-accordion .accordion-button::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233b82f6'%3E%3Cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3E%3Cpath d='M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z'/%3E%3C/svg%3E");
    transition: all 0.3s ease;
}

.faq-accordion .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233b82f6'%3E%3Cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3E%3Cpath d='M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'/%3E%3C/svg%3E");
    transform: rotate(180deg);
}

.faq-accordion .accordion-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Modales */
.modal-content {
    background-color: var(--bg-white);
    border: none;
    border-radius: 30px;
    color: var(--text-dark);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--border-soft);
}

.btn-close-red {
    background-color: #ef4444;
    opacity: 1;
    border-radius: 50%;
    padding: 0.6rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    background-size: 50%;
    transition: 0.3s;
}

.btn-close-red:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}

/* Formularios */
.form-control, .form-select {
    background-color: var(--bg-main);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    color: var(--text-dark);
    padding: 14px 20px;
}

.form-control:focus {
    background-color: var(--bg-white);
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    color: var(--text-dark);
}

.form-label {
    color: var(--text-dark);
    font-weight: 600;
    margin-left: 5px;
}

.wa-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.wa-float:hover {
    transform: scale(1.1) rotate(-10deg);
    color: #fff;
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--blue-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 1.5rem;
}

#tsparticles-hero {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

#tsparticles-hero canvas {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 1; /* Detrás del texto */
}

.particles-text-overlay {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 10; /* Por encima de las partículas */
    pointer-events: none;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
    .log-success { color: #10B981; }
    .log-warning { color: #F59E0B; }
    .log-dim { color: #64748B; }

@keyframes blink-animation { 
    0%, 100% { opacity: 1; } 
    50% { opacity: 0; } 
}

.cursor-blink {
    animation: blink-animation 1s step-end infinite !important;
    color: #38bdf8; /* Para que haga match con el texto de la terminal */
}

/* EFECTO RADAR WHATSAPP */
.wa-float {
    /* Mantenemos tus estilos originales */
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Pseudo-elemento para el pulso */
.wa-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #25D366;
    border-radius: 50%;
    z-index: -1; /* Para que quede detrás del ícono */
    animation: pulse-radar 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-radar {
    to {
        box-shadow: 0 0 0 30px rgba(37, 211, 102, 0);
        opacity: 0;
        transform: scale(1.5);
    }
}

/* INDICADOR DE STATUS LED */
.status-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #0f172a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border-soft);
}

.status-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10B981; /* Verde éxito */
    box-shadow: 0 0 8px #10B981;
    animation: led-blink 2s infinite ease-in-out;
}

/* Animación sutil de respiración del LED */
@keyframes led-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* =========================================
   REGLAS RESPONSIVE (Móviles y Tablets)
   ========================================= */
@media (max-width: 991.98px) {
    /* 1. Ajustes de Tipografía en Inicio */
    #inicio h1.display-3 {
        font-size: 2.5rem !important; /* Más amigable para lectura móvil */
        margin-top: 1rem;
    }
    
    #inicio p.lead {
        font-size: 1.1rem !important;
        margin-bottom: 2rem !important;
    }

    /* 2. Caja de Animaciones (Partículas) más compacta */
    #tsparticles-hero {
        height: 320px !important; 
        margin-top: 2rem;
    }

    #dynamic-message-box {
        padding: 1.5rem !important;
        width: 95% !important; /* Aprovecha el ancho de la pantalla */
    }

    #hero-dynamic-icon {
        font-size: 2rem !important;
    }

    #hero-dynamic-text {
        font-size: 1.1rem !important;
    }

    /* 3. Reducción de relleno en todas las tarjetas de cristal */
    .glass-card {
        padding: 1.5rem !important; 
    }

    /* 4. Terminal Evolutiva para que no desborde */
    .p-4[style*="font-family: monospace"] {
        font-size: 0.85rem !important; 
        padding: 1rem !important;
        min-height: 200px !important;
    }

    /* 5. Ajustes Formulario Contacto */
    #contacto .bg-blue-dark,
    #contacto .bg-white {
        padding: 2rem !important; 
    }
    
    #contacto h2.display-6 {
        font-size: 1.8rem;
    }

    /* 6. Botón Flotante WhatsApp proporcional */
    .wa-float {
        width: 55px; 
        height: 55px;
        font-size: 30px;
        bottom: 20px;
        right: 20px;
    }
}

/* =========================================
   REGLAS PARA MONITORES 2K / 4K / ULTRAWIDE
   ========================================= */
@media (min-width: 1600px) {
    /* Rompemos el límite de Bootstrap para que ocupe el 85% de la pantalla */
    .container {
        max-width: 85% !important; 
    }
    
    /* Escalamos la tipografía del Hero para que no se vea pequeña */
    #inicio h1.display-3 {
        font-size: 5rem !important; 
    }
    
    #inicio p.lead {
        font-size: 1.4rem !important;
        /* MUY IMPORTANTE: Evita que el texto sea una línea kilométrica imposible de leer */
        max-width: 800px; 
    }

    /* Le damos más área a la animación de partículas */
    #tsparticles-hero {
        height: 600px !important; 
    }

    /* Las tarjetas de cristal pueden respirar más */
    .glass-card {
        padding: 3rem !important; 
    }
}