/* ==========================================================================
   Logopedia María Ortiz Rioseco — estilos
   Mobile-first: los estilos base son para móvil; se amplían con min-width
   (600, 900, 1024 menú de escritorio, 1100/1200).
   ========================================================================== */

/* ---------- Fuente autoalojada (Nunito variable, OFL) ---------- */
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-variable-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variables (derivadas del azul del logo #00ABF4) ---------- */
:root {
  --brand: #00ABF4;       /* acentos, iconos, detalles (nunca texto pequeño sobre blanco) */
  --brand-dark: #0077B3;  /* botones con texto blanco, enlaces */
  --brand-deep: #005A87;  /* hover de botones, pie */
  --brand-soft: #E6F6FE;  /* fondos suaves de tarjetas y secciones */
  --brand-bg: #F4FBFF;    /* fondo alterno muy claro */
  --ink: #1D3446;         /* texto principal */
  --muted: #5B6F80;       /* texto secundario */
  --white: #FFFFFF;
  --line: #D3ECFA;        /* bordes suaves */

  --font: "Nunito", ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-base: 1rem;                                   /* 16 px mínimo en móvil */
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-h1: clamp(2rem, 1.35rem + 3vw, 3.4rem);
  --fs-h2: clamp(1.6rem, 1.25rem + 1.6vw, 2.4rem);
  --fs-h3: clamp(1.15rem, 1.05rem + 0.45vw, 1.35rem);
  --fs-small: 0.9375rem;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgb(29 52 70 / 0.05), 0 8px 24px -12px rgb(0 119 179 / 0.25);
  --shadow-lg: 0 2px 4px rgb(29 52 70 / 0.05), 0 18px 40px -16px rgb(0 119 179 / 0.35);

  --gutter: 1.25rem;
  --container: 1200px;
  --section-y: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --header-h: 72px;
  --mobile-bar-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset y base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  padding-bottom: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom, 0px)); /* hueco para la barra móvil */
  overflow-x: hidden;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.18; font-weight: 800; color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--fs-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.015em; }
h3 { font-size: var(--fs-h3); font-weight: 750; }
p, ul, ol { margin: 0 0 1rem; }
p { text-wrap: pretty; }
a { color: var(--brand-dark); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--brand-deep); }
strong { font-weight: 750; }
button { font: inherit; color: inherit; }

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

.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;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 1000;
  background: var(--brand-dark); color: var(--white); padding: .75rem 1.25rem;
  border-radius: var(--radius-sm); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--white); }

