/* ==========================================================================
   Clínica Paula Vega — Componentes compartidos
   btn · text-link · rating · links · person · price · price-table · steps ·
   review · faq · map · visit · post · cta-band · info-list
   ========================================================================== */

/* --- Botones -------------------------------------------------------------
   Jerarquía: primary (teal oscuro, 1 por bloque) > navy > outline > texto.
   WhatsApp va siempre como outline (blanco sobre claro, línea sobre navy).
   Pulsado: scale(.97) 140 ms. Hover solo con puntero fino.               */
.btn {
  --btn-bg: var(--cta);
  --btn-bg-hover: var(--cta-hover);
  --btn-fg: var(--white);
  --btn-border: transparent;
  --btn-border-hover: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1.5px solid var(--btn-border); border-radius: var(--r-sm);
  font-family: var(--font); font-size: var(--fs-base); font-weight: 650; line-height: 1.1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  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);
}
.btn:active { transform: scale(0.97); }
.btn .icon { width: 1.15em; height: 1.15em; transition: transform var(--t-hover) var(--ease-out); }
.btn--sm { min-height: 44px; padding: 9px 18px; font-size: var(--fs-sm); }
.btn--lg { min-height: 54px; padding: 14px 26px; font-size: var(--fs-lg); }

.btn--navy { --btn-bg: var(--navy); --btn-bg-hover: var(--navy-900); }
.btn--outline,
.btn--whatsapp,
.btn--ghost {
  --btn-bg: var(--white); --btn-bg-hover: var(--white);
  --btn-fg: var(--ink); --btn-border: var(--line-strong); --btn-border-hover: var(--ink);
}
.btn--light { --btn-bg: var(--white); --btn-bg-hover: var(--gray-50); --btn-fg: var(--ink); }
.btn--outline-light,
:is(.hero, .lp-hero, .section--night, .cta-final, .cta-strip, .blog-hero) .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);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--btn-bg-hover); border-color: var(--btn-border-hover); }
  .btn:hover > .icon:last-child:not(:first-child) { transform: translateX(3px); }
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Enlace de texto con flecha (subrayado corporativo). */
.text-link,
.arrow-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--teal-ink); font-weight: 650; text-decoration: none;
}
.text-link { border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.arrow-link { min-height: 44px; }
.text-link .icon,
.arrow-link .icon { width: 1.05em; height: 1.05em; transition: transform var(--t-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .text-link:hover { color: var(--ink); }
  .arrow-link:hover { text-decoration: underline; }
  .text-link:hover .icon,
  .arrow-link:hover .icon { transform: translateX(3px); }
}
.on-night-link { color: var(--white); font-weight: 700; }

/* --- Valoración ---------------------------------------------------------- */
.rating {
  display: inline-flex; min-height: 44px; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  font-size: var(--fs-sm); color: var(--ink-2); text-decoration: none;
}
.rating strong { color: var(--ink); font-size: var(--fs-lg); font-weight: 750; }
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars svg { width: 18px; height: 18px; fill: currentColor; }
@media (hover: hover) and (pointer: fine) { a.rating:hover span:last-child { text-decoration: underline; } }

/* --- Listas de enlaces con flecha (filas, no chips) ----------------------- */
.links,
.link-list { border-top: 1px solid var(--line); }
.links li,
.link-list li { border-bottom: 1px solid var(--line); }
.links a,
.link-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding-block: 10px;
  color: var(--ink); font-weight: 600; text-decoration: none;
}
.links .icon,
.link-list .icon { width: 16px; height: 16px; color: var(--teal-ink); transition: transform var(--t-hover) var(--ease-out); }
@media (min-width: 640px) {
  .link-list--2col { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
}
@media (hover: hover) and (pointer: fine) {
  .links a:hover,
  .link-list a:hover { color: var(--teal-ink); }
  .links a:hover .icon,
  .link-list a:hover .icon { transform: translateX(4px); }
}
.links--rich a { align-items: flex-start; padding-block: 14px; }
.links--rich span { display: grid; gap: 2px; }
.links--rich strong { font-weight: 650; }
.links--rich small { font-size: var(--fs-sm); font-weight: 400; color: var(--ink-2); line-height: 1.45; }
.links--rich .icon { margin-top: 5px; }
.links--blog a { font-weight: 500; }

/* --- Persona (equipo) ---------------------------------------------------- */
.person {
  display: grid; grid-template-columns: 112px 1fr; gap: 20px; align-items: start;
  padding-block: 32px; border-top: 1px solid var(--line);
}
.person:first-child { padding-top: 0; border-top: 0; }
@media (min-width: 640px) { .person { grid-template-columns: 168px 1fr; gap: 28px; } }
.person__photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top;
  border-radius: var(--r-md); background: var(--gray-50);
}
.person__body { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; min-width: 0; }
.person__role { color: var(--ink-2); margin-top: -6px; }
.person__body > p:not(.person__role) { color: var(--ink-2); font-size: var(--fs-sm); }
.creds { display: grid; gap: 8px; width: 100%; max-width: 420px; }
.creds div {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px;
  padding: 10px 14px; background: var(--gray-50); border-radius: var(--r-sm);
}
.creds dt { font-size: var(--fs-xs); color: var(--ink-2); align-self: center; }
.creds dd { font-weight: 700; font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }
.creds dd span { font-weight: 500; color: var(--ink-2); margin-left: 4px; }

/* Rejilla de fichas (landings, equipo): cada persona es una tarjeta. */
.team-grid { display: grid; gap: var(--col-gap); }
@media (min-width: 900px) { .team-grid { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.team-grid .person {
  padding: clamp(20px, 2.5vw, 32px); border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--white);
}

/* Sello de colegiación (fichas de perfil). */
.person__badges { display: grid; gap: 8px; }
.person__badge {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start;
  padding: 8px 12px; background: var(--gray-50);
  border-radius: var(--r-sm); color: var(--ink); font-size: var(--fs-sm); font-weight: 650;
}
.person__badge .icon { width: 18px; height: 18px; color: var(--teal-ink); }

/* --- Precios: tarjetas --------------------------------------------------- */
.price-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .price-grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 720px) { .price-grid--3 { grid-template-columns: repeat(3, 1fr); } }
.price {
  display: grid; gap: 4px; align-content: start;
  padding: 20px 22px 22px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.price__name { font-weight: 700; }
.price__meta { color: var(--ink-2); font-size: var(--fs-sm); }
.price__amount {
  font-size: clamp(1.875rem, 1.6rem + 1vw, 2.375rem); font-weight: 750; letter-spacing: -0.02em;
  line-height: 1.1; font-variant-numeric: tabular-nums; margin-block: 4px;
}
.price--featured { background: var(--teal-tint); border-color: var(--teal); }
.price__save {
  justify-self: start; margin-top: 8px; padding: 2px 8px;
  background: var(--navy); color: var(--white); border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 700;
}

/* --- Precios: tablas ----------------------------------------------------- */
.pricing {
  display: grid; gap: var(--col-gap);
  grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start;
}
.pricing > * { grid-column: span 12; }
.price-block {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.pricing .price-block { grid-column: span 12; }
@media (min-width: 1024px) { .pricing .price-block { grid-column: span 6; } }
.price-table { background: var(--white); }
.price-table caption:not(.sr-only) {
  text-align: left; caption-side: top;
  padding: 18px 24px; background: var(--navy); color: var(--white);
  font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.012em;
}
.price-table thead th {
  text-align: left; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3);
  padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--gray-50);
}
.price-table tbody th,
.price-table tbody td { padding: 16px 24px; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table tbody tr:last-child > * { border-bottom: 0; }
.price-table tbody th { text-align: left; font-weight: 600; }
.price-table tbody th span { display: block; margin-top: 2px; font-size: var(--fs-sm); font-weight: 400; color: var(--ink-2); }
.price-table tbody th a { color: var(--ink); text-underline-offset: 3px; }
.price-table td,
.price-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-table td { color: var(--ink-2); }
.price-table td strong,
.price-table tbody td.num { font-size: var(--fs-lg); font-weight: 700; color: var(--ink); }
.price-table--compact tbody th,
.price-table--compact tbody td { padding-block: 12px; }
.price-table--compact tbody td.num { font-size: var(--fs-base); }
.price-table .is-highlight { background: var(--teal-tint); }
@media (max-width: 479px) {
  .price-table caption:not(.sr-only),
  .price-table thead th,
  .price-table tbody th,
  .price-table tbody td { padding-inline: 16px; }
}
.pricing__foot,
.pricing__notes {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  margin-top: 28px; color: var(--ink-2);
}

/* --- Pasos numerados ------------------------------------------------------ */
.steps { display: grid; gap: 0; counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); } }
.steps > li { counter-increment: step; padding: 24px 0 28px; border-top: 2px solid var(--navy); }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-size: clamp(2.25rem, 1.8rem + 1.5vw, 3rem); font-weight: 750; line-height: 1;
  color: var(--teal-ink); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-bottom: 18px;
}
.steps h3, .steps h4 { margin-bottom: 10px; font-size: var(--fs-h3); }
.steps p { color: var(--ink-2); }

