/* ============================================================
   CURSO DETALLE — Inspirado en masterink.art/cursos/...
   ============================================================ */

/* HERO */
.cd2-hero {
  min-height: 88vh; display: flex; align-items: center;
  position: relative; overflow: hidden; padding: 8rem 0 5rem;
}
.cd2-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(135deg, rgba(18,18,18,0.97) 0%, rgba(66,45,255,0.18) 60%, rgba(18,18,18,0.95) 100%),
              image-set(
                url('../assets/img/fondo.avif') type('image/avif'),
                url('../assets/img/fondo.webp') type('image/webp')
              ) center/cover no-repeat;
}
.cd2-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 80% at 75% 50%, rgba(66,45,255,0.12) 0%, transparent 70%);
}
.cd2-hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 4rem; width: 100%; padding: 0 6%;
}
.cd2-hero-content { flex: 1; max-width: 580px; }
.cd2-hero-content .section-tag { margin-bottom: 1rem; }
.cd2-hero-content h1 {
  font-size: clamp(3rem, 8vw, 6rem); font-weight: 700;
  line-height: 0.95; letter-spacing: -0.02em; margin-bottom: 1.25rem;
}
.cd2-hero-content h1 em { font-style: normal; color: var(--green); }
.cd2-hero-desc {
  color: var(--muted); font-size: 1rem; line-height: 1.75;
  max-width: 480px; margin-bottom: 2rem;
}
.cd2-hero-pills {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
}
.cd2-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 500; color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px; padding: 0.35rem 0.85rem;
}
.cd2-pill i { color: var(--accent2); font-size: 0.72rem; }
.cd2-hero-media {
  width: 420px; flex-shrink: 0;
  border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(66,45,255,0.3);
  box-shadow: 0 0 80px rgba(66,45,255,0.2);
}
.cd2-hero-media img { width: 100%; display: block; }

@media (max-width: 900px) {
  .cd2-hero-inner { flex-direction: column; padding: 0 5%; text-align: center; }
  .cd2-hero-pills { justify-content: center; }
  .cd2-hero-media { width: 100%; max-width: 440px; }
}

/* MODAL PAGO */
.pay-modal-card { max-width: 480px; padding: 2rem 2rem 1.75rem; }

.pay-course-summary {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.9rem 1rem; margin-bottom: 1.5rem;
}
.pay-course-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.pay-course-info { flex: 1; min-width: 0; }
.pay-course-tag { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent2); }
.pay-course-name { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-top: 0.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-course-meta { font-size: 0.7rem; color: var(--muted); margin-top: 0.15rem; }
.pay-course-price { font-family: 'Oswald', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--green); flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem; }
.pay-price-original { font-size: 0.85rem; font-weight: 400; color: var(--muted); text-decoration: line-through; }

.pay-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.pay-tab {
  flex: 1; padding: 0.6rem; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--muted); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.pay-tab.active { background: rgba(66,45,255,0.15); border-color: var(--accent2); color: var(--text); }
.pay-tab:hover:not(.active) { border-color: rgba(255,255,255,0.15); color: var(--text); }

.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.pay-card-input-wrap { position: relative; }
.pay-card-input-wrap input { padding-right: 2.5rem !important; }
.pay-card-icon { position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 0.9rem; pointer-events: none; }

.pay-submit-btn { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; margin-top: 0.25rem; }

.pay-paypal-wrap { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; padding: 1.5rem 0; text-align: center; }
.pay-paypal-wrap p { color: var(--muted); font-size: 0.88rem; line-height: 1.6; }
.pay-secure-note { text-align: center; font-size: 0.72rem; color: var(--muted); margin-top: 1.1rem; }
.pay-secure-note i { color: var(--green); margin-right: 0.3rem; }

.cd2-access-once { font-size: 0.72rem; color: var(--muted); margin-top: -0.1rem; }