.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }
.nowrap { white-space: nowrap; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--soft { background: var(--brand-bg); }
.section--tint { background: var(--brand-soft); }
.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head p { color: var(--muted); font-size: var(--fs-lead); }
.section__foot { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.section__head--center + * + .section__foot, .section__foot--center { justify-content: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-bottom: 1rem; font-weight: 750; font-size: var(--fs-small);
  color: var(--brand-dark); letter-spacing: .01em;
}
.eyebrow::before {
  content: ""; width: 1.6rem; height: 1.6rem; flex-shrink: 0;
  background: url("../img/bocadillo.png") center / contain no-repeat;
}
.lead { font-size: var(--fs-lead); color: var(--ink); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 600px) {
  :root { --gutter: 2rem; }
  .grid--2, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .75rem 1.5rem;
  border: 2px solid transparent; border-radius: 999px;
  font-weight: 750; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn .icon { width: 1.15em; height: 1.15em; }
.btn--primary { background: var(--brand-dark); color: var(--white); }
.btn--primary:hover { background: var(--brand-deep); color: var(--white); }
.btn--secondary { background: var(--white); color: var(--brand-dark); border-color: var(--brand-dark); }
.btn--secondary:hover { background: var(--brand-soft); color: var(--brand-deep); }
.btn--light { background: var(--white); color: var(--brand-dark); }
.btn--light:hover { background: var(--brand-soft); color: var(--brand-deep); }
.btn--outline-light { background: transparent; color: var(--white); border-color: rgb(255 255 255 / .85); }
.btn--outline-light:hover { background: rgb(255 255 255 / .12); color: var(--white); }
.btn--lg { min-height: 56px; padding: 1rem 1.75rem; font-size: 1.0625rem; }
@media (prefers-reduced-motion: no-preference) { .btn:active { transform: scale(.98); } }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px;
  font-weight: 750; text-decoration: none; color: var(--brand-dark);
}
.link-arrow .icon { transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

.link-button {
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px;
}

/* ---------- Tarjetas ---------- */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.5rem;
}
.card--soft { background: var(--brand-soft); border-color: transparent; box-shadow: none; }
.card__icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1rem;
  border-radius: 16px; background: var(--brand-soft); color: var(--brand-dark);
}
.card--soft .card__icon { background: var(--white); }
.card__icon .icon { width: 26px; height: 26px; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); margin-bottom: 0; }
/* Tarjeta clicable entera con un único enlace accesible */
.card--link { transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.card--link:hover { box-shadow: var(--shadow-lg); }
@media (prefers-reduced-motion: no-preference) { .card--link:hover { transform: translateY(-4px); } }
.card--link .card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card--link .card__link { color: inherit; text-decoration: none; }
.card--link:focus-within { outline: 3px solid var(--brand-dark); outline-offset: 3px; }
.card--link .card__link:focus-visible { outline: none; }

/* Marcador neutro para imágenes pendientes (bocadillo del logo sobre azul suave) */
.placeholder {
  display: grid; place-items: center; aspect-ratio: 1; width: 100%;
  background: var(--brand-soft); border-radius: var(--radius);
}
.placeholder img { width: 34%; height: auto; opacity: .55; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); /* sin backdrop-filter: atraparía el panel fixed del menú móvil */
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.site-logo { display: block; flex-shrink: 0; padding-block: .5rem; }
.site-logo img { width: auto; height: 40px; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; min-width: 44px;
  padding: .5rem .9rem; border: 2px solid var(--line); border-radius: 999px;
  background: var(--white); color: var(--ink); font-weight: 750; cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

/* Menú móvil: panel desplegable bajo la cabecera */
.nav {
  position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 1rem var(--gutter) calc(var(--mobile-bar-h) + 2rem);
  background: var(--white);
  display: none;
}
.nav.is-open { display: block; }
.nav__list { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.nav__item { border-bottom: 1px solid var(--line); }
.nav__item.has-sub { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.nav__link {
  display: flex; align-items: center; min-height: 52px; padding-block: .5rem;
  font-weight: 750; font-size: 1.125rem; color: var(--ink); text-decoration: none;
}
.nav__link[aria-current] { color: var(--brand-dark); }
.sub-toggle {
  display: grid; place-items: center; width: 48px; height: 48px;
  border: 0; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); cursor: pointer;
}
.sub-toggle .icon { transition: transform .2s var(--ease); }
.sub-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.submenu { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0 0 .75rem; display: none; }
.submenu.is-open { display: block; }
.submenu a {
  display: flex; align-items: center; min-height: 44px; padding: .35rem .75rem;
  border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600;
}
.submenu a:hover, .submenu a[aria-current] { background: var(--brand-soft); color: var(--brand-deep); }
.nav__cta { width: 100%; }
body.nav-open { overflow: hidden; }

@media (min-width: 600px) {
  .site-logo img { height: 46px; }
}

/* Menú de escritorio */
@media (min-width: 1024px) {
  :root { --header-h: 84px; }
  .site-logo img { height: 52px; }
  .nav-toggle { display: none; }
  .nav {
    position: static; display: flex !important; align-items: center; gap: 1.25rem;
    padding: 0; overflow: visible; background: none;
  }
  .nav__list { display: flex; align-items: center; gap: .25rem; margin: 0; }
  .nav__item { border: 0; position: relative; }
  .nav__item.has-sub { display: flex; }
  .nav__link {
    min-height: 44px; padding: .5rem .75rem; font-size: 1rem; border-radius: 999px;
  }
  .nav__link:hover { background: var(--brand-soft); color: var(--brand-deep); }
  .nav__link[aria-current] { color: var(--brand-dark); box-shadow: inset 0 -3px 0 var(--brand); border-radius: 0; }
  .has-sub .nav__link { padding-right: .25rem; }
  .sub-toggle { width: 32px; height: 44px; background: none; border-radius: 8px; }
  .sub-toggle:hover { background: var(--brand-soft); }
  .submenu {
    position: absolute; top: calc(100% + .5rem); left: -1rem; z-index: 10;
    width: 560px; padding: .75rem;
    grid-template-columns: 1fr 1fr; gap: .25rem;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  }
  .submenu.is-open { display: grid; }
  .nav__cta { width: auto; }
}

/* ---------- Migas de pan ---------- */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; list-style: none; margin: 0 0 1.25rem; padding: 0; font-size: var(--fs-small); }
.breadcrumbs li { display: flex; align-items: center; gap: .5rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; color: var(--brand); }
.breadcrumbs a { color: var(--ink); }
.breadcrumbs [aria-current] { color: var(--muted); }

/* ---------- Pie ---------- */
.site-footer {
  background: var(--brand-deep); color: var(--white);
  padding-top: clamp(3rem, 2rem + 3vw, 4.5rem);
}
.site-footer a, .site-footer .link-button { color: var(--white); }
.site-footer a:hover, .site-footer .link-button:hover { color: var(--brand-soft); }
.site-footer :focus-visible { outline-color: var(--white); }
.site-footer__grid { display: grid; gap: 2.25rem; }
.site-footer__brand img { width: 220px; height: auto; margin-bottom: 1.25rem; }
.site-footer__brand p { margin-bottom: .35rem; }
.site-footer__title { font-size: 1.0625rem; color: var(--white); margin-bottom: 1rem; }
.site-footer__list, .site-footer__links { list-style: none; margin: 0; padding: 0; }
.site-footer__list li { display: flex; gap: .65rem; align-items: flex-start; margin-bottom: .75rem; }
.site-footer__list .icon { margin-top: .2em; color: var(--brand-soft); }
.site-footer__list a { overflow-wrap: anywhere; }
.site-footer__links li { margin-bottom: .1rem; }
.site-footer__links a, .site-footer__links .link-button { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer__legal {
  margin-top: 2.5rem; padding-block: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / .2); font-size: var(--fs-small);
}
.site-footer__legal p { margin: 0; }
@media (min-width: 600px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: 1.3fr 1.2fr 1fr 1fr; gap: 3rem; } }

/* ---------- Barra inferior fija (móvil) ---------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
  padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom, 0px));
  background: var(--white); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px -10px rgb(0 119 179 / .3);
}
.mobile-bar__btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; border-radius: 999px;
  font-weight: 750; text-decoration: none;
  background: var(--brand-dark); color: var(--white);
}
.mobile-bar__btn:hover { color: var(--white); background: var(--brand-deep); }
.mobile-bar__btn--wa { background: var(--white); color: var(--brand-dark); border: 2px solid var(--brand-dark); }
.mobile-bar__btn--wa:hover { background: var(--brand-soft); color: var(--brand-deep); }
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .mobile-bar { display: none; }
}

/* ==========================================================================
   Bloques de contenido
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) clamp(2.5rem, 1.5rem + 4vw, 5rem);
  background: linear-gradient(180deg, var(--brand-bg) 0%, var(--white) 100%);
}
/* Bocadillo del logo como forma decorativa muy sutil */
.hero::before {
  content: ""; position: absolute; right: -6rem; top: -4rem; width: 26rem; aspect-ratio: 240 / 257;
  background: url("../img/bocadillo.png") center / contain no-repeat; opacity: .06; pointer-events: none;
}
.hero__grid { position: relative; display: grid; gap: 2rem; align-items: center; }
.hero h1 { margin-bottom: 1.25rem; }
.hero__box {
  background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--brand);
  border-radius: var(--radius); padding: 1.25rem 1.25rem .25rem; box-shadow: var(--shadow);
  font-size: var(--fs-lead);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero__actions .btn { flex: 1 1 auto; }
.hero__media { position: relative; }
.hero__media::after { /* marco desplazado en azul suave */
  content: ""; position: absolute; inset: 1.25rem -1rem -1rem 1.25rem; z-index: -1;
  border-radius: var(--radius-lg); background: var(--brand-soft);
}
.hero__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
@media (min-width: 600px) {
  .hero__actions .btn { flex: 0 0 auto; }
  .hero__box { padding: 1.5rem 1.75rem .5rem; }
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr 1fr; gap: clamp(2.5rem, 4vw, 4.5rem); }
  .hero__img { aspect-ratio: 5 / 4.4; }
}