/* --- Reseñas -------------------------------------------------------------- */
.reviews { display: grid; gap: 0 var(--col-gap); }
@media (min-width: 768px) { .reviews { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .section .reviews:not(.reviews-wrap .reviews) { grid-template-columns: repeat(3, 1fr); } }
.reviews li { border-top: 1px solid var(--line); }
.review { padding: 24px 0 28px; }
.review blockquote p { font-size: var(--fs-base); line-height: 1.6; }
.review figcaption { margin-top: 14px; font-size: var(--fs-sm); color: var(--ink-3); }
.review cite { display: block; font-style: normal; font-weight: 700; color: var(--ink); }
.review__avatar { display: none; }
.reviews-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 32px;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.reviews-head .section-head { margin-bottom: 0; }

/* --- FAQ (details/summary nativo) --------------------------------------- */
.faq-layout,
.faq-wrap {
  display: grid; gap: 32px var(--col-gap);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.faq-layout > *,
.faq-wrap > * { grid-column: span 12; }
@media (min-width: 1024px) {
  .faq-layout > .section-head,
  .faq-wrap > .section-head { grid-column: 1 / span 4; margin-bottom: 0; align-content: start; }
  .faq-layout > .faq,
  .faq-wrap > .faq { grid-column: 5 / span 8; }
}
.faq { border-top: 2px solid var(--navy); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 64px; padding: 18px 0; cursor: pointer; list-style: none;
  font-size: var(--fs-lg); font-weight: 650; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq__icon { position: relative; flex: none; width: 28px; height: 28px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease; }
.faq__icon::before,
.faq__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px;
  background: var(--ink); translate: -50% -50%;
  transition: transform var(--t-menu) var(--ease-out), background-color var(--t-hover) ease;
}
.faq__icon::after { transform: rotate(90deg); }
.faq details[open] .faq__icon { background: var(--navy); border-color: var(--navy); }
.faq details[open] .faq__icon::before,
.faq details[open] .faq__icon::after { background: var(--white); }
.faq details[open] .faq__icon::after { transform: rotate(0deg); }
.faq__answer { padding: 0 48px 24px 0; color: var(--ink-2); max-width: 68ch; }
.faq__answer p + p { margin-top: 12px; }
.faq__answer a { color: var(--teal-ink); }
@media (hover: hover) and (pointer: fine) { .faq summary:hover { color: var(--teal-ink); } }
@media (prefers-reduced-motion: no-preference) {
  .faq details[open] .faq__answer { animation: faq-in 240ms var(--ease-out); }
}
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } }

/* --- Ubicación y mapa ----------------------------------------------------- */
.visit {
  display: grid; gap: 40px var(--col-gap);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.visit > * { grid-column: span 12; }
@media (min-width: 1024px) {
  .visit > .visit__info { grid-column: 1 / span 5; }
  .visit > .map { grid-column: 7 / span 6; }
}
.visit__list,
.visit__info dl { margin: 28px 0 32px; border-top: 1px solid var(--line); }
.visit__list > div,
.visit__info dl > div { display: grid; gap: 4px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) {
  .visit__list > div,
  .visit__info dl > div { grid-template-columns: 170px 1fr; }
}
.visit__info dt { font-size: var(--fs-sm); font-weight: 650; color: var(--ink-3); }
.visit__info dd a { font-weight: 650; }
.visit__phone { font-size: var(--fs-lg); font-weight: 700; text-decoration: none; color: var(--teal-ink); font-variant-numeric: tabular-nums; }
table.hours th { text-align: left; font-weight: 400; padding: 0 16px 4px 0; }
table.hours td { font-weight: 650; padding-bottom: 4px; font-variant-numeric: tabular-nums; }
dd.hours { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; }
dd.hours span:nth-child(even) { font-weight: 650; font-variant-numeric: tabular-nums; }
.transit { display: grid; gap: 8px; }
.transit li { display: flex; align-items: center; gap: 10px; }
.transit .icon { width: 20px; height: 20px; color: var(--teal-ink); }
.areas { display: flex; flex-wrap: wrap; gap: 6px; }
.areas li { padding: 4px 10px; background: var(--gray-50); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: var(--fs-sm); }

.map { position: relative; min-height: 360px; border-radius: var(--r-md); overflow: hidden; background: var(--navy); }
.map__placeholder {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center;
  gap: 14px; padding: 32px; text-align: center; color: var(--on-navy); background: var(--navy);
}
.map__pin { width: 44px; height: 44px; fill: var(--teal); }
.map__pin path { fill: var(--teal); stroke: none; }
.map__title { font-size: var(--fs-h3); font-weight: 700; }
.map__note, .map__placeholder .note { font-size: var(--fs-xs); color: var(--on-navy-2); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- Tarjeta de artículo -------------------------------------------------- */
.post {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  transition: border-color var(--t-hover) ease, box-shadow var(--t-hover) ease, transform var(--t-hover) var(--ease-out);
}
.post picture { display: block; overflow: hidden; }
.post img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 320ms var(--ease-out); }
.post__body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; }
.post__tag { font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--teal-ink); }
.post h2, .post h3 { font-size: var(--fs-h4); line-height: var(--lh-snug); }
.post h2 a, .post h3 a { color: var(--ink); text-decoration: none; }
.post h2 a::after, .post h3 a::after { content: ""; position: absolute; inset: 0; }
.post h2 a:focus-visible, .post h3 a:focus-visible { outline: none; }
.post:focus-within { box-shadow: 0 0 0 3px var(--teal); }
.post__meta { font-size: var(--fs-xs); color: var(--ink-3); }
.post__body > p:last-child { color: var(--ink-2); font-size: var(--fs-sm); }
@media (hover: hover) and (pointer: fine) {
  .post:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-3px); }
  .post:hover img { transform: scale(1.03); }
  .post:hover :is(h2, h3) a { color: var(--teal-ink); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
  .post:hover, .post:hover img { transform: none; }
}

