/* ==========================================================================
   FisioLife Conil — hoja de estilos
   Paleta derivada del logotipo (verde oliva #8CA844 + tinta negra) y del
   entorno: cal blanca de Conil, arena de la Fontanilla, pinar del Atlántico.
   ========================================================================== */

:root {
  /* Color */
  --cal:        #FBFAF7;   /* cal blanca — fondo base */
  --cal-2:      #F2F0E8;   /* cal en sombra */
  --sand:       #E7DDC9;   /* arena de duna */
  --sand-soft:  #F4EEE2;
  --ink:        #0E1211;   /* tinta — texto principal */
  --ink-2:      #414A45;   /* texto secundario */
  --ink-3:      #6B746E;   /* texto terciario */
  --olive:      #8CA844;   /* verde de marca (extraído del logo) */
  --olive-deep: #5C7726;   /* verde profundo — enlaces y foco */
  --olive-tint: #EDF2DD;   /* verde muy claro — fondos suaves */
  --pine:       #14312F;   /* pinar/atlántico — secciones oscuras */
  --pine-2:     #1D423F;
  --line:       #DFDCD2;   /* filetes */
  --white:      #FFFFFF;
  --alert:      #A4442F;

  /* Tipografía */
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body:    "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Escala tipográfica (fluida) */
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1.0625rem;
  --fs-md:   clamp(1.125rem, 0.5vw + 1rem, 1.3125rem);
  --fs-lg:   clamp(1.375rem, 1vw + 1.1rem, 1.75rem);
  --fs-xl:   clamp(1.75rem, 2vw + 1.2rem, 2.5rem);
  --fs-2xl:  clamp(2.125rem, 3.4vw + 1.1rem, 3.5rem);
  --fs-3xl:  clamp(2.35rem, 4.1vw + 1rem, 4rem);

  /* Espacio */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  --radius:    14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(14, 18, 17, 0.05), 0 2px 8px rgba(14, 18, 17, 0.04);
  --shadow:    0 2px 6px rgba(14, 18, 17, 0.06), 0 12px 32px rgba(14, 18, 17, 0.07);
  --shadow-lg: 0 6px 14px rgba(14, 18, 17, 0.07), 0 28px 60px rgba(14, 18, 17, 0.10);

  --wrap: 1180px;
  --header-h: 74px;
}

/* --------------------------------------------------------------- Reset -- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--cal);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-base);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 0 0 var(--sp-4);
  text-wrap: balance;
}
h1 { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.032em; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); letter-spacing: -0.015em; }
h4 { font-size: var(--fs-md); letter-spacing: -0.01em; }

p { margin: 0 0 var(--sp-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--olive-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

strong { font-weight: 650; }

:focus-visible {
  outline: 3px solid var(--olive-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Salto al contenido (accesibilidad) */
.saltar {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ink);
  color: var(--cal);
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
}
.saltar:focus { left: 0; color: var(--cal); }

/* ------------------------------------------------------------- Layout -- */