/* ANTES / DESPUÉS */
.cd2-audio-section {
  background: var(--bg2); padding: 5rem 6%;
  border-bottom: 1px solid var(--border);
}
.cd2-audio-inner { max-width: 860px; margin: 0 auto; }
.cd2-audio-head { margin-bottom: 2.5rem; }
.cd2-audio-head h2 { font-size: clamp(1.8rem, 5vw, 3rem); margin-bottom: 0.4rem; }
.cd2-audio-head h2 em { font-style: normal; color: var(--green); }
.cd2-audio-head p { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }
.cd2-audio-cards { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 700px) { .cd2-audio-cards { grid-template-columns: repeat(2, 1fr); } }

.cd2-audio-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.75rem 1.5rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}
.cd2-audio-before { border-color: rgba(255,80,80,0.25); }
.cd2-audio-after  { border-color: rgba(0,255,150,0.25); }

.cd2-audio-label { display: flex; flex-direction: column; gap: 0.35rem; }
.cd2-audio-badge {
  display: inline-block; font-size: 0.65rem; font-weight: 800;
  letter-spacing: 0.2em; text-transform: uppercase;
  border-radius: 999px; padding: 0.28rem 0.85rem; width: fit-content;
}
.cd2-badge-before { background: rgba(255,80,80,0.12); color: #ff7070; border: 1px solid rgba(255,80,80,0.3); }
.cd2-badge-after  { background: rgba(0,255,150,0.1); color: var(--green); border: 1px solid rgba(0,255,150,0.25); }
.cd2-audio-subtitle { font-size: 0.78rem; color: var(--muted); }

.cd2-player { display: flex; align-items: center; gap: 1rem; }
.cd2-play-btn {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.85rem;
  transition: background 0.2s, transform 0.15s;
}
.cd2-play-btn:hover { background: var(--accent2); transform: scale(1.08); }
.cd2-audio-after .cd2-play-btn { background: rgba(0,255,150,0.15); border: 1px solid rgba(0,255,150,0.3); color: var(--green); }
.cd2-audio-after .cd2-play-btn:hover { background: rgba(0,255,150,0.25); }

.cd2-player-right { flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.cd2-waveform-wrap {
  width: 100%; height: 40px; border-radius: 6px;
  background: rgba(255,255,255,0.05); position: relative; cursor: pointer;
  overflow: hidden;
}
.cd2-progress-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  background: rgba(66,45,255,0.35); transition: width 0.1s linear;
  border-radius: 6px;
}
.cd2-audio-after .cd2-progress-bar { background: rgba(0,255,150,0.2); }
.cd2-waveform {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.08) 0px, rgba(255,255,255,0.08) 2px,
    transparent 2px, transparent 6px
  );
}
.cd2-time { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ACCESO / CTA */
.cd2-access {
  background: var(--bg2); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 3rem 6%;
}
.cd2-access-inner { max-width: 860px; margin: 0 auto; }
.cd2-access-top {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.5rem; margin-bottom: 2rem;
}
.cd2-access-price-wrap { display: flex; flex-direction: column; gap: 0.2rem; }
.cd2-access-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}
.cd2-access-price {
  font-family: 'Oswald', sans-serif; font-size: 3.5rem;
  font-weight: 700; color: var(--green); letter-spacing: 0.04em; line-height: 1;
}
.cd2-access-btns { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.cd2-access-btn { min-width: 180px; text-align: center; justify-content: center; }
.cd2-trust-row {
  display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem;
  padding-top: 1.75rem; border-top: 1px solid var(--border);
}
.cd2-trust-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: var(--muted);
}
.cd2-trust-item i { color: var(--green); font-size: 0.78rem; }

/* PASOS DEL CURSO */
.cd2-steps-section {
  background: var(--bg); padding: 5rem 6%;
  border-bottom: 1px solid var(--border);
}
.cd2-section-head { margin-bottom: 2.5rem; }
.cd2-section-head h2 {
  font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 700;
  line-height: 1; letter-spacing: -0.02em; margin-bottom: 0.4rem;
}
.cd2-section-head h2 em { font-style: normal; color: var(--green); }
.cd2-section-head p { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }
.cd2-steps-track {
  display: flex; gap: 0; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 0.5rem;
}
.cd2-steps-track::-webkit-scrollbar { display: none; }
.cd2-step {
  flex: 0 0 auto;
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1.5rem 2rem; min-width: 150px;
  border: 1px solid var(--border); border-right: none;
  background: var(--bg2); position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.cd2-step:first-child { border-radius: 12px 0 0 12px; }
.cd2-step:last-child  { border-radius: 0 12px 12px 0; border-right: 1px solid var(--border); }
.cd2-step:hover { background: var(--bg3); border-color: rgba(66,45,255,0.35); }
.cd2-step:hover + .cd2-step { border-left-color: rgba(66,45,255,0.35); }
.cd2-step-num {
  font-family: 'Oswald', sans-serif; font-size: 1.8rem; font-weight: 700;
  color: rgba(66,45,255,0.22); line-height: 1;
}
.cd2-step-label {
  font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.75);
  line-height: 1.35;
}