/* ---------- Franja de confianza ---------- */
.trust { position: relative; margin-top: -1.5rem; z-index: 1; }
.trust__list {
  list-style: none; margin: 0; padding: 1rem 1.25rem;
  display: grid; gap: .25rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.trust__list li { display: flex; align-items: center; gap: .85rem; padding: .6rem 0; font-weight: 700; }
.trust__list .icon {
  width: 44px; height: 44px; padding: 10px; border-radius: 14px;
  background: var(--brand-soft); color: var(--brand-dark);
}
@media (min-width: 600px) { .trust__list { grid-template-columns: 1fr 1fr; gap: .25rem 1.5rem; padding: 1.25rem 1.75rem; } }
@media (min-width: 1100px) { .trust__list { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Tarjetas de área ---------- */
.area-card { padding: 1rem 1rem 1.25rem; }
.area-card .illus { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--radius) - 6px); margin-bottom: 1rem; }
.area-card__title { font-size: var(--fs-h3); font-weight: 750; margin-bottom: .35rem; padding-inline: .25rem; overflow-wrap: break-word; hyphens: auto; }
.area-card p { padding-inline: .25rem; flex-grow: 1; }
.area-card__more {
  display: inline-flex; align-items: center; gap: .35rem; margin-top: 1rem; padding-inline: .25rem;
  font-weight: 750; color: var(--brand-dark);
}
.area-card__more .icon { width: 1.1em; height: 1.1em; transition: transform .2s var(--ease); }
.area-card:hover .area-card__more .icon { transform: translateX(3px); }
@media (max-width: 1099px) {
  /* Móvil y tablet: ilustración a la izquierda para tarjetas más compactas */
  .area-card { display: grid; grid-template-columns: clamp(88px, 26vw, 120px) 1fr; column-gap: 1rem; align-items: start; align-content: start; }
  .area-card .illus { grid-row: 1 / span 3; margin-bottom: 0; }
  .area-card__more { margin-top: .5rem; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  /* En rejilla de 3 columnas vuelve al formato vertical */
  .grid--3 .area-card { display: flex; }
  .grid--3 .area-card .illus { margin-bottom: 1rem; }
}

/* ---------- Equipo ---------- */
.team-grid { max-width: 1000px; margin-inline: auto; }
.team-card { align-items: center; text-align: center; padding: 1.75rem 1.5rem; }
.team-card .team-card__photo {
  width: 160px; height: 160px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; margin-bottom: 1.25rem;
}
.team-card--compact .team-card__photo { width: 120px; height: 120px; }
.team-card__name { margin-bottom: .2rem; }
.team-card__role { color: var(--ink) !important; font-weight: 650; margin-bottom: .35rem !important; }
.team-card__cargo { color: var(--brand-dark) !important; font-weight: 700; font-size: var(--fs-small); margin-bottom: .35rem !important; }
.team-card img.team-card__photo { background: var(--brand-soft); border: 4px solid var(--brand-soft); }
.team-card__meta { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--fs-small); }
.team-card__meta .icon { color: var(--brand-dark); width: 1.1em; height: 1.1em; }
.team-card__desc { margin-top: .85rem !important; text-align: left; }

/* ---------- Pasos (¿Cómo trabajamos?) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; counter-reset: paso; }
.steps__item {
  position: relative; padding: 1.5rem 1.5rem 1.5rem 5rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.steps__num {
  position: absolute; left: 1.25rem; top: 1.4rem;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--brand-dark); color: var(--white); font-weight: 800; font-size: 1.2rem;
}
.steps__item h3 { margin-bottom: .4rem; }
.steps__item p { color: var(--muted); margin: 0; }
@media (min-width: 600px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .steps__item { padding: 4.75rem 1.5rem 1.5rem; }
  .steps__num { left: 1.5rem; top: 1.5rem; }
  /* Conector horizontal entre pasos */
  .steps__item:not(:last-child)::after {
    content: ""; position: absolute; top: 2.85rem; left: calc(1.5rem + 2.75rem + .5rem); right: -1.5rem;
    border-top: 2px dashed var(--brand); opacity: .5;
  }
}

