/* ============================================================
   CENACAB S.A.S. - Centro Nacional de Capacitación
   Premium Design System — Blue & Orange Brand
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --blue: #1a56db;
  --blue-light: #3b82f6;
  --blue-dark: #1e3a8a;
  --blue-glow: rgba(59, 130, 246, 0.4);
  --orange: #f97316;
  --orange-light: #fb923c;
  --orange-dark: #ea580c;
  --orange-glow: rgba(249, 115, 22, 0.4);
  --bg-dark: #0a0e1a;
  --bg-dark-2: #0f1629;
  --bg-dark-3: #1a2240;
  --surface: rgba(15, 22, 41, 0.7);
  --surface-light: rgba(26, 34, 64, 0.5);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: rgba(148, 163, 184, 0.1);
  --glass: rgba(15, 22, 41, 0.6);
  --glass-border: rgba(148, 163, 184, 0.08);
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Global Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { border: none; cursor: pointer; font-family: inherit; background: none; }

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

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--bg-dark-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* ── Navbar ── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: var(--glass); border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}
#navbar.scrolled { background: rgba(10, 14, 26, 0.95); box-shadow: 0 4px 30px rgba(0,0,0,0.3); }

.nav-container {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1200px; margin: 0 auto; height: 72px; padding: 0 24px;
}

.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo img { height: 45px; width: 45px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(59,130,246,0.3); }
.nav-logo span {
  font-family: 'Outfit', sans-serif; font-size: 1.4rem; font-weight: 700;
  background: linear-gradient(135deg, var(--blue-light), var(--orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--text-secondary); font-weight: 500; font-size: 0.9rem;
  position: relative; transition: var(--transition); padding: 4px 0;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
  background: linear-gradient(90deg, var(--blue-light), var(--orange));
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: linear-gradient(135deg, var(--blue), var(--orange));
  color: #fff; padding: 10px 24px; border-radius: 50px;
  font-weight: 600; font-size: 0.9rem; transition: var(--transition);
}
.nav-cta:hover { transform: scale(1.05); box-shadow: 0 4px 20px var(--blue-glow); }

.nav-mobile-toggle { display: none; color: #fff; padding: 8px; }

/* ── Hero ── */
#hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding-top: 72px;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0a0e1a 0%, #1e3a8a 25%, #1a2240 50%, #1e3a8a 75%, #0a0e1a 100%);
  background-size: 300% 300%; animation: heroShift 15s ease infinite;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--bg-dark) 100%);
}
.hero-particles {
  position: absolute; inset: 0; overflow: hidden;
}
.hero-particles .particle {
  position: absolute; border: 1px solid rgba(59,130,246,0.15);
  border-radius: 4px; transform: rotate(45deg); animation: float 8s ease-in-out infinite;
}

.hero-content {
  position: relative; z-index: 10; text-align: center; max-width: 850px;
  padding: 0 24px; animation: fadeInUp 0.8s ease;
}

.hero-logo {
  width: 120px; height: 120px; margin: 0 auto 24px; border-radius: 50%; overflow: hidden;
  border: 3px solid rgba(59,130,246,0.3);
  box-shadow: 0 0 40px var(--blue-glow), 0 0 80px rgba(59,130,246,0.15);
}
.hero-logo img { width: 100%; height: 100%; object-fit: cover; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass); border: 1px solid var(--glass-border);
  padding: 8px 20px; border-radius: 50px; margin-bottom: 24px;
  color: var(--orange); font-weight: 600; font-size: 0.85rem;
  backdrop-filter: blur(10px);
}
.hero-badge svg { color: var(--orange); }

.hero-title {
  font-family: 'Outfit', sans-serif; font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700; line-height: 1.1; margin-bottom: 20px;
  background: linear-gradient(180deg, #fff 30%, var(--text-secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-title .highlight {
  background: linear-gradient(135deg, var(--blue-light), var(--orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.hero-subtitle {
  color: var(--text-secondary); font-size: 1.15rem; max-width: 650px;
  margin: 0 auto 40px; line-height: 1.7;
}

.hero-buttons { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--blue), var(--orange-dark));
  color: #fff; padding: 14px 32px; border-radius: 50px; font-weight: 600;
  font-size: 1rem; transition: var(--transition);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 30px var(--blue-glow); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-primary); padding: 14px 32px; border-radius: 50px;
  font-weight: 600; font-size: 1rem; transition: var(--transition);
}
.btn-secondary:hover { background: var(--surface); }

.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 8px;
  background: #25d366; color: #fff; padding: 14px 24px;
  border-radius: 50px; font-weight: 600; font-size: 1rem; transition: var(--transition);
}
.btn-whatsapp:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(37,211,102,0.4); }

