@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Outfit:wght@400;600;700;800&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700;1,800&family=Work+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700&display=swap');

:root {
  --primary: #1a6b3c;
  --primary-hover: #2d9a5a;
  --secondary: #3b1f0e;
  --accent: #c8932a;
  --bg-color: #fdf6ec;
  --bg-alt: #f4f0ea;
  --text-main: #2a1a08;
  --text-light: #7a6552;
  --white: #ffffff;
  --border-color: rgba(200, 147, 42, .25);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 8px rgba(58, 31, 14, .04);
  --shadow-md: 0 8px 16px rgba(58, 31, 14, .08);
  --shadow-lg: 0 12px 24px rgba(58, 31, 14, .12);
  --shadow-hover: 0 16px 32px rgba(58, 31, 14, .12);
  --shadow-xl: 0 20px 40px rgba(58, 31, 14, .15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Work Sans', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: 'Work Sans', sans-serif;
  color: var(--secondary);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ══ 1. NAVIGATION ══ */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 5%;
  background: var(--bg-color);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
  height: 80px; /* Altura fija para el header */
}

.logo {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.nav-logo {
  height: 50px; /* Tamaño controlado del logo */
  width: auto;
  object-fit: contain;
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.main-nav ul li a {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.05em;
  position: relative;
}

.main-nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary);
  transition: var(--transition);
}

.main-nav ul li a:hover {
  color: var(--primary);
}

.main-nav ul li a:hover::after {
  width: 100%;
}

.main-nav ul li:last-child a {
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.main-nav ul li:last-child a::after {
  display: none;
}

.main-nav ul li:last-child a:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ══ MENÚ HAMBURGER (móvil) ══ */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ══ 2. HERO ══ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 5% 4rem;
  background: linear-gradient(160deg, #3eb489 0%, #2a9a72 40%, #1a7a58 100%);
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  z-index: 0;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  z-index: 0;
}

#hero>* {
  z-index: 1;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  animation: fadeInDown 0.8s ease-out;
}

#hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 1.5rem;
  max-width: 900px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

#hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: #e8b84b;
  position: relative;
  display: inline-block;
}

#hero h1 em::after {
  display: none;
}

#hero p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Para que en móviles se apilen con espacio */
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

#hero a {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  transition: var(--transition);
  /* La animación ahora la maneja el contenedor .hero-btns */
}

#hero a:first-of-type {
  background: var(--white);
  color: var(--primary);
}

#hero a:first-of-type:hover {
  background: var(--bg-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

#hero a:last-of-type {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

#hero a:last-of-type:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--white);
  transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* FIX: Respeto por preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Global Section Styling */
section {
  padding: 6rem 5%;
}

.section-label {
  color: var(--primary);
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  display: block;
}

section h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

/* ══ 3. MARQUES ALLIÉES ══ */
#aliados {
  background: var(--bg-color);
  text-align: center;
  padding: 4rem 5%;
  border-bottom: 1px solid var(--border-color);
}

.aliados-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.aliado-card {
  filter: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.aliado-card:hover {
  transform: scale(1.05);
}

.aliado-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--secondary);
}

/* ══ 4. MISSION ET VISION ══ */
#mision {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  background: var(--bg-color);
  padding: 6rem 5%;
}

.mision-card {
  background: var(--white);
  padding: 3rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.mision-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transition: var(--transition);
}

.mision-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.mision-card:hover::before {
  width: 8px;
}

.mision-card h2 {
  font-size: 1rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.mision-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

/* ══ 5. VARIANTES LINGUISTIQUES ══ */
#variantes {
  background: var(--bg-alt);
}

#variantes>p:not(.section-label) {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  max-width: 600px;
}

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

.variante-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.variante-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.variante-card img {
  width: 3cm;
  height: 3cm;
  object-fit: contain;
  margin: 1.5rem auto 0;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden;
}

.variante-card:hover img {
  transform: rotateY(360deg);
}

.variante-card h3 {
  font-size: 1.25rem;
  padding: 1.5rem 1.5rem 0.5rem;
}

.variante-card h3 .fi {
  font-size: 0.8em;
  border-radius: 2px;
  vertical-align: middle;
  margin-bottom: 2px;
}

.variante-card p {
  padding: 0 1.5rem;
  color: var(--text-light);
  font-size: 0.9rem;
  flex-grow: 1;
}

/* FIX: <q> reemplazado por botón en el HTML — este estilo aplica a .frase-audio */
.variante-card .frase-audio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem 1.5rem;
  font-style: italic;
  font-weight: 500;
  font-size: 1rem;
  font-family: inherit;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.variante-card .frase-audio::before {
  content: '«';
  font-style: normal;
}

.variante-card .frase-audio::after {
  content: '» 🔊';
  font-size: 0.9rem;
  opacity: 0.6;
  transition: var(--transition);
}

.variante-card .frase-audio:hover {
  color: var(--primary-hover);
  transform: scale(1.05);
}

.variante-card .frase-audio:hover::after {
  opacity: 1;
  transform: scale(1.2);
}

/* ══ 6. SERVICES ══ */
#services {
  background: linear-gradient(160deg, #3eb489 0%, #2a9a72 40%, #1a7a58 100%);
  color: var(--white);
  text-align: center;
}

#services .section-label {
  color: #e8b84b;
}

#services h2 {
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  margin-bottom: 4rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.servicio-card {
  background: var(--bg-color);
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  text-align: left;
}

.servicio-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* FIX: transition corregida (antes tenía var(--transition) anidado) */
.servicio-card span {
  font-size: 3rem;
  display: block;
  width: fit-content;
  margin: 0 auto 1.5rem;
  transition: var(--transition);
}

@keyframes circular-turn {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  25% {
    transform: translate(5px, -5px) rotate(5deg);
  }

  50% {
    transform: translate(0, -10px) rotate(0deg);
  }

  75% {
    transform: translate(-5px, -5px) rotate(-5deg);
  }

  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

.servicio-card:hover .emoji-mortarboard {
  animation: circular-turn 1.5s infinite linear;
}

@keyframes handshake-pulse {

  0%,
  100% {
    transform: scale(1);
  }

  20% {
    transform: scale(1.1) rotate(-5deg);
  }

  40% {
    transform: scale(0.9) rotate(5deg);
  }

  60% {
    transform: scale(1.1) rotate(-5deg);
  }

  80% {
    transform: scale(0.9) rotate(5deg);
  }
}

.servicio-card:hover .emoji-handshake {
  animation: handshake-pulse 1s ease-in-out infinite;
}

@keyframes rotate-earth {
  from {
    transform: perspective(1000px) rotateY(0deg);
  }

  to {
    transform: perspective(1000px) rotateY(360deg);
  }
}

.servicio-card:hover .emoji-earth {
  animation: rotate-earth 4s linear infinite;
}

.servicio-card h3 {
  color: var(--secondary);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.servicio-card p {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.servicio-card small {
  display: block;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ══ 7. COURS ══ */
#courses {
  background: var(--bg-alt);
}

#courses>a {
  display: inline-flex;
  align-items: center;
  margin-bottom: 3rem;
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}

#courses>a:hover {
  transform: translateX(5px);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.curso-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.curso-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.curso-card>span {
  align-self: flex-start;
  background: rgba(26, 107, 60, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.curso-card:nth-child(even)>span {
  background: rgba(200, 147, 42, 0.15);
  color: var(--accent);
}

.curso-card:nth-child(3n)>span {
  background: rgba(59, 31, 14, 0.1);
  color: var(--secondary);
}

.curso-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.curso-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.curso-card small {
  display: flex;
  gap: 1rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* ══ 8. COMMUNAUTÉ ══ */
#community {
  position: relative;
  overflow: hidden;
  padding: 100px 5%;
  background: #000;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.video-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Verde un poco más claro y vibrante, con menos opacidad para "aclarar" la sección */
  background: linear-gradient(135deg, rgba(40, 130, 80, 0.65), rgba(59, 31, 14, 0.55));
}

.community-content,
.community-features {
  position: relative;
  z-index: 10;
}

.community-content .section-label {
  color: var(--accent);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.community-content h2 {
  color: var(--white);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 1.5rem;
  text-shadow: 0 3px 6px rgba(0,0,0,0.5); /* Sombra más fuerte para compensar el fondo más claro */
}

.community-intro {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 1); /* Blanco puro para máxima legibilidad */
  margin-bottom: 3rem;
  max-width: 800px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.community-action {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-top: 6rem;
}

.community-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  list-style: none;
  padding: 0;
}

.community-features li {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 3rem 2rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.community-features li:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.community-features h3 {
  color: var(--white);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  font-family: 'Playfair Display', serif;
}

.community-features h3::before {
  content: '✦';
  color: var(--accent);
  margin-right: 1rem;
  font-size: 1.5rem;
}

.community-features p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ══ 9. FORMULAIRE D'INSCRIPTION ══ */
#inscription {
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#inscription h2 {
  text-align: center;
  margin-bottom: 3rem;
}

form {
  background: var(--white);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 650px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--secondary);
  font-size: 0.95rem;
}

form input[type="text"],
form input[type="email"],
form input[type="tel"],
form select,
form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  margin-bottom: 1.5rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg-color);
  transition: var(--transition);
}

/* FIX: color de focus corregido a verde (antes era naranja) */
form input:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(26, 107, 60, 0.15);
}

.checkbox-group {
  border: none;
  margin-bottom: 2rem;
  padding: 0;
}

.checkbox-group legend {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--secondary);
}

.checkbox-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.checkbox-item input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-item label {
  margin-bottom: 0;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
}

/* FIX: sombra del botón corregida a verde (antes era naranja) */
form button {
  width: 100%;
  padding: 1.15rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 6px -1px rgba(26, 107, 60, 0.3);
}

form button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(26, 107, 60, 0.3);
}

/* ══ 10. PIED DE PAGE ══ */
footer {
  background: linear-gradient(160deg, #3eb489 0%, #2a9a72 40%, #1a7a58 100%);
  color: rgba(255, 255, 255, 0.9);
  padding: 5rem 5% 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 4rem;
}

.footer-brand {
  max-width: 400px;
}

.footer-brand .logo {
  font-family: 'Outfit', sans-serif;
  color: var(--white);
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 15px;
  white-space: normal; /* Permitir que el texto rompa línea si es necesario */
}

.footer-logo {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1); /* Logo en blanco para el footer */
}

.footer-brand p:not(.logo) {
  font-size: 0.95rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
}

footer h4 {
  color: var(--white);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

footer ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-copy {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 3rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
}

/* ══ RESPONSIVE ══ */
@media (max-width: 900px) {
  .main-nav {
    padding: 1rem 5%;
  }

  .logo {
    white-space: normal;
    font-size: 0.95rem;
  }

  .nav-logo {
    height: 40px;
  }

  /* FIX: menú hamburger visible en móvil */
  .hamburger {
    display: flex;
  }

  .main-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    background: var(--bg-color);
    flex-direction: column;
    padding: 1.5rem 5%;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
  }

  .main-nav ul.open {
    display: flex;
  }

  .main-nav ul li:last-child a {
    display: inline-block;
  }

  #hero h1 {
    font-size: 2.5rem;
  }

  #hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
  }

  #hero a {
    display: block;
    margin: 1rem auto;
    width: fit-content;
  }

  #hero a:first-of-type {
    margin-right: auto;
  }

  .variante-card img {
    width: auto;
    height: 150px;
    max-width: 100%;
  }

  .aliados-grid {
    gap: 2rem;
  }
}

/* ══ 11. WHATSAPP FLOATING WIDGET ══ */
.whatsapp-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
  font-family: 'Work Sans', sans-serif;
}

.whatsapp-button {
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  animation: pulse-whatsapp 2s infinite;
}

.whatsapp-button:hover {
  transform: scale(1.1);
  background-color: #128c7e;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.whatsapp-button svg {
  width: 32px;
  height: 32px;
  fill: white;
}