/* ---------- Galería ---------- */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.gallery__item { overflow: hidden; border-radius: var(--radius); background: var(--brand-soft); }
.gallery__item img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery__item:first-child { grid-column: 1 / -1; }
@media (prefers-reduced-motion: no-preference) {
  .gallery__item img { transition: transform .5s var(--ease); }
  .gallery__item:hover img { transform: scale(1.03); }
}
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
  .gallery__item:first-child { grid-column: span 2; grid-row: span 2; }
  .gallery__item:first-child picture { height: 100%; }
  .gallery__item:first-child img { aspect-ratio: auto; }
}

/* ---------- Banda de llamada a la acción ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--brand-dark); color: var(--white); padding-block: clamp(3rem, 2rem + 3vw, 4.5rem); }
.cta-band::before {
  content: ""; position: absolute; left: -4rem; bottom: -6rem; width: 18rem; aspect-ratio: 240 / 257;
  background: url("../img/bocadillo.png") center / contain no-repeat; filter: brightness(0) invert(1); opacity: .08;
}
.cta-band__inner { position: relative; display: grid; gap: 1.75rem; }
.cta-band h2 { color: var(--white); margin-bottom: .5rem; }
.cta-band p { margin: 0; font-size: var(--fs-lead); }
.cta-band__actions { display: flex; flex-direction: column; gap: .75rem; }
.cta-band :focus-visible { outline-color: var(--white); }
@media (min-width: 600px) { .cta-band__actions { flex-direction: row; flex-wrap: wrap; } }
@media (min-width: 1024px) {
  .cta-band__inner { grid-template-columns: 1fr auto; align-items: center; }
  .cta-band__actions { flex-wrap: nowrap; }
}

/* ---------- Cabecera de páginas internas ---------- */
.page-hero {
  position: relative; overflow: hidden;
  padding-block: clamp(1.5rem, 1rem + 2vw, 2.5rem) clamp(2rem, 1.5rem + 3vw, 4rem);
  background: linear-gradient(180deg, var(--brand-bg) 0%, var(--white) 100%);
}
.page-hero h1 { margin-bottom: .75rem; }
.page-hero__intro { max-width: 46rem; }
.page-hero__grid { display: grid; gap: 2rem; align-items: center; }
/* En móvil la foto va antes del título, para que la entradilla enlace con el texto del área */
.page-hero__media { position: relative; order: -1; margin-bottom: 1rem; }
.page-hero__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
/* Ilustración del área superpuesta a la foto */
.page-hero__badge {
  position: absolute; right: 1rem; bottom: -1.5rem; width: clamp(96px, 26vw, 150px);
  padding: .4rem; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.page-hero__badge .illus { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--radius) - 6px); }
