:root {
  --wine:       #7a1c2e;
  --wine-dark:  #561320;
  --wine-deep:  #3a0d18;
  --gold:       #c9a84c;
  --gold-lt:    #e8c96a;
  --cream:      #f9f5ef;
  --cream-dk:   #ede7db;
  --text:       #1a1008;
  --muted:      #7a6a5e;
  --white:      #ffffff;
  --success:    #2e7d52;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
}

/* ─── STICKY TOP BAR ─── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--wine-deep);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
.topbar-brand {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.topbar-brand span { color: var(--gold); }
.topbar-secure {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem; opacity: 0.7;
}

/* ─── HERO SPLIT ─── */
.page-wrap {
  display: grid;
  grid-template-columns: 1fr 420px;
  min-height: calc(100vh - 52px);
  max-width: 1200px;
  margin: 0 auto;
  gap: 0;
}
@media(max-width:900px) {
  .page-wrap { grid-template-columns: 1fr; }
}

/* LEFT PANEL */
.left-panel {
  padding: 56px 48px 56px 40px;
  border-right: 1px solid var(--cream-dk);
}
@media(max-width:900px) {
  .left-panel { padding: 36px 24px; border-right: none; border-bottom: 1px solid var(--cream-dk); }
}

.course-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(122,28,46,0.08);
  border: 1px solid rgba(122,28,46,0.2);
  color: var(--wine);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 22px;
}
.course-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--wine);
  border-radius: 50%;
}

.left-panel h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 14px;
}
.left-panel h1 em {
  font-style: normal;
  color: var(--wine);
}
.left-panel > p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 36px;
}

/* PRICE ROW */
.price-row {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.price-main {
  font-family: 'Montserrat', sans-serif;
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--wine);
  line-height: 1;
}
.price-sub {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}
.price-sub strong { color: var(--text); font-weight: 600; display: block; }

/* BENEFITS */
.benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 44px;
}
@media(max-width:480px) { .benefits-grid { grid-template-columns: 1fr; } }

.benefit-card {
  background: var(--white);
  border: 1px solid var(--cream-dk);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.benefit-card:hover {
  border-color: rgba(122,28,46,0.25);
  box-shadow: 0 4px 16px rgba(122,28,46,0.07);
}
.benefit-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--wine), var(--wine-dark));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.benefit-icon svg { width: 16px; height: 16px; }
.benefit-text strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.benefit-text span { font-size: 0.78rem; color: var(--muted); }

/* TEMARIO */
.temario-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.temario-list { list-style: none; }
.temario-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cream-dk);
}
.temario-item:last-child { border-bottom: none; }
.temario-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--wine);
  opacity: 0.35;
  line-height: 1;
  min-width: 28px;
}
.temario-item strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 3px;
}
.temario-item p { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }

/* CERTIFICACION BADGE */
.cert-badge {
  margin-top: 40px;
  background: linear-gradient(135deg, var(--wine-deep), var(--wine));
  border-radius: 14px;
  padding: 24px 28px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 18px;
}
.cert-seal {
  width: 52px; height: 52px; flex-shrink: 0;
  background: rgba(201,168,76,0.2);
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cert-seal svg { width: 24px; height: 24px; }
.cert-badge h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-lt);
  margin-bottom: 4px;
}
.cert-badge p { font-size: 0.82rem; opacity: 0.8; line-height: 1.5; }

/* ─── RIGHT PANEL (FORM) ─── */
.right-panel {
  padding: 40px 32px;
  background: var(--white);
  position: sticky;
  top: 52px;
  align-self: start;
  max-height: calc(100vh - 52px);
  overflow-y: auto;
}
@media(max-width:900px) {
  .right-panel { position: static; max-height: none; padding: 36px 24px; }
}

.form-header { margin-bottom: 28px; text-align: center; }
.form-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.form-header p { font-size: 0.85rem; color: var(--muted); }

.price-summary {
  background: var(--cream);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.price-summary .ps-label { font-size: 0.85rem; color: var(--muted); }
.price-summary .ps-label strong { display: block; font-size: 0.92rem; color: var(--text); font-weight: 600; }
.price-summary .ps-amount {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--wine);
  line-height: 1;
}
.price-summary .ps-iva { font-size: 0.7rem; color: var(--muted); text-align: right; margin-top: 2px; }

.divider {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 20px;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--cream-dk);
}

.fg { margin-bottom: 16px; }
.fg label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.fg input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--cream-dk);
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.93rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fg input:focus {
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(122,28,46,0.07);
}
.fg input::placeholder { color: #bbb; }

#card-element {
  border: 1.5px solid var(--cream-dk);
  border-radius: 8px;
  padding: 11px 14px;
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
#card-element.StripeElement--focus {
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(122,28,46,0.07);
}
#card-errors {
  color: #c0392b; font-size: 0.8rem;
  margin-top: 7px; min-height: 18px;
}

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--wine), var(--wine-dark));
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 17px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  margin-top: 20px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}
.submit-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent);
}
.submit-btn:hover:not(:disabled) { opacity: 0.92; transform: translateY(-1px); }
.submit-btn:disabled { opacity: 0.55; cursor: default; transform: none; }

.trust-row {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.72rem; color: var(--muted);
}
.trust-item svg { width: 13px; height: 13px; opacity: 0.6; }

/* SUCCESS STATE */
#form-success {
  display: none;
  text-align: center;
  padding: 20px 0;
}
.success-circle {
  width: 68px; height: 68px;
  background: var(--success);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-circle svg { width: 30px; height: 30px; }
#form-success h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}
#form-success p { font-size: 0.9rem; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.success-btn {
  display: inline-block;
  background: var(--wine);
  color: var(--white);
  padding: 13px 32px;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.5px;
}

/* SPINNER */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* SCROLL BAR RIGHT PANEL */
.right-panel::-webkit-scrollbar { width: 4px; }
.right-panel::-webkit-scrollbar-track { background: transparent; }
.right-panel::-webkit-scrollbar-thumb { background: var(--cream-dk); border-radius: 4px; }