/* =========================================
   VARIABLES & THEME
========================================= */
:root {
    --bg-primary: #020617; 
    --bg-secondary: #0a1628; 
    --text-primary: #f8fafc;
    --text-secondary: rgba(248,250,252,0.7);
    --accent: #38bdf8; 
    --accent-hover: #0ea5e9;
    --secondary: #6366f1; 
    --gold: #f59e0b; 
    --success: #34d399; 
    --danger: #f87171;
    --glass-bg: rgba(15, 23, 42, 0.65); 
    --glass-border: rgba(56, 189, 248, 0.15);
    --glass-hover: rgba(56, 189, 248, 0.08); 
    --shadow: 0 8px 40px rgba(0,0,0,0.4);
    --glow: 0 0 30px rgba(56,189,248,0.25); 
    --radius-lg: 28px; 
    --radius-md: 20px;
    --radius-sm: 12px; 
    --radius-pill: 999px;
}
[data-theme="light"] {
    --bg-primary: #f8fafc; 
    --bg-secondary: #e2eeff; 
    --text-primary: #020617;
    --text-secondary: rgba(2,6,23,0.6); 
    --accent: #0284c7; 
    --accent-hover: #0369a1;
    --secondary: #4f46e5; 
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(2, 132, 199, 0.2); 
    --glass-hover: rgba(2, 132, 199, 0.06);
    --shadow: 0 8px 40px rgba(0,0,0,0.1); 
    --glow: 0 0 30px rgba(2,132,199,0.15);
}

/* =========================================
   RESET & BASE
========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { 
    font-family: 'Poppins', sans-serif; background: var(--bg-primary); 
    color: var(--text-primary); overflow-x: hidden; min-height: 100vh;
    transition: background 0.4s ease, color 0.4s ease; line-height: 1.6; cursor: none;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* =========================================
   ACCESIBILIDAD
========================================= */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; background: var(--accent); color: var(--bg-primary); padding: 12px 24px; border-radius: var(--radius-pill); font-weight: 600; z-index: 9999; }
.skip-link:focus { left: 20px; top: 20px; width: auto; height: auto; box-shadow: 0 4px 20px rgba(56,189,248,0.4); }

/* =========================================
   CUSTOM CURSOR
========================================= */
.cursor-dot, .cursor-circle { position: fixed; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); user-select: none; -webkit-user-select: none; }
.cursor-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; transition: opacity 0.2s; mix-blend-mode: difference; }
.cursor-circle { width: 36px; height: 36px; border: 1.5px solid var(--accent); border-radius: 50%; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.cursor-circle.hovering { width: 56px; height: 56px; border-color: var(--gold); }
.focus-mode .cursor-dot, .focus-mode .cursor-circle { display: none !important; }
.focus-mode body { cursor: auto !important; }
p, h1, h2, h3, h4, .level-desc, .faq-a, .hero-desc, .section-sub { cursor: text !important; }

/* =========================================
   NAVBAR
========================================= */
.nav-links a:not(.btn-cta) { position: relative; }
.nav-links a:not(.btn-cta)::after { content: ''; position: absolute; bottom: 4px; left: 18px; width: 0%; height: 1.5px; background: var(--accent); transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.nav-links a:not(.btn-cta):hover::after, .nav-links a:not(.btn-cta).active::after { width: calc(100% - 36px); }
nav { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); width: 94%; max-width: 1340px; background: var(--glass-bg); backdrop-filter: blur(24px); border: 1px solid var(--glass-border); border-radius: var(--radius-pill); padding: 10px 28px; z-index: 1000; display: flex; justify-content: space-between; align-items: center; transition: all 0.4s ease; box-shadow: var(--shadow); }
nav.scrolled { top: 8px; padding: 8px 24px; }
.nav-logo img { height: 68px; transition: height 0.4s; filter: drop-shadow(0 0 10px rgba(56,189,248,0.4)); }
nav.scrolled .nav-logo img { height: 50px; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a { color: var(--text-primary); font-size: 0.85rem; font-weight: 500; padding: 10px 18px; border-radius: var(--radius-pill); transition: all 0.2s; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { background: var(--glass-hover); color: var(--accent); }
.nav-links .btn-cta { background: var(--accent); color: var(--bg-primary) !important; font-weight: 700; padding: 10px 24px; margin-left: 8px; }
.nav-links .btn-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--text-primary); display: flex; align-items: center; justify-content: center; transition: all 0.2s; font-size: 1rem; }
.theme-btn:hover { background: var(--accent); color: var(--bg-primary); }
.theme-btn.active { background: var(--gold); color: var(--bg-primary); }
.menu-btn { display: none; }

/* =========================================
   MOBILE MENU
========================================= */
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(2,6,23,0.95); z-index: 999; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 40px 20px; animation: fadeIn 0.3s ease; }
.mobile-overlay.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.mobile-close { position: absolute; top: 24px; right: 24px; font-size: 1.8rem; color: var(--text-primary); width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--glass-border); transition: background 0.2s; }
.mobile-close:hover { background: var(--glass-hover); }
.mobile-nav { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 400px; }
.mobile-nav a { font-size: 1.4rem; font-weight: 600; color: var(--text-primary); padding: 14px 28px; border-radius: var(--radius-md); width: 100%; text-align: center; transition: all 0.2s; }
.mobile-nav a:hover, .mobile-nav a.active { background: var(--glass-bg); color: var(--accent); border: 1px solid var(--glass-border); }
.mobile-nav .btn-cta { background: var(--accent); color: var(--bg-primary) !important; font-weight: 700; margin-top: 16px; }
.mobile-theme-toggle { margin-top: 24px; padding: 12px 24px; border: 1px solid var(--glass-border); border-radius: var(--radius-pill); display: flex; align-items: center; gap: 10px; color: var(--text-primary); }

