/* =========================================
   Paleta de Colores - PREMIUM DARK & GLASS
   ========================================= */
:root {
    --bg-color: transparent;     /* El fondo lo manejará tsParticles */
    --primary-color: #38BDF8;    /* Light Blue */
    --primary-glow: rgba(56, 189, 248, 0.5);
    --secondary-color: #818CF8;  /* Indigo */
    --secondary-glow: rgba(129, 140, 248, 0.4);
    --accent-color: #10B981;     /* Emerald (Mejor contraste que ámbar para tech) */
    --accent-glow: rgba(16, 185, 129, 0.4);
    --text-color: #F8FAFC;       /* Slate 50 (Más blanco) */
    --text-muted: #94A3B8;       /* Slate 400 */
    
    --glass-bg: rgba(15, 23, 42, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

body {
    background-color: #0B0F19; /* Fallback profundo */
    overflow: hidden;
}

#tsparticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: #0B0F19 !important;
}

/* =========================================
   Scanline Overlay - Estética Tech Sutil
   ========================================= */
.reveal::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    opacity: 0.4;
}

/* =========================================
   Estilos Generales de Reveal
   ========================================= */
.reveal {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: transparent;
}

.reveal .slides {
    text-align: left;
}

/* Tipografía de Títulos con Gradientes + Underline Animado */
.reveal h1, .reveal h2, .reveal h3, .reveal h4 {
    font-family: var(--font-title);
    font-weight: 800;
    text-transform: none;
    letter-spacing: -0.5px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(56, 189, 248, 0.15);
    position: relative;
    display: inline-block;
}

/* Línea decorativa animada bajo los títulos h2 */
.reveal h2::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 200% 100%;
    animation: underline-draw 0.8s 0.3s ease-out forwards, gradient-shift 3s ease infinite;
}
@keyframes underline-draw {
    to { width: 100%; }
}
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.reveal h1 { font-size: 60px; line-height: 1.1; }
.reveal h2 { font-size: 42px; }
.reveal h3 { font-size: 28px; }

/* Tipografía de Cuerpo */
.reveal p, .reveal li { 
    font-size: 20px; 
    line-height: 1.6; 
    color: var(--text-color); 
}

/* Efecto Shimmer en strong */
strong {
    color: var(--primary-color);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(56,189,248,0.3);
    position: relative;
    background: linear-gradient(
        90deg, 
        var(--primary-color) 0%, 
        #a5f3fc 40%, 
        var(--primary-color) 60%, 
        var(--primary-color) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s ease-in-out infinite;
}
@keyframes shimmer {
    0%, 100% { background-position: -100% 0; }
    50% { background-position: 200% 0; }
}

.accent-text {
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
}

/* =========================================
   Glassmorphism (WOW Factor) + Borde Animado
   ========================================= */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
}

/* Borde con gradiente animado que aparece al hacer hover */
.glass-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    padding: 2px;
    background: conic-gradient(
        from var(--border-angle, 0deg),
        transparent 40%,
        var(--primary-color) 50%,
        var(--secondary-color) 55%,
        transparent 60%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: rotate-border 4s linear infinite;
    z-index: -1;
}

@property --border-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}
@keyframes rotate-border {
    to { --border-angle: 360deg; }
}

.glass-card:hover::before {
    opacity: 1;
}
.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(56, 189, 248, 0.15), inset 0 1px 0 rgba(255,255,255,0.2);
    border-color: rgba(56, 189, 248, 0.3);
}

/* Brillo ambiental interior al hover */
.glass-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: radial-gradient(ellipse at 50% 0%, rgba(56, 189, 248, 0.06) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    border-radius: 20px 20px 0 0;
}
.glass-card:hover::after {
    opacity: 1;
}

/* =========================================
   Layouts y Contenedores
   ========================================= */
.reveal .slides > section {
    padding: 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
}
.grid-2-balanced {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Animación Flotante para Íconos */
@keyframes float {
    0% { transform: translateY(0px) rotateY(0deg); filter: drop-shadow(0 5px 15px var(--primary-glow)); }
    25% { transform: translateY(-10px) rotateY(5deg); }
    50% { transform: translateY(-15px) rotateY(0deg); filter: drop-shadow(0 20px 25px var(--primary-glow)); }
    75% { transform: translateY(-10px) rotateY(-5deg); }
    100% { transform: translateY(0px) rotateY(0deg); filter: drop-shadow(0 5px 15px var(--primary-glow)); }
}

.icon-large {
    font-size: 130px;
    color: var(--primary-color);
    text-align: center;
    stroke-width: 1.5px;
}
.icon-large i {
    animation: float 6s ease-in-out infinite;
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =========================================
   Estilos de Portada - Mejorada
   ========================================= */
.cover-section {
    position: relative;
    height: 100%;
}
.cover-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 60vh;
    text-align: center;
}

/* Portada con gradiente animado */
.cover-title {
    font-size: 80px !important;
    margin: 0;
    text-align: center;
    background: linear-gradient(
        270deg, 
        #FFFFFF, 
        var(--primary-color), 
        var(--secondary-color), 
        #FFFFFF
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-title 8s ease infinite;
}
@keyframes gradient-title {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.subtitle {
    font-size: 24px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 20px;
    animation: fadeInUp 1s 0.5s ease both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   Listas y Viñetas
   ========================================= */
.reveal ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
.reveal li {
    margin-bottom: 20px;
    position: relative;
    padding-left: 40px;
    padding-top: 5px;
    padding-bottom: 5px;
    transition: transform 0.3s ease, background 0.3s ease;
    border-radius: 8px;
}
.reveal li:hover {
    transform: translateX(8px);
    background: rgba(56, 189, 248, 0.03);
}
.reveal li::before {
    content: "▹";
    position: absolute;
    left: 10px;
    top: 5px;
    color: var(--primary-color);
    font-size: 24px;
    text-shadow: 0 0 10px var(--primary-glow);
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}
.reveal li:hover::before {
    transform: translateX(3px) scale(1.2);
    text-shadow: 0 0 20px var(--primary-glow);
}

/* =========================================
   Línea de Tiempo (Índice y Flujo)
   ========================================= */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    width: 100%;
}
.progress-bar::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    z-index: 1;
    transform: translateY(-50%);
}

/* Línea de progreso animada */
.progress-bar::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 200% 100%;
    z-index: 1;
    transform: translateY(-50%);
    opacity: 0.3;
    animation: gradient-shift 3s ease infinite;
}

.progress-step {
    position: relative;
    z-index: 2;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 30px;
    padding: 8px 24px;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 16px;
    color: var(--text-muted);
    transition: all 0.4s ease;
}
.progress-step.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(129, 140, 248, 0.15));
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 25px var(--primary-glow), 0 0 50px rgba(56, 189, 248, 0.1);
    transform: scale(1.1);
    animation: active-pulse 2s ease-in-out infinite;
}
@keyframes active-pulse {
    0%, 100% { box-shadow: 0 0 25px var(--primary-glow); }
    50% { box-shadow: 0 0 35px var(--primary-glow), 0 0 60px rgba(56, 189, 248, 0.15); }
}

/* Índice Estilo Navegación Futurista */
.index-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}
.index-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    position: relative;
    overflow: hidden;
}

/* Efecto de luz deslizante al hover en items del índice */
.index-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.06), transparent);
    transition: left 0.6s ease;
}
.index-item:hover::after {
    left: 150%;
}

.index-item:hover {
    background: rgba(56, 189, 248, 0.05);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3), 0 0 20px rgba(56, 189, 248, 0.05);
}
.index-number {
    font-family: var(--font-title);
    font-size: 28px;
    font-weight: 800;
    margin-right: 20px;
    opacity: 0.7;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.3s ease;
}
.index-item:hover .index-number {
    opacity: 1;
}

/* =========================================
   Anillos (Interfaces) - Con Rotación
   ========================================= */
.rings-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 350px;
}
.ring-core {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: #FFF;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 16px;
    z-index: 4;
    text-align: center;
    box-shadow: 0 0 30px var(--primary-glow);
    animation: pulse 3s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 20px var(--primary-glow); }
    50% { box-shadow: 0 0 50px var(--secondary-glow); }
    100% { box-shadow: 0 0 20px var(--primary-glow); }
}
.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(255,255,255,0.2);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15px;
    font-family: var(--font-title);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    background: rgba(255,255,255,0.01);
    backdrop-filter: blur(2px);
    transition: all 0.5s ease;
}
.ring:hover {
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 20px var(--primary-glow) inset;
}

