/* ------------------------------------------------------------------
 * Checkout de programas UDALBA (diseño "botón de pago" 05-10-26)
 * ------------------------------------------------------------------ */

:root {
  --navy: #041E42;
  --navy-hero: #233051;
  --red: #C92A4F;
  --red-dark: #A91F40;
  --pink-soft: #F9ECF3;
  --bg-soft: #F4F7FB;
  --border: #D6DAE1;
  --line: #E3E6EB;
  --muted: #6B7385;
  --placeholder: #9AA1AE;
  --radius: 4px;
  --font: "DM Sans", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.co {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--navy);
  background: #fff;
}

.co img { max-width: 100%; }
.co a { color: inherit; }

/* ---------- Header ---------- */

.co-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 5vw;
  background: var(--navy);
  color: #fff;
}

.co-header__logo img { display: block; height: 104px; width: auto; }

.co-header__secure {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
}

.co-header__secure svg { width: 18px; height: 22px; }

/* ---------- Checkout: layout de 2 columnas ---------- */

.co-layout {
  display: grid;
  grid-template-columns: minmax(300px, 32.5%) 1fr;
  min-height: calc(100vh - 140px);
}

.co-hero {
  position: relative;
  color: #fff;
  background-color: var(--navy-hero);
  background-repeat: no-repeat;
  background-position: 90% top;
  background-size: cover;
}

.co-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(35, 48, 81, 0) 40%, rgba(35, 48, 81, .7) 65%, rgba(35, 48, 81, .92) 100%);
  pointer-events: none;
}

.co-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-height: 640px;
  padding: 48px 12% 72px;
}

.co-hero__eyebrow {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.25;
  text-transform: uppercase;
  max-width: 10em;
}

.co-hero__title {
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 700;
}

.co-hero__rule {
  width: 62px;
  height: 2px;
  margin: 18px 0;
  border: 0;
  background: var(--red);
}

.co-hero__desc { margin: 0; font-size: 12.5px; line-height: 1.4; }

.co-hero__facts {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: 18px 22px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
  line-height: 1.25;
}

.co-hero__facts svg { display: block; width: 22px; height: 22px; margin-bottom: 8px; opacity: .9; }
.co-hero__facts strong { display: block; font-weight: 700; }

/* ---------- Formulario ---------- */

.co-main { padding: 40px 6.5% 64px; }
.co-form { max-width: 880px; }

.co-eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .01em;
}

.co-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
}

.co-price { margin: 4px 0 0; font-size: 30px; font-weight: 700; }

.co-section { margin: 34px 0 0; padding: 0; border: 0; min-width: 0; }

.co-section > legend {
  float: left;
  width: 100%;
  margin: 0 0 6px;
  padding: 0;
  font-size: 17px;
  font-weight: 700;
}

.co-section > legend + * { clear: both; }

.co-grid { display: grid; gap: 14px 44px; }
.co-grid--2 { grid-template-columns: 1fr 1fr; }
.co-grid--4 { grid-template-columns: repeat(4, 1fr); gap: 14px 20px; }
.co-grid + .co-grid,
.co-field + .co-grid { margin-top: 14px; }

.co-field label,
.co-field .co-label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 500;
}

.co-req { color: var(--red); }

.co-input,
.co-select {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
  color: var(--navy);
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}

.co-input::placeholder { color: var(--placeholder); }

.co-select {
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23041E42' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.co-select:invalid { color: var(--placeholder); }
.co-select option { color: var(--navy); }

.co-input:focus,
.co-select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(4, 30, 66, .12);
}

.co-field.is-invalid .co-input,
.co-field.is-invalid .co-select,
.co-field.is-invalid .co-phone { border-color: var(--red); }

.co-error { display: block; margin-top: 5px; color: var(--red); font-size: 13px; }

/* Teléfono con código de país */
.co-phone {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.co-phone:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(4, 30, 66, .12); }

.co-phone .co-select,
.co-phone .co-input { border: 0; box-shadow: none; height: 42px; }

.co-phone .co-select {
  flex: 0 0 104px;
  width: 104px;
  padding-left: 12px;
  border-right: 1px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 15px;
}

.co-phone .co-input { flex: 1; min-width: 0; border-radius: 0 var(--radius) var(--radius) 0; }

/* Formas de pago */
.co-plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.co-plan {
  position: relative;
  display: block;
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.3;
  transition: border-color .15s;
}

.co-plan:hover { border-color: #AEB4BF; }

.co-plan input { position: absolute; opacity: 0; }

.co-plan__title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }

.co-plan__radio {
  flex: none;
  width: 14px;
  height: 14px;
  border: 1px solid #8C93A1;
  border-radius: 50%;
}