/* =========================================
   BOTONES GENERALES
========================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 32px; border-radius: var(--radius-pill); font-size: 0.95rem; font-weight: 700; transition: all 0.3s; white-space: nowrap; min-height: 48px; position: relative; overflow: hidden; }
.btn-primary { background: var(--accent); color: var(--bg-primary); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(56,189,248,0.4); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1.5px solid var(--glass-border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--bg-primary); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(245,158,11,0.4); }

/* =========================================
   CONTENEDORES Y SECCIONES
========================================= */
section { padding: 100px 20px; }
.container { max-width: 960px; margin: 0 auto; }
.container-wide { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.section-tag { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
h2.section-title { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; margin-bottom: 18px; }
.section-sub { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.7; max-width: 620px; margin: 0 auto 50px; }
.text-center { text-align: center; }

/* =========================================
   SECTION DIVIDERS
========================================= */
.section-divider {
    width: 100%;
    height: 1px;
    position: relative;
    overflow: visible;
    margin: 0;
}
.section-divider::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 0%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #38bdf8, #6366f1, #38bdf8, transparent);
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-divider.visible::before { width: 80%; }
.section-divider::after {
    content: '✦';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent);
    font-size: 0.65rem;
    opacity: 0;
    transition: opacity 0.6s 0.8s;
}
.section-divider.visible::after { opacity: 0.6; }

/* =========================================
   FAQ (compartido con otras páginas)
========================================= */
.faq-list { max-width: 760px; margin: 50px auto 0; }
.faq-item { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden; backdrop-filter: blur(10px); transition: border-color 0.2s; }
.faq-item.active { border-color: var(--accent); }
.faq-q { padding: 20px 26px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 0.98rem; }
.faq-q i { color: var(--text-secondary); transition: transform 0.3s; }
.faq-item.active .faq-q i { transform: rotate(180deg); color: var(--accent); }
.faq-a { padding: 0 26px; max-height: 0; overflow: hidden; transition: all 0.4s; opacity: 0; font-size: 0.93rem; color: var(--text-secondary); line-height: 1.7; }
.faq-item.active .faq-a { padding: 0 26px 22px; max-height: 400px; opacity: 1; }

/* =========================================
   FOOTER
========================================= */
footer { background: var(--bg-secondary); border-top: 1px solid var(--glass-border); padding: 80px 20px 30px; }
/* ✅ 5 columnas: brand + Cursos + Academia + Herramientas + Legal */
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto 60px; }
.footer-brand img { height: 55px; margin-bottom: 16px; filter: drop-shadow(0 0 8px rgba(56,189,248,0.3)); }
.footer-brand p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.65; }
.footer-socials { display: flex; gap: 15px; margin-top: 20px; }
.footer-socials a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all 0.3s ease; font-size: 1rem; }
.footer-socials a:hover { color: #00f2ff; border-color: #00f2ff; box-shadow: 0 0 15px rgba(0, 242, 255, 0.4), 0 0 30px rgba(0, 242, 255, 0.2); transform: translateY(-2px); background: rgba(0, 242, 255, 0.1); }
.footer-col h4 { font-size: 0.88rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 18px; color: var(--accent); }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: var(--text-secondary); font-size: 0.9rem; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--glass-border); padding-top: 24px; text-align: center; font-size: 0.82rem; color: var(--text-secondary); }

