/* ===== VARIABLES ===== */
:root {
    --bg-color: #0a0a1a;
    --text-color: #ffffff;
    --primary: #00e5ff;
    --secondary: #d49afe;
    --accent: #ff00c3;
    --card-bg: rgba(10, 10, 40, 0.5);
}

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', 'Arial', sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
    background-image: url("../images/fondo.jpeg");
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    position: relative;
    overflow-x: hidden;
}

/* HAZ DE LUZ ANIMADO EN EL FONDO */
body::after {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(0, 229, 255, 0.05) 0%, transparent 60%);
    animation: sweepLight 15s infinite linear;
    pointer-events: none;
    z-index: 0;
}
@keyframes sweepLight {
    0% { transform: translate(-30%, -30%) rotate(0deg); }
    100% { transform: translate(30%, 30%) rotate(360deg); }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    z-index: 1000;
}
.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}
.nav-links {
    display: flex;
    gap: 2rem;
}
.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}
.nav-links a:hover {
    color: var(--primary);
}

/* Contenedor general de secciones */
section {
    position: relative;
    z-index: 1;
    padding: 5rem 5%;
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 8rem;
}
.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.3em;
    text-shadow: 0 0 20px rgba(212, 154, 254, 0.5);
}
.hero .subtitulo {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    opacity: 0.9;
    margin-bottom: 2rem;
    color: #ccd9ff;
    max-width: 800px;
}
.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}
.btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #0077ff);
    color: white;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    border: none;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.6);
}
.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-secondary:hover {
    background: rgba(0, 229, 255, 0.1);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.4em 1.5em;
    background: rgba(0, 255, 255, 0.15);
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 50px;
    color: var(--primary);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    animation: pulseBadge 3s infinite;
}
@keyframes pulseBadge {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 229, 255, 0.4); }
    50% { box-shadow: 0 0 18px rgba(0, 229, 255, 0.8); }
}

/* Stats Section */
.stats {
    background: rgba(10, 10, 30, 0.7);
    padding: 4rem 5%;
    border-top: 1px solid rgba(0, 229, 255, 0.1);
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
    backdrop-filter: blur(10px);
}
.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.stat-text {
    font-size: 1rem;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Titles for sections */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: white;
}
.section-title span {
    color: var(--primary);
}

/* Catálogo de Cursos */
.cursos {
    padding-top: 5rem;
}
.grid-cursos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
}
.curso-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Tarjetas de Curso */
.tarjeta-curso {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 18px;
    padding: 2rem 1.5rem;
    width: 100%;
    cursor: pointer;
    transition: all 0.4s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 250px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(0, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}
.tarjeta-curso:hover {
    border-color: var(--primary);
    box-shadow: 0 0 35px rgba(0, 229, 255, 0.4), inset 0 0 60px rgba(0, 255, 255, 0.1);
    background: rgba(10, 10, 50, 0.8);
    transform: translateY(-5px);
}

.curso-numero {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
}

.badge-ia {
    display: inline-block;
    padding: 0.4em 1em;
    background: rgba(212, 154, 254, 0.15);
    border: 1px solid rgba(212, 154, 254, 0.4);
    border-radius: 30px;
    color: #f0c8ff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 10px rgba(212, 154, 254, 0.2);
}

.tarjeta-curso h3 {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.duracion {
    font-size: 0.9rem;
    color: #ccd9ff;
    margin-bottom: 0.5rem;
}
.dist-horas {
    display: block;
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 0.3rem;
}
.precio-original {
    font-size: 0.9rem;
    color: #aaa;
    text-decoration: line-through;
    margin-top: 1rem;
}
.precio-especial {
    font-size: 1.1rem;
    color: #ffeb3b;
    font-weight: 700;
    margin-top: 0.2rem;
}

/* Modales */
.modal-curso {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    max-width: 900px;
    background: rgba(8, 8, 30, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 24px;
    padding: 3rem;
    z-index: 9999;
    box-shadow: 0 0 80px rgba(0, 229, 255, 0.3), 0 30px 50px rgba(0, 0, 0, 0.8);
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    gap: 1.5rem;
    transition: opacity 0.3s ease;
}
.curso-wrapper.modal-abierto .modal-curso { display: flex; }

.modal-cerrar {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.7;
    z-index: 10001;
}
.modal-cerrar:hover { opacity: 1; color: var(--primary); }

.item-modal {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 2rem 1rem;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: all 0.3s;
}
.item-modal:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--primary);
    transform: scale(1.05);
}
.item-num {
    font-size: 2rem;
    font-weight: 900;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}
.item-nombre { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.item-horas {
    font-size: 0.9rem;
    background: rgba(0, 229, 255, 0.2);
    padding: 0.3em 1em;
    border-radius: 20px;
    color: var(--primary);
}

/* Metodología */
.metodologia {
    background: rgba(10, 10, 20, 0.8);
}
.metodologia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.metodo-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s;
}
.metodo-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
}
.metodo-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.metodo-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}
.metodo-card p {
    color: #ccc;
    line-height: 1.6;
}

/* Instructor */
.instructor {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 5rem 5%;
}
.instructor-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.instructor-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    object-fit: cover;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}
.instructor-bio h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
}
.instructor-bio .subtitle {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}
.instructor-bio p {
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* FAQ */
.faq {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
}
.faq-question {
    padding: 1.5rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-question:hover {
    color: var(--primary);
}
.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #ccc;
    line-height: 1.6;
}
.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem;
    max-height: 500px;
}
.faq-icon {
    transition: transform 0.3s;
}
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* Footer */
footer {
    background: #050510;
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.footer-links a {
    color: #aaa;
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--primary);
}
.copyright {
    color: #666;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* WhatsApp Btn */
.btn-wa-flotante {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #1da851);
    box-shadow: 0 4px 25px rgba(37, 211, 102, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: transform 0.3s, box-shadow 0.3s;
}
.btn-wa-flotante img {
    width: 65%;
    height: 65%;
    object-fit: contain;
    z-index: 1;
}
.btn-wa-flotante:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.9);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.2rem; }
    .modal-curso { flex-direction: column; width: 90vw; padding: 2rem 1rem; }
}

/* ===== ESTILOS DEL CARRUSEL DE CURSOS ===== */
.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3.5rem; /* Espacio para las flechas laterales */
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Las tarjetas del curso dentro del carrusel */
.carousel-track .curso-wrapper {
    flex: 0 0 calc(33.333% - 1.333rem); /* 3 columnas por defecto */
    min-width: 280px;
}

/* Flechas de Navegación */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 10, 40, 0.7);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: var(--primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
    user-select: none;
}

.carousel-btn:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.1);
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}

/* Indicadores de Puntos (Dots) */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2.5rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    transform: scale(1.2);
}

/* Responsivo para el Carrusel */
@media (max-width: 992px) {
    .carousel-track .curso-wrapper {
        flex: 0 0 calc(50% - 1rem); /* 2 columnas en tablets */
    }
}

@media (max-width: 768px) {
    .carousel-container {
        padding: 0 2.5rem;
    }
    .carousel-track .curso-wrapper {
        flex: 0 0 100%; /* 1 columna en móviles */
    }
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    .prev-btn { left: -10px; }
    .next-btn { right: -10px; }
}