.hero-stats { display: flex; justify-content: center; gap: 48px; margin-top: 60px; }
.hero-stats .stat { text-align: center; }
.hero-stats .stat-number {
  font-family: 'Outfit', sans-serif; font-size: 2.5rem; font-weight: 700;
  background: linear-gradient(135deg, var(--blue-light), var(--orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-stats .stat-label { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

/* ── Section Shared ── */
.section-header { text-align: center; margin-bottom: 60px; }
.section-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--glass); border: 1px solid var(--glass-border);
  padding: 6px 16px; border-radius: 50px; margin-bottom: 16px;
  color: var(--orange); font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 1px;
}
.section-title {
  font-family: 'Outfit', sans-serif; font-size: 2.5rem; font-weight: 700;
  margin-bottom: 12px;
}
.section-subtitle { color: var(--text-secondary); max-width: 550px; margin: 0 auto; font-size: 1.05rem; }

/* ── Cursos ── */
#cursos { padding: 100px 0; }

.cursos-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}

.curso-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.curso-card:hover { transform: translateY(-8px); box-shadow: 0 20px 60px rgba(0,0,0,0.3); }

.curso-card:nth-child(1) { border-top: 3px solid var(--blue); }
.curso-card:nth-child(2) { border-top: 3px solid var(--orange); }
.curso-card:nth-child(3) { border-top: 3px solid #14b8a6; }
.curso-card:nth-child(4) { border-top: 3px solid #f59e0b; }
.curso-card:nth-child(5) { border-top: 3px solid #ec4899; }
.curso-card:nth-child(6) { border-top: 3px solid #6366f1; }
.curso-card:nth-child(7) { border-top: 3px solid #10b981; }

.curso-card .card-img { height: 220px; overflow: hidden; position: relative; }
.curso-card .card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.curso-card:hover .card-img img { transform: scale(1.08); }
.curso-card .card-badge {
  position: absolute; top: 16px; right: 16px;
  background: var(--orange); color: #fff; padding: 6px 14px;
  border-radius: 50px; font-weight: 600; font-size: 0.75rem;
}

.curso-card .card-content { padding: 24px; }
.curso-card .card-title { font-family: 'Outfit', sans-serif; font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.curso-card .card-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px; line-height: 1.6; }

.curso-card .card-features { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.curso-card .card-feature { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 0.85rem; }
.curso-card .card-feature svg { color: var(--orange); flex-shrink: 0; }

.btn-info {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff; font-weight: 600; font-size: 0.9rem;
  transition: var(--transition); text-align: center;
}
.btn-info:hover { box-shadow: 0 4px 20px var(--blue-glow); transform: translateY(-2px); }

/* ── Quiénes Somos ── */
#quienes-somos { padding: 100px 0; background: var(--bg-dark-2); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

.about-text h3 { font-family: 'Outfit', sans-serif; font-size: 2rem; font-weight: 700; margin-bottom: 16px; }
.about-text p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 20px; }

.about-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.about-highlight { display: flex; gap: 12px; align-items: flex-start; }
.about-highlight .icon {
  width: 40px; height: 40px; min-width: 40px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  display: flex; align-items: center; justify-content: center;
}
.about-highlight .icon svg { color: #fff; }
.about-highlight h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 2px; }
.about-highlight p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0; }

.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.gallery-item {
  border-radius: var(--radius-sm); overflow: hidden;
  aspect-ratio: 1; cursor: pointer; position: relative;
}
.gallery-item.featured { grid-column: span 2; grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s ease;
}
.gallery-item:hover::after { opacity: 1; }

/* ── Misión & Visión ── */
#mision-vision { padding: 100px 0; }

.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.mv-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; position: relative; overflow: hidden;
}
.mv-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--orange));
}
.mv-card .mv-icon {
  width: 60px; height: 60px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.mv-card:first-child .mv-icon { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
.mv-card:last-child .mv-icon { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); }
.mv-card .mv-icon svg { color: #fff; }
.mv-card h3 { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; }
.mv-card p { color: var(--text-secondary); line-height: 1.8; }

/* ── Por qué elegirnos ── */
#por-que-elegirnos { padding: 100px 0; background: var(--bg-dark-2); }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.feature-card:hover { transform: translateY(-6px); border-color: var(--orange); }

.feature-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.feature-card:nth-child(odd) .feature-icon { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
.feature-card:nth-child(even) .feature-icon { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); }
.feature-icon svg { color: #fff; }
.feature-card h4 { font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* ── Frases Motivacionales ── */
#frases { padding: 80px 0; }

.quotes-carousel { position: relative; max-width: 800px; margin: 0 auto; min-height: 200px; }
.quote-slide { text-align: center; padding: 40px 20px; display: none; }
.quote-slide.active { display: block; animation: fadeIn 0.6s ease; }

.quote-text {
  font-style: italic; font-size: 1.35rem; line-height: 1.7;
  color: var(--text-primary); margin-bottom: 20px; position: relative;
}
.quote-text::before {
  content: '\201C'; font-size: 5rem; color: var(--orange); opacity: 0.2;
  position: absolute; top: -30px; left: -15px; font-family: Georgia, serif;
  line-height: 1;
}
.quote-author { font-weight: 600; font-size: 1rem; color: var(--orange); }
.quote-role { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

.quote-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.quote-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg-dark-3); cursor: pointer; transition: var(--transition);
}
.quote-dot.active { background: var(--orange); transform: scale(1.3); }

.quote-nav { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.quote-nav button {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: var(--transition);
}
.quote-nav button:hover { background: var(--orange); color: #fff; }

/* ── Sedes ── */
#sedes { padding: 100px 0; background: var(--bg-dark-2); }

.sedes-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }

.sede-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 20px; text-align: center;
  transition: var(--transition); position: relative;
}
.sede-card:hover { border-color: var(--blue-light); transform: translateY(-4px); }

.sede-card .sede-icon {
  width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  display: flex; align-items: center; justify-content: center;
}
.sede-card .sede-icon svg { color: #fff; }
.sede-card h4 { font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.sede-card p { color: var(--text-muted); font-size: 0.8rem; }

.sede-card.sede-principal { border-color: var(--orange); }
.sede-card.sede-principal::after {
  content: 'Sede Principal'; position: absolute; top: -10px; left: 50%;
  transform: translateX(-50%); background: var(--orange); color: #fff;
  padding: 3px 12px; border-radius: 50px; font-size: 0.7rem; font-weight: 600;
  white-space: nowrap;
}

/* ── Contacto ── */
#contacto { padding: 100px 0; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }

.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.icon-circle {
  width: 48px; height: 48px; min-width: 48px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-light);
}
.contact-item h4 { font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.contact-item p { color: var(--text-secondary); font-size: 0.9rem; }
.contact-item a { color: var(--orange); transition: var(--transition); }
.contact-item a:hover { text-decoration: underline; }

.btn-whatsapp-big {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  background: #25d366; color: #fff; padding: 14px 28px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem;
  transition: var(--transition); margin-top: 8px;
  box-shadow: 0 4px 20px rgba(37,211,102,0.3);
}
.btn-whatsapp-big:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(37,211,102,0.5); }

.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-links a {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: var(--transition);
}
.social-links a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

.contact-form {
  background: var(--surface); padding: 40px; border-radius: var(--radius);
  border: 1px solid var(--border);
}
.contact-form h3 { font-family: 'Outfit', sans-serif; font-size: 1.3rem; font-weight: 600; margin-bottom: 24px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; margin-bottom: 8px; font-weight: 500;
  font-size: 0.9rem; color: var(--text-secondary);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 12px 16px; background: var(--bg-dark-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); font-family: 'Inter', sans-serif;
  font-size: 0.95rem; transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--orange); outline: none;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group select { cursor: pointer; }
.form-group select option { background: var(--bg-dark-2); }

.btn-submit {
  width: 100%; padding: 14px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue), var(--orange));
  color: #fff; font-weight: 600; font-size: 1rem;
  transition: var(--transition);
}
.btn-submit:hover { box-shadow: 0 4px 20px var(--blue-glow); transform: translateY(-2px); }

/* ── Footer ── */
#footer { padding: 60px 0 24px; background: #060a14; border-top: 1px solid var(--border); }

.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }

.footer-col .nav-logo { margin-bottom: 12px; }
.footer-col .nav-logo img { height: 36px; width: 36px; }
.footer-col > p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 16px; }
.footer-col h4 {
  font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 600;
  margin-bottom: 16px; color: var(--orange);
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: var(--text-muted); font-size: 0.9rem; transition: var(--transition); }
.footer-col ul a:hover { color: var(--text-primary); }

.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: var(--transition);
}
.footer-social a:hover { background: var(--blue); color: #fff; }

.footer-bottom {
  border-top: 1px solid var(--border); margin-top: 40px; padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--text-muted); font-size: 0.8rem;
}

