:root {
  --primary-color: #4a148c;
  --secondary-color: #ff9800;
  --accent-color: #e91e63;
  --text-dark: #333;
  --text-light: #666;
  --background-light: #f9f9f9;
  --white: #fff;
  --shadow: 0 4px 15px rgba(0,0,0,0.1);
  --gradient: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  --transition: all 0.3s ease;
}

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

body { 
  font-family: 'Poppins', sans-serif; 
  color: var(--text-dark); 
  background: var(--background-light);
  line-height: 1.6;
  overflow-x: hidden;
}
.navbar { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 1rem 2rem; 
  background: var(--gradient);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 0.5rem 2rem;
  backdrop-filter: blur(10px);
}

.logo { 
  color: var(--white); 
  font-size: 1.8rem; 
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.logo span { 
  color: var(--secondary-color); 
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.nav-menu { 
  list-style: none; 
  display: flex; 
  gap: 1rem; 
  transition: var(--transition);
}

.nav-menu li a { 
  color: var(--white); 
  text-decoration: none; 
  font-weight: 500; 
  padding: 0.7rem 1.2rem; 
  border-radius: 25px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.nav-menu li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--secondary-color);
  transition: left 0.3s ease;
  z-index: -1;
}

.nav-menu li a:hover::before,
.nav-menu li a.active::before {
  left: 0;
}

.nav-menu li a:hover, 
.nav-menu li a.active { 
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255,152,0,0.4);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--white);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

.hero { 
  background: linear-gradient(rgba(0,0,0,0.4), rgba(74,20,140,0.6)), 
              radial-gradient(circle at 30% 50%, var(--accent-color) 0%, transparent 50%),
              radial-gradient(circle at 70% 20%, var(--secondary-color) 0%, transparent 50%),
              var(--gradient);
  min-height: 100vh; 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  text-align: center; 
  color: var(--white); 
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,152,0,0.1) 50%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.hero-content { 
  max-width: 800px;
  z-index: 2;
  position: relative;
}

.hero-content h1 { 
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease-out;
}

.hero-content h1 span { 
  color: var(--secondary-color); 
  text-shadow: 0 0 20px rgba(255,152,0,0.5);
}

.hero-content p { 
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  margin: 1.5rem 0 2rem;
  animation: fadeInUp 1s ease-out 0.3s both;
  opacity: 0.9;
}

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

.btn-main { 
  background: var(--gradient);
  color: var(--white); 
  padding: 1rem 2rem; 
  border: none; 
  border-radius: 50px; 
  text-decoration: none; 
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
  display: inline-block;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease-out 0.6s both;
  cursor: pointer;
}

.btn-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}

.btn-main:hover::before {
  left: 100%;
}

.btn-main:hover { 
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255,152,0,0.4);
}

.multimedia {
  padding: 4rem 2rem;
  background: var(--white);
}

.multimedia h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 3rem;
  position: relative;
}

.multimedia h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.media-item {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(74,20,140,0.1);
}

.media-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.media-item video,
.media-item audio,
.media-item canvas {
  width: 100%;
  display: block;
}

.media-item video {
  height: 200px;
  object-fit: cover;
}

.media-item audio {
  height: 60px;
}

.media-item canvas {
  height: 200px;
  background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
}

.media-content {
  padding: 1.5rem;
}

.media-content h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.media-content p {
  color: var(--text-light);
  line-height: 1.6;
}