/* Rotación sutil de los anillos */
.ring-1 { 
    width: 220px; height: 220px; z-index: 3; 
    animation: ring-spin 20s linear infinite;
}
.ring-2 { 
    width: 320px; height: 320px; z-index: 2; 
    animation: ring-spin 30s linear infinite reverse;
}
.ring-3 { 
    width: 420px; height: 420px; z-index: 1; 
    animation: ring-spin 40s linear infinite;
}
@keyframes ring-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =========================================
   Pros y Contras (Dashboard)
   ========================================= */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}
.pros, .cons {
    padding: 30px;
    border-radius: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}
.pros:hover, .cons:hover { transform: translateY(-5px); }

/* Brillo ambiental para pros y cons */
.pros::after, .cons::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.pros::after {
    background: radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
}
.cons::after {
    background: radial-gradient(ellipse at 50% 0%, rgba(239, 68, 68, 0.08) 0%, transparent 70%);
}
.pros:hover::after, .cons:hover::after { opacity: 1; }

.pros {
    border-top: 4px solid var(--accent-color);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.1);
}
.cons {
    border-top: 4px solid #EF4444; /* Rojo/Coral */
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.1);
}
.pros:hover { box-shadow: 0 15px 40px rgba(16, 185, 129, 0.2); }
.cons:hover { box-shadow: 0 15px 40px rgba(239, 68, 68, 0.2); }

.pros h3 { background: none; -webkit-text-fill-color: var(--accent-color); text-shadow: 0 0 10px var(--accent-glow); margin-bottom: 20px;}
.cons h3 { background: none; -webkit-text-fill-color: #EF4444; text-shadow: 0 0 10px rgba(239, 68, 68, 0.4); margin-bottom: 20px;}
.pros li::before { color: var(--accent-color); }
.cons li::before { color: #EF4444; }

/* =========================================
   Cierre - Efecto Glitch Real
   ========================================= */
.glitch-text {
    font-size: 100px !important;
    text-transform: uppercase;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
    animation: pulse-text 4s infinite;
}

/* Capas del glitch */
.glitch-text::before,
.glitch-text::after {
    content: "¿PREGUNTAS?";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.glitch-text::before {
    animation: glitch-1 3s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}
.glitch-text::after {
    animation: glitch-2 3s infinite linear alternate-reverse;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, -3px); }
}
@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(3px, -3px); }
    40% { transform: translate(3px, 3px); }
    60% { transform: translate(-3px, -3px); }
    80% { transform: translate(-3px, 3px); }
}

@keyframes pulse-text {
    0% { filter: drop-shadow(0 0 10px var(--primary-glow)); }
    50% { filter: drop-shadow(0 0 30px var(--secondary-glow)); }
    100% { filter: drop-shadow(0 0 10px var(--primary-glow)); }
}

/* =========================================
   Animaciones de Fragmentos Mejoradas
   ========================================= */
.reveal .fragment {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* Efecto de entrada personalizado para fragmentos */
.reveal .fragment.fade-up {
    transform: translateY(30px);
}
.reveal .fragment.fade-up.visible {
    transform: translateY(0);
}

.reveal .fragment.fade-left {
    transform: translateX(40px);
}
.reveal .fragment.fade-left.visible {
    transform: translateX(0);
}

.reveal .fragment.fade-right {
    transform: translateX(-40px);
}
.reveal .fragment.fade-right.visible {
    transform: translateX(0);
}

/* =========================================
   Scroll Indicator / Slide Counter Mejorado
   ========================================= */
.reveal .controls {
    color: var(--primary-color) !important;
}
.reveal .progress {
    height: 4px !important;
    color: var(--primary-color) !important;
}
.reveal .progress span {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)) !important;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* =========================================
   Selección de Texto
   ========================================= */
::selection {
    background: rgba(56, 189, 248, 0.3);
    color: #FFFFFF;
}