/* =========================================
   WHATSAPP FLOAT
========================================= */
.wa-float { position: fixed; bottom: 28px; right: 28px; z-index: 900; width: 60px; height: 60px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; box-shadow: 0 6px 24px rgba(37,211,102,0.5); transition: transform 0.2s, box-shadow 0.2s; animation: float 3s ease-in-out infinite; }
.wa-float:hover { transform: scale(1.1); box-shadow: 0 8px 30px rgba(37,211,102,0.7); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.wa-tooltip { position: absolute; bottom: 70px; right: 0; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 8px 14px; font-size: 0.8rem; white-space: nowrap; opacity: 0; transform: translateY(10px); transition: all 0.3s; pointer-events: none; }
.wa-float:hover .wa-tooltip { opacity: 1; transform: translateY(0); }

/* =========================================
   MODALES
========================================= */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 2000; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-box { background: var(--bg-secondary); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 44px; max-width: 560px; width: 100%; position: relative; color: var(--text-primary); animation: modalIn 0.3s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-box h2 { font-size: 1.5rem; margin-bottom: 16px; }
.modal-box p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; }
.modal-close-btn { position: absolute; top: 18px; right: 18px; font-size: 1.4rem; cursor: pointer; background: none; border: none; color: var(--text-secondary); transition: color 0.2s; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.modal-close-btn:hover { background: var(--glass-hover); color: var(--accent); }

/* =========================================
   FORMULARIOS (compartido)
========================================= */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-input, .form-textarea { width: 100%; padding: 14px 18px; background: rgba(0,0,0,0.2); border: 1.5px solid var(--glass-border); border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.95rem; transition: border-color 0.2s; outline: none; font-family: inherit; }
[data-theme="light"] .form-input, [data-theme="light"] .form-textarea { background: rgba(255,255,255,0.6); }
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { height: 120px; resize: vertical; margin-bottom: 14px; }

/* =========================================
   ANIMACIONES GENERALES
========================================= */
.fade-in { opacity: 0; transform: translateY(36px); transition: opacity 0.7s, transform 0.7s; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.accent-text { transition: color 0.7s ease; color: inherit; }
.accent-text.visible { color: var(--accent); }
[data-theme="light"] .accent-text.visible { color: var(--secondary); }
.ripple { position: fixed; border-radius: 50%; pointer-events: none; z-index: 50; background: radial-gradient(circle, rgba(56,189,248,0.5) 0%, transparent 70%); transform: translate(-50%, -50%); animation: rippleOut 0.6s ease-out forwards; }
@keyframes rippleOut { from{width:0;height:0;opacity:1} to{width:180px;height:180px;opacity:0} }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.4); } }

/* =========================================
   FOCUS MODE
========================================= */
.focus-mode .fade-in { opacity: 1 !important; transform: none !important; transition: none !important; }
.focus-mode #canvas3d { opacity: 0.2 !important; }

/* =========================================
   RESPONSIVE BASE
========================================= */
@media (max-width: 1100px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .nav-links { display: none; }
    .menu-btn { display: flex; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-socials { justify-content: center; }
    .cursor-dot, .cursor-circle { display: none !important; }
    body { cursor: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .cursor-dot, .cursor-circle { display: none !important; }
    body { cursor: auto !important; }
    .accent-text { transition: none !important; color: var(--accent) !important; }
}
/* =========================================
   CANVAS 3D (partículas de fondo)
========================================= */
#canvas3d { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }