/* ==========================================================================
   Clínica Paula Vega — Páginas interiores (landings, precios, servicios,
   equipo, perfiles, contacto, legales, gracias, 404)
   Hero navy como la home, bloques alternos blanco / gris frío, CTA visibles.
   Los componentes compartidos viven en components.css.
   ========================================================================== */

/* --- Hero de página interior (navy) --------------------------------------- */
.lp-hero {
  background: var(--navy);
  color: var(--on-navy);
  padding-block: 8px clamp(48px, 6vw, 80px);
}
.lp-hero :focus-visible { outline-color: var(--teal-on-navy); }
.lp-hero__grid {
  display: grid; gap: 40px var(--col-gap);
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  margin-top: clamp(16px, 2.5vw, 32px);
}
.lp-hero__copy, .lp-hero__media { grid-column: span 12; }
@media (min-width: 1024px) {
  .lp-hero__copy { grid-column: 1 / span 7; }
  .lp-hero__media { grid-column: 8 / span 5; }
  .lp-hero--text .lp-hero__copy { grid-column: 1 / span 9; }
}
.lp-hero__copy { display: grid; gap: 24px; align-content: start; }
.lp-hero h1 { max-width: 20ch; color: var(--white); }
.lp-hero__lead { font-size: var(--fs-lg); line-height: 1.55; color: var(--on-navy-2); max-width: 46ch; }
.lp-hero__lead a { color: var(--white); }
.lp-hero__actions { display: grid; gap: 14px; }
.lp-hero__actions .btn-row .btn { flex: 1 1 14rem; }
@media (min-width: 560px) { .lp-hero__actions .btn-row .btn { flex: 0 1 auto; } }
.lp-hero__alt { font-size: var(--fs-sm); color: var(--on-navy-2); }
.lp-hero__alt a { color: var(--white); font-weight: 600; }
.lp-hero__media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--r-md); background: var(--navy-700);
}
@media (min-width: 1024px) { .lp-hero__media img { aspect-ratio: 5 / 5.6; } }
.lp-hero__media--portrait img { object-position: center 20%; }

/* Datos rápidos: precio, duración, quién atiende (celdas con divisores). */
.lp-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); column-gap: 24px;
}
.lp-facts div { padding-top: 14px; border-top: 1px solid var(--on-navy-line); }
.lp-facts dt { font-size: var(--fs-xs); color: var(--on-navy-2); margin-bottom: 4px; }
.lp-facts dd { color: var(--white); font-weight: 700; font-size: var(--fs-lg); line-height: 1.25; font-variant-numeric: tabular-nums; }

/* Resumen (respuesta directa): panel en el borde inferior del hero. */
.lp-summary {
  display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; align-items: baseline;
  margin-top: clamp(32px, 4vw, 56px);
  padding: 20px clamp(20px, 2.5vw, 28px);
  background: var(--navy-700); border-radius: var(--r-md);
}
.lp-summary p { font-size: var(--fs-base); color: var(--white); max-width: 75ch; }
.lp-summary .lp-summary__label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal-on-navy); }
@media (max-width: 639px) { .lp-summary { grid-template-columns: 1fr; } }

/* --- Tarjetas de "qué tratamos" ------------------------------------------- */
.lp-cards { display: grid; gap: var(--col-gap); }
@media (min-width: 640px) { .lp-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .lp-cards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) { .lp-cards--2 { grid-template-columns: repeat(2, 1fr); max-width: 56rem; } }
.lp-card {
  display: flex; flex-direction: column; gap: 10px; height: 100%;
  padding: 24px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.lp-card h3 { font-size: var(--fs-h4); }
.lp-card p { color: var(--ink-2); font-size: var(--fs-sm); }

/* "Qué tratamos": filas con filete navy, sin caja (no compiten con las
   tarjetas enlazadas, que sí son clicables). */
.lp-cards--ruled { row-gap: 8px; }
.lp-cards--ruled .lp-card {
  padding: 20px 0 16px; background: none; border: 0; border-top: 2px solid var(--navy); border-radius: 0;
}
.lp-cards--ruled .lp-card p { font-size: var(--fs-base); }

/* Tarjeta enlazada: toda la tarjeta es clicable vía el enlace del título. */
.lp-card--link { position: relative; transition: border-color var(--t-hover) ease, box-shadow var(--t-hover) ease, transform var(--t-hover) var(--ease-out); }
.lp-card--link h3 a { color: var(--ink); text-decoration: none; }
.lp-card--link h3 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.lp-card--link .arrow-link { min-height: 0; margin-top: auto; padding-top: 6px; font-size: var(--fs-sm); }
.lp-card--link:focus-within { box-shadow: 0 0 0 3px var(--teal); }
.lp-card--link h3 a:focus-visible { outline: none; }
.lp-card--link:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) {
  .lp-card--link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-3px); }
  .lp-card--link:hover h3 a { color: var(--teal-ink); }
  .lp-card--link:hover .arrow-link .icon { transform: translateX(3px); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
  .lp-card--link:hover { transform: none; }
}