.envoltorio {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.seccion { padding-block: clamp(3.5rem, 7vw, 6.5rem); position: relative; }
.seccion--compacta { padding-block: clamp(2.5rem, 5vw, 4rem); }
.seccion--cal2 { background: var(--cal-2); }
.seccion--arena { background: var(--sand-soft); }
.seccion--pino { background: var(--pine); color: var(--sand-soft); }
.seccion--pino h2, .seccion--pino h3 { color: var(--cal); }
.seccion--pino a { color: #C7DC8F; }
.seccion--pino a:hover { color: var(--white); }

.rejilla { display: grid; gap: var(--sp-5); }
.rejilla--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.rejilla--3 { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.rejilla--4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

/* --------------------------------------------------- Etiquetas / eyebrow -- */

.etiqueta {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive-deep);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-4);
}
.etiqueta::before {
  content: "";
  width: 26px;
  height: 3px;
  background: var(--olive);
  border-radius: 2px;
  flex: none;
}
.seccion--pino .etiqueta { color: #B9D179; }

.entradilla {
  font-size: var(--fs-md);
  color: var(--ink-2);
  max-width: 60ch;
  line-height: 1.55;
}
.seccion--pino .entradilla { color: #CBD8CC; }

.encabezado-seccion { max-width: 68ch; margin-bottom: var(--sp-7); }

/* -------------------------------------------------------------- Botones -- */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  font-family: var(--body);
  font-weight: 650;
  font-size: var(--fs-sm);
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.16s ease,
              border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}
.boton:hover { transform: translateY(-1.5px); }
.boton:active { transform: translateY(0); }

.boton--principal { background: var(--olive); color: #10160A; border-color: var(--olive); box-shadow: var(--shadow-sm); }
.boton--principal:hover { background: var(--olive-deep); border-color: var(--olive-deep); color: var(--white); }

.boton--tinta { background: var(--ink); color: var(--cal); border-color: var(--ink); }
.boton--tinta:hover { background: var(--pine); border-color: var(--pine); color: var(--white); }

.boton--linea { background: transparent; color: var(--ink); border-color: var(--line); }
.boton--linea:hover { border-color: var(--ink); background: var(--white); color: var(--ink); }

.boton--wasap { background: #1FA855; color: #FFF; border-color: #1FA855; }
.boton--wasap:hover { background: #16803F; border-color: #16803F; color: #FFF; }

.boton--grande { padding: 1rem 1.75rem; font-size: var(--fs-base); }
.boton--ancho { width: 100%; }

.grupo-botones { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* ------------------------------------------------------------ Cabecera -- */

.cabecera {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cabecera[data-desplazada="si"] { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(14,18,17,0.045); }

.cabecera__interior {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.marca { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); flex: none; }
.marca img { height: 34px; width: auto; }
.marca__texto { font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.03em; line-height: 1; }
.marca__texto span { color: var(--olive-deep); }
.marca__sub { display: block; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; margin-top: 3px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: var(--sp-1); }
.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 550;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--cal-2); }

.acciones-cabecera { display: flex; align-items: center; gap: var(--sp-2); flex: none; }

.abrir-menu {
  display: none;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  cursor: pointer;
}

/* Menú desplegable en móvil */
.menu-movil {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--cal);
  padding: var(--sp-4) 0 var(--sp-6);
}
.menu-movil[data-abierto="si"] { display: block; }
.menu-movil ul { list-style: none; margin: 0 0 var(--sp-4); padding: 0; }
.menu-movil a {
  display: block;
  padding: 0.7rem 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--line);
}

/* ---------------------------------------------------------------- Héroe -- */

.heroe {
  position: relative;
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.heroe::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--line);
}
.heroe__fondo {
  position: absolute;
  top: -12%;
  right: -8%;
  width: min(46vw, 560px);
  aspect-ratio: 1;
  background: radial-gradient(circle at 50% 50%, rgba(140,168,68,0.16), rgba(140,168,68,0) 68%);
  pointer-events: none;
  z-index: 0;
}
.heroe__interior {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.heroe h1 { margin-bottom: var(--sp-5); }
.heroe h1 em { font-style: normal; color: var(--olive-deep); }
.heroe__lead { font-size: var(--fs-md); color: var(--ink-2); max-width: 46ch; margin-bottom: var(--sp-6); line-height: 1.55; }

.sellos { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.sello { display: inline-flex; align-items: center; gap: 0.45rem; font-size: var(--fs-sm); color: var(--ink-2); font-weight: 550; }
.sello svg { flex: none; color: var(--olive-deep); }

/* Tarjeta lateral del héroe */
.tarjeta-datos {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow);
  position: relative;
}
.tarjeta-datos__marca {
  position: absolute;
  top: calc(-1 * var(--sp-6));
  right: var(--sp-5);
  width: 62px;
  opacity: 0.95;
}
.tarjeta-datos dl { margin: 0; display: grid; gap: var(--sp-4); }
.tarjeta-datos dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2px;
}
.tarjeta-datos dd { margin: 0; font-weight: 600; font-size: 0.975rem; line-height: 1.45; }
.tarjeta-datos dd a { color: var(--ink); text-decoration: none; }
.tarjeta-datos dd a:hover { color: var(--olive-deep); text-decoration: underline; }
.tarjeta-datos hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-5) 0; }