/* LO QUE APRENDERÁS */
.cd2-learn {
  background: var(--bg2); padding: 5rem 6%;
  border-bottom: 1px solid var(--border);
}
.cd2-learn-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 0.75rem; max-width: 860px;
}
@media (min-width: 600px) { .cd2-learn-grid { grid-template-columns: repeat(2, 1fr); } }
.cd2-learn-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.9rem 1.1rem;
}
.cd2-learn-item i { color: var(--green); font-size: 0.78rem; margin-top: 3px; flex-shrink: 0; }
.cd2-learn-item span { font-size: 0.88rem; color: rgba(255,255,255,0.8); line-height: 1.5; }

/* PROBLEMAS */
.cd2-problems { background: var(--bg); padding: 5rem 6%; border-bottom: 1px solid var(--border); }
.cd2-problems-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1rem; max-width: 860px;
}
@media (min-width: 600px) { .cd2-problems-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cd2-problems-grid { grid-template-columns: repeat(3, 1fr); } }
.cd2-problem-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.5rem 1.25rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: border-color 0.2s;
}
.cd2-problem-card:hover { border-color: rgba(66,45,255,0.35); }
.cd2-problem-num {
  font-family: 'Oswald', sans-serif; font-size: 2rem; font-weight: 700;
  color: rgba(66,45,255,0.25); line-height: 1;
}
.cd2-problem-card p {
  font-size: 0.9rem; color: rgba(255,255,255,0.75);
  line-height: 1.55; font-style: italic; margin: 0;
}

/* TEMARIO */
.cd2-curriculum {
  background: var(--bg2); padding: 5rem 6%;
  border-bottom: 1px solid var(--border);
}
.cd2-modules { display: flex; flex-direction: column; gap: 0.6rem; max-width: 760px; }
.cd2-module {
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; background: var(--bg3);
}
.cd2-module-header {
  width: 100%; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.4rem; background: none; border: none;
  cursor: pointer; text-align: left; transition: background 0.15s;
}
.cd2-module-header:hover { background: rgba(255,255,255,0.03); }
.cd2-module-left { display: flex; align-items: center; gap: 1rem; }
.cd2-module-num {
  font-family: 'Oswald', sans-serif; font-size: 1.6rem;
  font-weight: 700; color: rgba(66,45,255,0.28); line-height: 1;
}
.cd2-module-title {
  font-family: 'Oswald', sans-serif; font-size: 1rem;
  font-weight: 700; color: var(--text); text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cd2-module-meta { font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem; }
.cd2-chevron { color: var(--muted); font-size: 0.75rem; transition: transform 0.25s; flex-shrink: 0; }
.cd2-module-body {
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  border-top: 1px solid var(--border);
}
.cd2-lesson {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.75rem 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.88rem; color: var(--muted);
}
.cd2-lesson:last-child { border-bottom: none; }
.cd2-lesson i { color: var(--accent2); font-size: 0.6rem; flex-shrink: 0; }

/* RECURSOS */
.cd2-resources { background: var(--bg); padding: 5rem 6%; border-bottom: 1px solid var(--border); }
.cd2-resources-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1rem; max-width: 760px;
}
@media (min-width: 700px) { .cd2-resources-grid { grid-template-columns: repeat(4, 1fr); } }
.cd2-resource-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.75rem 1.25rem;
  text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 0.75rem;
  transition: border-color 0.2s, background 0.2s;
}
.cd2-resource-card:hover { border-color: rgba(66,45,255,0.35); background: var(--bg3); }
.cd2-resource-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(66,45,255,0.12); border: 1px solid rgba(66,45,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent2); font-size: 1.1rem;
}
.cd2-resource-name { font-size: 0.82rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.cd2-resource-type { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* FINAL CTA */
.cd2-final-cta {
  background: var(--bg2); padding: 6rem 6%; text-align: center;
  position: relative; overflow: hidden;
}
.cd2-final-cta::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 100%, rgba(66,45,255,0.15) 0%, transparent 70%);
}
.cd2-final-cta-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  max-width: 560px; margin: 0 auto;
}
.cd2-final-cta-inner h2 {
  font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 700;
  line-height: 1; letter-spacing: -0.02em; margin-bottom: 0;
}
.cd2-final-cta-inner h2 em { font-style: normal; color: var(--green); }
.cd2-final-cta-inner > p { color: var(--muted); font-size: 0.95rem; line-height: 1.7; }
.cd2-final-price-original {
  font-family: 'Oswald', sans-serif; font-size: 1.5rem;
  font-weight: 400; color: var(--muted); text-decoration: line-through; letter-spacing: 0.05em;
}
.cd2-final-price {
  font-family: 'Oswald', sans-serif; font-size: 3rem; font-weight: 700;
  color: var(--green); letter-spacing: 0.05em;
}
.cd2-final-note { font-size: 0.75rem; color: var(--muted); margin-top: -0.25rem; }

