/* =========================================================
   Página de programa formativo
   El color del programa se define en <body class="pg pg--…">
   ========================================================= */
.pg { --pg: #1f9d55; --pg-ink: #17703d; --pg-soft: #e7f5ec; --pg-dark: #0b3d24; }
.pg { --pg-light: #7fe0a5; }
.pg--excel { --pg: #1f9d55; --pg-ink: #17703d; --pg-soft: #e7f5ec; --pg-dark: #0b3d24; --pg-light: #7fe0a5; }
.pg--pbi { --pg: #b98900; --pg-ink: #8a6500; --pg-soft: #fcf4d6; --pg-dark: #4a3800; --pg-light: #f2cf5b; }
.pg--gestion { --pg: #0b6bcb; --pg-ink: #0a55a1; --pg-soft: #e4effb; --pg-dark: #06305e; --pg-light: #8ec5ff; }
.pg--pymes { --pg: #d9741a; --pg-ink: #a8540b; --pg-soft: #fdeede; --pg-dark: #5a2c05; --pg-light: #ffbe85; }
.pg--ia { --pg: #7a52d1; --pg-ink: #5b38ab; --pg-soft: #efe9fb; --pg-dark: #2f1b66; --pg-light: #c4aaff; }
.pg--fde { --pg: #0e9aa0; --pg-ink: #0a6f74; --pg-soft: #dff5f4; --pg-dark: #053f42; --pg-light: #7fe3e0; }

/* ---------- Cabecera ---------- */
.pg-hero { position: relative; overflow: hidden; padding: 56px 0 64px; color: #fff; background: linear-gradient(135deg, #002a55 0%, #003366 55%, var(--pg-dark) 130%); }
.pg-hero::after { content: ""; position: absolute; right: -120px; top: -160px; width: 520px; height: 520px; border-radius: 50%; background: var(--pg); opacity: .16; filter: blur(70px); pointer-events: none; }
.pg-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.pg-crumb { margin: 0 0 18px; font-size: var(--fs-sm); color: #b9c8da; }
.pg-crumb a { color: #dbe5f0; text-decoration: underline; }
.pg-crumb i { margin: 0 6px; font-size: .7em; }
.pg-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); font-size: var(--fs-sm); font-weight: 700; }
.pg-kicker i { color: var(--pg-light); }
.pg-hero h1 { margin: 16px 0 12px; color: #fff; text-align: left; font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; }
.pg-lead { margin: 0 0 24px; max-width: 56ch; font-size: 1.12rem; line-height: 1.6; color: #dbe5f0; }
.pg-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 22px; }
.pg-price strong { font-family: var(--font-heading); font-size: 2.6rem; line-height: 1; }
.pg-price-old { color: #b9c8da; font-size: var(--fs-md); }
.pg-price-save { padding: 4px 12px; border-radius: 999px; background: #e3f4e6; color: #1f6b30; font-size: var(--fs-sm); font-weight: 700; }
.pg-hero .hero-actions { justify-content: flex-start; align-items: center; margin: 0; }
.pg-hero .hero-actions .btn { margin: 0; }
.pg-hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; padding: 0; font-size: var(--fs-sm); font-weight: 600; color: #dbe5f0; }
.pg-hero-facts i { margin-right: 6px; color: var(--pg-light); }
.pg-hero-media { position: relative; }
.pg-hero-media img { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: 0 30px 60px rgba(0, 0, 0, .4); transform: rotate(1.5deg); }
.pg-hero-tag { position: absolute; left: -14px; bottom: -16px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; background: #fff; color: var(--site-azul-marino); font-size: var(--fs-sm); font-weight: 700; box-shadow: 0 12px 26px rgba(0, 0, 0, .25); }
.pg-hero-tag i { color: var(--pg); }

/* ---------- Cifras y empresas ---------- */
.pg-stats { padding: 34px 0 38px; background: var(--site-gris-claro); border-bottom: 1px solid var(--site-borde); text-align: center; }
.pg-stats-list { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0 0 30px; padding: 0 0 28px; border-bottom: 1px solid var(--site-borde); }
.pg-stats-list li { padding: 0 18px; border-right: 1px solid var(--site-borde); }
.pg-stats-list li:last-child { border-right: 0; }
.pg-stats-list strong { display: block; font-family: var(--font-heading); font-size: 1.9rem; line-height: 1.15; color: var(--site-azul-marino); }
.pg-stats-list span { font-size: var(--fs-sm); color: var(--site-gris-texto); }

/* ---------- Para quién ---------- */
.pg-who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pg-who-card { padding: 26px 24px; background: #fff; border: 1px solid var(--site-borde); border-top: 4px solid var(--pg); border-radius: 14px; box-shadow: 0 2px 10px rgba(0, 51, 102, .05); }
.pg-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 12px; background: var(--pg-soft); color: var(--pg-ink); font-size: 1.15rem; }
.pg-who-card h3 { margin: 0 0 8px; text-align: left; font-size: 1.08rem; color: var(--site-azul-marino); }
.pg-who-card p { margin: 0; font-size: var(--fs-md); line-height: 1.6; color: var(--site-gris-texto); }
.pg-note { max-width: 760px; margin: 28px auto 0; padding: 14px 20px; border-radius: 12px; background: var(--pg-soft); color: var(--site-negro-texto); text-align: center; }
.pg-note i { margin-right: 6px; color: var(--pg); }

/* ---------- Resultados ---------- */
.pg-results { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 52px; align-items: center; }
.pg-results .section-kicker, .pg-results .home-title { text-align: left; }
.pg-results .home-title { margin-bottom: 22px; }
.pg-checks { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
.pg-checks li { position: relative; padding-left: 34px; line-height: 1.55; color: var(--site-gris-texto); }
.pg-checks li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--pg); color: #fff; font-size: .68rem; }
.pg-checks strong { color: var(--site-negro-texto); }
.pg-results-photo { margin: 0; }
.pg-results-photo img { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: 0 20px 44px rgba(0, 51, 102, .2); }

/* ---------- Itinerario ---------- */
.pg-path { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.pg-courses { list-style: none; position: relative; margin: 0; padding: 0 0 0 48px; display: grid; gap: 16px; }
.pg-courses::before { content: ""; position: absolute; left: 16px; top: 40px; bottom: 40px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--pg) 0%, var(--pg-soft) 100%); }
.pg-course { position: relative; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 0 22px; align-items: start; padding: 14px; background: #fff; border: 1px solid var(--site-borde); border-radius: 14px; box-shadow: 0 2px 8px rgba(0, 51, 102, .05); transition: box-shadow .25s ease, border-color .25s ease; }
.pg-course:hover { border-color: var(--pg); box-shadow: 0 10px 26px rgba(0, 51, 102, .12); }
.pg-num { position: absolute; left: -48px; top: 62px; width: 35px; height: 35px; border-radius: 50%; display: grid; place-items: center; background: var(--pg); color: #fff; font-weight: 700; font-size: var(--fs-sm); box-shadow: 0 0 0 5px #fff; }
.pg-thumb { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 760 / 420; background: var(--site-azul-marino); }
.pg-thumb picture, .pg-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pg-course-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 2px 0 6px; }
.pg-step { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--pg-ink); }
.pg-course h3 { margin: 0 0 6px; text-align: left; font-size: 1.12rem; line-height: 1.3; }
.pg-course h3 a { color: var(--site-azul-marino); }
.pg-course h3 a:hover { text-decoration: underline; }
.pg-desc { margin: 0 0 10px; font-size: var(--fs-md); line-height: 1.55; color: var(--site-gris-texto); }
.pg-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 10px; font-size: var(--fs-xs); font-weight: 600; color: var(--site-azul-marino); }
.pg-meta i { margin-right: 4px; color: var(--pg); }
.pg-temario { border-top: 1px solid var(--site-borde); padding-top: 10px; }
.pg-temario summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 700; color: var(--pg-ink); list-style: none; }
.pg-temario summary::-webkit-details-marker { display: none; }
.pg-temario summary::before { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; display: inline-block; margin-right: 8px; font-size: .75em; transition: transform .2s ease; }
.pg-temario[open] summary::before { transform: rotate(180deg); }
.pg-temario summary small { font-weight: 400; color: var(--site-gris-texto); }
.pg-temario ol { margin: 12px 0 12px; padding-left: 20px; columns: 2; column-gap: 28px; font-size: var(--fs-sm); line-height: 1.5; color: var(--site-negro-texto); }
.pg-temario ol li { break-inside: avoid; margin-bottom: 4px; }
.pg-temario ol li::marker { color: var(--pg-ink); font-weight: 700; }
.pg-temario .link-arrow { font-size: var(--fs-sm); color: var(--pg-ink); }

.pg-buy { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 6px; padding: 24px 22px; background: #fff; border: 2px solid var(--pg); border-radius: 16px; box-shadow: 0 12px 30px rgba(0, 51, 102, .14); }
.pg-buy-tag { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--pg-ink); }
.pg-buy-price { margin: 6px 0 0; }
.pg-buy-price strong { font-family: var(--font-heading); font-size: 2.2rem; line-height: 1; color: var(--site-azul-marino); }
.pg-buy-price s { margin-left: 8px; color: var(--site-gris-oscuro); }
.pg-buy-save { margin: 0; font-size: var(--fs-sm); font-weight: 700; color: #1f6b30; }
.pg-buy ul { list-style: none; margin: 12px 0 16px; padding: 14px 0 0; border-top: 1px solid var(--site-borde); display: grid; gap: 8px; font-size: var(--fs-sm); color: var(--site-negro-texto); }
.pg-buy ul i { margin-right: 8px; color: var(--pg); }
.pg-buy .btn { display: block; margin: 0; text-align: center; }
.pg-buy-wa { margin-top: 10px; text-align: center; font-size: var(--fs-sm); font-weight: 600; color: #1f8f4e; }
.pg-buy-wa:hover { text-decoration: underline; }

/* ---------- Precio ---------- */
.pg-compare { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; max-width: 980px; margin: 0 auto; align-items: stretch; }
.pg-plan { position: relative; display: flex; flex-direction: column; padding: 30px 28px; background: #fff; border: 1px solid var(--site-borde); border-radius: 16px; }
.pg-plan h3 { margin: 0 0 16px; text-align: left; font-size: 1.15rem; color: var(--site-azul-marino); }
.pg-plan-list { list-style: none; margin: 0; padding: 0; font-size: var(--fs-md); color: var(--site-gris-texto); }
.pg-plan-list li, .pg-plan-total { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--site-borde); }
.pg-plan-list b { font-weight: 600; color: var(--site-negro-texto); white-space: nowrap; }
.pg-plan-total { margin: auto 0 0; border-bottom: 0; padding-top: 14px; font-weight: 700; color: var(--site-negro-texto); }
.pg-plan-total b { font-size: 1.2rem; text-decoration: line-through; color: var(--site-gris-oscuro); }
.pg-plan--best { border: 2px solid var(--pg); box-shadow: 0 16px 38px rgba(0, 51, 102, .16); }
.pg-plan-badge { position: absolute; top: -13px; left: 24px; padding: 4px 14px; border-radius: 999px; background: var(--pg); color: #fff; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.pg-plan-price { margin: 0; }
.pg-plan-price strong { font-family: var(--font-heading); font-size: 2.8rem; line-height: 1; color: var(--site-azul-marino); }
.pg-plan-price s { margin-left: 10px; font-size: 1.1rem; color: var(--site-gris-oscuro); }
.pg-plan-save { margin: 6px 0 0; font-weight: 700; color: #1f6b30; }
.pg-plan-incl { list-style: none; margin: 18px 0 22px; padding: 16px 0 0; border-top: 1px solid var(--site-borde); display: grid; gap: 9px; font-size: var(--fs-md); color: var(--site-negro-texto); }
.pg-plan-incl li { display: flex; gap: 10px; align-items: flex-start; }
.pg-plan-incl i { margin-top: 4px; color: var(--pg); }
.pg-plan--best .btn { display: block; margin: auto 0 0; text-align: center; }
.pg-price-notes { list-style: none; max-width: 980px; margin: 28px auto 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 28px; font-size: var(--fs-sm); line-height: 1.55; color: var(--site-gris-texto); }
.pg-price-notes li { display: flex; gap: 10px; align-items: flex-start; }
.pg-price-notes i { margin-top: 3px; color: var(--site-azul-marino); }
.pg-price-notes strong { color: var(--site-negro-texto); }

/* ---------- Cierre ---------- */
.closing-card s { opacity: .7; }
.pg-closing-alt { margin: 26px 0 0 !important; font-size: var(--fs-sm) !important; }
.pg-closing-alt a { color: #fff; text-decoration: underline; font-weight: 600; }

@media (max-width: 1050px) {
  .pg-path { grid-template-columns: 1fr; }
  .pg-buy { position: static; max-width: 520px; margin: 0 auto; width: 100%; }
}
@media (max-width: 900px) {
  .pg-hero-grid, .pg-results { grid-template-columns: 1fr; gap: 36px; }
  .pg-hero-media { max-width: 520px; }
  .pg-who, .pg-price-notes { grid-template-columns: 1fr; }
  .pg-compare { grid-template-columns: 1fr; }
  .pg-plan--best { order: -1; }
  .pg-results-photo { display: none; }
}
@media (max-width: 760px) {
  .pg-hero { padding: 34px 0 48px; }
  .pg-price strong { font-size: 2.2rem; }
  .pg-hero .hero-actions .btn { width: 100%; text-align: center; justify-content: center; }
  .pg-hero-media img { transform: none; }
  .pg-hero-tag { left: 10px; bottom: -14px; }
  .pg-stats-list { grid-template-columns: repeat(2, 1fr); gap: 20px 0; }
  .pg-stats-list li:nth-child(2n) { border-right: 0; }
  .pg-stats-list strong { font-size: 1.5rem; }
  .pg-who { gap: 12px; }
  .pg-who-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 14px; padding: 16px; border-top-width: 1px; border-left: 4px solid var(--pg); }
  .pg-icon { grid-row: 1 / span 2; margin: 0; width: 44px; height: 44px; }
  .pg-courses { padding-left: 0; gap: 12px; }
  .pg-courses::before { display: none; }
  .pg-course { grid-template-columns: 96px minmax(0, 1fr); gap: 0 14px; padding: 12px; }
  .pg-num { left: 6px; top: 6px; width: 22px; height: 22px; font-size: .7rem; box-shadow: 0 0 0 2px #fff; }
  .pg-thumb { border-radius: 6px; }
  .pg-course h3 { font-size: var(--fs-base); }
  .pg-desc { font-size: var(--fs-sm); }
  .pg-temario ol { columns: 1; }
  .pg-plan { padding: 26px 20px; }
  .pg-plan-price strong { font-size: 2.3rem; }
}
.pg-buy ul li { display: flex; gap: 8px; align-items: flex-start; }
.pg-buy ul i { margin: 4px 0 0; }

/* Programa alternativo y pasos sin tutoría */
.pg-alt { max-width: 760px; margin: 14px auto 0; text-align: center; font-size: var(--fs-sm); color: var(--site-gris-texto); }
.pg-alt a { color: var(--site-azul-marino); font-weight: 600; text-decoration: underline; }
.pg-temario summary small em { font-style: normal; color: #8a4d06; }

/* Quién te forma: sección propia, sobre blanco */
.pg-director { padding: 56px 0; }
.pg-director .director-formacion { margin-top: 0; }
/* Precio sobre blanco: la opción "curso a curso" queda en gris para que destaque el programa */
#precio:not(.bg-light) .pg-plan:not(.pg-plan--best) { background: var(--site-gris-claro); border-color: transparent; }

/* ---------- Bajo la cabecera: ventajas en tarjetas que montan sobre la cabecera ---------- */
.pg-hero { padding-bottom: 112px; }
.pg-stats { position: relative; z-index: 2; padding-top: 0; }
.pg-feats { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0 0 34px; padding: 0; transform: translateY(-56px); margin-bottom: -22px; text-align: left; }
.pg-feats li { display: flex; gap: 14px; align-items: flex-start; padding: 22px 20px; background: #fff; border: 1px solid var(--site-borde); border-bottom: 4px solid var(--pg); border-radius: 14px; box-shadow: 0 14px 34px rgba(0, 34, 68, .16); }
.pg-feats .pg-icon { flex: 0 0 46px; margin: 0; }
.pg-feats strong { display: block; margin-bottom: 4px; font-family: var(--font-heading); font-size: 1.05rem; line-height: 1.25; color: var(--site-azul-marino); }
.pg-feats p { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--site-gris-texto); }
@media (max-width: 1050px) { .pg-feats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .pg-hero { padding-bottom: 84px; }
  .pg-feats { gap: 10px; transform: translateY(-44px); margin-bottom: -20px; }
  .pg-feats li { flex-direction: column; gap: 8px; padding: 14px; }
  .pg-feats .pg-icon { flex-basis: auto; width: 38px; height: 38px; font-size: 1rem; }
  .pg-feats strong { font-size: var(--fs-md); }
  .pg-feats p { font-size: var(--fs-xs); }
}

/* =========================================================
   Página de curso (misma estructura que la de programa)
   ========================================================= */
.pg--curso .pg-price-old { color: #dbe5f0; font-weight: 600; }
/* Temario */
.pg-modules { max-width: none; margin: 0; }
.pg-modules details { background: #fff; border: 1px solid var(--site-borde); border-radius: 12px; margin-bottom: 10px; overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.pg-modules details[open], .pg-modules details:hover { border-color: var(--pg); box-shadow: 0 6px 18px rgba(0, 51, 102, .08); }
.pg-modules summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; font-family: var(--font-heading); font-weight: 600; color: var(--site-azul-marino); list-style: none; background: none; }
.pg-modules summary::-webkit-details-marker { display: none; }
.pg-modules summary::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .8rem; color: var(--pg); transition: transform .2s ease; }
.pg-modules details[open] summary::after { transform: rotate(180deg); }
.pg-modules .module-desc { margin: 0; padding: 0 20px 10px; font-size: var(--fs-sm); color: var(--site-gris-texto); }
.pg-modules .module-lessons { list-style: none; margin: 0; padding: 0 20px 16px; columns: 2; column-gap: 28px; font-size: var(--fs-sm); color: var(--site-negro-texto); }
.pg-modules .module-lessons li { position: relative; break-inside: avoid; padding: 4px 0 4px 20px; border: 0; }
.pg-modules .module-lessons li::before { content: "\f144"; font-family: "Font Awesome 6 Free"; font-weight: 400; position: absolute; left: 0; top: 5px; font-size: .8rem; color: var(--pg); }
.pg--curso .pg-buy-save { color: var(--pg-ink); }
/* Programa del que forma parte */
.pg-upsell { padding: 34px 0; background: var(--pg-soft); border-top: 1px solid var(--site-borde); border-bottom: 1px solid var(--site-borde); }
.pg-upsell-inner { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.pg-upsell-img { display: block; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 24px rgba(0, 51, 102, .2); }
.pg-upsell-img img { display: block; width: 100%; height: auto; }
.pg-upsell-kicker { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--pg-ink); }
.pg-upsell h2 { margin: 4px 0 6px; text-align: left; font-size: 1.35rem; color: var(--site-azul-marino); }
.pg-upsell p { margin: 0; color: var(--site-gris-texto); font-size: var(--fs-md); }
.pg-upsell-price { margin-top: 8px !important; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.pg-upsell-price strong { font-family: var(--font-heading); font-size: 1.5rem; color: var(--site-azul-marino); }
.pg-upsell-price s { color: var(--site-gris-oscuro); }
.pg-upsell-price span { font-weight: 700; color: #1f6b30; font-size: var(--fs-sm); }
.pg-upsell-price em { font-style: normal; font-size: var(--fs-sm); }
.pg-upsell .btn { margin: 0; white-space: nowrap; }
/* Inscripción */
.pg-compare--curso { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.pg-compare--curso .pg-plan h3 { margin-bottom: 10px; }
.pg-plan-alt-price { margin: 0; }
.pg-plan-alt-price strong { font-family: var(--font-heading); font-size: 1.9rem; color: var(--site-azul-marino); }
.pg-plan-alt-price s { margin-left: 8px; color: var(--site-gris-oscuro); }
.pg-plan .btn-outline-navy { display: block; margin: auto 0 0; text-align: center; }
.pg-cd { margin: 0 0 20px; padding: 14px 16px; border-radius: 12px; background: var(--site-gris-claro); text-align: center; }
.pg-cd[hidden] { display: none; }
.pg-cd p { margin: 0 0 8px; font-size: var(--fs-sm); font-weight: 700; color: var(--site-azul-marino); }
.pg-cd .course-countdown { justify-content: center; margin: 0; gap: 8px; }
.pg-cd .course-countdown div { min-width: 62px; padding: 8px 10px; background: #fff; }
.pg-cd .course-countdown span { font-size: 1.5rem; }
.pg-cd-off { margin: 0 0 20px; font-size: var(--fs-sm); color: var(--site-gris-texto); }
@media (max-width: 900px) {
  .pg-upsell-inner { grid-template-columns: 1fr; gap: 16px; }
  .pg-upsell-img { max-width: 260px; }
  .pg-compare--curso { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .pg-modules .module-lessons { columns: 1; }
  .pg-modules summary { padding: 14px 16px; font-size: var(--fs-md); }
  .pg-cd .course-countdown div { min-width: 54px; }
}

/* ---------- Cierre con fotografía ---------- */
.closing-card--photo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 44px; align-items: center; max-width: 1120px; padding: 48px 52px; text-align: left; }
.closing-card--photo .closing-text > p { margin: 0; color: #dbe5f0; font-size: var(--fs-lg); }
.closing-card--photo .hero-actions { justify-content: flex-start; }
.closing-card--photo .pg-closing-alt { line-height: 1.7; }
.closing-photo { margin: 0; }
.closing-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; border: 4px solid rgba(255, 255, 255, .9); box-shadow: 0 20px 44px rgba(0, 0, 0, .35); transform: rotate(2deg); }
@media (max-width: 900px) {
  .closing-card--photo { grid-template-columns: 1fr; gap: 26px; padding: 30px 22px; text-align: center; }
  .closing-card--photo .closing-photo { order: -1; max-width: 420px; margin: 0 auto; width: 100%; }
  .closing-photo img { aspect-ratio: 16 / 9; transform: none; border-width: 3px; }
  .closing-card--photo .hero-actions { justify-content: center; }
}
.closing-card--photo h2 { text-align: left; }
@media (max-width: 900px) { .closing-card--photo h2 { text-align: center; } }
/* Cierre: la línea de enlaces alternativos cabe en una sola fila en escritorio */
@media (min-width: 1101px) {
  .closing-card--photo { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }
  .closing-card--photo .pg-closing-alt { white-space: nowrap; }
}

/* =========================================================
   Animación sobria (<body class="pg-anim">)
   ========================================================= */
@keyframes pg-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes pg-left { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
@keyframes pg-right { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes pg-zoom { from { opacity: 0; transform: scale(.97) translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pg-media { from { opacity: 0; transform: translateX(40px) rotate(4deg); } to { opacity: 1; transform: rotate(1.5deg); } }
@keyframes pg-float { 0%, 100% { transform: rotate(1.5deg) translateY(0); } 50% { transform: rotate(1.5deg) translateY(-8px); } }
@keyframes pg-pop { 0% { opacity: 0; transform: translateY(10px) scale(.92); } 70% { transform: translateY(-2px) scale(1.03); } 100% { opacity: 1; transform: none; } }
@keyframes pg-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Elementos que entran al llegar a la vista */
.pg-anim .pg-rv { opacity: 0; }
.pg-anim .pg-rv.pg-rv-in { animation-duration: .65s; animation-timing-function: cubic-bezier(.22, .61, .36, 1); animation-fill-mode: both; }
.pg-anim .pg-rv--up.pg-rv-in { animation-name: pg-up; }
.pg-anim .pg-rv--left.pg-rv-in { animation-name: pg-left; }
.pg-anim .pg-rv--right.pg-rv-in { animation-name: pg-right; }
.pg-anim .pg-rv--zoom.pg-rv-in { animation-name: pg-zoom; animation-duration: .8s; }

/* Cabecera: el texto entra escalonado y la portada flota suavemente */
.pg-anim .pg-hero-text > * { animation: pg-up .7s cubic-bezier(.22, .61, .36, 1) both; }
.pg-anim .pg-hero-text > *:nth-child(1) { animation-delay: .05s; }
.pg-anim .pg-hero-text > *:nth-child(2) { animation-delay: .12s; }
.pg-anim .pg-hero-text > *:nth-child(3) { animation-delay: .2s; }
.pg-anim .pg-hero-text > *:nth-child(4) { animation-delay: .3s; }
.pg-anim .pg-hero-text > *:nth-child(5) { animation-delay: .4s; }
.pg-anim .pg-hero-text > *:nth-child(6) { animation-delay: .5s; }
.pg-anim .pg-hero-text > *:nth-child(7) { animation-delay: .6s; }
.pg-anim .pg-hero-media img { animation: pg-media .9s cubic-bezier(.22, .61, .36, 1) .25s both, pg-float 7s ease-in-out 1.3s infinite; }
.pg-anim .pg-hero-tag { animation: pg-pop .5s ease-out 1s both; }

/* Detalles al interactuar */
.pg-anim .pg-feats li, .pg-anim .pg-who-card { transition: opacity .6s ease, transform .6s ease, box-shadow .25s ease; }
.pg-anim .pg-feats li.in-view:hover, .pg-anim .pg-who-card.in-view:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(0, 34, 68, .18); }
.pg-anim .pg-icon { transition: transform .25s ease, background .25s ease, color .25s ease; }
.pg-anim .pg-feats li:hover .pg-icon, .pg-anim .pg-who-card:hover .pg-icon { transform: scale(1.08); background: var(--pg); color: #fff; }
.pg-anim .pg-modules details[open] > *:not(summary) { animation: pg-open .3s ease both; }
.pg-anim .pg-plan--best { transition: transform .3s ease, box-shadow .3s ease; }
.pg-anim .pg-plan--best:hover { transform: translateY(-4px); box-shadow: 0 22px 46px rgba(0, 51, 102, .2); }
.pg-anim .closing-photo img { transition: transform .5s ease; }
.pg-anim .closing-card:hover .closing-photo img { transform: rotate(0deg) scale(1.02); }
.pg-anim .pg-upsell-img img { transition: transform .5s ease; }
.pg-anim .pg-upsell-inner:hover .pg-upsell-img img { transform: scale(1.04); }
.pg-anim .pg-checks li::before { transition: transform .25s ease; }
.pg-anim .pg-checks li:hover::before { transform: scale(1.15); }

@media (max-width: 760px) {
  @keyframes pg-media { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  .pg-anim .pg-hero-media img { animation: pg-media .8s cubic-bezier(.22, .61, .36, 1) .25s both; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-anim .pg-rv { opacity: 1; }
  .pg-anim .pg-hero-text > *, .pg-anim .pg-hero-media img, .pg-anim .pg-hero-tag, .pg-anim .pg-rv.pg-rv-in, .pg-anim .pg-modules details[open] > *:not(summary) { animation: none; }
}
/* Cursos y programas: el titular del cierre en una sola fila en escritorio */
@media (min-width: 1101px) {
  .closing-card--photo { grid-template-columns: minmax(0, 1.45fr) minmax(0, .55fr); gap: 40px; }
  .closing-card--photo h2 { font-size: 1.75rem; white-space: nowrap; }
}
/* Programas: los cursos del itinerario entran escalonados y el temario se abre con un fundido */
.pg-anim .pg-course.reveal { transform: translateY(24px); transition: opacity .6s ease, transform .6s cubic-bezier(.22, .61, .36, 1), box-shadow .25s ease, border-color .25s ease; }
.pg-anim .pg-course.reveal.in-view { transform: none; }
.pg-anim .pg-temario[open] > *:not(summary) { animation: pg-open .3s ease both; }
.pg-anim .pg-thumb img { transition: transform .5s ease; }
.pg-anim .pg-course:hover .pg-thumb img { transform: scale(1.05); }
.pg-anim .pg-num { transition: transform .25s ease; }
.pg-anim .pg-course:hover .pg-num { transform: scale(1.12); }
@media (prefers-reduced-motion: reduce) { .pg-anim .pg-course.reveal { transform: none; } .pg-anim .pg-temario[open] > *:not(summary) { animation: none; } }

/* Fichas de curso generadas: perfiles sin titular y fecha de preinscripción */
.pg-who-card--solo { display: flex; gap: 14px; align-items: center; }
.pg-who-card--solo .pg-icon { flex: 0 0 46px; margin: 0; }
.pg-who-card--solo p { font-size: var(--fs-base); font-weight: 600; color: var(--site-azul-marino); line-height: 1.45; }
.pg-cd-date { padding: 12px 16px; border-radius: 12px; background: #fdf0dc; color: #8a4d06 !important; font-weight: 700; text-align: center; }
.pg-cd-date i { margin-right: 6px; }
@media (max-width: 760px) { .pg-who-card--solo { display: flex; } .pg-who-card--solo .pg-icon { grid-row: auto; } }
.pg-plan-nota { grid-column: 1; margin: -16px 0 0 48px; padding: 12px 16px; border-radius: 10px; background: var(--pg-soft); color: var(--site-negro-texto); font-size: var(--fs-sm); line-height: 1.5; }
.pg-plan-nota i { margin-right: 6px; color: var(--pg-ink); }
.pg-path .pg-buy { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 1050px) { .pg-path .pg-buy { grid-column: auto; grid-row: auto; } .pg-plan-nota { margin: 0; } }
@media (max-width: 760px) { .pg-plan-nota { margin-left: 0; } }
/* La fecha calculada dentro de la etiqueta no debe heredar la separación entre icono y texto */
.pg-hero-tag > [data-prox] { margin: 0 -4px; }
/* Fotografías servidas con <picture> */
.pg-results-photo picture, .closing-photo picture, .ins-hero-media picture { display: block; }
/* Las fotos del cierre llevan width/height en el HTML: la altura la fija la proporción, no el atributo */
.closing-photo img { height: auto; }
/* Etiqueta de inicio de la cabecera: icono y texto en dos bloques, el texto en una sola pieza */
.pg-hero-tag .pg-hero-tag-txt { display: block; min-width: 0; line-height: 1.35; }
@media (max-width: 760px) {
  .pg-hero-tag { max-width: calc(100% - 20px); align-items: flex-start; padding: 9px 14px; font-size: .88rem; }
  .pg-hero-tag i { margin-top: 3px; }
}

/* Móvil: la etiqueta superior se condensa para quedar en una sola línea */
@media (max-width: 600px) {
  .pg-kicker { max-width: 100%; padding: 6px 12px; gap: 6px; font-size: .8rem; white-space: nowrap; }
  .pg-kicker .k-extra { display: none; }
  .pg-kicker .k-nivel { display: inline-block; }
  .pg-kicker .k-nivel::first-letter { text-transform: uppercase; }
}