@media (min-width: 900px) {
  .page-hero--split .page-hero__grid { grid-template-columns: 1.1fr 1fr; gap: clamp(2.5rem, 5vw, 5rem); }
  .page-hero__media { order: 0; margin-bottom: 0; }
  .page-hero__badge { left: -2rem; right: auto; bottom: -2rem; }
}
.section--tight-top { padding-top: 1rem; }
.page-hero--split { padding-bottom: 0; }
.section--area { padding-top: 1.25rem; }
@media (min-width: 900px) {
  .page-hero--split { padding-bottom: 2rem; }
  .section--area { padding-top: 4rem; } /* hueco para la ilustración superpuesta */
}

/* ---------- Texto de área ---------- */
.prose { max-width: 46rem; margin-inline: auto; font-size: 1.0625rem; }
.prose h2 {
  position: relative; font-size: clamp(1.35rem, 1.15rem + .9vw, 1.75rem);
  margin-top: 2.5rem; padding-top: 1.25rem;
}
.prose h2::before { /* pequeño trazo de marca sobre cada subapartado */
  content: ""; position: absolute; left: 0; top: 0; width: 3rem; height: 4px; border-radius: 4px; background: var(--brand);
}
.prose > :first-child { margin-top: 0; }
.prose ul:not([class]) { padding-left: 1.25rem; }
.prose ul:not([class]) li { margin-bottom: .5rem; padding-left: .25rem; }
.prose ul:not([class]) li::marker { color: var(--brand-dark); }

.feature-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1rem; }
.feature-list li { padding: 1.25rem 1.5rem; background: var(--brand-bg); border: 1px solid var(--line); border-radius: var(--radius); }
.prose .feature-list h2 { font-size: 1.15rem; margin: 0 0 .35rem; padding: 0; }
.prose .feature-list h2::before { display: none; }
.feature-list p { margin: 0; }
@media (min-width: 600px) { .feature-list { grid-template-columns: 1fr 1fr; } }

.check-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .75rem; }
.check-list li { display: flex; gap: .75rem; align-items: flex-start; padding: 1rem 1.25rem; background: var(--brand-bg); border-radius: var(--radius-sm); }
.check-list .icon { color: var(--brand-dark); margin-top: .2em; }

/* Enlace a "¿Cómo trabajamos?" al final del área */
.howlink {
  display: flex; gap: 1.25rem; align-items: flex-start; max-width: 46rem; margin: 3rem auto 0;
  padding: 1.5rem; background: var(--brand-soft); border-radius: var(--radius);
}
/* Enlaces sobre fondo azul suave: azul más oscuro para contraste AA (4.5:1) */
.howlink .link-arrow, .map a, .notice a, .section--tint a:not(.btn) { color: var(--brand-deep); }
.howlink__icon { display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 16px; background: var(--white); color: var(--brand-dark); }
.howlink__title { font-weight: 800; font-size: 1.2rem; margin-bottom: .5rem; }
.howlink__steps { margin: 0 0 .5rem; padding-left: 1.25rem; }
.howlink__steps li { margin-bottom: .2rem; }
.howlink__steps li::marker { color: var(--brand-dark); font-weight: 800; }
@media (max-width: 599px) { .howlink { flex-direction: column; } }

