/* =========================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
    --brand-purple: #2E1A5F;
    --brand-teal: #3BBCA8;
    --brand-dark: #1a0f35;
    --text-main: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fc;
    --white: #ffffff;
    --shadow-soft: 0 10px 30px rgba(46, 26, 95, 0.08);
    --shadow-hover: 0 20px 40px rgba(46, 26, 95, 0.15);
}

body {
    background-color: var(--white);
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    margin: 0;
    padding-top: 80px; /* Espacio para el Navbar fijo */
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 1366px) {
    .container { max-width: 1080px; }
}

a { text-decoration: none; }
/* =========================================
   3. HERO SECTION (Fondo Moderno y Animado)
   ========================================= */
.hero-escuela {
    position: relative;
    padding: 140px 0 100px;       
    color: white;                 
    text-align: center;
    overflow: hidden;
}

/* Carrusel de fondos */
.hero-background-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-bg-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(46, 26, 95, 0.95) 0%, rgba(46, 26, 95, 0.85) 100%);
}

.hero-bg-slide.active {
    opacity: 1;
}

.hero-escuela .container {
    position: relative;
    z-index: 1;
}

/* Animación de entrada para el H1 */
.hero-escuela h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    color: white;
    font-weight: 800;
    margin-bottom: 25px;
    letter-spacing: -1px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); 
    animation: slideInUp 1s ease-out forwards;
}

/* Efecto Neón y Latido para "En Tiempo Récord" */
.text-gradient {
    background: linear-gradient(90deg, #3BBCA8, #6fffd4); 
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(59, 188, 168, 0.5));
    font-weight: 900;
    display: inline-block;
    animation: textPulse 3s infinite ease-in-out;
}

/* Párrafo */
.hero-escuela p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
    font-weight: 400;
    opacity: 0;
    animation: slideInUp 1s ease-out forwards;
    animation-delay: 0.5s;
}

/* Botones Hero */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    opacity: 0;
    animation: slideInUp 1s ease-out forwards;
    animation-delay: 0.8s;
}

/* Etiqueta Nueva Temporada */
.badge-tech {
    background: rgba(255, 255, 255, 0.1);
    color: #6fffd4;
    padding: 8px 25px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Botones Generales */
.btn {
    padding: 15px 35px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--brand-teal); /* Color resaltado para el botón principal */
    color: white;
    box-shadow: 0 10px 20px rgba(59, 188, 168, 0.3);
}
.btn-primary:hover {
    background: white;
    color: var(--brand-teal);
    transform: translateY(-3px);
}

.btn-whatsapp {
    background: transparent;
    color: white;
    border: 2px solid white;
}
.btn-whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
    color: white;
}

/* =========================================
   4. SECCIÓN DE PROGRAMAS (GRID)
   ========================================= */
.programs-section {
    padding: 80px 0;
    background: 
        linear-gradient(to bottom, rgba(248, 249, 252, 0.95), rgba(248, 249, 252, 0.80)),
    url('https://res.cloudinary.com/dtozni6ik/image/upload/f_auto,q_auto/v1770062147/imagen_2026-02-02_145548813_otu7p7.png') center center / cover no-repeat fixed;
}

.section-header { text-align: center; margin-bottom: 60px; }
.section-title { font-size: 2.5rem; color: var(--brand-purple); font-weight: 800; margin-bottom: 15px; }
.section-desc { color: var(--text-light); font-size: 1.1rem; }

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.program-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: var(--shadow-soft);
    display: flex; flex-direction: column; justify-content: space-between;
}
.program-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }

/* Header de la tarjeta */
.card-header-tech {
    font-size: 1.5rem; font-weight: 900; color: var(--brand-teal);
    background: rgba(59, 188, 168, 0.1); display: inline-block;
    padding: 8px 18px; border-radius: 50px; margin-bottom: 15px;
    text-align: center;
    width: 100%;
}
.card-top-content h3 { font-size: 1.5rem; margin: 0 0 5px 0; color: var(--brand-purple); }
.card-desc { font-size: 0.95rem; color: var(--text-light); margin-bottom: 20px; }