.co-plan input:checked + .co-plan__title .co-plan__radio {
  border-color: var(--red);
  background: radial-gradient(circle, var(--red) 0 3.5px, #fff 4px);
}

.co-plan input:focus-visible + .co-plan__title .co-plan__radio { box-shadow: 0 0 0 3px rgba(201, 42, 79, .25); }

.co-plan__detail, .co-plan__total { display: block; }
.co-plan__detail { margin: 8px 0 0 22px; color: var(--muted); }
.co-plan__detail strong { color: var(--navy); }
.co-plan__total { margin: 18px 0 0 22px; }
.co-plan__total strong { display: block; }

/* Resumen */
.co-summary {
  display: grid;
  grid-template-columns: 2.4fr 1fr 1fr 1fr;
  gap: 4px 24px;
  margin-top: 28px;
  padding: 18px 36px 16px;
  background: var(--bg-soft);
  border-radius: 6px;
  font-size: 13px;
}

.co-summary__title { grid-column: 1 / -1; margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.co-summary small { display: block; color: var(--muted); font-size: 11px; }
.co-summary strong { font-weight: 600; }

/* Botones */
.co-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 20px;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  border-radius: 3px;
  border: 1px solid var(--red);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}

.co .co-btn--primary { color: #fff; background: var(--red); box-shadow: 0 3px 6px rgba(4, 30, 66, .2); }
.co .co-btn--primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.co .co-btn--primary[disabled] { opacity: .7; cursor: progress; }
.co .co-btn--outline { color: var(--red); background: #fff; }
.co .co-btn--outline:hover { background: var(--pink-soft); }

.co-btn svg { width: 20px; height: 20px; flex: none; }

.co-submit { margin-top: 26px; }

.co-note {
  margin: 10px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}

.co-alert {
  margin: 24px 0 0;
  padding: 14px 18px;
  color: var(--red-dark);
  background: var(--pink-soft);
  border-radius: 6px;
  font-size: 14px;
}

.co-alert ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Páginas de resultado ---------- */

.co-page {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 140px);
  padding: 34px 20px 64px;
}

.co-deco { position: absolute; pointer-events: none; user-select: none; }
.co-deco--circles { left: 0; bottom: 0; width: min(22vw, 360px); }
.co-deco--burst { right: 0; top: 50px; width: min(19vw, 330px); opacity: .85; }

.co-result {
  position: relative;
  z-index: 1;
  max-width: 610px;
  margin: 0 auto;
  text-align: center;
}

.co-result__icon {
  display: grid;
  place-items: center;
  width: 98px;
  height: 98px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--pink-soft);
  color: var(--red);
}

.co-result__icon svg { width: 56px; height: 56px; }

.co-result h1 { max-width: 11.5em; margin: 0 auto; font-size: 46px; line-height: 1.02; font-weight: 700; }
.co-result__lead { margin: 22px 0 0; font-size: 20px; font-weight: 500; line-height: 1.25; }
.co-result__muted { margin: 6px 0 0; color: var(--muted); font-size: 16px; }

.co-card {
  margin-top: 36px;
  padding: 28px 36px 22px;
  text-align: left;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(4, 30, 66, .08);
}

.co-card h2 { margin: 0 0 10px; font-size: 19px; font-weight: 700; }

.co-rows { margin: 0; }

.co-rows > div {
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.co-rows > div:first-child { border-top: 0; }
.co-rows dt { color: var(--muted); }
.co-rows dd { margin: 0; font-weight: 500; }

.co-actions { display: grid; gap: 16px; margin-top: 18px; }
.co-card + .co-actions { margin-top: 26px; }

.co-alert-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 36px;
  padding: 26px 28px;
  text-align: left;
  background: var(--pink-soft);
  border-radius: 10px;
  font-size: 15px;
}

.co-alert-card svg { flex: none; width: 50px; height: 40px; color: var(--red); }
.co-alert-card strong { display: block; color: var(--red); }

.co-help {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  text-align: left;
  font-size: 14px;
  line-height: 1.25;
}

.co-help svg { width: 44px; height: 44px; flex: none; }
.co-help a { text-decoration: none; }
.co-help a:hover { text-decoration: underline; }

/* ---------- Listado de programas ---------- */

.co-list { max-width: 1100px; margin: 0 auto; padding: 48px 20px 72px; }
.co-list__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-top: 28px; }

.co-program {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 16px rgba(4, 30, 66, .08);
  text-decoration: none;
}

.co-program__img { aspect-ratio: 16 / 10; background: var(--navy-hero) center 20% / cover no-repeat; }
.co-program__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 20px 22px 22px; }
.co-program__body .co-eyebrow { margin: 0; font-size: 12px; }
.co-program__name { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 700; }
.co-program__price { margin: auto 0 12px; padding-top: 10px; font-size: 18px; font-weight: 700; }
.co-program .co-btn { font-size: 15px; min-height: 42px; }

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
  .co-plans { grid-template-columns: repeat(2, 1fr); }
  .co-grid--4 { grid-template-columns: 1fr 1fr; }
  .co-summary { grid-template-columns: 1fr 1fr; }
  .co-summary > div:first-of-type { grid-column: 1 / -1; }
}

@media (max-width: 991px) {
  .co-header__logo img { height: 60px; }
  .co-layout { grid-template-columns: 1fr; }
  .co-hero { background-size: 100% auto; background-position: center top; }
  .co-hero::after { background: linear-gradient(to bottom, rgba(35, 48, 81, 0) 160px, rgba(35, 48, 81, .8) 340px, var(--navy-hero) 470px); }
  .co-hero__content { min-height: 620px; padding: 40px 6% 32px; }
  .co-main { padding: 32px 6% 56px; }
  .co-deco { display: none; }
}

@media (max-width: 640px) {
  .co-header { padding: 14px 16px; }
  .co-header__logo img { height: 48px; }
  .co-header__secure { font-size: 15px; }
  .co-hero__title { font-size: 28px; }
  .co-hero__facts { grid-template-columns: 1fr 1fr; }
  .co-main { padding: 26px 16px 48px; }
  .co-title, .co-price { font-size: 24px; }
  .co-grid--2, .co-grid--4, .co-plans, .co-summary { grid-template-columns: 1fr; }
  .co-summary { padding: 16px 18px; }
  .co-result h1 { font-size: 34px; }
  .co-result__lead { font-size: 18px; }
  .co-card { padding: 22px 18px 16px; }
  .co-rows > div { grid-template-columns: 1fr; gap: 2px; }
  .co-alert-card { flex-direction: column; text-align: center; }
  .co-btn { font-size: 15px; }
}
