/* =========================================================
   Humanpsy · Hoja de estilos (versión accesible y móvil)
   Mobile-first. Contrastes de color verificados AA (WCAG 2.2).
   ========================================================= */

@font-face { font-family: "Amaranth"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/amaranth-400.woff2") format("woff2"); }
@font-face { font-family: "Amaranth"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/amaranth-700.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("../fonts/montserrat-var.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 100 900; font-style: italic; font-display: swap; src: url("../fonts/montserrat-var-italic.woff2") format("woff2"); }

:root {
  --azul: #206d99;          /* color corporativo original · 5,7:1 sobre blanco */
  --azul-oscuro: #134a6b;
  --azul-claro: #e8f2f8;
  --rosa: #b0257f;          /* rosa del logo oscurecido para texto · 6,1:1 */
  --rosa-logo: #ff45c8;
  --morado: #6a1fb0;
  --naranja: #ff8c42;
  --celeste: #a9d8ff;
  --texto: #1f2933;
  --texto-suave: #4a5866;   /* 7:1 sobre blanco */
  --fondo: #ffffff;
  --fondo-alt: #f5f7f9;
  --borde: #d5dde4;
  --foco: #ffbf47;
  --radio: 14px;
  --sombra: 0 6px 24px rgb(19 74 107 / 0.10);
  --ancho: 72rem;
  --fuente-titulos: "Amaranth", "Trebuchet MS", sans-serif;
  --fuente-texto: "Montserrat", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  font-family: var(--fuente-texto);
  font-size: 1.0625rem;           /* 17px: lectura cómoda en móvil */
  line-height: 1.65;
  color: var(--texto);
  background: var(--fondo);
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--fuente-titulos); color: var(--azul-oscuro); line-height: 1.2; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 3.2vw, 1.6rem); }
p { margin: 0 0 1em; }
a { color: var(--azul); text-underline-offset: .18em; }
a:hover { color: var(--azul-oscuro); }

/* Foco siempre visible para quien navega con teclado */
:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; border-radius: 4px; }
.fondo-oscuro :focus-visible { outline-color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Saltar al contenido */
.saltar {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--azul-oscuro); color: #fff; padding: .75rem 1rem; border-radius: 0 0 8px 8px;
  font-weight: 600; text-decoration: none;
}
.saltar:focus { top: 0; color: #fff; }

.contenedor { width: min(100% - 2rem, var(--ancho)); margin-inline: auto; }
.seccion { padding-block: clamp(2.5rem, 7vw, 5rem); }
.seccion--alt { background: var(--fondo-alt); }
.centrado { text-align: center; }
.intro { max-width: 46rem; margin-inline: auto; color: var(--texto-suave); font-size: 1.1rem; }

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / .97);
  border-bottom: 1px solid var(--borde);
  backdrop-filter: saturate(1.4) blur(6px);
}
.cabecera__barra { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }

.marca { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--morado); }
.marca__circulos { position: relative; width: 2.6rem; height: 2.6rem; flex: none; }
.marca__circulos span { position: absolute; border-radius: 50%; }
.marca__circulos span:nth-child(1) { width: 1.55rem; height: 1.55rem; background: var(--rosa-logo); left: 0; top: 0; }
.marca__circulos span:nth-child(2) { width: .6rem; height: .6rem; background: var(--celeste); right: .2rem; top: .25rem; }
.marca__circulos span:nth-child(3) { width: 1.15rem; height: 1.15rem; background: var(--morado); right: 0; bottom: 0; }
.marca__texto { display: flex; flex-direction: column; line-height: 1; }
.marca__nombre { font-weight: 700; letter-spacing: .16em; font-size: 1.15rem; }
.marca__nombre b { color: #a3480b; font-weight: 700; } /* naranja del logo, oscurecido: 5,9:1 */
.marca__sub { font-size: .72rem; letter-spacing: .3em; color: var(--rosa); margin-top: .3rem; text-transform: uppercase; }

.menu-boton {
  display: none; /* solo se muestra cuando hay JS (ver .js) */
  align-items: center; gap: .5rem;
  min-height: 44px; padding: .5rem .9rem;
  font: inherit; font-weight: 600; color: var(--azul-oscuro);
  background: var(--azul-claro); border: 1px solid transparent; border-radius: 999px; cursor: pointer;
}
.menu-boton__icono, .menu-boton__icono::before, .menu-boton__icono::after {
  display: block; width: 1.2rem; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s;
}
.menu-boton__icono { position: relative; }
.menu-boton__icono::before, .menu-boton__icono::after { content: ""; position: absolute; left: 0; }
.menu-boton__icono::before { top: -6px; }
.menu-boton__icono::after { top: 6px; }
.menu-boton[aria-expanded="true"] .menu-boton__icono { background: transparent; }
.menu-boton[aria-expanded="true"] .menu-boton__icono::before { transform: translateY(6px) rotate(45deg); }
.menu-boton[aria-expanded="true"] .menu-boton__icono::after { transform: translateY(-6px) rotate(-45deg); }

.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a {
  display: flex; align-items: center; min-height: 44px; padding: .5rem .85rem;
  text-decoration: none; color: var(--texto); font-weight: 500; border-radius: 8px;
}
.nav a:hover { background: var(--azul-claro); color: var(--azul-oscuro); }
.nav a[aria-current="page"] { color: var(--azul-oscuro); font-weight: 700; box-shadow: inset 0 -3px 0 var(--rosa-logo); }

/* Móvil: menú desplegable */
@media (max-width: 63.99rem) {
  .js .menu-boton { display: inline-flex; }
  .nav { padding-bottom: 1rem; }
  .js .nav { display: none; }
  .js .nav.abierto { display: block; }
  .nav ul { display: grid; gap: .15rem; border-top: 1px solid var(--borde); padding-top: .75rem; }
  .nav a { font-size: 1.1rem; padding-inline: .5rem; }
}
/* Escritorio: menú horizontal */
@media (min-width: 64rem) {
  .cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; }
  .nav ul { display: flex; flex-wrap: wrap; gap: .15rem; }
  .nav a { font-size: .95rem; }
}

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.4rem;
  font: inherit; font-weight: 600; text-decoration: none; line-height: 1.2;
  color: #fff; background: var(--azul); border: 2px solid var(--azul); border-radius: 999px; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.boton:hover { background: var(--azul-oscuro); border-color: var(--azul-oscuro); color: #fff; }
