/* ============================================================
   MELU — Plataforma de Test · páginas públicas
   Complementa a landings.css en /plataforma-de-test y /test/<slug>.
   Prefijo pt- para no chocar con l- (landings) ni con la app.
   ============================================================ */

:root {
  --pt-ok: #15803d; --pt-ok-bg: #ecfdf3; --pt-ok-bd: #86efac;
  --pt-ko: #dc2626; --pt-ko-bg: #fef2f2; --pt-ko-bd: #fca5a5;
  --pt-of: #92400e; --pt-of-bg: #fffbeb; --pt-of-bd: #fde68a;
}
[data-theme="dark"] {
  --pt-ok: #3fb950; --pt-ok-bg: rgba(63,185,80,.12); --pt-ok-bd: rgba(63,185,80,.5);
  --pt-ko: #ff7b72; --pt-ko-bg: rgba(248,81,73,.12); --pt-ko-bd: rgba(248,81,73,.5);
  --pt-of: #e3b341; --pt-of-bg: rgba(210,153,34,.12); --pt-of-bd: rgba(210,153,34,.45);
}

.pt-ico { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.l-card .pt-ico-box { width: 46px; height: 46px; border-radius: 12px; background: var(--l-bg2); color: var(--l-primary); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.l-section a.pt-link, .l-sub a, .pt-text a { color: var(--l-primary); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Hero: sellos ---------- */
.pt-ticks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 18px 0 0; padding: 0; font-size: .92rem; font-weight: 600; }
.pt-ticks li { display: inline-flex; align-items: center; gap: 7px; }
.pt-ticks li::before { content: "✓"; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--l-success); color: #fff; font-size: .7rem; font-weight: 800; flex: 0 0 auto; }

/* ---------- Aviso del simulacro open ---------- */
.pt-sim { display: flex; gap: 22px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--l-card); border: 1px solid var(--l-border); border-left: 5px solid var(--l-accent); border-radius: 16px; padding: 22px 24px; box-shadow: var(--l-shadow); }
.pt-sim .pt-sim-txt { flex: 1 1 420px; min-width: 0; }
.pt-sim .pt-sim-fecha { display: inline-block; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--pt-of); background: var(--pt-of-bg); border: 1px solid var(--pt-of-bd); border-radius: 999px; padding: 4px 11px; margin-bottom: 8px; }
.pt-sim h2, .pt-sim h3 { margin: 0 0 6px; font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.pt-sim p { margin: 0; color: var(--l-muted); font-size: .95rem; }

/* ---------- Tarjetas de oposición ---------- */
.pt-opos { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.pt-opo { position: relative; display: flex; flex-direction: column; background: var(--l-card); border: 1px solid var(--l-border); border-radius: 18px; padding: 24px 22px 22px; box-shadow: var(--l-shadow); }
.pt-opo.dest { border: 2px solid var(--l-primary); }
.pt-opo .pt-lbl { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--l-primary); }
.pt-opo h3 { margin: 6px 0 14px; font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.pt-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 14px; padding: 0; }
.pt-nums div { background: var(--l-bg2); border-radius: 12px; padding: 10px 6px; text-align: center; }
.pt-nums dt { font-size: 1.15rem; font-weight: 800; color: var(--l-primary); line-height: 1.1; }
.pt-nums dd { margin: 3px 0 0; font-size: .74rem; color: var(--l-muted); }
.pt-opo p { margin: 0 0 12px; color: var(--l-muted); font-size: .92rem; }
.pt-oficial { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 800; color: var(--pt-of); background: var(--pt-of-bg); border: 1px solid var(--pt-of-bd); border-radius: 999px; padding: 4px 11px; margin: 0 0 12px; align-self: flex-start; }
.pt-precio-mini { border-top: 1px solid var(--l-border); padding-top: 14px; margin-top: auto; }
.pt-precio-mini .pt-p { font-size: 1.05rem; font-weight: 800; }
.pt-precio-mini .pt-p small { font-weight: 600; color: var(--l-muted); font-size: .85rem; }
.pt-precio-mini .pt-dto { font-size: .82rem; color: var(--l-muted); margin: 4px 0 14px; }
.pt-btns { display: grid; gap: 8px; }
.pt-btns .l-btn { justify-content: center; width: 100%; text-align: center; }
.pt-opo .pt-mas { margin-top: 12px; font-size: .88rem; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pt-opo .pt-mas a { color: var(--l-primary); font-weight: 700; text-decoration: none; }
.pt-opo .pt-mas a:hover { text-decoration: underline; }

/* ---------- Demo / preguntas de muestra ---------- */
.pt-quiz { max-width: 780px; margin: 0 auto; }
.pt-quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; font-size: .88rem; font-weight: 700; color: var(--l-muted); }
.pt-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--l-border); overflow: hidden; }
.pt-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--l-primary), var(--l-primary-2)); border-radius: 999px; transition: width .3s ease; }
.pt-qs { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.pt-q { background: var(--l-card); border: 1px solid var(--l-border); border-radius: 18px; padding: 22px 22px 20px; box-shadow: var(--l-shadow); }
.pt-tag { display: inline-block; font-size: .76rem; font-weight: 800; letter-spacing: .02em; color: var(--l-primary); background: var(--l-bg2); border-radius: 999px; padding: 4px 11px; margin: 0 0 10px; }
.pt-tag.of { color: var(--pt-of); background: var(--pt-of-bg); border: 1px solid var(--pt-of-bd); }
.pt-enun { margin: 0 0 14px; font-size: 1.12rem; font-weight: 700; line-height: 1.4; letter-spacing: -.005em; }
.pt-opts { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.pt-opt { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 48px; text-align: left; font: inherit; font-size: .97rem; color: var(--l-text); background: var(--l-card); border: 2px solid var(--l-border); border-radius: 12px; padding: 10px 14px; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.pt-opt:hover { border-color: var(--l-primary); }
.pt-opt:focus-visible { outline: 3px solid var(--l-primary); outline-offset: 2px; }
.pt-opt .pt-l { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--l-bg2); color: var(--l-primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; margin-top: 1px; }
.pt-opt .pt-ot { flex: 1; padding-top: 3px; }
.pt-opt[aria-disabled="true"] { cursor: default; }
.pt-opt[aria-disabled="true"]:hover { border-color: var(--l-border); }
.pt-q.hecha .pt-opt:not(.ok):not(.ko) { opacity: .7; }
.pt-opt.ok, .pt-opt.ok:hover { border-color: var(--pt-ok); background: var(--pt-ok-bg); }
.pt-opt.ok .pt-l { background: var(--pt-ok); color: #fff; }
.pt-opt.ko, .pt-opt.ko:hover { border-color: var(--pt-ko); background: var(--pt-ko-bg); }
.pt-opt.ko .pt-l { background: var(--pt-ko); color: #fff; }
.pt-fb { margin: 12px 0 0; font-weight: 800; font-size: .98rem; }
.pt-fb:empty { display: none; }
.pt-fb.ok { color: var(--pt-ok); }
.pt-fb.ko { color: var(--pt-ko); }
.pt-exp { margin-top: 12px; background: var(--l-bg2); border-radius: 12px; padding: 12px 16px; font-size: .93rem; color: var(--l-text); line-height: 1.55; }
.pt-exp p { margin: 0; }
.pt-exp .pt-sol { font-weight: 800; margin-bottom: 4px; }
/* Con JS, la solución se ve después de responder; sin JS se ve siempre. */
.js .pt-exp { display: none; }
.js .pt-q.hecha .pt-exp { display: block; }
.js .pt-quiz[data-modo="pasos"] .pt-q:not(.actual) { display: none; }
.js .pt-quiz[data-modo="pasos"].fin .pt-qs, .js .pt-quiz[data-modo="pasos"].fin .pt-nav, .js .pt-quiz[data-modo="pasos"].fin .pt-quiz-top { display: none; }
.pt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* El aviso del simulacro open se oculta solo cuando termina (clase sim-fin puesta en <head>). */
.sim-fin [data-sim] { display: none !important; }
.pt-nav { display: flex; justify-content: flex-end; margin-top: 14px; }
.pt-nav .l-btn[hidden] { display: none; }
.pt-result { margin-top: 18px; text-align: center; background: var(--l-card); border: 2px solid var(--l-primary); border-radius: 18px; padding: 28px 22px; box-shadow: var(--l-shadow); }
.pt-result[hidden] { display: none; }
.pt-result:focus { outline: none; }
.pt-result .pt-nota { font-size: 2.6rem; font-weight: 800; color: var(--l-primary); line-height: 1; letter-spacing: -.02em; }
.pt-result h3 { margin: 10px 0 6px; font-size: 1.3rem; }
.pt-result p { margin: 0 auto 18px; color: var(--l-muted); max-width: 520px; }
.pt-result .pt-btns-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pt-reset { background: none; border: none; color: var(--l-muted); font: inherit; font-size: .9rem; text-decoration: underline; cursor: pointer; padding: 8px; }

/* ---------- Capturas ---------- */
.pt-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.pt-shots figure { margin: 0; }
.pt-shot { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; border: 1px solid var(--l-border); box-shadow: var(--l-shadow); background: linear-gradient(135deg, var(--l-bg2), var(--l-card)); }
.pt-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.pt-shot.sin-img img { display: none; }
.pt-shot.sin-img::after { content: "Captura de la plataforma"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--l-muted); font-weight: 700; font-size: .9rem; }
.pt-shots figcaption { margin-top: 10px; color: var(--l-muted); font-size: .9rem; }
.pt-shots figcaption b { color: var(--l-text); }

/* ---------- Precios ---------- */
.pt-planes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: stretch; }
.pt-plan { display: flex; flex-direction: column; background: var(--l-card); border: 1px solid var(--l-border); border-radius: 18px; padding: 26px 24px; box-shadow: var(--l-shadow); }
.pt-plan.dest { border: 2px solid var(--l-primary); }
.pt-plan .pt-plan-nom { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--l-primary); }
.pt-plan .pt-plan-precio { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 2px; line-height: 1.05; }
.pt-plan .pt-plan-precio small { font-size: .95rem; font-weight: 600; color: var(--l-muted); letter-spacing: 0; }
.pt-plan .pt-plan-sub { color: var(--l-muted); font-size: .9rem; margin: 0 0 14px; }
.pt-plan ul { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; font-size: .93rem; }
.pt-plan li { display: flex; gap: 9px; align-items: flex-start; }
.pt-plan li::before { content: "✓"; color: var(--l-success); font-weight: 800; flex: 0 0 auto; }
.pt-plan .pt-btns { margin-top: auto; }
.pt-plan .pt-plan-para { font-size: .8rem; font-weight: 700; color: var(--l-muted); margin: 0 0 8px; }
.pt-avisos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 20px; }
.pt-aviso { display: flex; gap: 14px; align-items: flex-start; background: var(--l-bg2); border: 1px solid var(--l-border); border-radius: 14px; padding: 16px 18px; font-size: .93rem; }
.pt-aviso .pt-ico { color: var(--l-primary); margin-top: 2px; }
.pt-aviso p { margin: 0; color: var(--l-muted); }
.pt-aviso strong { color: var(--l-text); }

/* ---------- Temas ---------- */
.pt-bloque { margin: 26px 0 10px; font-size: 1.05rem; font-weight: 800; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pt-bloque span { font-size: .85rem; color: var(--l-muted); font-weight: 600; }
.pt-temas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.pt-temas li { display: flex; align-items: center; gap: 12px; background: var(--l-card); border: 1px solid var(--l-border); border-radius: 12px; padding: 10px 14px; font-size: .92rem; }
.pt-temas .pt-tn { flex: 0 0 auto; min-width: 34px; height: 30px; padding: 0 6px; border-radius: 9px; background: var(--l-bg2); color: var(--l-primary); font-weight: 800; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; }
.pt-temas .pt-tt { flex: 1; min-width: 0; }
.pt-temas .pt-tc { flex: 0 0 auto; font-weight: 800; font-size: .88rem; color: var(--l-text); white-space: nowrap; }
.pt-temas .pt-tc small { font-weight: 600; color: var(--l-muted); }

/* ---------- Datos del examen ---------- */
.pt-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 0 0 18px; padding: 0; }
.pt-datos div { background: var(--l-card); border: 1px solid var(--l-border); border-radius: 14px; padding: 16px 18px; box-shadow: var(--l-shadow); }
.pt-datos dt { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--l-primary); margin-bottom: 4px; }
.pt-datos dd { margin: 0; font-size: .95rem; }
.pt-text { max-width: 760px; color: var(--l-muted); font-size: 1rem; }
.pt-text p { margin: 0 0 14px; }