/* ── Course Modal ── */
#curso-modal {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
#curso-modal.active { opacity: 1; pointer-events: auto; }

.modal-content {
  background: var(--bg-dark-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); max-width: 700px; width: 90%;
  max-height: 90vh; overflow-y: auto; position: relative;
  transform: scale(0.9); transition: transform 0.3s ease;
}
#curso-modal.active .modal-content { transform: scale(1); }

.modal-header { position: relative; height: 250px; overflow: hidden; }
.modal-header img { width: 100%; height: 100%; object-fit: cover; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.6); display: flex;
  align-items: center; justify-content: center;
  color: #fff; transition: var(--transition);
}
.modal-close:hover { background: var(--orange); }

.modal-body { padding: 32px; }
.modal-body h2 { font-family: 'Outfit', sans-serif; font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.modal-badge-tag {
  display: inline-flex; padding: 4px 14px; border-radius: 50px;
  background: rgba(249,115,22,0.15); color: var(--orange);
  font-weight: 600; font-size: 0.8rem; margin-bottom: 16px;
}
.modal-desc { color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; }
.modal-dirigido {
  color: var(--text-secondary); font-style: italic; line-height: 1.6;
  margin-bottom: 24px; padding-left: 16px;
  border-left: 3px solid var(--orange);
}

.modal-details {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px;
}
.modal-detail {
  display: flex; gap: 12px; align-items: center;
}
.modal-detail .detail-icon {
  width: 36px; height: 36px; min-width: 36px; border-radius: var(--radius-sm);
  background: var(--surface-light); display: flex;
  align-items: center; justify-content: center; color: var(--blue-light);
}
.modal-detail span { font-weight: 500; font-size: 0.9rem; }

.modal-section { margin-bottom: 24px; }
.modal-section h4 {
  font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 600;
  margin-bottom: 12px; color: var(--text-primary);
}
.modal-section ul { padding-left: 0; }
.modal-section li {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 8px; color: var(--text-secondary); font-size: 0.9rem;
}
.modal-section li::before {
  content: '✓'; color: var(--success); font-weight: 700; min-width: 16px;
}

.modal-requirements {
  background: var(--surface); padding: 20px; border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.btn-inscribirse {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff; font-weight: 600; font-size: 1rem;
  transition: var(--transition);
}
.btn-inscribirse:hover { box-shadow: 0 4px 20px var(--orange-glow); transform: translateY(-2px); }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.95); display: flex;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.lightbox.active { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 90%; max-height: 90vh; object-fit: contain;
  border-radius: var(--radius);
}
.lightbox-close {
  position: absolute; top: 20px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1); display: flex;
  align-items: center; justify-content: center;
  color: #fff; transition: var(--transition);
}
.lightbox-close:hover { background: var(--orange); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1); display: flex;
  align-items: center; justify-content: center;
  color: #fff; transition: var(--transition);
}
.lightbox-nav:hover { background: var(--orange); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ── Login Overlay ── */
#login-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(10, 14, 26, 0.92); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
#login-overlay.active { opacity: 1; pointer-events: auto; }

.login-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 48px;
  width: 420px; max-width: 90%; box-shadow: var(--shadow);
  transform: scale(0.9); transition: transform 0.3s ease;
}
#login-overlay.active .login-card { transform: scale(1); }

