/* ============================================================
   CURSO LANDING — CSS reutilizable
   Layout: hero full-width + 2-col (contenido + sticky buy card)
   Se carga DESPUÉS de assets/css/styles.css.
   ============================================================ */

/* ─── HERO inline (dentro del grid, con fondo dark via ::before) ─ */
.cl-hero-inline {
  color: white;
  padding: 50px 0 40px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}
.cl-hero-inline h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 44px;
  font-weight: 800;
  color: white;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}
.cl-hero-inline .cl-hero-subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin: 0 0 22px;
}
.cl-hero-breadcrumb {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cl-hero-breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}
.cl-hero-breadcrumb a:hover { color: white; text-decoration: underline; }
.cl-hero-breadcrumb .sep { opacity: 0.5; }
.cl-hero-eyebrow {
  color: var(--accent);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-block;
}
.cl-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 46px;
  font-weight: 800;
  color: white;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  max-width: 820px;
}
.cl-hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 720px;
}
.cl-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cl-hero-meta li {
  background: rgba(45, 74, 43, 0.65);       /* verde sólido semi-opaco (legible sobre cualquier fondo) */
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cl-hero-meta li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
@media (max-width: 700px) {
  .cl-hero-inline { padding: 40px 0 30px; margin-bottom: 30px; }
  .cl-hero-inline h1 { font-size: 30px; }
  .cl-hero-inline .cl-hero-subtitle { font-size: 15px; }
}

/* ─── LAYOUT 2 COLUMNAS: CONTENIDO + STICKY SIDEBAR ───────── */
.cl-course-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px 100px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 60px;
  position: relative;
  /* SIN align-items: start → así el sidebar estira a la altura del contenido
     y la sticky card puede viajar dentro del sidebar. */
}

/* Franja verde full-width detrás del hero (cubre ambas columnas) */
.cl-course-layout.with-hero {
  /* Fallback: si JS falla o tarda, muestra 420px de franja */
  --hero-strip-height: 420px;
}
.cl-course-layout.with-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: var(--hero-strip-height);
  background:
    linear-gradient(180deg, rgba(45,74,43,0.90) 0%, rgba(36,64,34,0.96) 100%),
    url('https://www.singletrack.es/wp-content/uploads/2023/04/Perro-optimizado.jpg');
  background-size: cover;
  background-position: center;
  z-index: 0;
  pointer-events: none;
  transition: height .1s ease;
}
.cl-course-content, .cl-course-sidebar { position: relative; z-index: 1; }
.cl-course-content { min-width: 0; }
@media (max-width: 980px) {
  .cl-course-layout {
    grid-template-columns: 1fr;
    padding: 0 22px 60px;
    gap: 0;
  }
  /* En móvil, el sidebar sticky desaparece: lo reemplaza la barra flotante inferior */
  .cl-course-sidebar { display: none; }
}

/* ─── STICKY BUY CARD (arranca al mismo nivel que el hero) ─── */
.cl-buy-card {
  position: sticky;
  top: 100px;                              /* deja hueco al header fijo */
  margin-top: 50px;                        /* baja un poco desde el borde del hero */
  background: white;
  border: 1px solid #EFE9DA;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(45, 74, 43, 0.18);
}
@media (max-width: 980px) {
  .cl-buy-card { margin-top: 0; }
}
.cl-buy-card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--cream);
}
.cl-buy-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cl-buy-card-body {
  padding: 22px 22px 20px;
}
.cl-buy-card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #F0EADD;
}

/* ─── SIDEBAR: variante "próximamente" (curso aún no disponible) ─ */
.cl-buy-card-soon-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  border-radius: 999px;
  margin: 4px 0 14px;
  text-transform: uppercase;
}
.cl-buy-card-soon-note {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 18px;
}

/* ─── SIDEBAR: nota de "disponible pago a plazos" ────────── */
.cl-buy-card-plans-hint {
  display: none;                            /* Se muestra si es variable */
  background: linear-gradient(135deg, #FFF9EF, #FEF1DA);
  border: 1px solid #EBDFC2;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--dark);
  line-height: 1.45;
  margin: 0 0 14px;
}
.cl-buy-card-plans-hint strong { color: var(--primary); font-weight: 700; }
body[data-has-plans="true"] .cl-buy-card-plans-hint { display: block; }
body[data-has-plans="true"] .cl-buy-card-price-note { margin-bottom: 10px; }
.cl-buy-card-price {
  font-family: 'Poppins', sans-serif;
  font-size: 38px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.02em;
}
.cl-buy-card-price .cl-price-currency {
  font-size: 24px;
  margin-left: 3px;
  font-weight: 700;
}
.cl-buy-card-price-note {
  font-size: 12.5px;
  color: var(--muted);
  margin: 5px 0 16px;
  line-height: 1.4;
}
.cl-buy-card .btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 14.5px;
  padding: 11px 18px;
}
.cl-buy-card .btn:last-of-type { margin-bottom: 0; }
.cl-buy-card-features {
  list-style: none;
  padding: 16px 0 0;
  margin: 16px 0 0;
  border-top: 1px solid #F0EADD;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cl-buy-card-features li {
  position: relative;
  padding-left: 24px;
  font-size: 13.5px;
  color: var(--dark);
  line-height: 1.4;
}
.cl-buy-card-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
}
.cl-buy-card-features li::after {
  content: '✓';
  position: absolute;
  left: 4px;
  top: 2px;
  color: white;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}
