/* --- VARIABLES Y CONFIGURACIÓN --- */
:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1f1f1f;
    --primary: #00e5ff; /* Cian Neón */
    --primary-dim: rgba(0, 229, 255, 0.1);
    --secondary: #ffd700; /* Amarillo Oro */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border: #333333;
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-main); background-color: var(--bg-dark); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3, h4 { font-weight: 900; color: var(--text-main); }
.highlight { color: var(--primary); text-shadow: 0 0 15px rgba(0, 229, 255, 0.4); }

/* NAV & LOGO */
.top-nav { padding: 20px 0; background-color: rgba(10, 10, 10, 0.95); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px); }
.logo-container { display: flex; align-items: center; gap: 15px; }
.academy-logo { height: 50px; border-radius: 8px; }
.brand-name { font-weight: 700; font-size: 1.2rem; letter-spacing: 1px; color: var(--text-main); }

/* HERO */
.hero-section { padding: 100px 0 80px; text-align: center; background: radial-gradient(circle at center, #1a1a1a 0%, #0a0a0a 70%); }
.tagline { color: var(--secondary); font-size: 0.9rem; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 20px; font-weight: 700; }
.hero-section h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 25px; }
.subtitle { font-size: 1.2rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 40px; }
.cta-button { display: inline-block; padding: 18px 40px; border-radius: 50px; font-weight: 700; text-decoration: none; font-size: 1.1rem; transition: var(--transition); border: none; cursor: pointer; }
.cta-button.primary { background-color: var(--primary); color: #000; box-shadow: 0 0 20px rgba(0, 229, 255, 0.3); }
.cta-button.primary:hover { background-color: #fff; transform: translateY(-3px); box-shadow: 0 0 30px rgba(0, 229, 255, 0.6); }
.whatsapp-inline { margin-top: 30px; color: var(--text-muted); font-size: 0.95rem; }
.whatsapp-inline i { color: #25D366; font-size: 1.2rem; margin-right: 5px; }

/* SEPARADOR */
.section-divider { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 0; }

/* BENEFICIOS */
.benefits-section { padding: 80px 0; }
.benefits-section h2 { text-align: center; font-size: 2.5rem; margin-bottom: 50px; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; }
.benefit-card { background: var(--bg-card); padding: 30px; border-radius: 16px; border: 1px solid var(--border); transition: var(--transition); text-align: center; }
.benefit-card:hover { border-color: var(--primary); transform: translateY(-5px); background: var(--bg-card-hover); }
.benefit-card i { font-size: 2.5rem; color: var(--primary); margin-bottom: 20px; }
.highlight-card { border-color: var(--secondary); background: linear-gradient(145deg, rgba(255, 215, 0, 0.05), transparent); }
.highlight-card i { color: var(--secondary); }

/* MALLA CURRICULAR */
.curriculum-section { padding: 80px 0; background-color: #0e0e0e; }
.curriculum-section h2 { text-align: center; font-size: 2.5rem; margin-bottom: 10px; }
.section-desc { text-align: center; color: var(--text-muted); margin-bottom: 50px; }
.acordeon-container { max-width: 900px; margin: 0 auto; }
.modulo-item { margin-bottom: 15px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg-card); }
.modulo-header { width: 100%; padding: 25px; display: flex; justify-content: space-between; align-items: center; background: transparent; border: none; color: var(--text-main); cursor: pointer; text-align: left; transition: var(--transition); }
.modulo-header:hover { background-color: var(--bg-card-hover); }
.modulo-header[aria-expanded="true"] h3 { color: var(--primary); }
.modulo-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; background-color: #111; }
.inner-content { padding: 25px; }
.summary { font-style: italic; color: var(--text-main); background: var(--primary-dim); padding: 15px; border-radius: 8px; margin-bottom: 20px; border-left: 3px solid var(--primary); }
.modulo-content ul { padding-left: 20px; list-style-type: none; }
.modulo-content li { margin-bottom: 8px; color: var(--text-muted); padding-left: 15px; position: relative; }
.modulo-content li::before { content: "•"; color: var(--primary); position: absolute; left: 0; font-weight: bold; }

/* PREMIUM */
.premium-section { padding: 80px 0; background-color: var(--bg-dark); }
.premium-card { max-width: 600px; margin: 0 auto; background: linear-gradient(145deg, #1a1a1a, #0d0d0d); border: 1px solid var(--border); border-radius: 20px; padding: 40px; text-align: center; position: relative; }
.premium-badge { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background: var(--secondary); color: #000; padding: 5px 20px; border-radius: 20px; font-weight: 700; font-size: 0.8rem; }
.price-box .amount { font-size: 4rem; font-weight: 900; line-height: 1; color: var(--text-main); }
.premium-list { list-style: none; text-align: left; max-width: 400px; margin: 0 auto; }
.premium-list i { color: var(--secondary); margin-right: 15px; }

/* FORM & AUTH */
.form-section { padding: 80px 0 120px; background-color: #080808; }
.form-wrapper { max-width: 600px; margin: 0 auto; background: var(--bg-card); padding: 40px; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); border: 1px solid var(--border); }
.input-group label { display: block; margin-bottom: 8px; font-weight: 600; }
.input-group input { width: 100%; padding: 15px; background: #000; border: 1px solid var(--border); border-radius: 8px; color: #fff; margin-bottom: 20px; }
.submit-button { width: 100%; padding: 18px; background-color: var(--primary); color: #000; border: none; border-radius: 8px; font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: var(--transition); }
.submit-button:hover { background-color: #fff; }
.form-footer { text-align: center; margin-top: 15px; font-size: 0.9rem; color: var(--text-muted); }
.user-welcome-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.logout-link { background: none; border: none; color: var(--text-muted); text-decoration: underline; cursor: pointer; }

/* PAGO - NUEVOS ESTILOS */
.status-card { background: rgba(255, 255, 255, 0.1); padding: 15px; border-radius: 8px; margin-bottom: 30px; text-align: center; font-weight: 700; }
.status-pending { color: #ff4444; }

.plan-selector-container { display: flex; gap: 15px; margin-bottom: 30px; justify-content: center; flex-wrap: wrap; }
.plan-option-card { background: var(--bg-card); border: 2px solid var(--border); padding: 20px; border-radius: 12px; cursor: pointer; text-align: center; width: 45%; min-width: 250px; transition: var(--transition); position: relative; }
.plan-option-card:hover { background: var(--bg-card-hover); }
.plan-option-card.selected { border-color: var(--primary); background: rgba(0, 229, 255, 0.05); }
.plan-option-card .check-icon { position: absolute; top: 10px; right: 10px; color: var(--primary); display: none; }
.plan-option-card.selected .check-icon { display: block; }
.plan-option-card .price { font-size: 1.8rem; font-weight: 900; color: var(--text-main); }

.payment-methods-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-bottom: 25px; }
.method-btn { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 15px 10px; text-align: center; cursor: pointer; transition: var(--transition); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.method-btn:hover { background: var(--bg-card-hover); }
.method-btn.active { border-color: var(--secondary); background: rgba(255, 215, 0, 0.05); }
.method-btn i { font-size: 1.5rem; color: var(--text-muted); }
.method-btn.active i { color: var(--secondary); }

.payment-instructions-box { background: #000; border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 20px; display: none; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.instruction-title { color: var(--secondary); font-weight: 700; margin-bottom: 15px; border-bottom: 1px solid #333; padding-bottom: 10px; text-transform: uppercase; }

.data-block { margin-bottom: 15px; border-bottom: 1px dashed #333; padding-bottom: 15px; }
.data-block:last-child { border-bottom: none; }
.data-block .label { display: block; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 5px; }

.data-row { display: flex; justify-content: space-between; align-items: center; background: #1a1a1a; padding: 10px; margin-bottom: 5px; border-radius: 6px; font-family: monospace; font-size: 0.9rem; flex-wrap: wrap; gap: 10px; }
.data-row span { color: var(--text-muted); }
.data-row strong { color: #fff; }

.copy-btn { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 0.75rem; text-transform: uppercase; font-weight: 700; border: 1px solid var(--primary); padding: 2px 6px; border-radius: 4px; transition: 0.2s; }
.copy-btn:hover { background: var(--primary); color: #000; }

.confirm-payment-btn { width: 100%; background: var(--primary); color: #000; padding: 15px; border: none; border-radius: 8px; font-weight: 800; font-size: 1rem; cursor: pointer; margin-top: 10px; transition: 0.3s; }
.confirm-payment-btn:hover { background: #fff; box-shadow: 0 0 15px var(--primary); }

.success-message { text-align: center; padding: 30px; background: rgba(0, 229, 255, 0.1); border-radius: 12px; border: 1px solid var(--primary); margin-bottom: 20px; }
.success-message i { font-size: 3rem; color: var(--primary); margin-bottom: 15px; }

/* FOOTER */
footer { padding: 40px 0; text-align: center; color: var(--text-muted); border-top: 1px solid var(--border); font-size: 0.9rem; }
.whatsapp-float { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background-color: #25D366; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; box-shadow: 0 5px 20px rgba(0,0,0,0.4); z-index: 1000; text-decoration: none; transition: transform 0.3s; }
.whatsapp-float:hover { transform: scale(1.1); }

/* --- ESTILOS DEL AULA VIRTUAL (LMS) --- */

.classroom-body {
    background-color: #0f0f0f;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Evita scroll doble */
}

/* NAV SUPERIOR */
.classroom-nav {
    height: 60px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    flex-shrink: 0;
}

.nav-left { display: flex; align-items: center; gap: 15px; }
.back-link { color: #aaa; text-decoration: none; font-size: 0.9rem; transition: 0.2s; }
.back-link:hover { color: var(--primary); }
.divider { color: #333; }
.course-title { font-weight: 700; color: #fff; }

.nav-right { display: flex; align-items: center; gap: 10px; }
#student-name { color: #fff; font-size: 0.9rem; }
.avatar-circle { width: 35px; height: 35px; background: var(--primary); color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; }

/* LAYOUT PRINCIPAL */
.classroom-container {
    display: flex;
    flex: 1;
    overflow: hidden; /* El scroll lo manejan los hijos */
}

/* SIDEBAR */
.modules-sidebar {
    width: 300px;
    background: #141414;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header { padding: 20px; border-bottom: 1px solid #333; }
.sidebar-header h3 { font-size: 1.1rem; margin-bottom: 10px; }
.progress-bar-container { width: 100%; height: 6px; background: #333; border-radius: 3px; overflow: hidden; margin-bottom: 5px; }
.progress-bar-fill { height: 100%; background: var(--secondary); transition: width 0.5s; }
.progress-text { font-size: 0.8rem; color: #aaa; text-align: right; }

.modules-list { overflow-y: auto; flex: 1; }

.module-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: 0.2s;
    opacity: 0.6; /* Por defecto apagado */
}

.module-item:hover { background: #1f1f1f; opacity: 1; }
.module-item.active { background: rgba(0, 229, 255, 0.05); border-left: 4px solid var(--primary); opacity: 1; }
.module-item.locked { cursor: not-allowed; opacity: 0.4; }
.module-item.completed { opacity: 1; }
.module-item.completed .status-icon { color: #25D366; }

.status-icon { font-size: 1.2rem; margin-right: 15px; color: var(--text-muted); width: 20px; text-align: center; }
.module-item.active .status-icon { color: var(--primary); }

.module-info { display: flex; flex-direction: column; }
.module-number { font-size: 0.75rem; color: #888; text-transform: uppercase; margin-bottom: 2px; }
.module-name { font-size: 0.95rem; font-weight: 600; color: #fff; line-height: 1.3; }

/* ÁREA DE CONTENIDO */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: #0f0f0f;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-placeholder {
    position: absolute; top:0; left:0; width:100%; height:100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #555;
}

.lesson-details h1 { font-size: 2rem; margin-bottom: 10px; color: var(--primary); }
.lesson-details p { color: #ccc; font-size: 1.1rem; margin-bottom: 30px; max-width: 800px; }

.lesson-actions { display: flex; gap: 15px; flex-wrap: wrap; }
.action-btn {
    padding: 12px 25px; border-radius: 8px; font-weight: 600; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 10px; transition: 0.3s; font-size: 1rem;
}
.download-btn { background: #222; color: #fff; border: 1px solid #444; }
.download-btn:hover { background: #333; }
.exam-btn { background: var(--primary); color: #000; box-shadow: 0 0 15px rgba(0, 229, 255, 0.2); }
.exam-btn:hover { transform: translateY(-2px); box-shadow: 0 0 25px rgba(0, 229, 255, 0.4); }

/* MODAL EXAMEN */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 1000;
    display: none; /* Oculto */
    align-items: center; justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: #1a1a1a; width: 90%; max-width: 600px;
    border-radius: 12px; border: 1px solid #333;
    display: flex; flex-direction: column; max-height: 90vh;
}

.modal-header { padding: 20px; border-bottom: 1px solid #333; display: flex; justify-content: space-between; align-items: center; }
.close-modal { background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; }

.modal-body { padding: 30px; overflow-y: auto; }
.quiz-question { margin-bottom: 30px; }
.quiz-question h4 { font-size: 1.1rem; margin-bottom: 15px; color: #fff; }
.quiz-option {
    display: block; padding: 12px; margin-bottom: 8px;
    background: #252525; border-radius: 6px; cursor: pointer;
    transition: 0.2s; border: 1px solid transparent;
}
.quiz-option:hover { background: #333; }
.quiz-option input { margin-right: 10px; }

.modal-footer { padding: 20px; border-top: 1px solid #333; text-align: right; }
.submit-exam-btn { background: var(--secondary); color: #000; border: none; padding: 12px 30px; font-weight: bold; border-radius: 6px; cursor: pointer; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .classroom-container { flex-direction: column; overflow-y: auto; }
    .modules-sidebar { width: 100%; height: auto; max-height: 300px; }
    .content-area { overflow-y: visible; }
}