/*--------------------------------------------------------------
1. Variables globales
--------------------------------------------------------------*/
:root {
  --clr-primary: #6a1b9a;
  --clr-accent: #ff5722;
  --clr-accent-dark: #e64a19;
  --clr-light: #fff;
  --clr-dark: #333;
  --clr-bg: #f4f4f4;
  --clr-bg-alt: #f9f9f9;

  --font-base: "Poppins", sans-serif;
  --fs-h1: clamp(2rem, 5vw, 3rem);
  --fs-h2: clamp(1.75rem, 4vw, 2rem);
  --fs-body: clamp(1rem, 2.5vw, 1.2rem);

  --section-padding: 60px;
  --gutter: 20px;
  --border-radius: 8px;
  --transition-speed: 0.3s;
}

/*--------------------------------------------------------------
2. Reset y estilos base
--------------------------------------------------------------*/
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  font-family: var(--font-base);
  background-color: var(--clr-bg);
  color: var(--clr-dark);
  line-height: 1.6;
}

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

/*--------------------------------------------------------------
3. Contenedor central
--------------------------------------------------------------*/
.container {
  width: min(100% - 2 * var(--gutter), 1200px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/*--------------------------------------------------------------
4. Secciones genéricas
--------------------------------------------------------------*/
section {
  padding: var(--section-padding) 0;
}

/*--------------------------------------------------------------
5. Hero Section
--------------------------------------------------------------*/
.hero-section {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
}

.hero-video-wrapper {
  position: absolute;
  inset: 0;
  z-index: 1;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.hero-logo {
  position: absolute;
  top: var(--gutter);
  left: var(--gutter);
  z-index: 3;
}

.hero-logo img {
  height: 50px;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.hero-content {
  position: relative;
  z-index: 4;
  max-width: 800px;
  color: var(--clr-light);
}

.hero-content h1 {
  font-size: var(--fs-h1);
  margin-bottom: 0.5em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-content p {
  font-size: var(--fs-body);
  margin-bottom: 1.25em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.cta {
  display: inline-block;
  background: var(--clr-accent);
  color: var(--clr-light);
  padding: 0.75em 2em;
  border-radius: 30px;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: background var(--transition-speed),
    transform var(--transition-speed);
}

.cta:hover {
  background: var(--clr-accent-dark);
  transform: translateY(-2px);
}

/*--------------------------------------------------------------
6. Beneficios Section
--------------------------------------------------------------*/
.benefits-section {
  background: var(--clr-light);
  text-align: center;
}

.benefits-section h2 {
  font-size: var(--fs-h2);
  margin-bottom: 1em;
  color: var(--clr-primary);
}

.benefits-section ul {
  list-style: none;
  columns: 2;
  gap: var(--gutter);
  max-width: 600px;
  margin: 0 auto;
}

.benefits-section li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.75em;
  font-size: var(--fs-body);
}

.benefits-section li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--clr-accent);
}

/*--------------------------------------------------------------
7. Promo Timer
--------------------------------------------------------------*/
.promo-timer {
  background: linear-gradient(to right, #ff8a65, #d84315);
  color: var(--clr-light);
  text-align: center;
}

.promo-timer h2 {
  font-size: var(--fs-h2);
  margin-bottom: 0.25em;
}

.promo-timer p {
  font-size: var(--fs-body);
  margin-bottom: 1.25em;
}

.countdown-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin-inline: auto;
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.35s;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.countdown-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: bold;
}

/*--------------------------------------------------------------
8. Cursos & Mega Packs
--------------------------------------------------------------*/
.curso-grid,
.mega-pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gutter);
  justify-items: center;
}

.curso,
.mega-pack {
  background: var(--clr-light);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-speed),
    box-shadow var(--transition-speed);
}

.curso:hover,
.mega-pack:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.image-container {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.curso:hover .image-container img,
.mega-pack:hover .image-container img {
  transform: scale(1.1);
}

.badge {
  position: absolute;
  top: var(--gutter);
  left: var(--gutter);
  background: #e91e63;
  color: var(--clr-light);
  padding: 0.25em 0.5em;
  border-radius: var(--border-radius);
  font-size: 0.85rem;
}

.curso h3,
.mega-pack h3 {
  font-size: 1.2rem;
  margin: 1em 0 0.5em;
  padding: 0 var(--gutter);
}

.curso p,
.mega-pack p {
  font-size: var(--fs-body);
  color: #555;
  padding: 0 var(--gutter) 1em;
}

/*--------------------------------------------------------------
9. Comprar Todo
--------------------------------------------------------------*/
.todos-cursos-section {
  background: var(--clr-bg-alt);
  text-align: center;
}

.todos-cursos-section h2 {
  font-size: var(--fs-h2);
  margin-bottom: 0.5em;
  color: var(--clr-primary);
}

/*--------------------------------------------------------------
10. FAQ
--------------------------------------------------------------*/
.faq-item {
  max-width: 600px;
  margin: 0 auto var(--gutter);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: var(--clr-primary);
  color: var(--clr-light);
  padding: 0.75em var(--gutter);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: var(--fs-body);
  transition: background var(--transition-speed);
}

.faq-question:hover {
  background: #5a157f;
}

.faq-answer {
  display: none;
  background: var(--clr-bg);
  padding: 0.75em var(--gutter);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/*--------------------------------------------------------------
11. Contacto
--------------------------------------------------------------*/
.contacto-section {
  background: var(--clr-light);
  text-align: center;
}

.contacto-section h2 {
  font-size: var(--fs-h2);
  margin-bottom: 0.5em;
  color: var(--clr-primary);
}

/*--------------------------------------------------------------
12. WhatsApp Fijo
--------------------------------------------------------------*/
.whatsapp-fixed {
  position: fixed;
  bottom: var(--gutter);
  right: var(--gutter);
  z-index: 1000;
}

.whatsapp-fixed img {
  width: 50px;
  height: 50px;
}

/*--------------------------------------------------------------
13. Media Queries
--------------------------------------------------------------*/
@media (max-width: 1200px) {
  .benefits-section ul {
    columns: 1;
  }
}

@media (max-width: 992px) {
  .hero-logo img {
    height: 45px;
  }
}

@media (max-width: 768px) {
  .hero-content p {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  }
  .cta {
    padding: 0.6em 1.5em;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .image-container {
    height: 140px;
  }
}