.whatsapp-chat-bubble {
  width: 300px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: none; /* Hidden by default */
  flex-direction: column;
  transform-origin: bottom right;
  animation: bubble-appear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-chat-bubble.active {
  display: flex;
}

.chat-header {
  background-color: #075e54;
  color: white;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header .avatar {
  width: 45px;
  height: 45px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.header-info h4 {
  margin: 0;
  font-size: 16px;
  color: white;
}

.header-info p {
  margin: 0;
  font-size: 12px;
  opacity: 0.8;
}

.chat-body {
  padding: 20px;
  background-color: #e5ddd5;
  background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
  background-size: contain;
}

.chat-message {
  background: white;
  padding: 10px 15px;
  border-radius: 10px;
  border-top-left-radius: 2px;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  position: relative;
}

.chat-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: -10px;
  border: 5px solid transparent;
  border-right-color: white;
  border-top-color: white;
}

.chat-footer {
  padding: 15px;
  background: white;
}

.btn-start-chat {
  display: block;
  background-color: #25d366;
  color: white;
  text-align: center;
  padding: 12px;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-start-chat:hover {
  background-color: #128c7e;
  transform: translateY(-2px);
}

@keyframes pulse-whatsapp {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@keyframes bubble-appear {
  from { opacity: 0; transform: scale(0.5) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 600px) {
  .whatsapp-widget {
    bottom: 20px;
    right: 20px;
  }
  .whatsapp-chat-bubble {
    width: 280px;
    right: 0;
  }
}

/* ══ 12. COMUNIDAD PAGE ══ */
.comunidad-page {
  background: var(--bg-alt);
  min-height: 100vh;
}

.comunidad-header {
  padding: 120px 5% 60px;
  background: linear-gradient(160deg, #3eb489 0%, #2a9a72 40%, #1a7a58 100%);
  color: var(--white);
  text-align: center;
  position: relative;
}

.comunidad-header-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.comunidad-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 5vw, 4.5rem);
  color: var(--white);
  margin-bottom: 1rem;
}

.comunidad-header p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.btn-comunidad-hero {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.125rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(200, 147, 42, 0.4);
}

.btn-comunidad-hero:hover {
  transform: translateY(-3px);
  background: #deb04a;
  box-shadow: 0 8px 25px rgba(200, 147, 42, 0.6);
}

.comunidad-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 5%;
}

.comunidad-layout {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

@media (min-width: 900px) {
  .comunidad-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}

.comunidad-feed-col {
  display: flex;
  flex-direction: column;
}

/* Sidebar Noticias */
.comunidad-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: var(--white);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.sidebar-widget h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}

.widget-subtitle {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.news-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: var(--transition);
  padding: 0.5rem;
  border-radius: 8px;
}

.news-item:hover {
  background: var(--bg-alt);
  transform: translateX(5px);
}

.news-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.news-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.news-topic {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.topic-cultura { background: rgba(200, 147, 42, 0.15); color: var(--accent); }
.topic-gastronomia { background: rgba(224, 36, 94, 0.1); color: #e0245e; }
.topic-deportes { background: rgba(45, 154, 90, 0.1); color: var(--primary); }

.news-info h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.3;
}

.widget-ad {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.ad-label {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  z-index: 2;
}

.widget-ad img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.widget-ad h4 {
  font-size: 1.25rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.widget-ad p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.btn-ad {
  width: 100%;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.75rem;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-ad:hover {
  background: var(--primary);
  color: var(--white);
}

.comunidad-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--white);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.feed-comunidad {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.post-avatar {
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'Montserrat', sans-serif;
}

.post-info h3 {
  font-size: 1.125rem;
  margin: 0 0 0.25rem 0;
  color: var(--secondary);
}

.post-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  display: inline-block;
}

.tag-cultura { background: rgba(200, 147, 42, 0.15); color: var(--accent); }
.tag-viajes { background: rgba(26, 107, 60, 0.1); color: var(--primary); }
.tag-lenguaje { background: rgba(59, 31, 14, 0.1); color: var(--secondary); }

.post-content {
  margin-bottom: 1.5rem;
}

.post-content p {
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.post-media {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 1rem;
}

.post-footer {
  display: flex;
  gap: 1rem;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.btn-like {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
}

.btn-like:hover {
  color: #e0245e;
}

.btn-like.liked {
  color: #e0245e;
}

.btn-share {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  margin-left: auto;
  transition: var(--transition);
}

.btn-share:hover {
  color: var(--primary);
}

/* Modal styles */
.comunidad-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.comunidad-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

.comunidad-modal-content {
  background: var(--white);
  padding: 3rem;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: var(--shadow-xl);
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

.close-modal {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.comunidad-modal-content h2 {
  margin-bottom: 2rem;
  color: var(--secondary);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea,
.form-group input[type="file"] {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg-alt);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(26, 107, 60, 0.15);
}

.btn-submit-post {
  width: 100%;
  padding: 1.15rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 1rem;
}

.btn-submit-post:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(26, 107, 60, 0.3);
}

.no-posts {
  text-align: center;
  color: var(--text-light);
  font-size: 1.125rem;
  padding: 3rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Comments Section Styles */
.post-comments-container {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border-color);
}

.post-comments {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.comment-card {
  background: var(--bg-alt);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-size: 0.95rem;
}

.comment-card strong {
  display: block;
  color: var(--secondary);
  margin-bottom: 0.25rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
}

.comment-card p {
  color: var(--text-main);
  margin: 0;
  line-height: 1.5;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.comment-inputs-row {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.comment-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.comment-file-label {
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: var(--transition);
  background: rgba(26, 107, 60, 0.05);
}

.comment-file-label:hover {
  background: rgba(26, 107, 60, 0.15);
}

.comment-media-input {
  display: none;
}

.comment-media {
  width: 100%;
  max-width: 300px;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 0.75rem;
  display: block;
}

.comment-name-input {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

.comment-text-input {
  flex: 3;
  min-width: 200px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

.comment-name-input:focus,
.comment-text-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 107, 60, 0.1);
}

.btn-comment-submit {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.btn-comment-submit:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* ══ 13. PORTAL DEL ALUMNO ══ */
.portal-page {
  background: var(--bg-alt);
  padding-top: 100px;
}

.portal-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 5%;
}

.portal-section {
  background: var(--white);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 3rem;
}

.portal-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
  padding-bottom: 0.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header .portal-title {
  margin-bottom: 0;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* Carousel */
.carousel-container {
  position: relative;
  background: var(--bg-color);
  border-radius: 12px;
  padding: 3rem 0;
  overflow: hidden;
  cursor: none;
  width: 100%;
}

.carousel-track {
  display: flex;
  width: max-content;
  align-items: center;
  will-change: transform;
}

.carousel-slide {
  width: 90vw;
  max-width: 600px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
  margin-bottom: 1rem;
  pointer-events: none;
}

.slide-content h3 {
  font-family: 'Montserrat', sans-serif;
  color: var(--secondary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.slide-content p {
  color: var(--text-main);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.carousel-btn {
  display: none;
}

/* Sub-pestañas para estudiantes y calendario */
.student-subtabs, #calendar-tabs-container {
  display: flex;
  gap: 10px;
  margin-bottom: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 40px; /* Asegurar espacio */
}

.sub-tab {
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  border: 1.5px solid var(--border-color);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.sub-tab.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.sub-tab:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

/* Calendar */
.calendar-grid {
  display: block;
  width: 100%;
  min-height: 100px; /* Asegurar que no colapse */
}

.cal-column {
  background: var(--bg-alt);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
  overflow: hidden;
}

.cal-day-header {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 0.75rem;
  font-weight: 600;
  border-radius: 7px 7px 0 0;
}

.cal-events {
  padding: 1rem;
}

.cal-event {
  background: var(--white);
  padding: 0.5rem;
  border-radius: 4px;
  border-left: 3px solid var(--accent);
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cal-event strong {
  display: block;
  color: var(--secondary);
  margin-bottom: 0.2rem;
}

.no-events {
  color: var(--text-light);
  font-size: 0.85rem;
  text-align: center;
  font-style: italic;
}

@media (max-width: 768px) {
  .portal-main {
    padding: 1rem 3%;
  }

  .portal-section {
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
  }

  .portal-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0;
  }

  .professor-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem !important;
  }

  .professor-card img {
    width: 80px !important;
    height: 80px !important;
  }

  .next-class-card {
    min-width: 100% !important;
    padding: 1rem !important;
    flex-direction: column;
    text-align: center;
  }

  .next-class-card button {
    margin: 0 auto !important;
  }

  .certificate-container {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .certificate-text {
    min-width: 100%;
  }

  .calendar-tabs-container {
    justify-content: flex-start !important;
    padding-bottom: 10px;
  }

  /* Tables responsiveness */
  .grades-table th, .grades-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }

  /* Modals */
  .comunidad-modal-content {
    width: 95% !important;
    padding: 1.5rem !important;
  }

  /* CRM and Tables */
  .crm-table-container {
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
    width: calc(100% + 3rem);
  }
}

/* Virtual Classroom Accordion */
.vc-level {
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.vc-level-btn {
  background: var(--bg-alt);
  color: var(--secondary);
  width: 100%;
  padding: 1rem 1.5rem;
  text-align: left;
  border: none;
  outline: none;
  font-size: 1.15rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vc-level-btn:hover, .vc-level-btn.active {
  background: rgba(26, 107, 60, 0.1);
}

.vc-icon {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.vc-level-btn.active .vc-icon {
  transform: rotate(180deg);
}

.vc-lessons-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: var(--white);
}

.vc-lesson {
  padding: 1.5rem;
  border-top: 1px solid var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.vc-lesson h4 {
  margin: 0;
  color: var(--text-main);
  font-size: 1.1rem;
}

.vc-lesson-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.vc-lesson-actions button {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  color: var(--secondary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.vc-lesson-actions button:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* Grades & Certificate */
.grades-card {
  margin-bottom: 2rem;
  overflow-x: auto;
}

.grades-table {
  width: 100%;
  border-collapse: collapse;
}

.grades-table th, .grades-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--bg-alt);
}

.grades-table th {
  background: var(--bg-alt);
  color: var(--secondary);
  font-weight: 600;
}

.status-pass {
  background: rgba(26, 107, 60, 0.15);
  color: var(--primary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}

.certificate-container {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(200, 147, 42, 0.1), rgba(200, 147, 42, 0.05));
  padding: 2rem;
  border-radius: 12px;
  border: 1px dashed var(--accent);
  gap: 1.5rem;
  flex-wrap: wrap;
}

.certificate-icon {
  font-size: 3rem;
}

.certificate-text {
  flex: 1;
  min-width: 250px;
}

.certificate-text h3 {
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 6px -1px rgba(26, 107, 60, 0.3);
  font-size: 1rem;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(26, 107, 60, 0.3);
}

/* ══ 14. DASHBOARD BOXES (PORTAL PROFESOR) ══ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding: 1rem;
}

.dashboard-box {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.dashboard-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.dashboard-box.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(26, 107, 60, 0.3);
}

.dashboard-box .box-icon {
  font-size: 2.5rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.dashboard-box:hover .box-icon {
  transform: scale(1.1);
}

.dashboard-box h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  margin: 0;
  color: inherit;
}

.dashboard-box p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
  opacity: 0.8;
}

.dashboard-box.active p {
  color: rgba(255, 255, 255, 0.8);
}

/* Ocultar secciones no activas */
.portal-section.hidden {
  display: none !important;
}

/* Animación de entrada para secciones */
.portal-section:not(.hidden) {
  animation: fadeInSection 0.4s ease-out;
}

@keyframes fadeInSection {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ══ FULL SCREEN PIZARRA ══ */
.quill-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: white !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
}

.quill-fullscreen .ql-toolbar {
    border-radius: 8px 8px 0 0 !important;
    background: #f8f9fa !important;
}

.quill-fullscreen .ql-container {
    flex-grow: 1 !important;
    height: calc(100vh - 160px) !important;
    overflow-y: auto !important;
    background: white !important;
    border-radius: 0 0 8px 8px !important;
}

.btn-fullscreen-toggle {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-fullscreen-toggle:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