.estado-hoy { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 650; font-size: 0.925rem; }
.estado-hoy::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.estado-hoy[data-estado="abierto"] { color: #2C7A3F; }
.estado-hoy[data-estado="abierto"]::before { background: #2C7A3F; box-shadow: 0 0 0 3px rgba(44,122,63,0.16); }
.estado-hoy[data-estado="cerrado"] { color: var(--alert); }
.estado-hoy[data-estado="cerrado"]::before { background: var(--alert); box-shadow: 0 0 0 3px rgba(164,68,47,0.14); }

.valoracion { display: flex; align-items: center; gap: var(--sp-2); }
.valoracion__nota { font-family: var(--display); font-size: 1.65rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.estrellas { color: var(--olive); letter-spacing: 0.1em; font-size: 0.95rem; }

/* ------------------------------------------- Triaje "¿qué te duele?" ----- */

.triaje {
  margin-top: var(--sp-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.triaje__cabeza { padding: var(--sp-5) var(--sp-5) var(--sp-4); border-bottom: 1px solid var(--line); background: var(--olive-tint); }
.triaje__cabeza h2 { font-size: var(--fs-lg); margin-bottom: 0.35rem; }
.triaje__cabeza p { font-size: var(--fs-sm); color: var(--ink-2); margin: 0; }

.triaje__opciones { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-5); }
.ficha-triaje {
  border: 1.5px solid var(--line);
  background: var(--cal);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--ink-2);
}
.ficha-triaje:hover { border-color: var(--olive); color: var(--ink); background: var(--white); }
.ficha-triaje[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--cal); }

.triaje__respuesta { padding: 0 var(--sp-5) var(--sp-5); }
.triaje__panel {
  border-top: 1px dashed var(--line);
  padding-top: var(--sp-5);
  display: grid;
  gap: var(--sp-4);
}
.triaje__panel h3 { font-size: var(--fs-md); margin-bottom: 0.25rem; }
.triaje__panel p { font-size: 0.95rem; color: var(--ink-2); margin: 0; }
.triaje__panel ul { margin: 0; padding-left: 1.1rem; font-size: 0.95rem; color: var(--ink-2); }
.triaje__panel li { margin-bottom: 0.3rem; }
.triaje__vacio { font-size: 0.95rem; color: var(--ink-3); font-style: italic; }

/* ------------------------------------------------------------- Tarjetas -- */

.tarjeta {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.tarjeta--enlace:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--olive); }
.tarjeta h3 { margin: 0; }
.tarjeta h3 a { color: inherit; text-decoration: none; }
.tarjeta h3 a::after { content: ""; position: absolute; inset: 0; }
.tarjeta p { font-size: 0.95rem; color: var(--ink-2); margin: 0; }
.tarjeta__icono {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--olive-tint);
  color: var(--olive-deep);
  display: grid; place-items: center;
  flex: none;
}
.tarjeta__lista { list-style: none; margin: auto 0 0; padding: var(--sp-3) 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tarjeta__lista li { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); background: var(--cal-2); padding: 0.25rem 0.5rem; border-radius: 6px; }

/* ------------------------------------------------------------- Proceso -- */

