/* ==========================================================================
   Recursos Worship — Precios de RW Titler (2026)
   Se carga después de css/styles.css y css/nav.css (mismo sistema que la home);
   aquí solo va lo propio de esta página. Prefijo tp-. Misma familia que
   precios-presenter.css (rp-). Todo plano: sin sombras ni glows.
   --------------------------------------------------------------------------
   1. Base de la página
   2. Hero (titular corto + facturación con ahorro calculado + aviso de prueba)
   3. Tarjetas de plan (Gratis, Básico, Profesional destacado, Director)
   4. Franja «Profesional y Director incluyen…»
   5. Qué incluye cada plan (mensaje clave)
   6. Tabla comparativa
   7. CTA final
   8. Responsive
   9. Movimiento reducido
   ========================================================================== */

/* 1. Base ------------------------------------------------------------------ */
.tp-page section[id] { scroll-margin-top: 96px; }
.tp-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tp-muted { color: var(--muted-2); }

/* Valores de la tabla */
.tp-v { display: inline-flex; align-items: center; gap: 8px; }
.tp-v sup, .tp-th-name sup { align-self: flex-start; margin-left: -6px; line-height: 1.2; }
.tp-yes { color: var(--accent-fg); }
.tp-no { color: var(--muted-2); }
.tp-no i { display: block; width: 12px; height: 1.6px; border-radius: 2px; background: currentColor; }
.tp-soft { color: var(--muted); }
.tp-page sup { font-size: 0.7em; line-height: 0; margin-left: 2px; }
.tp-page sup a { color: var(--accent-fg); font-weight: 600; }

/* Selector Mensual / Anual (radios en pastilla, como la página de precios general) */
.tp-seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--fill); }
.tp-seg button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; color: var(--muted); white-space: nowrap;
  transition: background-color var(--t-ui), color var(--t-ui);
}
.tp-seg button:hover { color: var(--ink); }
.tp-seg button[aria-checked="true"] { background: var(--panel); color: var(--ink); }
.tp-seg .chip { height: 22px; padding: 0 8px; font-size: 11.5px; }