/* ── RESPONSIVE — MÓVIL ── */
@media (max-width: 767px) {
  /* Hero */
  .cd2-hero       { padding: 6rem 0 3rem; min-height: auto; }
  .cd2-hero-inner { gap: 2rem; }
  .cd2-hero-content h1 { font-size: clamp(2.5rem, 12vw, 4rem); }

  /* Secciones — reducir padding vertical */
  .cd2-audio-section  { padding: 3rem 5%; }
  .cd2-access         { padding: 2rem 5%; }
  .cd2-steps-section  { padding: 3rem 5%; }
  .cd2-learn          { padding: 3rem 5%; }
  .cd2-problems       { padding: 3rem 5%; }
  .cd2-curriculum     { padding: 3rem 5%; }
  .cd2-resources      { padding: 3rem 5%; }
  .cd2-final-cta      { padding: 3.5rem 5%; }

  /* Cabeceras de sección */
  .cd2-section-head { margin-bottom: 1.75rem; }
  .cd2-audio-head   { margin-bottom: 1.75rem; }

  /* Acceso — precio y botones apilados */
  .cd2-access-top      { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .cd2-access-price    { font-size: clamp(2.5rem, 12vw, 3.5rem); }
  .cd2-access-btns     { width: 100%; flex-direction: column; }
  .cd2-access-btn      { width: 100%; min-width: 0; }
  .btn-primary.cd2-access-btn,
  .btn-ghost.cd2-access-btn { width: 100%; justify-content: center; }

  /* Modal de pago */
  .pay-row { grid-template-columns: 1fr; }
  .pay-modal-card { padding: 1.5rem 1.25rem 1.25rem; }

  /* CTA final */
  .cd2-final-price { font-size: 2.5rem; }
  .cd2-final-cta-inner h2 { font-size: clamp(1.8rem, 8vw, 3rem); }

  /* Trust row */
  .cd2-trust-row { gap: 0.85rem 1.5rem; }

  /* Resources — 2 cols on mobile is fine, keep it */
}

/* ── RESPONSIVE — TABLET ── */
@media (max-width: 899px) and (min-width: 768px) {
  .cd2-audio-section { padding: 4rem 5%; }
  .cd2-access        { padding: 2.5rem 5%; }
  .cd2-steps-section { padding: 4rem 5%; }
  .cd2-learn         { padding: 4rem 5%; }
  .cd2-problems      { padding: 4rem 5%; }
  .cd2-curriculum    { padding: 4rem 5%; }
  .cd2-resources     { padding: 4rem 5%; }
  .cd2-final-cta     { padding: 4.5rem 5%; }
}