.features { 
  padding: 4rem 2rem; 
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.features h2 { 
  font-size: 2.5rem; 
  margin-bottom: 3rem; 
  color: var(--primary-color);
  text-align: center;
  position: relative;
}

.features h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

.card-container { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 2rem; 
  max-width: 1200px;
  margin: 0 auto;
}

.card { 
  background: var(--white); 
  padding: 2rem; 
  border-radius: 20px; 
  box-shadow: var(--shadow);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(74,20,140,0.1);
}

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

.card:hover { 
  transform: translateY(-15px) rotateY(2deg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.card h3 { 
  color: var(--accent-color); 
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.card p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.card-progress {
  margin-top: 1rem;
}

.card-progress span {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  display: block;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.stats {
  padding: 4rem 2rem;
  background: var(--gradient);
  color: var(--white);
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.stat-item {
  padding: 1.5rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
}

.stat-label {
  font-size: 1.1rem;
  opacity: 0.9;
}

.mini-quiz {
  padding: 4rem 2rem;
  background: var(--white);
}

.quiz-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.quiz-container h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

.question-card {
  background: var(--background-light);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.question-card p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.quiz-options {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.quiz-option {
  background: var(--white);
  border: 2px solid var(--primary-color);
  padding: 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-size: 1rem;
}

.quiz-option:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
}

.quiz-option.correct {
  background: #28a745;
  color: var(--white);
  border-color: #28a745;
}

.quiz-option.incorrect {
  background: #dc3545;
  color: var(--white);
  border-color: #dc3545;
}

.quiz-feedback {
  margin-top: 1rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.form-section {
  padding: 4rem 2rem;
  background: var(--background-light);
}

.form-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.form-container h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 2rem;
  font-size: 2.5rem;
}

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

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

.form-control {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-family: inherit;
  transition: var(--transition);
  background: #f8f9fa;
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74,20,140,0.1);
  background: var(--white);
}

.form-control.error {
  border-color: #dc3545;
  background: #fff5f5;
}

.error-message {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.form-control.error + .error-message {
  display: block;
}

footer { 
  background: var(--text-dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-link {
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--secondary-color);
}

/* Diseño responsive */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
  }
  
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--primary-color);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0,0,0,0.05);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    margin: 1rem 0;
  }

  .hamburger {
    display: flex;
  }

  .hero-content h1 { 
    font-size: 2rem; 
  }
  
  .hero-content p {
    font-size: 1rem;
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .media-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .stats-container {
    grid-template-columns: 1fr;
  }
  
  .card-container {
    grid-template-columns: 1fr;
  }
  
  .form-container {
    margin: 0 1rem;
    padding: 2rem 1.5rem;
  }
}

/* Animaciones buenardas xd */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { transform: translateX(-50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.8s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}
.form-field input,
.form-field select,
.form-field textarea {
  padding: .6rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.form-field input.invalid,
.form-field textarea.invalid {
  border-color: #e91e63;
  background:#ffe6ef;
}
.error-msg {
  color:#e91e63;
  font-size:.8rem;
  display:none;
}
.form-success {
  margin-top:1rem;
  color:green;
  font-weight:600;
}

.mapa-iframe {
  padding:4rem 2rem;
  text-align:center;
}
.mapa-iframe .iframe-wrapper {
  max-width:600px;
  margin:0 auto;
  aspect-ratio:16/9;
}
.mapa-iframe iframe {
  width:100%;
  height:100%;
  border:0;
  border-radius:10px;
  box-shadow:var(--shadow);
}

.gallery-controls {
  text-align:center;
  padding:2rem 1rem;
}
.gallery-filter-wrapper {
  display:inline-flex;
  gap:.5rem;
  flex-wrap:wrap;
}
.gallery-grid {
  width:100%;
  max-width:1100px;
  margin:0 auto 4rem;
  padding:0 1rem;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px,1fr));
  gap:1.5rem;
}
.gal-item {
  background:var(--white);
  padding:1rem;
  border-radius:10px;
  box-shadow:var(--shadow);
  text-align:center;
}
.gal-item img,
.gal-item video {
  width:100%;
  height:auto;
  border-radius:8px;
  cursor:pointer;
}
.gal-item figcaption {
  margin-top:.5rem;
  font-size:.9rem;
  color:var(--text-light);
}
.gal-filter.active {
  outline:2px solid var(--accent-color);
}

.lightbox {
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.8);
  justify-content:center;
  align-items:center;
  z-index:2000;
}
.lightbox img {
  max-width:90%;
  max-height:80%;
  box-shadow:var(--shadow);
  border-radius:10px;
}
.lightbox-close {
  position:absolute;
  top:1rem;
  right:1rem;
  background:none;
  border:none;
  color:#fff;
  font-size:2rem;
  cursor:pointer;
}

/* Artículos de contenido */
.page-main {
  max-width:900px;
  margin:0 auto;
  padding:2rem 1rem 5rem;
}
.content-article h1 {
  margin-bottom:1rem;
}
.content-article p {
  margin-bottom:1.5rem;
}
.detalle-tema {
  margin-bottom:1rem;
  background:var(--white);
  padding:1rem;
  border-radius:8px;
  box-shadow:var(--shadow);
}
.detalle-tema > summary {
  cursor:pointer;
  font-weight:600;
}
.mini-ejercicio {
  margin-top:2rem;
  background:var(--background-light);
  padding:1.5rem;
  border-radius:8px;
  box-shadow:var(--shadow);
}
.mini-ejercicio form label {
  margin-right:.5rem;
}

/* Literatura cards */
.lit-grid {
  display:grid;
  gap:2rem;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  margin-top:2rem;
}
.lit-card {
  background:var(--white);
  padding:1rem;
  border-radius:10px;
  box-shadow:var(--shadow);
  text-align:center;
}
.lit-card img,
.lit-card video,
.lit-card iframe {
  width:100%;
  border-radius:8px;
  margin:.5rem 0;
}
.tabla-responsiva-wrapper {
  overflow-x:auto;
  margin-top:2rem;
}
.tabla-responsiva {
  width:100%;
  border-collapse:collapse;
}
.tabla-responsiva th,
.tabla-responsiva td {
  border:1px solid #ddd;
  padding:.5rem;
  text-align:left;
}

/* Redacción */
.redac-editor {
  margin-top:2rem;
  background:var(--white);
  padding:1.5rem;
  border-radius:10px;
  box-shadow:var(--shadow);
}
.redac-editor textarea {
  width:100%;
  resize:vertical;
}
.redac-herramientas {
  margin-top:.5rem;
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
}
.plantillas-redac {
  margin-top:2rem;
  text-align:center;
}
.plantillas-redac .plantilla-btn {
  margin:.25rem;
  padding:.5rem 1rem;
  border:1px dashed var(--primary-color);
  background:var(--background-light);
  cursor:pointer;
  border-radius:5px;
}
.quiz-page {
  max-width:700px;
  margin:4rem auto;
  padding:0 1rem 4rem;
}
.quiz-form .quiz-q {
  margin-bottom:2rem;
  background:var(--white);
  padding:1rem;
  border-radius:10px;
  box-shadow:var(--shadow);
}
.quiz-form label {
  display:block;
  margin:.25rem 0;
}
.quiz-result {
  margin-top:1rem;
  font-weight:600;
  text-align:center;
}
.quiz-acciones {
  text-align:center;
  margin-bottom:5rem;
}
.quiz-acciones .btn-main {
  margin:.25rem;
}

.quiz-feedback.good { color:green; }
.quiz-feedback.bad { color:#e91e63; }


/* "Parche" para eliminar los efectos de la barra de navegación inicial
que copié de una página externa, se ve horrible en ésta xdd :v */ 
/* "Parche" para eliminar los efectos de la barra de navegación inicial
que copié de una página externa, se ve horrible en ésta xdd :v */ 
.nav-menu li a,
.nav-menu li a::before {
  all: unset;
  color: var(--white);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.nav-menu li a:link,
.nav-menu li a:visited {
  color: var(--white);
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: var(--secondary-color);
}

.btn-main{
  background: #7f00ff;
  color: #fff;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.btn-main:hover{
  background: #5f00c9;
}



/* WTF, 1,000 líneas terminó saliendo, ojalá saque al menos un 18... :,) */