/* --- Banda CTA navy (final de página) ------------------------------------- */
.cta-band {
  display: grid; gap: 28px; align-items: center;
}
@media (min-width: 900px) { .cta-band { grid-template-columns: minmax(0, 1fr) auto; gap: 48px; } }
.cta-band h2 { color: var(--white); max-width: 22ch; }
.cta-band .section-head > h2::before { background: var(--teal); }
.cta-band .lead { color: var(--on-navy-2); }
.cta-band .btn-row .btn { min-height: 54px; padding: 14px 26px; font-size: var(--fs-lg); }
.section--night :focus-visible { outline-color: var(--teal-on-navy); }

/* --- Lista informativa con icono ----------------------------------------- */
.info-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .info-list { grid-template-columns: 1fr 1fr; column-gap: var(--col-gap); } }
.info-list li {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  padding-block: 20px; border-bottom: 1px solid var(--line); color: var(--ink-2);
}
.info-list .icon { width: 24px; height: 24px; margin-top: 2px; color: var(--teal-ink); }
.info-list strong { display: block; color: var(--ink); margin-bottom: 2px; }
.visit__info > .btn-row { margin-top: 24px; }
.visit__info > .areas { margin-top: 24px; }
@media (max-width: 479px) {
  .price { padding: 16px; }
  .price__amount { font-size: 1.75rem; }
}

/* --- Fotos reales de la clínica (en color, sin duotono) -------------------- */
/* Galería: foto + pie, sin tarjetas. Móvil: la primera a lo ancho, el resto de dos en dos. */
.clinic-gallery { display: grid; gap: var(--col-gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.clinic-gallery > figure { display: grid; grid-template-rows: 1fr auto; gap: 10px; min-width: 0; }
.clinic-gallery picture { display: block; }
.clinic-gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-md); background: var(--gray-100); }
.clinic-gallery figcaption { font-size: var(--fs-sm); color: var(--ink-3); }
.clinic-gallery > figure:first-child { grid-column: 1 / -1; }
.clinic-gallery > figure:first-child img { aspect-ratio: 4 / 3; object-position: 50% 60%; }
@media (min-width: 768px) {
  .clinic-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .clinic-gallery > figure:first-child { grid-column: auto; }
  /* Escritorio: fotos cuadradas para que la galería acompañe sin dominar la sección. */
  .clinic-gallery img, .clinic-gallery > figure:first-child img { aspect-ratio: 1; object-position: 50% 62%; }
  /* Cinco fotos: la primera ocupa dos filas y el resto forma un 2 x 2. */
  .clinic-gallery--5 { grid-template-columns: 1.3fr 1fr 1fr; }
  .clinic-gallery--5 > figure:first-child { grid-row: span 2; }
  .clinic-gallery--5 > figure:first-child picture { position: relative; min-height: 0; }
  .clinic-gallery--5 > figure:first-child img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
}

/* Texto + foto lateral (precios, equipo). */
.media-split { display: grid; gap: var(--s-7); align-items: start; }
@media (min-width: 1024px) { .media-split { grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--s-8); } }
.media-split__photo { display: grid; gap: 10px; }
.media-split__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); background: var(--gray-100); }
@media (min-width: 1024px) { .media-split__photo img { aspect-ratio: 4 / 5; } }

/* Fotos de fachada y entrada en "Cómo llegar"; galería breve en la home. */
.visit > .clinic-gallery { margin-top: var(--s-7); }
.visit__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.visit__photos figure { display: grid; gap: 8px; align-content: start; }
.visit__photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-md); background: var(--gray-100); }