.cl-buy-card-methods {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #F0EADD;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cl-buy-card-methods strong {
  font-size: 10.5px;
  font-family: 'Poppins', sans-serif;
  color: var(--dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.cl-buy-card-methods span {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}
@media (max-width: 980px) {
  .cl-buy-card { position: static; }        /* sin sticky en móvil */
  .cl-buy-card-price { font-size: 36px; }
}

/* ─── SECCIONES DE CONTENIDO ──────────────────────────────── */
.cl-course-content > section + section {
  margin-top: 64px;
  padding-top: 64px;
  border-top: 1px solid #EFE9DA;
}
.cl-course-content .cl-section-title {
  display: block;
  color: var(--accent);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.cl-course-content h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}
.cl-course-content .cl-section-lead {
  font-size: 16.5px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 24px;
}
.cl-course-content .prose p {
  font-size: 16.5px;
  color: var(--text);
  line-height: 1.75;
  margin: 0 0 16px;
}
@media (max-width: 700px) {
  .cl-course-content > section + section {
    margin-top: 48px;
    padding-top: 48px;
  }
  .cl-course-content h2 { font-size: 24px; }
}

/* ─── APRENDERÁS (grid de bullets) ────────────────────────── */
.cl-learn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  padding: 0;
  margin: 0;
}
.cl-learn-grid li {
  position: relative;
  padding: 14px 16px 14px 46px;
  background: var(--cream);
  border-radius: 12px;
  color: var(--dark);
  font-size: 15px;
  line-height: 1.5;
  list-style: none;
}
.cl-learn-grid li::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
}
.cl-learn-grid li::after {
  content: '✓';
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
}
@media (max-width: 620px) {
  .cl-learn-grid { grid-template-columns: 1fr; }
}

/* ─── TEMARIO (acordeón) ──────────────────────────────────── */
.cl-modulo {
  background: white;
  border: 1px solid #E8E1D2;
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow .2s ease;
}
.cl-modulo[open] { box-shadow: 0 8px 24px rgba(45, 74, 43, 0.08); }
.cl-modulo summary {
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 16.5px;
  color: var(--dark);
  list-style: none;
}
.cl-modulo summary::-webkit-details-marker { display: none; }
.cl-modulo summary::after {
  content: '+';
  margin-left: auto;
  font-size: 26px;
  font-weight: 400;
  color: var(--primary);
  line-height: 1;
}
.cl-modulo[open] summary::after { content: '−'; }
.cl-modulo-num {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}
.cl-modulo-body {
  padding: 0 22px 20px 72px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}
.cl-modulo-body p { margin: 0 0 8px; }
.cl-modulo-body ul { padding-left: 18px; margin: 8px 0 0; }
.cl-modulo-body ul li { margin-bottom: 5px; color: var(--muted); }
.cl-temario-cta { margin-top: 20px; }
.cl-temario-cta .btn { font-size: 14px; padding: 10px 18px; }
@media (max-width: 620px) {
  .cl-modulo summary { padding: 16px 18px; gap: 12px; font-size: 15px; }
  .cl-modulo-num { width: 30px; height: 30px; font-size: 13px; }
  .cl-modulo-body { padding: 0 18px 18px 60px; font-size: 14.5px; }
}

/* ─── PÚBLICO OBJETIVO ────────────────────────────────────── */
.cl-audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.cl-audience-grid li {
  background: var(--cream);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  transition: transform .2s ease;
}
.cl-audience-grid li:hover { transform: translateY(-3px); }
.cl-audience-grid .icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.cl-audience-grid .icon svg { width: 22px; height: 22px; fill: currentColor; }
.cl-audience-grid h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 14.5px;
  color: var(--dark);
  margin: 0;
  line-height: 1.35;
}

/* ─── CERTIFICACIÓN ───────────────────────────────────────── */
.cl-cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.cl-cert-grid li {
  background: white;
  border: 1px solid #EFE9DA;
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
}
.cl-cert-grid .cert-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.cl-cert-grid .cert-badge svg { width: 24px; height: 24px; fill: currentColor; }
.cl-cert-grid h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 15.5px;
  color: var(--dark);
  margin: 0 0 6px;
}
.cl-cert-grid p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* ─── REQUISITOS ──────────────────────────────────────────── */
.cl-requisitos {
  padding: 0;
  margin: 0;
  list-style: none;
}
.cl-requisitos li {
  background: var(--cream);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 15px;
  color: var(--dark);
  line-height: 1.55;
}