/* ---------- Banda azul: exámenes oficiales ---------- */
.pt-years { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pt-years div { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 12px; text-align: center; }
.pt-years b { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.pt-years span { font-size: .8rem; opacity: .85; }
.pt-big { font-size: 3.4rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; text-align: center; margin-bottom: 4px; }
.pt-big-lbl { text-align: center; font-size: .9rem; opacity: .9; margin-bottom: 16px; }
.l-feature-band .l-btn { background: #fff; color: #0b3a8f; border: none; margin-top: 18px; }
.l-feature-band a:not(.l-btn) { color: #fff; }

/* ---------- Enlaces a otros test ---------- */
.pt-otros { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.pt-otros a { display: block; text-decoration: none; background: var(--l-card); border: 1px solid var(--l-border); border-radius: 14px; padding: 16px 18px; box-shadow: var(--l-shadow); transition: transform .2s, box-shadow .2s; }
.pt-otros a:hover { transform: translateY(-3px); box-shadow: var(--l-shadow-h); }
.pt-otros b { display: block; color: var(--l-text); margin-bottom: 4px; }
.pt-otros span { color: var(--l-muted); font-size: .88rem; }

/* ---------- Pie más completo ---------- */
.pt-footer .l-footer-inner { grid-template-columns: 1.3fr repeat(3, 1fr); }
.pt-footer .legal a { display: inline; }

/* ---------- Móvil ---------- */
@media (max-width: 860px) {
  .pt-footer .l-footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .pt-footer .l-footer-inner { grid-template-columns: 1fr; }
  .pt-q { padding: 18px 16px 16px; }
  .pt-enun { font-size: 1.04rem; }
  .pt-opt { padding: 10px 12px; font-size: .95rem; }
  .pt-temas { grid-template-columns: 1fr; }
  .pt-sim { padding: 18px; }
  .pt-sim .l-btn { width: 100%; justify-content: center; }
  .pt-opos, .pt-planes, .pt-shots { grid-template-columns: 1fr; }
  .l-hero .cta-row .l-btn { width: 100%; justify-content: center; text-align: center; }
  .pt-big { font-size: 2.8rem; }
}

/* ---------- Anclas: que la barra fija no tape el destino ---------- */
section[id], .pt-q, .pt-result { scroll-margin-top: 84px; }

/* ---------- Modo oscuro (lo que landings.css no cubre) ---------- */
/* (Los botones primary/accent en oscuro ya los arregla landings.css desde el 10-oct-2026.) */
[data-theme="dark"] .pt-opt { background: #0d1117; }
[data-theme="dark"] .pt-opt.ok { background: var(--pt-ok-bg); }
[data-theme="dark"] .pt-opt.ko { background: var(--pt-ko-bg); }

@media (prefers-reduced-motion: reduce) {
  .pt-bar span, .pt-opt, .pt-otros a { transition: none; }
}