/* --- Cuerpo: prosa + columna lateral -------------------------------------- */
.lp-body { display: grid; gap: var(--s-7); align-items: start; }
@media (min-width: 1024px) {
  .lp-body { grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--s-8); }
  .lp-aside { position: sticky; top: calc(var(--header-h) + 24px); }
}
.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 { margin-top: var(--s-7); font-size: clamp(1.5rem, 1.3rem + 0.9vw, 2rem); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--s-6); font-size: var(--fs-h4); }
.prose h2 + *, .prose h3 + * { margin-top: var(--s-3); }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25rem; display: grid; gap: var(--s-2); list-style: revert; }
.prose li::marker { color: var(--teal-ink); }
.prose figure { margin-block: var(--s-6); }
.prose figure img { width: 100%; border-radius: var(--r-md); aspect-ratio: 16 / 10; object-fit: cover; }
.prose figcaption { margin-top: var(--s-2); }

.lp-aside { display: grid; gap: 16px; }
.aside-card {
  display: grid; gap: 12px; padding: 24px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
}
.aside-card h2 { font-size: var(--fs-h4); }
.aside-card .btn { width: 100%; }
.aside-card .note { font-size: var(--fs-sm); }
.aside-card .note a { font-weight: 600; }
.aside-card img { border-radius: var(--r-sm); }
.aside-card--cta { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.aside-card--cta h2 { color: var(--white); }
.aside-card--cta .note { color: var(--on-navy-2); }
.aside-card--cta .btn--whatsapp {
  --btn-bg: transparent; --btn-bg-hover: rgb(255 255 255 / 0.08);
  --btn-fg: var(--white); --btn-border: rgb(255 255 255 / 0.55); --btn-border-hover: var(--white);
}
.aside-card--cta :focus-visible { outline-color: var(--teal-on-navy); }
/* En móvil la barra fija ya ofrece Llamar/WhatsApp: no duplicar. */
@media (max-width: 1023px) { .aside-card--cta { display: none; } }

.aside-prices { display: grid; font-size: var(--fs-sm); }
.aside-prices li {
  display: flex; justify-content: space-between; gap: 12px;
  padding-block: 10px; border-bottom: 1px solid var(--line); color: var(--ink-2);
}
.aside-prices li:last-child { border-bottom: 0; }
.aside-prices strong { color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.aside-person { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.aside-person img { width: 64px; height: 80px; object-fit: cover; object-position: top; border-radius: var(--r-sm); background: var(--gray-50); }
.aside-person p { font-size: var(--fs-sm); color: var(--ink-2); }
.aside-person strong { display: block; color: var(--ink); font-size: var(--fs-base); }
.aside-person a { font-weight: 650; }

/* --- Relacionados: blog + tratamientos hermanos --------------------------- */
.lp-related { display: grid; gap: var(--s-7); }
@media (min-width: 900px) { .lp-related { grid-template-columns: 1fr 1fr; gap: var(--s-8); } }
.lp-related h2 { font-size: var(--fs-h3); margin-bottom: 16px; }

/* --- Precios (página) ------------------------------------------------------ */
.section > .shell > .price-block + .price-block { margin-top: var(--s-7); }
.section > .shell > .price-block { background: none; border: 0; overflow: visible; }
.section > .shell > .price-block > h3 { margin-bottom: 6px; }
.section > .shell > .price-block > .note { margin-bottom: 18px; }
.section > .shell > .price-block > .price-table { border: 1px solid var(--line); border-radius: var(--r-md); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.pricing .section-head { align-content: start; }
@media (min-width: 1024px) {
  .section > .shell > .pricing > .section-head { grid-column: 1 / span 5; }
  .section > .shell > .pricing > .price-table { grid-column: 7 / span 6; grid-row: 1 / span 2; }
  .section > .shell > .pricing { grid-template-rows: auto 1fr; }
  .section > .shell > .pricing > .note { grid-column: 1 / span 5; align-self: start; }
}
.pricing > .price-table { border: 1px solid var(--line); border-radius: var(--r-md); border-collapse: separate; border-spacing: 0; overflow: hidden; }

/* --- Equipo y fichas ------------------------------------------------------- */
.profile { display: grid; gap: var(--s-6); align-items: start; }
@media (min-width: 900px) {
  .profile { grid-template-columns: 18rem minmax(0, 1fr); gap: var(--s-8); }
  .profile__card { position: sticky; top: calc(var(--header-h) + 24px); }
}
.profile__card { display: grid; gap: 16px; }
.profile__card img { width: 100%; max-width: 18rem; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: var(--r-md); background: var(--gray-50); }
.timeline, .prose .timeline { display: grid; gap: 18px; border-left: 2px solid var(--line); list-style: none; padding-left: 0; }
.timeline li { position: relative; padding-left: 24px; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 0.5em; width: 12px; height: 12px; background: var(--white); border: 2px solid var(--teal); border-radius: 2px; }
.timeline strong { display: block; color: var(--ink); }
.timeline span { color: var(--ink-2); }

/* --- Contacto ------------------------------------------------------------- */
.contact { row-gap: var(--s-7); align-items: start; }
@media (min-width: 1024px) {
  .contact.visit > .visit__info { grid-column: 1 / span 5; }
  .contact.visit > .form { grid-column: 7 / span 6; }
}
.form {
  display: grid; gap: 18px;
  padding: clamp(20px, 3vw, 36px);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
}
.form h2 { font-size: var(--fs-h3); }
.field { display: grid; gap: 6px; }
.field-row { display: grid; gap: 18px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label,
.field legend { font-weight: 650; font-size: var(--fs-sm); }
.field .opt { font-weight: 400; color: var(--ink-3); }
.field input,
.field select,
.field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  background: var(--white); color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  font: inherit; font-size: 1rem; /* 16px+: iOS no hace zoom al enfocar */
  transition: border-color var(--t-hover) ease, box-shadow var(--t-hover) ease;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none; border-color: var(--teal-ink); box-shadow: 0 0 0 3px var(--teal-tint);
}
.field [aria-invalid='true'] { border-color: var(--error); }
.field__error { font-size: var(--fs-sm); color: var(--error); font-weight: 600; }
.field__error:empty { display: none; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-size: var(--fs-sm); color: var(--ink-2); }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--teal-ink); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.choices legend { margin-bottom: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px;
  background: var(--white); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 600;
  transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.choice input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.choice input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.choice input:active + span { transform: scale(0.97); }
/* Trampa para bots: fuera de pantalla, nunca display:none. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; }
.form .btn[aria-busy='true'] { opacity: 0.75; cursor: progress; }
.form__note { font-size: var(--fs-xs); color: var(--ink-3); }

/* --- Legales -------------------------------------------------------------- */
.legal { max-width: 68ch; }
.legal h2 { font-size: var(--fs-h3); margin-top: var(--s-7); }
.legal h3 { font-size: var(--fs-h4); margin-top: var(--s-6); }
.legal p, .legal li { color: var(--ink-2); font-size: 1rem; }
.legal > * + * { margin-top: var(--s-4); }
.legal h2 + *, .legal h3 + * { margin-top: var(--s-3); }
.legal ul { padding-left: 1.25rem; display: grid; gap: var(--s-2); list-style: revert; }
.legal a { overflow-wrap: anywhere; }
.legal table { font-size: var(--fs-sm); background: var(--white); border: 1px solid var(--line); }
.legal th, .legal td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal thead th { background: var(--navy); color: var(--white); }
.table-scroll { overflow-x: auto; }

/* --- 404 y gracias -------------------------------------------------------- */
.lp-center { display: grid; gap: 24px; justify-items: start; max-width: 44rem; }
.lp-center .links { width: 100%; }
.lp-center h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
.lp-center h1::before { content: ""; display: block; width: 40px; height: 3px; background: var(--teal); margin-bottom: 20px; }
.check-mark {
  display: grid; place-items: center; width: 56px; height: 56px;
  border-radius: var(--r-md); background: var(--navy); color: var(--white);
}
.check-mark svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .check-mark svg path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw-check 420ms var(--ease-out) 160ms forwards; }
}
@keyframes draw-check { to { stroke-dashoffset: 0; } }

/* --- Especialidades agrupadas (hub de fisioterapia) ----------------------- */
.spec-groups { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .spec-groups { grid-template-columns: 1.25fr 1fr 1fr; gap: var(--col-gap); align-items: start; } }
.spec-group { padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); }
.spec-group h3 { font-size: var(--fs-h4); margin-bottom: 12px; }
.spec-group .links { border-top: 0; }
.spec-group .links li:last-child { border-bottom: 0; }

/* --- Cita destacada (una sola reseña) ------------------------------------- */
.lp-quote {
  display: grid; gap: 16px; align-content: center;
  padding: clamp(24px, 3vw, 40px);
  background: var(--navy); color: var(--on-navy); border-radius: var(--r-md);
}
.lp-quote blockquote p { font-size: var(--fs-h4); line-height: var(--lh-snug); font-weight: 500; }
.lp-quote figcaption { font-size: var(--fs-sm); color: var(--on-navy-2); }
.lp-quote cite { font-style: normal; font-weight: 700; color: var(--white); }
.lp-quote a { color: var(--white); }
.lp-quote :focus-visible { outline-color: var(--teal-on-navy); }