/* Cuerpo expandible */
.card-body-expand { border-top: 1px dashed #eee; padding-top: 20px; margin-bottom: 20px; }
.tech-list { list-style: none; padding: 0; margin: 0; }
.tech-list li { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.tech-list li i { color: var(--brand-teal); }

/* Botón de la tarjeta - Interactivo */
.btn-card-action {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 12px 20px; 
    border-radius: 12px; 
    border: 2px solid var(--brand-purple);
    color: var(--brand-purple); 
    font-weight: 700; 
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

/* Efecto de fondo animado */
.btn-card-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-card-action:hover::before {
    left: 100%;
}

.btn-card-action:hover { 
    background: var(--brand-purple); 
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 20, 140, 0.3);
}

.btn-card-action:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(74, 20, 140, 0.2);
}

/* Animación de los iconos */
.btn-card-action i {
    transition: transform 0.3s ease;
}

.btn-card-action:hover i {
    transform: scale(1.2) rotate(5deg);
}

/* Tarjeta Destacada */
.program-card.highlight { border: 2px solid var(--brand-purple); transform: scale(1.02); z-index: 2; }
.program-card.highlight:hover { transform: scale(1.05); }
.program-card.highlight .btn-card-action { background: var(--brand-purple); color: white; }

/* --- Horarios en Tarjetas (Etiquetas) --- */
.schedule-box { margin-bottom: 20px; }
.s-label { font-size: 0.8rem; font-weight: 700; color: #555; margin-bottom: 8px; display: block; }
.s-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.time-tag {
    background: white; color: var(--brand-purple); border: 1px solid #ddd;
    padding: 4px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 700;
}
.free-advice-badge {
    background-color: var(--brand-purple); color: white; text-align: center;
    font-size: 0.8rem; font-weight: 700; padding: 8px; border-radius: 8px; margin-top: 15px;
}

/* =========================================
   5. CURSOS ESPECIALES (GRID AVANZADO)
   ========================================= */
.special-courses-section {
    padding: 80px 0;
    position: relative;
    background: linear-gradient(135deg, rgba(248, 249, 252, 0.97) 0%, rgba(255, 255, 255, 0.80) 100%),
                url('https://res.cloudinary.com/dtozni6ik/image/upload/f_auto,q_auto/v1770062147/imagen_2026-02-02_145548813_otu7p7.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.special-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px; 
    margin-top: 40px; 
}

@media (max-width: 992px) {
    .special-grid {
        grid-template-columns: 1fr;
    }
}

.special-card {
    display: flex; 
    gap: 20px; 
    padding: 30px; 
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fc 100%);
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Efecto de brillo animado en el fondo */
.special-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(59, 188, 168, 0.1) 50%, 
        transparent 70%);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.special-card:hover::before {
    opacity: 1;
    animation: shine 1.5s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.special-card:hover { 
    border-color: var(--brand-teal); 
    box-shadow: 0 12px 35px rgba(59, 188, 168, 0.2),
                0 0 0 1px rgba(59, 188, 168, 0.1);
    transform: translateY(-8px) scale(1.02);
}

.s-icon {
    width: 70px; 
    height: 70px; 
    border-radius: 18px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 1.8rem; 
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Efecto de pulso en el icono */
.s-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 18px;
    background: inherit;
    opacity: 0;
    animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

.special-card:hover .s-icon {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.s-icon.purple { 
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%); 
    color: var(--brand-purple); 
}

.s-icon.teal { 
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%); 
    color: var(--brand-teal); 
}

.s-content { width: 100%; position: relative; z-index: 1; }

.s-header-flex { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 8px; 
}

.s-header-flex h4 { 
    margin: 0; 
    color: var(--brand-purple); 
    font-size: 1.2rem;
    font-weight: 800;
    transition: color 0.3s ease;
}

.special-card:hover .s-header-flex h4 {
    color: var(--brand-teal);
}

.mini-price { 
    background: linear-gradient(135deg, var(--brand-teal) 0%, #26a69a 100%); 
    color: white; 
    font-weight: 700; 
    font-size: 0.75rem; 
    padding: 5px 12px; 
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(59, 188, 168, 0.3);
    transition: all 0.3s ease;
}

.special-card:hover .mini-price {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 188, 168, 0.4);
}

.s-subtitle { 
    margin: 0 0 15px 0; 
    font-size: 0.95rem; 
    color: var(--text-light);
    font-weight: 500;
}

.simple-list { 
    list-style: none; 
    padding: 0; 
    margin-bottom: 0; 
}

.simple-list li { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    font-size: 0.9rem; 
    margin-bottom: 8px;
    padding: 5px 0;
    transition: all 0.2s ease;
}

.simple-list li:hover {
    transform: translateX(5px);
}

.simple-list li i { 
    color: var(--brand-teal);
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.simple-list li:hover i {
    transform: scale(1.2) rotate(10deg);
}

/* --- NUEVA CUADRÍCULA DE HORARIOS (Estética) --- */
.schedule-title {
    font-size: 0.8rem; font-weight: 700; color: var(--brand-purple);
    display: block; margin-bottom: 8px; border-bottom: 1px dashed #e2e8f0; padding-bottom: 4px;
}
.time-grid-list {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
    list-style: none; padding: 0; margin: 0 0 15px 0;
    max-height: 160px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Personalizar el scrollbar para la lista de horarios */
.time-grid-list::-webkit-scrollbar {
    width: 6px;
}

.time-grid-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.time-grid-list::-webkit-scrollbar-thumb {
    background: var(--brand-teal);
    border-radius: 10px;
}

.time-grid-list::-webkit-scrollbar-thumb:hover {
    background: #2a9d8f;
}

.time-grid-list li {
    background-color: white; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 6px 4px; text-align: center; font-size: 0.75rem; font-weight: 600;
    color: var(--text-main); transition: all 0.2s ease; cursor: default;
}
.time-grid-list li:hover {
    border-color: var(--brand-teal); color: var(--brand-teal);
    background-color: #f0fdfa; transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(59, 188, 168, 0.15);
}

/* =========================================
   6. ANIMACIONES Y KEYFRAMES
   ========================================= */
@keyframes slideInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes textPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); text-shadow: 0 0 20px rgba(59, 188, 168, 0.3); }
    100% { transform: scale(1); }
}

/* Clases utilitarias para JS Scroll */
.fade-in { opacity: 0; transition: opacity 1s ease-out; }
.slide-up { opacity: 0; transform: translateY(50px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.visible { opacity: 1; transform: translateY(0); }

/* Seccion Estadísticas */
.stats-section {
    background: var(--brand-purple); padding: 60px 0; color: white; text-align: center; margin-top: 50px;
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.stat-item i { font-size: 2.5rem; color: var(--brand-teal); margin-bottom: 10px; }
.stat-number { font-size: 3rem; font-weight: 800; line-height: 1; margin-bottom: 5px; }

/* =========================================
   7. FOOTER Y EXTRAS
   ========================================= */
.cta-simple {
    padding: 80px 0;
    position: relative;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, rgba(46, 26, 95, 0.92) 0%, rgba(26, 15, 53, 0.88) 100%),
                url('https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?q=80&w=1469&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.cta-simple h2 { font-size: 2.5rem; margin-bottom: 10px; }
.btn-white { background: white; color: var(--brand-purple); padding: 18px 45px; border-radius: 50px; font-weight: 700; }
.btn-white:hover { background: var(--brand-teal); color: white; }

.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px; background-color: #25D366; color: white;
    width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 32px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 9999;
    transition: transform 0.3s;
}
.whatsapp-float:hover { transform: scale(1.1); }

/* Responsive Tablet */
@media (max-width: 1024px) {
    .hero-escuela h1 { font-size: 3rem; }
    .section-title { font-size: 2.1rem; }
    .special-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .special-card { flex-direction: column; align-items: flex-start; }
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-escuela { background-attachment: scroll; padding: 100px 0 60px; }
    .hero-escuela h1 { font-size: 2.5rem; }
    .programs-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .section-title { font-size: 1.8rem; }
    
    /* Títulos de tarjetas en móvil */
    .card-header-tech {
        font-size: 1.2rem;
        padding: 6px 14px;
    }
    
    .card-top-content h3 {
        font-size: 1.1rem;
    }
    
    /* Cursos de especialización responsive */
    .special-grid { grid-template-columns: 1fr; }
    .special-card { flex-direction: column; }
    
    /* Ajustar imagen de fondo en móvil */
    .programs-section {
        background-attachment: scroll;
    }
    
    .cta-simple h2 { font-size: 2rem; }
    .whatsapp-float { width: 50px; height: 50px; font-size: 28px; bottom: 20px; right: 20px; }
    
    .hero-bg-slide {
        background-attachment: scroll;
    }
}