/* Índice de pasos en la cabecera de ¿Cómo trabajamos? */
.hero-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; counter-reset: hs; }
.hero-steps li { counter-increment: hs; display: flex; align-items: center; gap: .75rem; font-weight: 700; font-size: var(--fs-lead); }
.hero-steps li::before {
  content: counter(hs); display: grid; place-items: center; flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; font-size: 1rem;
}

/* ---------- Línea temporal (¿Cómo trabajamos?) ---------- */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 50rem; position: relative; }
.timeline::before { /* línea vertical */
  content: ""; position: absolute; left: calc(1.5rem - 1px); top: 1rem; bottom: 1rem; width: 2px;
  background: linear-gradient(var(--brand), var(--brand-soft));
}
.timeline__item { position: relative; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding-bottom: 2rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__num {
  position: relative; z-index: 1; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--brand-dark); color: var(--white); font-weight: 800; font-size: 1.25rem; box-shadow: 0 0 0 6px var(--white);
}
.timeline__body { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.timeline__body h2 { font-size: clamp(1.25rem, 1.1rem + .7vw, 1.6rem); margin-bottom: .5rem; }
.timeline__lead { font-weight: 650; font-size: var(--fs-lead); }
.timeline__body ul { margin: 0; padding-left: 1.25rem; }
.timeline__body li { margin-bottom: .5rem; }
.timeline__body li::marker { color: var(--brand-dark); }
@media (min-width: 600px) {
  .timeline::before { left: calc(2rem - 1px); }
  .timeline__item { grid-template-columns: 4rem 1fr; gap: 1.5rem; }
  .timeline__num { width: 4rem; height: 4rem; font-size: 1.5rem; }
  .timeline__body { padding: 1.75rem 2rem; }
}

/* Dirección, horario y cita al final de ¿Cómo trabajamos? */
.visit { display: grid; gap: 1.5rem; padding: 1.75rem; background: var(--brand-soft); border-radius: var(--radius-lg); }
.visit__item { display: flex; gap: 1rem; align-items: flex-start; }
.visit__item .card__icon { background: var(--white); flex-shrink: 0; margin: 0; }
.visit__title { font-size: 1.15rem; margin-bottom: .35rem; }
.visit address, .visit__line { font-style: normal; margin: 0 0 .2rem; }
.visit__note { margin: .35rem 0 0; font-weight: 700; }
.visit__cta { display: flex; align-items: center; }
.visit__cta .btn { width: 100%; }
@media (min-width: 900px) {
  .visit { grid-template-columns: 1.2fr 1fr auto; align-items: center; padding: 2rem 2.5rem; }
  .visit__cta .btn { width: auto; }
}

/* ---------- Zona de atención y listas en tarjetas ---------- */
.chips { list-style: none; margin: 0 0 1.75rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { padding: .45rem .95rem; border-radius: 999px; background: var(--brand-dark); color: var(--white); font-weight: 700; font-size: var(--fs-small); }
.chips--light li { background: var(--white); color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.chips__title { font-size: 1.1rem; margin-bottom: .75rem; }
.visit__links { margin: .35rem 0 0; }
.visit__links a { color: var(--brand-deep); font-weight: 700; }
.card__list { margin: .75rem 0 0; padding-left: 1.25rem; color: var(--ink); }
.card__list li { margin-bottom: .4rem; }
.card__list li::marker { color: var(--brand-dark); }
.area-zone { max-width: 46rem; margin: 1.5rem auto 0; color: var(--muted); font-size: var(--fs-small); }

/* ---------- Quiénes somos ---------- */
.method-grid { max-width: 1000px; margin-inline: auto; }
.method-card h3 { font-size: 1.25rem; }
.method-card__num { color: var(--brand-dark); }
.method-card p { color: var(--ink); }

/* ---------- Contacto ---------- */
.contact-actions { display: grid; gap: .75rem; margin-top: 1.5rem; }
.contact-btn {
  display: flex; align-items: center; gap: 1rem; min-height: 72px; padding: .85rem 1.25rem;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.contact-btn:hover { border-color: var(--brand-dark); color: var(--ink); }
@media (prefers-reduced-motion: no-preference) { .contact-btn:hover { transform: translateY(-2px); } }
.contact-btn__icon { display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-dark); color: var(--white); }
.contact-btn__label { display: block; font-size: var(--fs-small); color: var(--muted); font-weight: 650; }
.contact-btn__value { display: block; font-weight: 800; font-size: 1.125rem; overflow-wrap: anywhere; }
.page-hero--contact .page-hero__media { order: 0; } /* en Contacto, los botones antes que la foto */

.contact-grid { display: grid; gap: 1.5rem; align-items: start; }
.contact-info { display: grid; gap: 1.25rem; }
.info-card__title { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; margin-bottom: .75rem; }
.info-card__title .icon { color: var(--brand-dark); }
.info-card address { font-style: normal; margin-bottom: .5rem; }
.info-card__more { margin: 0 0 1rem; font-size: var(--fs-small); }
.notice { display: flex; align-items: center; gap: .6rem; margin: 0; padding: .75rem 1rem; background: var(--brand-soft); border-radius: var(--radius-sm); color: var(--ink) !important; }
.notice .icon { color: var(--brand-dark); }
.hours { margin: 0; }
.hours div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.hours div:last-child { border-bottom: 0; }
.hours dt { font-weight: 700; }
.hours dd { margin: 0; white-space: nowrap; }

.map { border-radius: var(--radius); overflow: hidden; background: var(--brand-soft); }
.map__placeholder { display: grid; justify-items: center; gap: .75rem; padding: 2rem 1.25rem; text-align: center; }
.map__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--white); color: var(--brand-dark); }
.map__text { max-width: 28rem; margin: 0; font-size: var(--fs-small); color: var(--ink); }
.map__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.map iframe { display: block; width: 100%; height: 360px; border: 0; }

.form-card { padding: 1.5rem; }
.form-card h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem); }
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 700; }
.req { color: var(--brand-dark); }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field textarea {
  width: 100%; min-height: 48px; padding: .75rem 1rem;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 2px solid #B9D9EA; border-radius: var(--radius-sm);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 1px; border-color: var(--brand-dark); }
.field [aria-invalid="true"] { border-color: #B42318; }
.field__error { margin: 0; color: #B42318; font-weight: 700; font-size: var(--fs-small); }
.field__help { margin: -.5rem 0 0; color: var(--muted); font-size: var(--fs-small); }
.field .field__help { margin: 0; }
.field-row { display: grid; gap: 1.1rem; }
.field--check { grid-template-columns: auto 1fr; align-items: start; column-gap: .75rem; }
.field--check input { width: 24px; height: 24px; margin: .6rem 0 0; accent-color: var(--brand-dark); }
/* La etiqueta amplía la zona pulsable de la casilla hasta 44 px de alto */
.field--check label { font-weight: 500; min-height: 44px; padding-block: .5rem; }
.field--check .field__error { grid-column: 1 / -1; }
.field--hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__submit { width: 100%; }

/* Estado de la verificación de humano */
.pow-status {
  display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .6rem 1rem;
  border-radius: var(--radius-sm); background: var(--brand-bg); border: 1px solid var(--line);
  font-size: var(--fs-small); font-weight: 650; color: var(--ink);
}
.pow-status__icon, .pow-status__spinner { display: none; flex-shrink: 0; }
.pow-status__icon .icon { width: 1.2em; height: 1.2em; }
.pow-status__spinner {
  width: 1.1em; height: 1.1em; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--brand-dark);
}
@media (prefers-reduced-motion: no-preference) {
  .pow-status__spinner { animation: pow-giro .8s linear infinite; }
}
@keyframes pow-giro { to { transform: rotate(360deg); } }
.pow-status[data-state="working"] .pow-status__spinner { display: inline-block; }
.pow-status[data-state="ok"] { background: #E7F6EC; border-color: #A6DDB8; color: #11622F; }
.pow-status[data-state="ok"] .pow-status__icon--ok { display: inline-flex; }
.pow-status[data-state="error"] { background: #FDECEA; border-color: #F3B8B1; color: #8A1C12; }
.pow-status[data-state="error"] .pow-status__icon--error { display: inline-flex; }
.alert { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1.25rem; padding: 1rem 1.25rem; border-radius: var(--radius-sm); font-weight: 650; }
.alert p { margin: 0; }
.alert .icon { margin-top: .15em; }
.alert--ok { background: #E7F6EC; color: #11622F; border: 1px solid #A6DDB8; }
.alert--error { background: #FDECEA; color: #8A1C12; border: 1px solid #F3B8B1; }
.rgpd { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); line-height: 1.55; }
.rgpd p { margin: 0; }
.rgpd strong { color: var(--ink); }
@media (min-width: 600px) {
  .contact-actions { grid-template-columns: repeat(3, 1fr); }
  .contact-btn { flex-direction: column; align-items: flex-start; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .form-card { padding: 2rem; }
  .form__submit { width: auto; justify-self: start; }
}
@media (min-width: 900px) {
  .page-hero--contact .contact-actions { grid-template-columns: 1fr; }
  .page-hero--contact .contact-btn { flex-direction: row; align-items: center; }
}
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: 1fr 1.25fr; gap: 2rem; }
  .contact-info { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

/* ---------- 404 ---------- */
.error-page__inner { max-width: 40rem; text-align: center; }
.error-page__icon { width: 96px; height: auto; margin: 0 auto 1rem; }
.error-page .eyebrow::before { display: none; }
.error-page__actions { justify-content: center; }

/* ---------- Banner y panel de cookies ---------- */
.btn--consent { background: var(--brand-dark); color: var(--white); flex: 1 1 0; min-width: 0; padding-inline: 1rem; }
.btn--consent:hover { background: var(--brand-deep); color: var(--white); }

.consent-banner {
  position: fixed; z-index: 95; left: .5rem; right: .5rem;
  bottom: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom, 0px) + .5rem); /* encima de la barra móvil */
  max-height: calc(100vh - var(--header-h) - var(--mobile-bar-h) - 1.5rem); overflow-y: auto;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 40px -10px rgb(29 52 70 / .45);
}
.consent-banner[hidden], .consent-modal[hidden] { display: none; }
.consent-banner__inner { display: grid; gap: 1rem; padding: 1.1rem 1.1rem 1.25rem; }
.consent-banner__title { font-size: 1.1rem; margin-bottom: .35rem; }
.consent-banner p { margin: 0; font-size: var(--fs-small); line-height: 1.55; }
.consent-banner__actions, .consent-modal__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.consent-banner__actions .btn, .consent-modal__actions .btn { min-height: 46px; font-size: .9375rem; }
@media (max-width: 420px) {
  .consent-banner__actions, .consent-modal__actions { flex-direction: column; }
}
@media (min-width: 1024px) {
  .consent-banner { left: 1.5rem; right: auto; bottom: 1.5rem; max-width: 640px; }
  .consent-banner__inner { padding: 1.5rem; }
}

.consent-modal {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1rem;
  background: rgb(29 52 70 / .55);
}
.consent-modal__dialog {
  width: 100%; max-width: 560px; max-height: calc(100vh - 2rem); overflow-y: auto;
  padding: 1.5rem; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.consent-modal__dialog:focus { outline: none; }
.consent-modal__dialog:focus-visible { outline: 3px solid var(--brand-dark); }
.consent-modal__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.consent-modal__head h2 { font-size: 1.4rem; margin: 0; }
.consent-modal__close {
  display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0;
  border: 0; border-radius: 50%; background: var(--brand-soft); color: var(--ink); cursor: pointer;
}
.consent-modal p { font-size: var(--fs-small); }
.consent-cat { padding: 1rem 0; border-top: 1px solid var(--line); }
.consent-cat__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .35rem; }
.consent-cat h3 { font-size: 1.05rem; margin: 0; }
.consent-cat p { margin: 0; color: var(--muted); }
.consent-cat__always { font-size: var(--fs-small); font-weight: 750; color: var(--brand-dark); white-space: nowrap; }
.consent-modal__actions { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
body.consent-modal-open { overflow: hidden; }

/* Interruptor accesible (checkbox con role="switch") */
.switch { position: relative; display: inline-flex; align-items: center; min-width: 52px; min-height: 44px; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch__track {
  position: relative; width: 52px; height: 30px; border-radius: 999px; background: #A9B8C4; transition: background .2s var(--ease);
}
.switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--white); box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s var(--ease);
}
.switch input:checked + .switch__track { background: var(--brand-dark); }
.switch input:checked + .switch__track::after { transform: translateX(22px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--brand-dark); outline-offset: 3px; }

/* ---------- Páginas legales ---------- */
.legal { max-width: 46rem; margin-inline: auto; }
.legal h2 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); margin-top: 2.25rem; }
.legal h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: .4rem; }
.legal li::marker { color: var(--brand-dark); }
.legal__meta { color: var(--muted); font-size: var(--fs-small); }
.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.table-wrap table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: var(--fs-small); }
.table-wrap th, .table-wrap td { padding: .7rem .85rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap th { background: var(--brand-soft); font-weight: 750; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap code { font-size: .875em; background: var(--brand-bg); padding: .1em .35em; border-radius: 4px; }
.table-wrap:focus-visible { outline: 3px solid var(--brand-dark); }

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