.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo img { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px; }
.login-logo h2 { font-family: 'Outfit', sans-serif; font-size: 1.3rem; }
.login-logo p { color: var(--text-muted); font-size: 0.85rem; }

.btn-login {
  width: 100%; padding: 14px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue), var(--orange));
  color: #fff; font-weight: 600; font-size: 1rem; transition: var(--transition);
}
.btn-login:hover { box-shadow: 0 4px 20px var(--blue-glow); }

.login-error { color: var(--danger); font-size: 0.85rem; margin-top: 8px; display: none; text-align: center; }
.login-error.show { display: block; }
.login-hint { color: var(--text-muted); font-size: 0.8rem; margin-top: 16px; text-align: center; }
.login-close {
  position: absolute; top: 16px; right: 16px; color: var(--text-muted);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: var(--transition);
}
.login-close:hover { color: #fff; background: var(--surface-light); }

/* ── Portal ── */
#portal { display: none; min-height: 100vh; }
#portal.active { display: flex; }

.portal-sidebar {
  width: 280px; background: var(--bg-dark-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: fixed;
  top: 0; left: 0; bottom: 0; z-index: 100; transition: transform 0.3s ease;
}
.sidebar-header {
  padding: 24px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.sidebar-logo { display: flex; align-items: center; gap: 12px; }
.sidebar-logo img { width: 32px; height: 32px; border-radius: 50%; }
.sidebar-logo span { font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 700; }

.sidebar-nav { display: flex; flex-direction: column; padding: 12px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-radius: var(--radius-sm); color: var(--text-secondary);
  font-weight: 500; font-size: 0.95rem; transition: var(--transition);
  margin-bottom: 4px;
}
.nav-item:hover { background: var(--surface); color: var(--text-primary); }
.nav-item.active {
  background: rgba(26, 86, 219, 0.15); color: var(--blue-light);
  font-weight: 600; border-left: 3px solid var(--blue);
}
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }

.sidebar-user {
  padding: 20px; border-top: 1px solid var(--border);
  display: flex; gap: 12px; align-items: center;
}
.user-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: #fff; font-size: 0.9rem;
}
.user-name { font-weight: 500; font-size: 0.95rem; }
.user-id { color: var(--text-muted); font-size: 0.8rem; }

.portal-main { margin-left: 280px; flex: 1; padding: 32px; min-height: 100vh; }
.portal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px;
}
.portal-header h1 { font-family: 'Outfit', sans-serif; font-size: 1.8rem; font-weight: 700; }
.portal-header .header-date { color: var(--text-secondary); }

.btn-sidebar-toggle {
  display: none; position: fixed; top: 16px; left: 16px; z-index: 101;
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-primary); align-items: center; justify-content: center;
}

/* ── Portal Views ── */
.portal-view { display: none; }
.portal-view.active { display: block; animation: fadeInUp 0.4s ease; }

/* Dashboard */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: -20px; right: -20px;
  width: 80px; height: 80px; border-radius: 50%; opacity: 0.1;
}
.stat-card:nth-child(1)::before { background: var(--blue); }
.stat-card:nth-child(2)::before { background: var(--orange); }
.stat-card:nth-child(3)::before { background: var(--success); }
.stat-card:nth-child(4)::before { background: var(--danger); }