.boton--claro { background: #fff; color: var(--azul-oscuro); border-color: #fff; }
.boton--claro:hover { background: var(--azul-claro); color: var(--azul-oscuro); border-color: var(--azul-claro); }
.boton--borde { background: transparent; color: var(--azul-oscuro); border-color: var(--azul); }
.boton--borde:hover { background: var(--azul); color: #fff; }
.boton svg { width: 1.25em; height: 1.25em; flex: none; }
.botones { display: flex; flex-wrap: wrap; gap: .75rem; }
.centrado .botones { justify-content: center; }

/* ---------- Portada ---------- */
.portada { background: linear-gradient(135deg, #fff 0%, var(--azul-claro) 100%); padding-block: clamp(2.5rem, 8vw, 5.5rem); overflow: hidden; }
.portada__grid { display: grid; gap: 2rem; align-items: center; }
.portada__etiqueta { display: inline-block; font-weight: 600; color: var(--rosa); letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; margin-bottom: .75rem; }
.portada h1 { color: var(--azul-oscuro); }
.portada__texto { font-size: 1.15rem; color: var(--texto-suave); max-width: 38rem; }
.portada__imagen { position: relative; }
.portada__imagen img { border-radius: var(--radio); box-shadow: var(--sombra); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.portada__imagen::before, .portada__imagen::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; }
.portada__imagen::before { width: 7rem; height: 7rem; background: var(--rosa-logo); opacity: .85; left: -1.5rem; top: -1.5rem; }
.portada__imagen::after { width: 5rem; height: 5rem; background: var(--morado); opacity: .85; right: -1rem; bottom: -1.5rem; }
.portada__imagen { isolation: isolate; }
@media (min-width: 52rem) { .portada__grid { grid-template-columns: 1.1fr 1fr; } }

/* ---------- Tarjetas ---------- */
.rejilla { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.tarjeta {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra);
}
.tarjeta img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.tarjeta__cuerpo { padding: 1.25rem 1.25rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.tarjeta__cuerpo > :last-child { margin-bottom: 0; }
.tarjeta h3 { font-size: 1.35rem; }
.tarjeta--enlace { position: relative; transition: transform .15s, box-shadow .15s; }
.tarjeta--enlace:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgb(19 74 107 / .16); }
.tarjeta--enlace :is(h2, h3) a { text-decoration: none; color: inherit; }
.tarjeta--enlace :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; } /* toda la tarjeta clicable */
.tarjeta--enlace:focus-within { outline: 3px solid var(--foco); outline-offset: 3px; }
.tarjeta--enlace :is(h2, h3) a:focus-visible { outline: none; }

/* Bloques de dos columnas (texto + imagen) */
.bloque { display: grid; gap: 2rem; align-items: center; }
.bloque img { border-radius: var(--radio); box-shadow: var(--sombra); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 52rem) {
  .bloque { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .bloque--invertido > :first-child { order: 2; }
}

/* Banda azul */
.fondo-oscuro { background: var(--azul-oscuro); color: #fff; }
.fondo-oscuro h2, .fondo-oscuro h3 { color: #fff; }
.fondo-oscuro a:not(.boton) { color: #fff; }
.fondo-oscuro p { color: #e6eef4; }

.accesos { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.acceso {
  display: flex; flex-direction: column; gap: .35rem; padding: 1.5rem;
  border: 1px solid rgb(255 255 255 / .25); border-radius: var(--radio); text-decoration: none; color: #fff;
  transition: background-color .15s;
}
.acceso:hover { background: rgb(255 255 255 / .08); color: #fff; }
.acceso__pre { font-size: .9rem; color: #cfe0ec; }
.acceso__titulo { font-family: var(--fuente-titulos); font-size: 1.7rem; letter-spacing: .04em; }
.acceso__cta { margin-top: .5rem; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }

/* ---------- Equipo ---------- */
.cabecera-pagina { position: relative; color: #fff; background: var(--azul-oscuro); isolation: isolate; }
.cabecera-pagina img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cabecera-pagina::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(19 74 107 / .92), rgb(19 74 107 / .65)); z-index: -1; }
.cabecera-pagina .contenedor { padding-block: clamp(3rem, 10vw, 6rem); }
.cabecera-pagina h1, .cabecera-pagina h2 { color: #fff; }
.cabecera-pagina p { color: #eef5f9; max-width: 44rem; font-size: 1.1rem; }

.profesional { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.profesional__cabecera { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.profesional__cabecera h2 { margin: 0; }
.colegiado { display: inline-block; font-family: var(--fuente-texto); font-size: .95rem; font-weight: 600; color: var(--rosa); background: #fbe8f4; padding: .25rem .7rem; border-radius: 999px; vertical-align: middle; }
.cita {
  margin: 0 0 2rem; padding: 1.25rem 1.5rem; border-left: 4px solid var(--rosa-logo);
  background: var(--fondo-alt); border-radius: 0 var(--radio) var(--radio) 0; font-style: italic; font-size: 1.1rem;
}
.cita p:last-child { margin: 0; }
.tarjeta ul { margin: 0; padding-left: 1.2rem; }

/* ---------- Galería ---------- */
.galeria { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); list-style: none; padding: 0; margin: 0; }
.galeria button {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; overflow: hidden;
}
.galeria img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform .25s; }
.galeria button:hover img { transform: scale(1.04); }
.galeria a { display: block; border-radius: 10px; overflow: hidden; }

.visor { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; }
.visor::backdrop { background: rgb(8 20 30 / .92); }
.visor__marco { display: grid; grid-template-rows: auto 1fr auto; height: 100%; color: #fff; padding: .75rem; gap: .5rem; }
.visor__barra { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.visor__contador { font-size: .95rem; }
.visor figure { margin: 0; display: grid; place-items: center; min-height: 0; }
.visor figure img { max-height: calc(100vh - 9rem); max-width: 100%; width: auto; object-fit: contain; border-radius: 6px; }
.visor figcaption { text-align: center; margin-top: .5rem; color: #e6eef4; }
.visor__controles { display: flex; justify-content: center; gap: 1rem; }
.visor button {
  min-width: 48px; min-height: 48px; padding: .5rem 1rem; font: inherit; font-weight: 600;
  color: #fff; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .35); border-radius: 999px; cursor: pointer;
}
.visor button:hover { background: rgb(255 255 255 / .22); }
.visor :focus-visible { outline-color: #fff; }

/* ---------- Contacto ---------- */
.contacto-grid { display: grid; gap: 2rem; }
@media (min-width: 56rem) { .contacto-grid { grid-template-columns: 1fr 1.2fr; gap: 3rem; } }
.panel { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: clamp(1.25rem, 4vw, 2rem); box-shadow: var(--sombra); }
.panel + .panel { margin-top: 1.5rem; }
.horario { margin: 0; display: grid; gap: .6rem; }
.horario div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--borde); }
.horario div:last-child { border-bottom: 0; padding-bottom: 0; }
.horario dt { font-weight: 600; }
.horario dd { margin: 0; text-align: right; }
address { font-style: normal; }
.lista-contacto { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.lista-contacto a { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; font-weight: 600; }
.lista-contacto svg { width: 1.4rem; height: 1.4rem; flex: none; color: var(--azul); }
.mapa { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radio); margin-top: 1rem; }

.formulario { display: grid; gap: 1.15rem; }
.campo { display: grid; gap: .35rem; }
.campo label { font-weight: 600; }
.campo .ayuda { font-size: .9rem; color: var(--texto-suave); }
.obligatorio { color: var(--rosa); }
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="number"], input[type="date"], input:not([type]), textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem;
  font: inherit; font-size: 1rem; color: var(--texto);
  background: #fff; border: 1.5px solid #8a99a8; border-radius: 10px;
}
textarea { min-height: 9rem; resize: vertical; }
input:focus-visible, textarea:focus-visible { border-color: var(--azul); outline: 3px solid var(--foco); outline-offset: 1px; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b3261e; }
.error { color: #b3261e; font-size: .92rem; font-weight: 600; }
.casilla { display: flex; gap: .7rem; align-items: flex-start; }
.casilla input { width: 1.4rem; height: 1.4rem; margin: .15rem 0 0; flex: none; accent-color: var(--azul); }
.trampa { position: absolute; left: -9999px; }
.aviso-envio { padding: 1rem 1.25rem; border-radius: 10px; font-weight: 600; }
.aviso-envio--ok { background: #e3f4ea; color: #145c32; }
.aviso-envio--ko { background: #fdecea; color: #8c1d18; }

/* ---------- Blog ---------- */
.articulo { max-width: 46rem; margin-inline: auto; }
.articulo__meta { color: var(--texto-suave); font-size: .95rem; margin-bottom: 1.5rem; }
.articulo figure { margin: 0 0 2rem; }
.articulo figure img { border-radius: var(--radio); width: 100%; }
.articulo h2 { font-size: 1.6rem; margin-top: 1.5em; }
.etiquetas { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 2rem 0 0; }
.etiquetas li { background: var(--azul-claro); color: var(--azul-oscuro); padding: .2rem .7rem; border-radius: 999px; font-size: .9rem; font-weight: 600; }
.paginacion { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--borde); }
.paginacion a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.tarjeta time { color: var(--texto-suave); font-size: .9rem; display: block; margin-bottom: .4rem; }

/* ---------- Textos legales ---------- */
.legal { max-width: 48rem; margin-inline: auto; }
.legal h2 { font-size: 1.5rem; margin-top: 1.8em; }
.legal li { margin-bottom: .4rem; }

/* ---------- Pie ---------- */
.pie { background: #10354d; color: #e6eef4; padding-block: 3rem 1.5rem; margin-top: auto; }
.pie a { color: #fff; }
.pie h2 { color: #fff; font-size: 1.25rem; }
.pie__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.pie ul a { display: inline-flex; align-items: center; min-height: 40px; }
.redes { display: flex !important; flex-wrap: wrap; gap: .5rem !important; }
.redes a { display: inline-grid !important; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgb(255 255 255 / .1); }
.redes a:hover { background: rgb(255 255 255 / .22); }
.redes svg { width: 1.35rem; height: 1.35rem; }
/* Banner de subvención (Manual de Identidad Visual Fondos Europeos Andalucía 2021-2027):
   logos oficiales en negativo sobre el azul del pie, en el orden UE · Ministerio + Fondos Europeos · Junta,
   bandera UE ≥ 1 cm de alto y separación entre logos ≥ ancho del símbolo. */
.pie__subvencion { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid rgb(255 255 255 / .2); text-align: center; }
.pie__subvencion p { margin: 0 auto 1.5rem; max-width: 70rem; font-size: .9rem; line-height: 1.6; color: #cfdde7; }
.pie ul.pie__logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5rem 4rem; }
.pie__logos img { display: block; width: auto; max-width: 100%; }
.pie__logo-ue { height: 46px; }
.pie__logo-ffee { height: 46px; }
.pie__logo-junta { height: 44px; }
@media (max-width: 30rem) {
  .pie ul.pie__logos { gap: 3.25rem; flex-direction: column; }
  .pie__logo-ffee { height: auto; }
}
.pie__subvencion + .pie__legal { margin-top: 1.75rem; }
.pie__legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgb(255 255 255 / .2); font-size: .9rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
.pie__legal p { margin: 0; align-self: center; }
.pie .pie__enlaces { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.pie :focus-visible { outline-color: #fff; }

/* Barra de acciones rápidas (solo móvil) */
.acciones-movil { display: none; }
@media (max-width: 47.99rem) {
  .acciones-movil {
    display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--borde); box-shadow: 0 -4px 16px rgb(0 0 0 / .08);
  }
  .acciones-movil .boton { padding-inline: .75rem; font-size: .95rem; }
  body { padding-bottom: 4.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .cabecera, .pie, .acciones-movil, .saltar, .menu-boton { display: none !important; }
  body { padding: 0; font-size: 12pt; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
}

/* =================== Web nueva: componentes =================== */
.contenedor--texto { max-width: 52rem; }
.contenedor--reserva { max-width: 60rem; }
.nav .nav__cta a { color: #fff; }
.nav .nav__cta a:hover { color: #fff; }
@media (min-width: 64rem) {
  .nav ul { align-items: center; }
  .nav a { font-size: .92rem; padding-inline: .6rem; }
  .nav .nav__cta { margin-left: .4rem; }
}
@media (max-width: 63.99rem) { .nav .nav__cta { margin-top: .5rem; } .nav .nav__cta a { justify-content: center; } }

.migas ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .5rem; font-size: .9rem; }
.migas li + li::before { content: "›"; margin-right: .5rem; color: currentColor; opacity: .7; }
.migas a { color: inherit; }
.cabecera-pagina .migas { color: #e6eef4; }

.sellos { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.sellos li { font-size: .85rem; font-weight: 600; color: var(--azul-oscuro); background: #fff; border: 1px solid var(--borde); border-radius: 999px; padding: .3rem .8rem; }

.necesidades { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.panel-necesidad { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.4rem; box-shadow: var(--sombra); }
.panel-necesidad h3 { font-size: 1.35rem; }
.panel-necesidad h3 a { text-decoration: none; color: inherit; }
.panel-necesidad ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.panel-necesidad li a { display: flex; align-items: center; min-height: 44px; padding: .2rem 0; border-bottom: 1px solid var(--borde); text-decoration: none; font-weight: 500; }
.panel-necesidad li a::after { content: "→"; margin-left: auto; color: var(--rosa); }
.panel-necesidad li a:hover { color: var(--azul-oscuro); }

.pasos-proceso { list-style: none; padding: 0; margin: 2rem 0 1.5rem; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); counter-reset: none; }
.pasos-proceso li { background: #fff; border-radius: var(--radio); padding: 1.4rem; border: 1px solid var(--borde); position: relative; }
.pasos-proceso__num { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--azul-claro); color: var(--azul-oscuro); font-weight: 700; font-size: 1.2rem; margin-bottom: .6rem; }
.pasos-proceso h2, .pasos-proceso h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.pasos-proceso p { margin: 0; color: var(--texto-suave); }
.pasos-proceso--vertical { grid-template-columns: 1fr; }

.rejilla--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.tarjeta--persona img { aspect-ratio: 4 / 3; object-position: center 20%; }
.tarjeta__cargo { color: var(--rosa); font-weight: 600; font-size: .95rem; }
.tarjeta__titulo { font-size: 1.3rem; }
.tarjeta .etiquetas { margin-top: .5rem; }

.cabecera-pagina p { font-size: 1.15rem; }
.contenido-servicio { display: grid; gap: 2rem; }
@media (min-width: 60rem) { .contenido-servicio { grid-template-columns: minmax(0, 1fr) 21rem; gap: 3rem; align-items: start; } .contenido-servicio__lateral { position: sticky; top: 5.5rem; } }
.contenido-servicio__texto { max-width: 46rem; }
.contenido-servicio__texto h2 { margin-top: 1.6em; }
.destacado { font-size: 1.15rem; color: var(--azul-oscuro); }
.lista-check { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.lista-check li { position: relative; padding-left: 1.9rem; }
.lista-check li::before { content: ""; position: absolute; left: .2rem; top: .45em; width: 1rem; height: 1rem; border-radius: 50%; background: var(--azul-claro); box-shadow: inset 0 0 0 4px var(--azul); }
.panel-practico dl { margin: 0 0 1rem; display: grid; gap: .5rem; }
.panel-practico dl div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--borde); padding-bottom: .5rem; }
.panel-practico dt { font-weight: 600; } .panel-practico dd { margin: 0; text-align: right; }
.panel-practico .boton { margin-top: .5rem; }
.boton--ancho { width: 100%; }
.contenido-servicio__lateral .panel-caja { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.3rem; margin-bottom: 1rem; }
.contenido-servicio__lateral h2 { font-size: 1.2rem; }
.lista-equipo { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }

.faq { display: grid; gap: .5rem; }
.faq details { background: #fff; border: 1px solid var(--borde); border-radius: 12px; }
.faq summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--rosa); }
.faq details[open] summary::after { content: "−"; }
.faq__respuesta { padding: 0 1.2rem 1rem; color: var(--texto-suave); }
.faq__respuesta p { margin: 0; }

.enlaces-tarjeta { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.enlaces-tarjeta a { display: flex; align-items: center; min-height: 56px; padding: .8rem 1.1rem; background: #fff; border: 1px solid var(--borde); border-radius: 12px; text-decoration: none; font-weight: 600; }
.enlaces-tarjeta a::after { content: "→"; margin-left: auto; color: var(--rosa); }

.perfil { display: grid; gap: 2rem; align-items: start; margin-bottom: 2rem; }
@media (min-width: 52rem) { .perfil { grid-template-columns: 22rem 1fr; gap: 3rem; } }
.perfil__media img, .perfil__media video { width: 100%; border-radius: var(--radio); box-shadow: var(--sombra); }
.perfil__cargo { color: var(--rosa); font-weight: 600; font-size: 1.05rem; }
.perfil__datos .panel-caja { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.4rem; }

.mapa { position: relative; border-radius: var(--radio); overflow: hidden; background: var(--azul-claro); min-height: 18rem; display: grid; place-items: center; }
.mapa iframe { width: 100%; height: 100%; min-height: 20rem; border: 0; display: block; }
.mapa__aviso { padding: 1.5rem; text-align: center; max-width: 26rem; }
.mapa__aviso .botones { justify-content: center; }

.direccion-grande { font-style: normal; font-size: 1.2rem; margin-bottom: 1rem; }
.horario-lista, .pie__horario { margin: 0; display: grid; gap: .4rem; }
.horario-lista div { display: grid; gap: .1rem; }
.horario-lista dt, .pie__horario dt { font-weight: 600; }
.horario-lista dd, .pie__horario dd { margin: 0; }
.pie__horario dd { color: #cfdde7; font-size: .95rem; }
.pie__nica { font-size: .9rem; color: #cfdde7; }

.franja-crisis { background: #fff4e0; color: #5c3300; border-top: 1px solid #f0d9b0; }
.franja-crisis p { margin: 0; padding: .9rem 0; font-size: .95rem; }
.franja-crisis a { color: #5c3300; font-weight: 600; }

.tabla-precios { width: 100%; border-collapse: collapse; margin-bottom: .75rem; }
.tabla-precios th, .tabla-precios td { text-align: left; padding: .75rem .5rem; border-bottom: 1px solid var(--borde); }
.tabla-precios td:last-child { font-weight: 700; color: var(--azul-oscuro); white-space: nowrap; }
.tabla-precios thead th { font-size: .85rem; color: var(--texto-suave); text-transform: uppercase; letter-spacing: .04em; }
.seccion .panel-caja { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: clamp(1.25rem, 3vw, 1.75rem); box-shadow: var(--sombra); }

.boton--borde-claro { background: transparent; color: #fff; border-color: rgb(255 255 255 / .7); }
.boton--borde-claro:hover { background: rgb(255 255 255 / .12); color: #fff; border-color: #fff; }
.cta-final .botones { justify-content: center; }
.pasos-simples { padding-left: 1.3rem; display: grid; gap: .6rem; }

/* Reserva */
.reserva { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: clamp(1.25rem, 4vw, 2rem); box-shadow: var(--sombra); }
.reserva__pasos { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; counter-reset: paso; }
.reserva__pasos li { counter-increment: paso; text-align: center; font-weight: 600; font-size: .92rem; color: var(--texto-suave); padding-bottom: .6rem; border-bottom: 4px solid var(--borde); }
.reserva__pasos li::before { content: counter(paso) ". "; }
.reserva__pasos li.activo { color: var(--azul-oscuro); border-color: var(--azul); }
.reserva__pasos li.hecho { color: var(--verde, #145c32); border-color: #7cc49a; }
.reserva__paso { border: 0; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.reserva__paso legend { font-family: var(--fuente-titulos); font-size: 1.5rem; color: var(--azul-oscuro); margin-bottom: .5rem; padding: 0; }
.reserva__info { margin: 0; color: var(--texto-suave); min-height: 1.5em; }
.reserva__semana { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.reserva__semana p { margin: 0; font-weight: 600; }
.reserva__huecos { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
.reserva__dia { border: 1px solid var(--borde); border-radius: 12px; padding: .9rem; }
.reserva__dia h3 { font-family: var(--fuente-texto); font-size: 1rem; text-transform: capitalize; margin-bottom: .6rem; }
.reserva__dia ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr)); gap: .4rem; }
.hueco { width: 100%; min-height: 48px; display: grid; place-items: center; gap: 0; padding: .3rem; border: 1.5px solid var(--azul); border-radius: 10px; background: #fff; color: var(--azul-oscuro); font: inherit; cursor: pointer; line-height: 1.1; }
.hueco small { font-size: .72rem; color: var(--texto-suave); }
.hueco:hover, .hueco:focus-visible { background: var(--azul); color: #fff; }
.hueco:hover small, .hueco:focus-visible small { color: #e6eef4; }
.reserva__resumen { margin: 0; padding: .8rem 1rem; background: var(--azul-claro); border-radius: 10px; font-weight: 600; color: var(--azul-oscuro); }
.reserva__hecho { text-align: center; padding: 1rem 0; }
.reserva__hecho h2 { color: var(--verde, #145c32); }
.reserva .segmentado { display: inline-flex; flex-wrap: wrap; border: 1.5px solid var(--borde); border-radius: 999px; padding: 3px; gap: 2px; }
.reserva .segmentado label { position: relative; padding: .45rem 1rem; border-radius: 999px; cursor: pointer; font-weight: 600; min-height: 40px; display: inline-flex; align-items: center; }
.reserva .segmentado input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.reserva .segmentado label:has(input:checked) { background: var(--azul); color: #fff; }
.reserva .segmentado label:has(input:focus-visible) { outline: 3px solid var(--foco); }
.etiqueta { font-weight: 600; }
.alerta { padding: .75rem 1rem; border-radius: 10px; font-weight: 600; margin: 0; }
.alerta--error { background: #fdecea; color: #8c1d18; }
.rejilla-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); align-items: start; }
select { width: 100%; min-height: 48px; padding: .6rem .8rem; font: inherit; font-size: 1rem; color: var(--texto); background: #fff; border: 1.5px solid #8a99a8; border-radius: 10px; }

/* Ayuda urgente */
.urgente__lista { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .75rem; }
.urgente__boton { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; padding: 1.1rem 1.4rem; border-radius: 14px; border: 2px solid #d4a24c; background: #fff8ec; color: #5c3300; text-decoration: none; }
.urgente__boton strong { font-size: 1.8rem; font-family: var(--fuente-titulos); }
.urgente__boton--principal { background: #b3261e; border-color: #b3261e; color: #fff; }
.urgente__boton--principal:hover { color: #fff; background: #8c1d18; }

/* ===== Ajustes de ancho en móvil ===== */
/* Los elementos de una rejilla pueden encogerse (si no, el contenido más ancho estira toda la columna) */
.contacto-grid > *, .bloque > *, .rejilla > *, .necesidades > *, .contenido-servicio > *, .perfil > *, .pie__grid > * { min-width: 0; }
.mapa__aviso { width: 100%; box-sizing: border-box; }
.lista-contacto a, address, .pie a { overflow-wrap: anywhere; }
/* Tabla de precios en pantallas estrechas: cada servicio en una tarjeta */
@media (max-width: 34rem) {
  .tabla-precios thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabla-precios, .tabla-precios tbody { display: block; }
  .tabla-precios tr { display: grid; grid-template-columns: 1fr auto; gap: .15rem 1rem; padding: .7rem 0; border-bottom: 1px solid var(--borde); }
  .tabla-precios th, .tabla-precios td { border: 0; padding: 0; }
  .tabla-precios th[scope="row"] { grid-column: 1 / -1; }
  .tabla-precios td:nth-child(2) { color: var(--texto-suave); }
  .tabla-precios td:last-child { text-align: right; }
  .seccion .panel-caja, .panel { padding: 1.1rem; }
}

/* Elegir profesional para WhatsApp */
.dlg-wa { border: 0; padding: 0; border-radius: 18px; width: min(94vw, 28rem); box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
.dlg-wa::backdrop { background: rgb(19 35 48 / .5); }
.dlg-wa__caja { padding: 1.25rem; }
.dlg-wa__cabecera { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.dlg-wa__cabecera h2 { margin: 0; font-size: 1.35rem; }
.dlg-wa__cerrar { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--borde); background: #fff; font-size: 1.1rem; cursor: pointer; flex: none; }
.dlg-wa__nota { color: var(--texto-suave); font-size: .92rem; margin: .5rem 0 1rem; }
.dlg-wa__lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.dlg-wa__pro { display: grid; grid-template-columns: 3.5rem 1fr auto; align-items: center; gap: .8rem; padding: .7rem .8rem; border: 1.5px solid var(--borde); border-radius: 14px; text-decoration: none; color: var(--texto); min-height: 72px; }
.dlg-wa__pro:hover, .dlg-wa__pro:focus-visible { border-color: #1fa855; background: #f2fbf5; color: var(--texto); }
.dlg-wa__foto { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; object-position: center 20%; }
.dlg-wa__texto { display: grid; min-width: 0; }
.dlg-wa__texto small { color: var(--texto-suave); }
.dlg-wa__ir { font-weight: 700; color: #137a3c; font-size: .9rem; white-space: nowrap; }
@media (max-width: 22.5rem) { .dlg-wa__pro { grid-template-columns: 3rem 1fr; } .dlg-wa__ir { grid-column: 2; } .dlg-wa__foto { width: 3rem; height: 3rem; } }

/* Logo más compacto en móviles muy estrechos */
@media (max-width: 22.5rem) {
  .marca__nombre { font-size: 1rem; letter-spacing: .1em; white-space: nowrap; }
  .marca__sub { font-size: .6rem; letter-spacing: .14em; white-space: nowrap; }
  .marca__circulos { width: 2.2rem; height: 2.2rem; }
}
/* Móviles de 320 px: que el logo y el botón «Menú» quepan sin desbordar */
@media (max-width: 21.5rem) {
  .cabecera__barra { gap: .5rem; }
  .marca { gap: .45rem; }
  .marca__circulos { width: 1.9rem; height: 1.9rem; }
  .marca__nombre { font-size: .9rem; letter-spacing: .08em; }
  .marca__sub { font-size: .55rem; letter-spacing: .1em; }
  .menu-boton { padding: .5rem .7rem; gap: .4rem; }
}

/* Contacto agrupado por profesional */
.contacto-pro { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--borde); }
.contacto-pro h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.contacto-pro h3 a { text-decoration: none; color: inherit; }

/* ---- En los medios: franja al pie (se desliza sola, con pausa) y listados ---- */
.medios { background: var(--fondo-alt); border-top: 1px solid var(--borde); padding-block: 1.1rem .4rem; }
.medios__cabecera { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .3rem 1rem; margin-bottom: .6rem; }
.medios__cabecera h2 { margin: 0; font-size: 1.1rem; }
.medios__controles { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.medios__controles a { font-weight: 600; font-size: .92rem; margin-left: .25rem; }
.medios__boton { min-width: 40px; min-height: 40px; padding: 0 .7rem; border-radius: 999px; border: 1.5px solid var(--azul); background: #fff; color: var(--azul-oscuro); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.medios__boton:hover { background: var(--azul-claro); }
/* position: relative para que el texto oculto de las tarjetas (absoluto) quede dentro del carrusel y no ensanche la página en el móvil */
.medios__pista { position: relative; list-style: none; margin: 0; padding: .2rem .1rem .8rem; display: flex; gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; }
.medios__pista .medio { flex: 0 0 min(85%, 21rem); scroll-snap-align: start; }
.medios__lista { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.medio__enlace { position: relative; display: flex; flex-direction: column; gap: .3rem; height: 100%; padding: .7rem .95rem; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); color: var(--texto); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.medio__enlace:hover { border-color: var(--azul); box-shadow: var(--sombra); }
.medio__enlace:hover .medio__titulo { text-decoration: underline; }
.medio__cabeza { display: flex; align-items: center; min-height: 26px; }
/* Logo en gris y algo transparente para que no compita con la web; recupera su color al pasar el ratón o con el foco */
.medio__logo { display: block; height: 24px; width: auto; max-width: 11rem; object-fit: contain; object-position: left center; filter: grayscale(1) contrast(1.1); opacity: .7; transition: filter .2s ease, opacity .2s ease; }
.medio__enlace:hover .medio__logo, .medio__enlace:focus-visible .medio__logo { filter: none; opacity: 1; }
.medio__medio { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-suave); }
.medio__titulo { font-weight: 600; font-size: .95rem; color: var(--azul-oscuro); line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.medio__quien { margin-top: auto; font-size: .82rem; color: var(--texto-suave); }
.medio__quien:empty { display: none; }
.perfil__medios { margin-top: 2.5rem; }
@media (prefers-reduced-motion: reduce) { .medios__pista { scroll-behavior: auto; } .medio__enlace, .medio__logo { transition: none; } }.medios__pista .medio__titulo { -webkit-line-clamp: 1; line-clamp: 1; }
.medios__pista .medio__quien { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Correos del pie: más pequeños para que quepan; si aun así no caben, cortan antes de la @ y no a mitad de palabra */
.pie a.pie__email { font-size: .86rem; overflow-wrap: normal; word-break: normal; letter-spacing: -.01em; }