/* 2. Hero ------------------------------------------------------------------ */
.tp-hero { min-height: 0; display: block; padding: 132px 0 clamp(40px, 4.5vw, 72px); }
.tp-hero-copy { gap: 22px; }
.tp-hero .hero-title { max-width: 19ch; }
.tp-hero .hero-sub { max-width: 56ch; }
.tp-badge { gap: 9px; padding-left: 6px; transition: box-shadow var(--t-ui); }
.tp-badge:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.tp-badge img { width: 24px; height: 24px; flex: none; }
.tp-billbox { display: grid; justify-items: center; gap: 12px; margin-top: 4px; }
/* El texto del ahorro cambia de largo: alto mínimo de dos líneas para que nada salte */
.tp-saving { max-width: 60ch; min-height: 2.9em; font-size: 14.5px; line-height: 1.45; color: var(--muted); font-variant-numeric: tabular-nums; text-wrap: balance; }
.tp-saving b { color: var(--ink); font-weight: 600; }
.tp-saving.is-swap { animation: tpSwap 0.45s var(--ease-quint); }
/* Aviso de la prueba (el mismo texto que la tabla en vivo, bajo el interruptor) */
.tp-trialnote { display: inline-flex; align-items: flex-start; gap: 8px; max-width: 60ch; padding: 9px 14px 9px 11px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; font-weight: 560; line-height: 1.4; text-align: left; }
.tp-trialnote .ico { width: 17px; height: 17px; margin-top: 1px; }
.tp-back { display: inline; text-align: center; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.tp-back .arrow { display: inline-block; vertical-align: -0.15em; margin-left: 4px; }
.tp-back:hover { color: var(--ink); }
@keyframes tpSwap { from { opacity: 0; filter: blur(5px); transform: translateY(4px); } to { opacity: 1; filter: none; transform: none; } }

/* 3. Tarjetas de plan ------------------------------------------------------ */
/* Filas compartidas (subgrid): cabecera, precio, texto, lista, «no incluye» y botón quedan
   alineados de una tarjeta a otra aunque el contenido tenga distinto largo */
.tp-plans {
  width: min(100% - 32px, 1600px);
  margin: clamp(40px, 4.5vw, 64px) auto 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(6, auto);
  gap: 0 clamp(12px, 1.1vw, 16px);
  text-align: left;
}
.tp-plan { position: relative; display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 18px; padding: clamp(22px, 1.9vw, 30px); border-radius: var(--r-xl); background: var(--surface); }
.tp-plan.is-free { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.tp-plan-head { display: grid; gap: 12px; justify-items: start; }
.tp-plan-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; width: 100%; }
.tp-plan-name { font-size: clamp(21px, 1.6vw, 25px); }
.tp-trialchip { height: 24px; padding: 0 9px; font-size: 12px; background: var(--accent-soft); color: var(--accent-ink); }
/* Etiqueta centrada sobre el borde superior (no empuja el contenido) */
.tp-plan-chip { position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%); background: var(--accent); color: #fff; }

.tp-tag { display: inline-flex; align-items: center; gap: 9px; min-height: 34px; padding: 4px 12px 4px 5px; border-radius: 999px; background: var(--panel); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tp-tag.is-solo { background: var(--accent-soft); color: var(--accent-ink); }
.tp-logos { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.tp-logos img { width: 20px; height: 20px; padding: 1px; }

.tp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.tp-price s { font-size: 17px; font-weight: 500; color: var(--muted-2); }
.tp-price s:empty { display: none; }
.tp-price strong { font-size: clamp(40px, 3.3vw, 52px); font-weight: 650; line-height: 1; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.tp-price span { font-size: 15px; color: var(--muted); }
.tp-price.is-swap s, .tp-price.is-swap strong, .tp-save.is-swap { animation: tpSwap 0.45s var(--ease-quint); }
.tp-billnote { margin-top: 10px; font-size: 13.5px; line-height: 1.45; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Ahorro calculado: misma altura en mensual y anual para que la tarjeta no salte */
.tp-save { margin-top: 6px; min-height: 2.9em; font-size: 13.5px; line-height: 1.45; font-weight: 560; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.tp-save.is-empty { visibility: hidden; }
.tp-plan-copy { color: var(--muted); font-size: 15.5px; line-height: 1.45; }
.tp-plan .list-label { margin-bottom: 12px; }
.tp-feats { display: grid; gap: 9px; }
.tp-feats li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.tp-feats .ico { width: 18px; height: 18px; margin-top: 1px; color: var(--accent-fg); }
.tp-feats b { font-weight: 600; color: var(--ink); }
.tp-out { display: flex; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.tp-out b { color: var(--ink-2); font-weight: 600; }
.tp-plan-cta { display: grid; gap: 12px; justify-items: center; align-self: end; padding-top: 4px; }
.tp-plan-cta .btn { width: 100%; }
.tp-details { font-size: 14px; font-weight: 600; color: var(--muted); }
a.tp-details:hover { color: var(--ink); }

/* Plan destacado: banda morada profunda (misma que el CTA final) */
.tp-plan.is-featured { background: var(--accent-deep); color: #fff; }
.tp-plan.is-featured .tp-tag { background: rgba(255, 255, 255, 0.1); color: #fff; }
.tp-plan.is-featured .tp-trialchip { background: rgba(255, 255, 255, 0.12); color: #fff; }
.tp-plan.is-featured .tp-price span, .tp-plan.is-featured .tp-billnote, .tp-plan.is-featured .tp-plan-copy, .tp-plan.is-featured .tp-out, .tp-plan.is-featured .tp-details { color: rgba(255, 255, 255, 0.72); }
.tp-plan.is-featured .tp-out b, .tp-plan.is-featured .list-label, .tp-plan.is-featured .tp-feats li, .tp-plan.is-featured .tp-feats b, .tp-plan.is-featured a.tp-details:hover { color: #fff; }
.tp-plan.is-featured .tp-price s { color: rgba(255, 255, 255, 0.5); }
.tp-plan.is-featured .tp-feats .ico { color: #c4b5fd; }
.tp-plan.is-featured .tp-save { color: #c4b5fd; }
.tp-plan.is-featured sup a { color: #c4b5fd; }
.tp-plan.is-featured .tp-out { border-top-color: rgba(255, 255, 255, 0.16); }
:root[data-theme="dark"] .tp-plan.is-featured { background: #24104f; }

/* 4. Franja (como «Funciona con» de la home) ------------------------------ */
.tp-band { padding-inline: var(--gutter); padding-bottom: clamp(48px, 5vw, 80px); }
.tp-band .works-list img { width: 22px; height: 22px; }

/* 5. Qué incluye cada plan -------------------------------------------------- */
.tp-key .head { margin-bottom: clamp(32px, 4vw, 56px); }
.tp-key .head-copy { max-width: 980px; }
.tp-key-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.2vw, 18px); }
.tp-kcard { display: flex; flex-direction: column; gap: 20px; padding: clamp(22px, 2.4vw, 36px); border-radius: var(--r-xl); background: var(--surface); }
.tp-khead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tp-khead > img { width: 40px; height: 40px; flex: none; }
.tp-khead .tp-logos img { width: 30px; height: 30px; padding: 0; }
.tp-khead .tp-logos { gap: 4px; }
.tp-khead h3 { display: grid; gap: 2px; min-width: 0; font-size: clamp(20px, 1.6vw, 24px); font-weight: 620; letter-spacing: -0.02em; line-height: 1.15; }
.tp-khead h3 small { font-size: 12.5px; font-weight: 560; letter-spacing: 0; color: var(--muted); }
.tp-kprice { margin-left: auto; display: flex; align-items: baseline; gap: 5px; }
.tp-kprice small { font-size: 13px; color: var(--muted); }
.tp-kprice strong { font-size: 28px; font-weight: 650; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.tp-kprice span { font-size: 14px; color: var(--muted); }

.tp-prod { display: grid; }
.tp-prod li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line-2); }
.tp-prod li:last-child { border-bottom: 1px solid var(--line-2); }
.tp-prod img { width: 28px; height: 28px; }
.tp-prod-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.tp-prod-val { display: inline-flex; align-items: center; gap: 8px; justify-self: end; text-align: right; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tp-prod-val i { display: block; width: 12px; height: 1.6px; border-radius: 2px; background: currentColor; }
.tp-prod li.is-off img { filter: grayscale(1); opacity: 0.35; }
:root[data-theme="dark"] .tp-prod li.is-off img { filter: grayscale(1) brightness(2.2); opacity: 0.4; }
.tp-prod li.is-off .tp-prod-name, .tp-prod li.is-off .tp-prod-val { color: var(--muted-2); }
.tp-prod li.is-soft .tp-prod-val { color: var(--muted); }
.tp-knote { font-size: 14.5px; line-height: 1.5; color: var(--muted); margin-top: auto; }
.tp-knote b { color: var(--ink); font-weight: 600; }

.tp-kcard.is-featured { background: var(--accent-deep); color: #fff; }
:root[data-theme="dark"] .tp-kcard.is-featured { background: #24104f; }
.tp-kcard.is-featured .tp-khead h3 small, .tp-kcard.is-featured .tp-kprice small, .tp-kcard.is-featured .tp-kprice span, .tp-kcard.is-featured .tp-knote { color: rgba(255, 255, 255, 0.72); }
.tp-kcard.is-featured .tp-prod li { border-color: rgba(255, 255, 255, 0.16); }
.tp-kcard.is-featured .tp-prod-name { color: #fff; }
.tp-kcard.is-featured .tp-prod-val { color: rgba(255, 255, 255, 0.86); }

/* «¿Necesitas RW Titler y RW Presenter?» */
.tp-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-top: clamp(14px, 1.4vw, 22px); padding: clamp(22px, 2.4vw, 34px); border-radius: var(--r-xl); background: var(--accent-soft); }
.tp-more-copy { display: grid; gap: 6px; max-width: 70ch; }
.tp-more h3 { font-size: clamp(20px, 1.6vw, 24px); font-weight: 620; letter-spacing: -0.02em; color: var(--ink); }
.tp-more p { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* 6. Tabla comparativa ----------------------------------------------------- */
.tp-full { padding-block: var(--space-md) 0; }
/* Tabla más ancha que el resto (pedido): misma medida que las tarjetas del hero */
.tp-full > .w-base { width: min(100% - 32px, 1600px); }
.tp-table-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px 40px; margin-bottom: clamp(28px, 3vw, 44px); }
.tp-table-head .head-copy { display: grid; gap: 14px; max-width: 640px; }
/* relative: los textos .tp-sr (absolutos) quedan dentro del contenedor que se desliza en móvil;
   sin esto se salen del recorte y ensanchan el documento */
.tp-table-wrap { position: relative; }
.tp-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 15px; }
.tp-table col.c-label { width: 32%; }
.tp-table thead th {
  position: sticky; top: 78px; z-index: 2;
  padding: 16px 14px 18px; text-align: left; vertical-align: bottom;
  background: var(--bg); border-bottom: 1px solid var(--line-2);
}
.tp-th { display: grid; gap: 6px; justify-items: start; }
.tp-th-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 16px; font-weight: 620; letter-spacing: -0.015em; color: var(--ink); }
.tp-th-name .chip { height: 22px; padding: 0 8px; font-size: 11px; }
.tp-th-price { font-size: 14px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.tp-th-price b { color: var(--ink); font-weight: 600; }
.tp-table tbody th, .tp-table tbody td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; line-height: 1.4; }
.tp-table tbody th { padding-left: 0; font-weight: 500; color: var(--ink-2); overflow-wrap: break-word; hyphens: auto; }
.tp-table tbody td { color: var(--ink); }
.tp-table tbody td .tp-yes .ico { width: 20px; height: 20px; }
.tp-table tbody td .tp-no i { margin-top: 0.7em; }
/* Columna Profesional apenas teñida (es el plan destacado) */
.tp-table .c-pro { background: var(--accent-soft); }
.tp-table thead th.c-pro { background: var(--accent-soft); }
:root[data-theme="dark"] .tp-table .c-pro, :root[data-theme="dark"] .tp-table thead th.c-pro { background: #1d1530; }
.tp-group th { padding: 36px 0 12px !important; border-bottom: 1px solid var(--line-2) !important; background: var(--bg); }
.tp-group-name { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 620; letter-spacing: -0.02em; color: var(--ink); }
.tp-group-name img { width: 26px; height: 26px; }
.tp-group-name .ico { color: var(--accent-fg); }
.tp-table tbody tr:first-child.tp-group th { padding-top: 20px !important; }
.tp-row-ico { display: inline-flex; align-items: center; gap: 10px; }
.tp-row-ico img { width: 20px; height: 20px; }
.tp-table tfoot td, .tp-table tfoot th { padding: 22px 14px 0; vertical-align: top; background: transparent; }
.tp-table tfoot .btn { width: 100%; padding: 0 12px; }
.tp-swipe { display: none; }
.tp-notes { display: grid; gap: 6px; margin-top: 28px; font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 90ch; }
.tp-notes sup { color: var(--accent-fg); margin-right: 4px; margin-left: 0; }

/* 7. CTA final ------------------------------------------------------------- */
.tp-cta .cta-copy p { max-width: 44ch; }
.tp-cta-back { color: rgba(255, 255, 255, 0.72); font-size: 15px; }
.tp-cta-back:hover { color: #fff; }
.tp-arrow-back { margin-right: 2px; }
.tp-cta-back:hover .tp-arrow-back { transform: translateX(-3px); }

/* 8. Responsive ------------------------------------------------------------ */
@media (max-width: 1200px) {
  .tp-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(12, auto); width: min(100% - 32px, 1100px); }
  .tp-plan:nth-child(n+3) { margin-top: 32px; }
}
@media (max-width: 900px) {
  .tp-hero { padding-top: 112px; }
  .tp-key-grid { grid-template-columns: 1fr; }
  .tp-table-head { align-items: flex-start; }
}
/* En móvil la tabla se desliza de lado con la columna de funciones fija */
@media (max-width: 760px) {
  .tp-plans { grid-template-columns: 1fr; grid-template-rows: none; width: min(100% - 2 * var(--gutter), 520px); gap: 32px; }
  .tp-plan { display: flex; flex-direction: column; grid-row: auto; gap: 18px; }
  .tp-plan:nth-child(n+3) { margin-top: 0; }
  .tp-plan-cta { margin-top: auto; align-self: stretch; }
  .tp-save.is-empty { display: none; }
  .tp-table-wrap { overflow-x: auto; overscroll-behavior-x: contain; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .tp-table-wrap::-webkit-scrollbar { display: none; }
  .tp-table { min-width: 620px; font-size: 13.5px; }
  .tp-table col.c-label { width: 150px; }
  .tp-table thead th { position: static; top: auto; padding: 12px 10px 14px; }
  .tp-table tbody th, .tp-table tbody td { padding: 11px 10px; }
  .tp-table tbody th, .tp-table thead th:first-child, .tp-table tfoot th { position: sticky; top: auto; left: 0; z-index: 1; background: var(--bg); }
  .tp-table tbody th { padding-left: 0; padding-right: 12px; box-shadow: inset -1px 0 0 var(--line); }
  .tp-group th { position: static !important; box-shadow: none !important; }
  .tp-group-name { position: sticky; left: 0; font-size: 16px; }
  .tp-th-name { font-size: 14.5px; }
  .tp-th-name .chip { display: none; }
  .tp-th-price { font-size: 12.5px; }
  .tp-table tbody td .tp-yes .ico { width: 18px; height: 18px; }
  .tp-table tfoot td { padding: 18px 6px 0; }
  .tp-table tfoot .btn { height: 40px; font-size: 13px; padding: 0 8px; }
  .tp-swipe { display: block; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
  .tp-swipe::before { content: "← "; }
  .tp-swipe::after { content: " →"; }
}
@media (max-width: 560px) {
  .tp-badge { font-size: 12.5px; }
  .tp-seg button { height: 40px; padding: 0 14px; }
  .tp-saving { font-size: 13.5px; }
  .tp-trialnote { font-size: 13.5px; }
  .tp-plan { padding: 24px 20px; }
  .tp-kcard { padding: 22px 18px; }
  .tp-kprice { margin-left: 0; width: 100%; }
  .tp-prod li { grid-template-columns: 26px minmax(0, 1fr); row-gap: 2px; }
  .tp-prod-val { grid-column: 2; justify-self: start; text-align: left; font-size: 13.5px; }
  .tp-more { padding: 22px 20px; }
  .tp-more-side, .tp-more-side .btn { width: 100%; }
  .tp-table-head .tp-seg { align-self: stretch; }
  .tp-table-head .tp-seg button { flex: 1 1 auto; justify-content: center; }
}

/* 9. Movimiento reducido --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .tp-price.is-swap s, .tp-price.is-swap strong, .tp-save.is-swap, .tp-saving.is-swap { animation: none !important; }
}