.stat-card .stat-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.stat-card:nth-child(1) .stat-icon { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
.stat-card:nth-child(2) .stat-icon { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); }
.stat-card:nth-child(3) .stat-icon { background: linear-gradient(135deg, var(--success), #16a34a); }
.stat-card:nth-child(4) .stat-icon { background: linear-gradient(135deg, var(--danger), #dc2626); }
.stat-card .stat-icon svg { color: #fff; }
.stat-card .stat-value { font-family: 'Outfit', sans-serif; font-size: 2rem; font-weight: 700; }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.85rem; }

.dashboard-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }
.dash-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.dash-card .card-title {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Outfit', sans-serif; font-size: 1.15rem; font-weight: 600;
  margin-bottom: 20px;
}

.upcoming-list, .notifications-list { display: flex; flex-direction: column; gap: 12px; }
.upcoming-item {
  display: flex; gap: 16px; align-items: center; padding: 12px;
  background: var(--bg-dark-2); border-radius: var(--radius-sm);
}
.upcoming-item .time { font-weight: 600; color: var(--orange); white-space: nowrap; min-width: 60px; }
.upcoming-item .details .subject { font-weight: 500; }
.upcoming-item .details .room { color: var(--text-muted); font-size: 0.85rem; }

.notification-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px;
  background: var(--bg-dark-2); border-radius: var(--radius-sm);
}
.notification-item .notif-icon { font-size: 1.2rem; min-width: 28px; text-align: center; }
.notification-item .notif-text { font-size: 0.9rem; }
.notification-item .notif-time { color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }

/* Schedule */
.schedule-container { overflow-x: auto; }
.schedule-grid {
  display: grid; grid-template-columns: 80px repeat(5, 1fr);
  min-width: 700px;
}
.schedule-header {
  font-weight: 600; text-align: center; padding: 16px;
  background: var(--bg-dark-2); border-bottom: 1px solid var(--border);
}
.schedule-time {
  padding: 16px 8px; color: var(--text-muted); font-size: 0.85rem;
  border-right: 1px solid var(--border); text-align: right;
}
.schedule-cell {
  min-height: 60px; border: 1px solid var(--border); position: relative;
}
.schedule-class {
  position: absolute; border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: 0.8rem; left: 4px; right: 4px;
}
.schedule-class .class-name { font-weight: 600; font-size: 0.78rem; }
.schedule-class .class-room { opacity: 0.8; font-size: 0.72rem; }

.class-purple { background: rgba(139,92,246,0.2); border-left: 3px solid #8b5cf6; color: #c4b5fd; }
.class-cyan { background: rgba(6,182,212,0.2); border-left: 3px solid #06b6d4; color: #67e8f9; }
.class-teal { background: rgba(20,184,166,0.2); border-left: 3px solid #14b8a6; color: #5eead4; }
.class-orange { background: rgba(249,115,22,0.2); border-left: 3px solid #f97316; color: #fdba74; }

/* Grades */
.grades-summary { display: flex; gap: 24px; margin-bottom: 32px; }
.gpa-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  display: flex; gap: 24px; align-items: center; flex: 1;
}
.gpa-circle {
  width: 100px; height: 100px; border-radius: 50%;
  border: 4px solid var(--blue); display: flex;
  flex-direction: column; align-items: center; justify-content: center;
}
.gpa-circle .gpa-value { font-family: 'Outfit', sans-serif; font-size: 2rem; font-weight: 700; }
.gpa-circle .gpa-scale { color: var(--text-muted); font-size: 0.75rem; }
.gpa-details { display: flex; flex-direction: column; gap: 8px; }
.gpa-details span { color: var(--text-secondary); font-size: 0.9rem; }

.grades-table-container {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.grades-table { width: 100%; border-collapse: collapse; }
.grades-table th {
  padding: 14px 20px; text-align: left; background: var(--bg-dark-2);
  color: var(--text-muted); font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border);
}
.grades-table td { padding: 14px 20px; border-bottom: 1px solid var(--border); }

.grade-badge {
  display: inline-flex; padding: 4px 12px; border-radius: 50px;
  font-weight: 600; font-size: 0.85rem;
}
.grade-A { background: rgba(34,197,94,0.15); color: var(--success); }
.grade-B { background: rgba(59,130,246,0.15); color: var(--blue-light); }
.grade-C { background: rgba(245,158,11,0.15); color: var(--warning); }
.grade-pending { background: rgba(148,163,184,0.15); color: var(--text-muted); }

.progress-bar { height: 6px; background: var(--bg-dark-3); border-radius: 3px; overflow: hidden; }
.progress-bar .fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  transition: width 1s ease;
}

/* Payments */
.payments-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.balance-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
}
.balance-amount {
  font-family: 'Outfit', sans-serif; font-size: 3rem; font-weight: 700;
  background: linear-gradient(135deg, var(--blue-light), var(--orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 8px;
}
.balance-label { color: var(--text-muted); }
.balance-due { margin-top: 16px; color: var(--text-secondary); }

.payment-history { margin-top: 32px; }
.payment-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.payment-item .payment-desc { font-weight: 500; }
.payment-item .payment-date { color: var(--text-muted); font-size: 0.85rem; }
.payment-item .payment-amount { font-weight: 600; }
.payment-item .payment-amount.paid { color: var(--success); }

/* Profile */
.profile-header {
  display: flex; gap: 24px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; margin-bottom: 32px;
}
.profile-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif; font-size: 2.5rem; font-weight: 700; color: #fff;
}
.profile-info h2 { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; }
.profile-info .profile-course { color: var(--orange); font-weight: 500; }
.profile-info .profile-id { color: var(--text-muted); font-size: 0.9rem; }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.profile-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.profile-card h3 {
  font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 600;
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.profile-field {
  display: flex; justify-content: space-between; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.profile-field .field-label { color: var(--text-muted); }
.profile-field .field-value { font-weight: 500; }

/* ── Animations ── */
@keyframes heroShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50% { transform: translateY(-20px) rotate(45deg); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-10px); }
  30% { transform: translateX(10px); }
  45% { transform: translateX(-6px); }
  60% { transform: translateX(6px); }
}
@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ══ PORTAL ADMIN/TEACHER/STUDENT PANELS ══ */

/* Panel Actions Bar */
.panel-actions { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.btn-action { padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem; cursor: pointer; border: none; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px; }
.btn-primary-action { background: linear-gradient(135deg, var(--blue), var(--blue-light)); color: white; }
.btn-primary-action:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(59,130,246,0.3); }
.btn-secondary-action { background: var(--surface); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary-action:hover { border-color: var(--blue); }
.btn-danger-action { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.btn-danger-action:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(239,68,68,0.3); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab { padding: 12px 20px; background: none; border: none; color: var(--text-secondary); font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; transition: var(--transition); }
.tab.active { color: var(--blue-light); border-bottom-color: var(--blue); }
.tab:hover { color: var(--text-primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Data Tables */
.users-table-container, .grades-table-container { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 14px 16px; text-align: left; background: var(--bg-dark-2); color: var(--text-muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.data-table tr:hover { background: rgba(59,130,246,0.05); }
.data-table code { background: var(--bg-dark-2); padding: 2px 8px; border-radius: 4px; font-size: 0.85rem; color: var(--orange); }

/* User cells */
.user-cell { display: flex; align-items: center; gap: 10px; }
.avatar-xs { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--orange)); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.7rem; color: white; flex-shrink: 0; }

/* Badges */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: rgba(34,197,94,0.15); color: #22c55e; }
.badge-warning { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-danger { background: rgba(239,68,68,0.15); color: #ef4444; }

/* Small buttons */
.btn-sm { padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; cursor: pointer; border: none; transition: var(--transition); }
.btn-edit { background: rgba(59,130,246,0.15); color: var(--blue-light); }
.btn-edit:hover { background: rgba(59,130,246,0.25); }
.btn-delete { background: rgba(239,68,68,0.15); color: #ef4444; }
.btn-delete:hover { background: rgba(239,68,68,0.25); }
.btn-xs { padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; cursor: pointer; border: none; background: rgba(239,68,68,0.15); color: #ef4444; }

/* Filter Bar */
.filter-bar { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-bar select { padding: 10px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.9rem; min-width: 200px; }
.filter-bar select:focus { border-color: var(--blue); outline: none; }

/* Content Cards */
.content-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; transition: var(--transition); }
.content-card:hover { border-color: rgba(59,130,246,0.3); }
.content-card.submitted { border-left: 3px solid #22c55e; }
.content-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.content-type-badge { padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; background: rgba(59,130,246,0.12); color: var(--blue-light); }
.content-course { font-size: 0.85rem; color: var(--text-muted); }
.content-date { font-size: 0.8rem; color: var(--text-muted); margin-left: auto; }
.content-title { font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.content-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 10px; }
.content-subject { font-size: 0.85rem; color: var(--orange); display: block; margin-bottom: 8px; }
.content-link { color: var(--blue-light); text-decoration: none; font-size: 0.9rem; }
.content-link:hover { text-decoration: underline; }
.content-due { font-size: 0.85rem; color: var(--text-muted); display: block; margin-bottom: 8px; }
.content-actions { display: flex; gap: 8px; margin-top: 12px; }

/* Courses Admin Grid */
.courses-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.course-admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.course-admin-header { padding: 24px; color: white; text-align: center; }
.course-admin-header h3 { font-family: 'Outfit', sans-serif; font-size: 1.2rem; margin-top: 8px; }
.course-icon-big { font-size: 2.5rem; }
.course-code { font-size: 0.8rem; opacity: 0.8; }
.course-admin-body { padding: 20px; }
.course-stat { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.course-stat span { color: var(--text-secondary); }
.course-stat strong { color: var(--text-primary); }
.enrolled-list { margin-top: 16px; }
.enrolled-list h4 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.enrolled-student { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: var(--bg-dark-2); border-radius: 6px; margin-bottom: 4px; font-size: 0.85rem; }
.btn-enroll-action { width: 100%; margin-top: 16px; justify-content: center; }
.btn-unenroll { padding: 2px 6px; background: rgba(239,68,68,0.2); color: #ef4444; border: none; border-radius: 4px; cursor: pointer; font-size: 0.75rem; }

/* Enrollment summary bars */
.enrollment-summary { display: flex; flex-direction: column; gap: 12px; }
.enrollment-bar { display: flex; align-items: center; gap: 12px; }
.bar-label { font-size: 0.85rem; min-width: 180px; color: var(--text-secondary); }
.bar-track { flex: 1; height: 8px; background: var(--bg-dark-3); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.bar-count { font-weight: 600; font-size: 0.85rem; min-width: 24px; text-align: right; }

/* Recent users */
.recent-users { display: flex; flex-direction: column; gap: 10px; }
.recent-user { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--bg-dark-2); border-radius: var(--radius-sm); justify-content: space-between; }
.user-avatar-sm { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--orange)); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.7rem; color: white; }
.user-name-sm { font-weight: 500; font-size: 0.9rem; }
.user-role-sm { font-size: 0.8rem; color: var(--text-muted); }
.empty-msg { text-align: center; color: var(--text-muted); padding: 40px 20px; font-size: 0.95rem; }
.empty-msg-sm { color: var(--text-muted); font-size: 0.85rem; padding: 8px 0; font-style: italic; }

/* Grade Input Table */
.grades-input-table input.grade-input { width: 60px; padding: 6px 8px; background: var(--bg-dark-2); border: 1px solid var(--border); border-radius: 4px; color: var(--text-primary); font-size: 0.85rem; text-align: center; }
.grades-input-table input.grade-input:focus { border-color: var(--blue); outline: none; }
.grade-avg { color: var(--blue-light); }
.grade-badge { padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.grade-A { background: rgba(34,197,94,0.15); color: #22c55e; }
.grade-B { background: rgba(59,130,246,0.15); color: #3b82f6; }
.grade-C { background: rgba(245,158,11,0.15); color: #f59e0b; }
.grade-F { background: rgba(239,68,68,0.15); color: #ef4444; }
.grade-pending { background: rgba(100,116,139,0.15); color: #94a3b8; }

/* Backup Panel */
.backup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.backup-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; text-align: center; }
.backup-icon { font-size: 3rem; margin-bottom: 16px; }
.backup-card h3 { font-family: 'Outfit', sans-serif; font-size: 1.2rem; margin-bottom: 12px; }
.backup-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; }

/* Dynamic Modal */
.modal-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(10,14,26,0.9); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: var(--transition); padding: 20px; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-card { background: var(--bg-dark-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0; width: 100%; max-width: 600px; max-height: 85vh; overflow-y: auto; animation: scaleIn 0.3s ease; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-dark-2); z-index: 1; }
.modal-header h2 { font-family: 'Outfit', sans-serif; font-size: 1.2rem; }
.modal-close-btn { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.modal-close-btn:hover { background: var(--surface); color: var(--text-primary); }
.modal-body-content { padding: 24px; }

/* Form Rows */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.btn-cancel { padding: 10px 20px; background: var(--surface); color: var(--text-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; }
.btn-submit-modal { padding: 10px 24px; background: linear-gradient(135deg, var(--blue), var(--blue-light)); color: white; border: none; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; }
.btn-submit-modal:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(59,130,246,0.3); }

/* Enroll list */
.enroll-list { max-height: 300px; overflow-y: auto; }
.enroll-option { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.enroll-option label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9rem; }
.enroll-option input[type="checkbox"] { accent-color: var(--blue); }

/* Student Course Section */
.student-course-section { margin-bottom: 32px; }
.course-section-title { font-family: 'Outfit', sans-serif; font-size: 1.4rem; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--border); }
.subject-block { margin-bottom: 24px; padding: 16px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); }
.subject-title { font-family: 'Outfit', sans-serif; font-size: 1.05rem; margin-bottom: 12px; color: var(--text-primary); }
.class-content-item { display: flex; gap: 14px; padding: 12px; background: var(--bg-dark-2); border-radius: var(--radius-sm); margin-bottom: 8px; }
.content-type-icon { font-size: 1.5rem; flex-shrink: 0; }
.class-content-info h4 { font-size: 0.95rem; margin-bottom: 4px; }
.class-content-info p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px; }
.content-link-btn { display: inline-flex; padding: 6px 14px; background: linear-gradient(135deg, var(--blue), var(--blue-light)); color: white; text-decoration: none; border-radius: 6px; font-size: 0.8rem; font-weight: 500; transition: var(--transition); }
.content-link-btn:hover { transform: translateY(-1px); }

/* Video embed */
.video-embed { margin-top: 10px; border-radius: var(--radius-sm); overflow: hidden; }
.video-embed iframe { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-sm); }

/* Submission form */
.submit-task-form { margin-top: 12px; }
.submit-task-form textarea { width: 100%; padding: 12px; background: var(--bg-dark-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-family: 'Inter', sans-serif; min-height: 80px; resize: vertical; margin-bottom: 10px; }
.submit-task-form textarea:focus { border-color: var(--blue); outline: none; }
.submission-info { margin-top: 12px; padding: 12px; background: var(--bg-dark-2); border-radius: var(--radius-sm); border-left: 3px solid #22c55e; }

/* Progress bar */
.progress-bar { height: 6px; background: var(--bg-dark-3); border-radius: 3px; overflow: hidden; }
.progress-bar .fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--orange)); border-radius: 3px; transition: width 1s ease; }

/* Toast notifications */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 14px 24px; background: var(--bg-dark-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.9rem; box-shadow: var(--shadow); transform: translateX(100%); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease; white-space: pre-line; }
.toast.show { transform: translateX(0); opacity: 1; }

/* Logout button */
.logout-btn { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: 12px; color: #ef4444 !important; border-radius: var(--radius-sm); transition: var(--transition); text-decoration: none; font-size: 0.9rem; }
.logout-btn:hover { background: rgba(239,68,68,0.1); }

/* Profile in portal */
.profile-header { display: flex; align-items: center; gap: 24px; margin-bottom: 32px; padding: 24px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--orange)); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; color: white; }
.profile-info h2 { font-family: 'Outfit', sans-serif; font-size: 1.5rem; }
.profile-course { color: var(--blue-light); font-weight: 500; }
.profile-id, .profile-grid .field-label { color: var(--text-muted); font-size: 0.85rem; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.profile-card h3 { font-family: 'Outfit', sans-serif; font-size: 1.1rem; margin-bottom: 16px; }
.profile-field { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.field-value { font-weight: 500; }
.text-muted { color: var(--text-muted); }

/* Portal Access Buttons */
.btn-portal-hero { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 32px; background: linear-gradient(135deg, var(--blue), var(--orange)); color: white; border: none; border-radius: var(--radius-sm); font-size: 1.05rem; font-weight: 600; font-family: 'Outfit', sans-serif; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.btn-portal-hero:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(59,130,246,0.4); }
.btn-portal-footer { display: inline-block; width: 100%; margin-top: 16px; padding: 12px; background: rgba(59,130,246,0.1); color: var(--blue-light); border: 1px solid rgba(59,130,246,0.2); border-radius: var(--radius-sm); font-weight: 600; text-align: center; cursor: pointer; transition: all 0.3s ease; }
.btn-portal-footer:hover { background: var(--blue); color: white; border-color: var(--blue); }

.fade-in-up { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

/* Staggered animations for course cards */
.curso-card:nth-child(1) { transition-delay: 0s; }
.curso-card:nth-child(2) { transition-delay: 0.1s; }
.curso-card:nth-child(3) { transition-delay: 0.2s; }
.curso-card:nth-child(4) { transition-delay: 0.3s; }
.curso-card:nth-child(5) { transition-delay: 0.4s; }
.curso-card:nth-child(6) { transition-delay: 0.5s; }
.curso-card:nth-child(7) { transition-delay: 0.6s; }

/* Staggered animations for feature cards */
.feature-card:nth-child(1) { transition-delay: 0s; }
.feature-card:nth-child(2) { transition-delay: 0.1s; }
.feature-card:nth-child(3) { transition-delay: 0.15s; }
.feature-card:nth-child(4) { transition-delay: 0.2s; }
.feature-card:nth-child(5) { transition-delay: 0.25s; }
.feature-card:nth-child(6) { transition-delay: 0.3s; }

/* ── Advanced Animations ── */

/* Glowing border animation */
@keyframes borderGlow {
  0%, 100% { border-color: rgba(59,130,246,0.3); box-shadow: 0 0 15px rgba(59,130,246,0.1); }
  50% { border-color: rgba(249,115,22,0.4); box-shadow: 0 0 25px rgba(249,115,22,0.15); }
}

/* Gradient text shimmer effect */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Counter pulse */
@keyframes countPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Neon glow */
@keyframes neonPulse {
  0%, 100% { box-shadow: 0 0 5px var(--blue-glow), 0 0 20px rgba(59,130,246,0.1); }
  50% { box-shadow: 0 0 15px var(--blue-glow), 0 0 40px rgba(59,130,246,0.2); }
}

/* Slide in from left/right */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Rotate in */
@keyframes rotateIn {
  from { opacity: 0; transform: rotate(-5deg) scale(0.95); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}

/* Continuous float for hero elements */
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Apply glow to hero logo */
.hero-logo { animation: neonPulse 3s ease-in-out infinite; }

/* Shimmer on section titles */
.section-title {
  background: linear-gradient(90deg, var(--text-primary) 0%, var(--text-primary) 40%, var(--orange) 50%, var(--text-primary) 60%, var(--text-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* Hero badge float */
.hero-badge { animation: gentleFloat 3s ease-in-out infinite; }

/* Hero stats counter pulse on hover */
.hero-stats .stat:hover .stat-number { animation: countPulse 0.5s ease; }

/* Sede cards glow on hover */
.sede-card:hover { animation: borderGlow 2s ease-in-out infinite; }

/* CTA button pulse */
.nav-cta { animation: neonPulse 3s ease-in-out infinite; }

/* Misión/Visión card entrance */
.mv-card { 
  opacity: 0; animation: fadeInUp 0.8s ease forwards;
}
.mv-card:nth-child(1) { animation-delay: 0.2s; }
.mv-card:nth-child(2) { animation-delay: 0.4s; }

/* Gallery items hover effect with overlay text */
.gallery-item::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(26,86,219,0.3), rgba(249,115,22,0.3));
  opacity: 0; transition: opacity 0.4s ease;
}
.gallery-item:hover::before { opacity: 1; }

/* Scroll indicator for hero */
.hero-content::after {
  content: ''; position: absolute; bottom: -60px; left: 50%;
  transform: translateX(-50%); width: 24px; height: 40px;
  border: 2px solid rgba(255,255,255,0.3); border-radius: 12px;
}
.hero-content::before {
  content: ''; position: absolute; bottom: -48px; left: 50%;
  transform: translateX(-50%); width: 4px; height: 8px;
  background: var(--orange); border-radius: 2px;
  animation: scrollIndicator 2s ease-in-out infinite;
}
@keyframes scrollIndicator {
  0% { transform: translateX(-50%) translateY(0); opacity: 1; }
  100% { transform: translateX(-50%) translateY(12px); opacity: 0; }
}

/* Typing cursor for hero title */
.hero-title .highlight { position: relative; }

/* Card hover lift with 3D perspective */
.curso-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  transform-style: preserve-3d;
}
.curso-card:hover {
  transform: translateY(-10px) rotateX(2deg);
  box-shadow: 0 25px 60px rgba(0,0,0,0.35), 0 0 30px rgba(26,86,219,0.1);
}

/* Feature card gradient border on hover */
.feature-card::before {
  content: ''; position: absolute; inset: -1px; z-index: -1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), var(--orange));
  opacity: 0; transition: opacity 0.3s ease;
}
.feature-card { position: relative; overflow: hidden; }
.feature-card:hover::before { opacity: 0.3; }

/* Quote slide with scale */
.quote-slide.active {
  animation: scaleIn 0.5s ease;
}

/* Smooth underline animation for footer links */
.footer-col ul a { position: relative; }
.footer-col ul a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: linear-gradient(90deg, var(--blue-light), var(--orange));
  transition: width 0.3s ease;
}
.footer-col ul a:hover::after { width: 100%; }

/* WhatsApp button bounce */
@keyframes whatsappBounce {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-4px); }
  75% { transform: translateY(2px); }
}
.btn-whatsapp-big { animation: whatsappBounce 2s ease-in-out infinite; }
.btn-whatsapp-big:hover { animation: none; transform: translateY(-3px); }

/* ── Utilities ── */
.hidden { display: none !important; }
.text-center { text-align: center; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .cursos-grid { grid-template-columns: repeat(2, 1fr); }
  .sedes-grid { grid-template-columns: repeat(3, 1fr); }
  .mv-grid { grid-template-columns: 1fr; }
  .portal-sidebar { transform: translateX(-100%); }
  .portal-sidebar.open { transform: translateX(0); }
  .portal-main { margin-left: 0; }
  .btn-sidebar-toggle { display: flex; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; position: fixed; top: 72px; left: 0; right: 0;
    background: rgba(10,14,26,0.98); backdrop-filter: blur(20px);
    flex-direction: column; padding: 24px; gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-cta { display: none; }
  .nav-mobile-toggle { display: flex; }

  .hero-title { font-size: 2.2rem; }
  .hero-stats { flex-direction: column; gap: 24px; }
  .hero-buttons { flex-direction: column; align-items: center; }

  .cursos-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-highlights { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .payments-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .sedes-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.featured { grid-column: span 2; grid-row: span 1; }
  .modal-details { grid-template-columns: 1fr; }
  .hero-content::after, .hero-content::before { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .sedes-grid { grid-template-columns: 1fr; }
  .login-card { padding: 28px; margin: 16px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}