/* ─── FAQ ─────────────────────────────────────────────────── */
.cl-faq .faq-item {
  background: white;
  border: 1px solid #E8E1D2;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.cl-faq .faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  color: var(--dark);
  font-size: 15.5px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
}
.cl-faq .faq-item summary::-webkit-details-marker { display: none; }
.cl-faq .faq-item summary::after {
  content: '+';
  margin-left: auto;
  font-size: 22px;
  color: var(--primary);
  font-weight: 400;
  line-height: 1;
}
.cl-faq .faq-item[open] summary::after { content: '−'; }
.cl-faq .faq-answer {
  padding: 0 22px 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.cl-faq .faq-answer p { margin: 0; }

/* ─── SECCIÓN "PLANES DE PAGO" (dinámica, dentro del content) ─ */
.cl-payment-section {
  scroll-margin-top: 100px;                 /* offset para el scroll-to del sidebar */
}
.cl-plans-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 24px;
  padding: 6px;
  background: var(--cream);
  border-radius: 14px;
  border: 1px solid #EBDFC2;
}
.cl-plans-loading {
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  margin: 0;
}
.cl-plans-section .cl-plan {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, transform .15s ease;
  font-family: 'Inter', sans-serif;
  width: 100%;
}
.cl-plans-section .cl-plan:hover {
  border-color: rgba(45, 74, 43, 0.3);
  transform: translateX(2px);
}
.cl-plans-section .cl-plan.is-active {
  border-color: var(--primary);
  background: rgba(45, 74, 43, 0.03);
}
.cl-plans-section .cl-plan-radio {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 2px solid #C7C0AF;
  border-radius: 50%;
  position: relative;
  transition: border-color .15s ease;
}
.cl-plans-section .cl-plan.is-active .cl-plan-radio { border-color: var(--primary); }
.cl-plans-section .cl-plan.is-active .cl-plan-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--primary);
}
.cl-plans-section .cl-plan-label {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  color: var(--dark);
  font-weight: 600;
  line-height: 1.35;
}
.cl-plans-section .cl-plan-price {
  flex: 0 0 auto;
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.cl-plans-section .cl-plan-note {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
}

/* CTA de la sección de planes */
.cl-plans-cta {
  margin-top: 26px;
  padding: 24px 26px;
  background: white;
  border: 1px solid #E8E1D2;
  border-radius: 14px;
}
.cl-plans-selected {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #F0EADD;
  font-size: 15px;
}
.cl-plans-selected-label { color: var(--muted); }
.cl-plans-selected-label strong { color: var(--dark); font-weight: 700; }
.cl-plans-selected-price strong {
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  color: var(--primary);
  font-weight: 800;
}
.cl-plans-cta .btn {
  width: 100%;
  justify-content: center;
  font-size: 16px;
  padding: 14px 20px;
}
.cl-plans-methods-note {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.cl-plans-methods-note strong { color: var(--dark); font-weight: 600; }

@media (max-width: 620px) {
  .cl-plans-section .cl-plan { padding: 12px 14px; gap: 10px; }
  .cl-plans-section .cl-plan-label { font-size: 14px; }
  .cl-plans-section .cl-plan-price { font-size: 15px; }
  .cl-plans-cta { padding: 20px 18px; }
  .cl-plans-selected-price strong { font-size: 20px; }
}

/* Smooth scroll global para los enlaces internos */
html { scroll-behavior: smooth; }

/* ─── BARRA FLOTANTE MÓVIL (bottom bar) ──────────────────── */
/* En desktop está oculta. En móvil aparece como CTA fija abajo. */
.cl-mobile-buy-bar {
  display: none;
}
@media (max-width: 980px) {
  .cl-mobile-buy-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: white;
    box-shadow: 0 -6px 24px rgba(45, 74, 43, 0.15);
    border-top: 1px solid #E8E1D2;
    padding: 10px 14px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    align-items: center;
    gap: 12px;
  }
  .cl-mobile-buy-price {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    gap: 1px;
    min-width: 80px;
  }
  .cl-mobile-buy-price .cl-price-value {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.02em;
  }
  .cl-mobile-buy-price .cl-price-currency {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
  }
  .cl-mobile-buy-cta {
    flex: 1;
    justify-content: center;
    font-size: 14px;
    padding: 12px 14px;
    margin-bottom: 0 !important;
  }
  .cl-mobile-buy-cta .arrow {
    margin-left: 4px;
  }
  /* Padding en main para que la barra no tape el CTA final del contenido */
  main { padding-bottom: 90px; }
  /* Empujar la burbuja de WhatsApp por encima de la barra */
  .whatsapp-float { bottom: 84px !important; }
}