.paso { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-4); align-items: start; }
.paso__num {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--olive);
  color: var(--olive-deep);
  display: grid; place-items: center;
  flex: none;
}
.seccion--pino .paso__num { border-color: #7E9B3C; color: #C7DC8F; }
.paso h3 { font-size: var(--fs-md); margin-bottom: 0.3rem; }
.paso p { font-size: 0.95rem; color: var(--ink-2); margin: 0; }
.seccion--pino .paso p { color: #B7C6B8; }

/* --------------------------------------------------------------- Tablas -- */

.tabla-envoltorio { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table.tabla { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px; }
table.tabla caption { text-align: left; padding: var(--sp-4) var(--sp-5); font-size: var(--fs-sm); color: var(--ink-3); border-bottom: 1px solid var(--line); }
table.tabla th, table.tabla td { padding: 0.85rem var(--sp-5); text-align: left; border-bottom: 1px solid var(--line); }
table.tabla thead th {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ink-3);
  font-weight: 500;
  background: var(--cal-2);
}
table.tabla tbody tr:last-child th, table.tabla tbody tr:last-child td { border-bottom: 0; }
table.tabla tbody tr:hover { background: var(--olive-tint); }
table.tabla th[scope="row"] { font-weight: 650; }
table.tabla th[scope="row"] a { color: var(--ink); text-decoration: none; }
table.tabla th[scope="row"] a:hover { color: var(--olive-deep); text-decoration: underline; }
.dato { font-family: var(--mono); font-size: 0.88rem; color: var(--ink-2); white-space: nowrap; }

/* ------------------------------------------------------------ Opiniones -- */

.opinion {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.opinion blockquote { margin: 0; font-size: 1.02rem; line-height: 1.55; color: var(--ink); }
.opinion figcaption { margin-top: auto; display: flex; align-items: center; gap: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--olive-tint); color: var(--olive-deep);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 0.95rem;
  flex: none;
}
.opinion__nombre { font-weight: 650; font-size: 0.925rem; line-height: 1.2; }
.opinion__fuente { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* ----------------------------------------------------------------- FAQ -- */

.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: var(--sp-5) 3rem var(--sp-5) 0;
  font-family: var(--display);
  font-weight: 650;
  font-size: var(--fs-md);
  letter-spacing: -0.012em;
  position: relative;
  transition: color 0.15s ease;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--olive-deep); }
.faq__item summary::after {
  content: "";
  position: absolute;
  right: 0.5rem; top: 50%;
  width: 13px; height: 13px;
  border-right: 2px solid var(--olive-deep);
  border-bottom: 2px solid var(--olive-deep);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.22s ease;
}
.faq__item[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq__respuesta { padding: 0 3rem var(--sp-5) 0; color: var(--ink-2); max-width: 72ch; }

/* --------------------------------------------------------------- Mapa --- */

.mapa {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cal-2);
  min-height: 340px;
  box-shadow: var(--shadow-sm);
}
.mapa iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* ------------------------------------------------------- Bloque de cita -- */

.cta-cita {
  background: var(--pine);
  color: var(--sand-soft);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 3.25rem);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta-cita::before {
  content: "";
  position: absolute;
  right: -40px; bottom: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140,168,68,0.28), rgba(140,168,68,0) 70%);
}
.cta-cita h2 { color: var(--cal); margin-bottom: var(--sp-3); }
.cta-cita p { color: #C3D2C4; margin-bottom: 0; }
.cta-cita__acciones { display: flex; flex-direction: column; gap: var(--sp-3); position: relative; z-index: 1; }

/* --------------------------------------------------------- Aviso / nota -- */

.nota {
  border-left: 3px solid var(--olive);
  background: var(--olive-tint);
  padding: var(--sp-4) var(--sp-5);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.nota strong { color: var(--ink); }

.aviso-editar {
  border: 1.5px dashed #C58B2E;
  background: #FDF6E7;
  color: #6B4A12;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.aviso-editar strong { color: #4A3208; }

/* -------------------------------------------------------------- Pie ----- */

.pie { background: var(--pine); color: #AEBFAF; padding-block: var(--sp-8) var(--sp-6); }
.pie a { color: #C7DC8F; text-decoration: none; }
.pie a:hover { color: var(--white); text-decoration: underline; }
.pie__rejilla { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: var(--sp-6); }
.pie h3 { font-size: 0.8rem; font-family: var(--mono); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #8FA391; margin-bottom: var(--sp-4); }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; font-size: 0.925rem; }
.pie__logo { width: 190px; margin-bottom: var(--sp-4); }
.pie__legal {
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5);
  align-items: center; justify-content: space-between;
  font-size: 0.82rem;
}
.pie__legal nav { display: flex; flex-wrap: wrap; gap: var(--sp-4); }

.redes { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }
.redes a {
  width: 40px; height: 40px; border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.16);
  display: grid; place-items: center;
  color: #C7DC8F;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.redes a:hover { background: var(--olive); border-color: var(--olive); color: #10160A; }

/* --------------------------------------------------- Botón WhatsApp fijo -- */

.wasap-flotante {
  position: fixed;
  right: 20px; bottom: 22px;
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #1FA855;
  color: #FFF;
  display: grid; place-items: center;
  box-shadow: 0 6px 24px rgba(31,168,85,0.42);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.wasap-flotante:hover { transform: scale(1.07); color: #FFF; box-shadow: 0 8px 30px rgba(31,168,85,0.55); }

/* Barra fija de acciones en móvil */
.barra-movil {
  display: none;
  position: fixed;
  inset-inline: 0; bottom: 0;
  z-index: 95;
  background: rgba(251,250,247,0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 0.55rem 0.6rem calc(0.55rem + env(safe-area-inset-bottom));
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}
.barra-movil a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 0.45rem 0.2rem;
  border-radius: 11px;
  font-size: 0.7rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--ink-2);
}
.barra-movil a.destacado { background: var(--olive); color: #10160A; }
.barra-movil a svg { width: 19px; height: 19px; flex: none; }

/* ---------------------------------------- Columna vertebral (scroll) ----- */
/* Elemento firma: el rail izquierdo reproduce las vértebras del logotipo y
   se rellena en verde según avanza la lectura. Solo en pantallas anchas.   */

.rail-columna {
  position: fixed;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  pointer-events: none;
}
.rail-columna__vertebra {
  width: 15px;
  height: 9px;
  border-radius: 7px 7px 4px 4px / 8px 8px 3px 3px;
  background: var(--line);
  transition: background-color 0.35s ease, transform 0.35s ease, width 0.35s ease;
}
.rail-columna__vertebra[data-activa="si"] { background: var(--olive); transform: scaleX(1.16); }
.rail-columna__etiqueta {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  writing-mode: vertical-rl;
  margin-top: 10px;
}

/* --------------------------------------------------------- Migas de pan -- */

.migas { font-size: 0.82rem; color: var(--ink-3); padding-top: var(--sp-5); }
.migas ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.migas li:not(:last-child)::after { content: "›"; margin-left: 0.4rem; color: var(--line); }
.migas a { color: var(--ink-3); text-decoration: none; }
.migas a:hover { color: var(--olive-deep); text-decoration: underline; }

/* ------------------------------------------------------ Artículo / prosa -- */

.prosa { max-width: 72ch; }
.prosa h2 { font-size: var(--fs-xl); margin-top: var(--sp-7); }
.prosa h2:first-child { margin-top: 0; }
.prosa h3 { margin-top: var(--sp-6); }
.prosa ul, .prosa ol { padding-left: 1.25rem; margin-bottom: var(--sp-4); color: var(--ink-2); }
.prosa li { margin-bottom: 0.4rem; }
.prosa li::marker { color: var(--olive); }

/* Reparto en dos columnas para páginas interiores */
.reparto { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.lateral { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: var(--sp-4); }

/* Marcador de foto pendiente */
.hueco-foto {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--cal-2);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--sp-5);
  color: var(--ink-3);
  font-size: 0.85rem;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------ Animación -- */

/* Sin JS el contenido se ve siempre: la animación es una mejora, no un requisito. */
html[data-js="si"] .aparece {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
html[data-js="si"] .aparece[data-visible="si"] { opacity: 1; transform: none; }

/* ------------------------------------------------------------ Responsive -- */

@media (min-width: 1400px) {
  .rail-columna { display: flex; }
}

@media (max-width: 960px) {
  .heroe__interior { grid-template-columns: 1fr; }
  .tarjeta-datos__marca { display: none; }
  .cta-cita { grid-template-columns: 1fr; }
  .reparto { grid-template-columns: 1fr; }
  .lateral { position: static; }
  .pie__rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .acciones-cabecera .boton--linea { display: none; }
  .abrir-menu { display: flex; }
  .barra-movil { display: grid; }
  .wasap-flotante { bottom: 88px; right: 16px; width: 52px; height: 52px; }
  body { padding-bottom: 74px; }
}

@media (max-width: 560px) {
  .envoltorio { padding-inline: var(--sp-4); }
  .acciones-cabecera .boton--principal { display: none; }
  .marca__sub { display: none; }
  .pie__rejilla { grid-template-columns: 1fr; gap: var(--sp-5); }
  .pie__legal { flex-direction: column; align-items: flex-start; }
  .triaje__opciones { padding: var(--sp-4); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html[data-js="si"] .aparece { opacity: 1; transform: none; }
}

@media print {
  .cabecera, .barra-movil, .wasap-flotante, .rail-columna, .cta-cita, .triaje { display: none !important; }
  body { background: #FFF; font-size: 11pt; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
