/* Farmacia Málaga 15 · estilo «Mediterráneo»: blanco de cal, fotos en arco, Young Serif en los titulares y
   Figtree en el texto. Colores del logo: verde menta (#9ccdc8) y gris carbón (#231f20); para el texto y los
   botones se usa el mismo verde oscurecido (petróleo), que sí tiene buen contraste sobre fondo claro.
   Sin iconos decorativos, sin sombras ni degradados. Texto grande y con buen contraste. */

@font-face {
  font-family: "Young Serif";
  src: url("/assets/fonts/young-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --cal: #f6f3ec;          /* blanco de cal, el fondo */
  --cal-2: #ede7db;        /* arena clara, para alternar secciones */
  --blanco: #fffdf9;
  --tinta: #231f20;        /* el gris carbón del logo */
  --tinta-2: #554f4b;
  --filete: rgb(35 31 32 / 0.14);
  --petroleo: #2f6b65;     /* el verde del logo, oscurecido: titulares, enlaces y botones */
  --petroleo-hondo: #1f4a46;
  --menta: #9ccdc8;        /* verde oficial del logo: solo sobre fondo oscuro */
  --carbon: #231f20;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radio: 12px;
  --arco: 999px 999px var(--radio) var(--radio);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 92px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--cal);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 72px; /* hueco para la barra fija del móvil */
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; text-wrap: balance; color: var(--petroleo-hondo); }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
figure { margin: 0; }
address { font-style: normal; }
::selection { background: var(--petroleo); color: var(--blanco); }
:focus-visible { outline: 3px solid var(--petroleo); outline-offset: 3px; }

.sprite { display: none; }
[hidden] { display: none !important; }
.contenedor { width: min(1220px, 100%); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .contenedor { padding-inline: 36px; } }
.saltar { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--blanco); padding: 0.6rem 1rem; font-weight: 600; }
.saltar:focus { left: 8px; }
.cifras { font-variant-numeric: tabular-nums; }

/* ---------- Tipografía de apoyo ---------- */
/* Antetítulo con el símbolo del logo en pequeño */
.antetitulo { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 1rem; font-weight: 600; color: var(--petroleo); line-height: 1.4; }
.antetitulo::before { content: ""; flex: none; width: 1.05em; height: 1.05em; background: currentColor; -webkit-mask: url("/assets/img/simbolo.svg") center / contain no-repeat; mask: url("/assets/img/simbolo.svg") center / contain no-repeat; }
.titulo-seccion { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.5rem); }
.entradilla { font-size: 1.25rem; line-height: 1.55; color: var(--tinta-2); max-width: 46ch; }

/* ---------- Botones ---------- */
.botones { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 54px; padding: 0.8rem 1.4rem;
  font: 600 1.05rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  color: var(--petroleo-hondo); background: transparent;
  border: 2px solid var(--petroleo-hondo); border-radius: var(--radio);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.boton:hover { background: var(--petroleo-hondo); color: var(--blanco); }
.boton svg { width: 21px; height: 21px; flex: none; }
.boton-principal { background: var(--petroleo); border-color: var(--petroleo); color: var(--blanco); }
.boton-principal:hover { background: var(--petroleo-hondo); border-color: var(--petroleo-hondo); }
.boton-pequeno { min-height: 46px; padding: 0.5rem 1.1rem; font-size: 1rem; }
.enlace { display: inline-flex; gap: 0.45rem; align-items: center; font-weight: 600; color: var(--petroleo); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.enlace:hover { color: var(--petroleo-hondo); }
.enlace svg { width: 19px; height: 19px; flex: none; }

/* ---------- Franja superior ---------- */
.franja { background: var(--carbon); color: rgb(255 253 249 / 0.82); font-size: 0.97rem; }
.franja .contenedor { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem 1.5rem; flex-wrap: wrap; min-height: 42px; padding-block: 0.45rem; }
.franja a { color: var(--blanco); font-weight: 600; text-decoration: none; }
.franja a:hover { text-decoration: underline; }
.franja-der { display: none; gap: 1.5rem; } /* en el móvil el teléfono ya está en la barra fija de abajo */
@media (min-width: 600px) { .franja-der { display: flex; } }
.franja-dir { display: none; }
@media (min-width: 960px) { .franja-dir { display: inline; } }
.estado { font-weight: 700; color: var(--blanco); }
.estado::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; margin-right: 0.45em; border-radius: 50%; background: currentColor; vertical-align: 0.08em; }
.estado.abierto::before { background: var(--menta); }
.estado.cerrado::before { background: #f0a8a0; }

/* ---------- Cabecera ---------- */
.cabecera { position: sticky; top: 0; z-index: 20; background: var(--cal); border-bottom: 1px solid var(--filete); }
.cabecera .contenedor { display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; min-height: 80px; }
.marca { display: inline-flex; flex: none; text-decoration: none; }
.marca img { height: 46px; width: auto; }
@media (min-width: 720px) { .marca img { height: 54px; } }
.cabecera-der { display: flex; align-items: center; gap: 0.75rem; }
.cabecera-der .boton-llamar { display: none; }
@media (min-width: 900px) { .cabecera-der .boton-llamar { display: inline-flex; } }
.boton-menu { font: 600 1rem var(--sans); min-height: 46px; padding: 0.5rem 1rem; background: none; color: var(--petroleo-hondo); border: 2px solid var(--petroleo-hondo); border-radius: var(--radio); cursor: pointer; }
.nav { display: none; position: absolute; inset: 100% 0 auto; flex-direction: column; padding: 0.5rem 16px 1.5rem; background: var(--cal); border-bottom: 1px solid var(--filete); }
.nav[data-abierto] { display: flex; }
.nav a { font-family: var(--serif); font-size: 1.7rem; line-height: 1.25; padding: 0.45rem 0; text-decoration: none; color: var(--petroleo-hondo); }
@media (min-width: 1100px) {
  .cabecera .contenedor { min-height: 92px; }
  .nav { display: flex; position: static; flex-direction: row; gap: 1.75rem; margin-left: auto; padding: 0; border: 0; background: none; white-space: nowrap; }
  .nav a { font: 600 1.02rem var(--sans); color: var(--tinta); padding: 0.35rem 0; border-bottom: 2px solid transparent; }
  .nav a:hover { color: var(--petroleo); border-bottom-color: var(--menta); }
  .boton-menu { display: none; }
}

/* ---------- Portada ---------- */
.portada { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.portada-rejilla { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 960px) { .portada-rejilla { grid-template-columns: 1.2fr 1fr; gap: 4.5rem; } }
.portada-texto { display: grid; gap: 1.5rem; justify-items: start; }
.portada h1 { font-size: clamp(3rem, 1.6rem + 5.4vw, 5.6rem); line-height: 1; letter-spacing: -0.02em; }
.portada h1 span { display: block; color: var(--petroleo); }
.portada-foto { position: relative; justify-self: center; width: min(440px, 100%); }
@media (min-width: 960px) { .portada-foto { justify-self: end; } }
.portada-foto img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--arco); background: var(--cal-2); }
.portada-foto figcaption { padding-top: 0.8rem; font-size: 0.97rem; color: var(--tinta-2); text-align: center; }
/* Sello circular con el nombre del pueblo y el símbolo del logo */
.sello { position: absolute; width: 132px; height: 132px; left: -34px; bottom: 54px; }
@media (max-width: 599px) { .sello { width: 104px; height: 104px; left: -6px; bottom: 50px; } }
.sello-fondo { fill: var(--blanco); stroke: var(--filete); }
.sello-texto { font: 700 14.5px var(--sans); letter-spacing: 0.14em; fill: var(--petroleo-hondo); }

/* Datos prácticos bajo la portada */
.datos { display: grid; margin-top: clamp(2.75rem, 5vw, 4rem); background: var(--blanco); border: 1px solid var(--filete); border-radius: var(--radio); }
@media (min-width: 900px) { .datos { grid-template-columns: repeat(3, 1fr); } }
.dato { display: grid; gap: 0.3rem; align-content: start; padding: 1.5rem; border-top: 1px solid var(--filete); }
.dato:first-child { border-top: 0; }
@media (min-width: 900px) { .dato { padding: 1.75rem 2rem; border-top: 0; border-left: 1px solid var(--filete); } .dato:first-child { border-left: 0; } }
.dato h2 { font: 700 0.97rem/1.4 var(--sans); color: var(--petroleo); margin-bottom: 0.35rem; }
.dato-valor { font-family: var(--serif); font-size: 1.55rem; line-height: 1.25; color: var(--petroleo-hondo); }
.dato a { text-decoration: none; }
.dato a:hover { text-decoration: underline; }
.dato .enlace { text-decoration: underline; margin-top: 0.35rem; }
.dato .nota { font-size: 0.97rem; color: var(--tinta-2); }

/* ---------- Secciones ---------- */
.seccion { padding-block: clamp(3.75rem, 8vw, 6.5rem); }
.seccion-arena { background: var(--cal-2); }
.seccion-cabeza { display: grid; gap: 1rem; justify-items: center; text-align: center; max-width: 760px; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); }
.seccion-cabeza .entradilla { margin-inline: auto; }

/* Servicios destacados: dos bloques grandes */
.destacados { display: grid; gap: 1.25rem; margin-bottom: 1.25rem; }
@media (min-width: 860px) { .destacados { grid-template-columns: 1fr 1fr; } }
.destacados > li { display: grid; gap: 0.8rem; align-content: start; padding: clamp(1.75rem, 3vw, 2.5rem); background: var(--blanco); border: 1px solid var(--filete); border-radius: var(--radio); }
.destacados h3 { font-size: clamp(1.7rem, 1.4rem + 1vw, 2.1rem); }
.destacados p { color: var(--tinta-2); }
.lista-limpia { list-style: none; margin: 0; padding: 0; }

/* Resto de servicios: rejilla con filetes, sin iconos */
.servicios { display: grid; gap: 1px; background: var(--filete); border: 1px solid var(--filete); border-radius: var(--radio); overflow: hidden; }
@media (min-width: 680px) { .servicios { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .servicios { grid-template-columns: repeat(3, 1fr); } }
.servicios > li { display: grid; gap: 0.5rem; align-content: start; padding: 1.6rem 1.5rem 1.8rem; background: var(--cal); }
.servicios h3 { font-size: 1.45rem; }
.servicios p { color: var(--tinta-2); font-size: 1.05rem; }

/* Análisis con cita previa */
.analisis { display: grid; gap: 1.25rem; }
@media (min-width: 860px) { .analisis { grid-template-columns: repeat(3, 1fr); } }
.analisis > li { display: grid; gap: 0.7rem; align-content: start; justify-items: start; padding: 1.75rem; background: var(--blanco); border: 1px solid var(--filete); border-radius: var(--radio); }
.analisis-cuando { font-size: 0.97rem; font-weight: 700; color: var(--petroleo); }
.analisis h3 { font-size: 1.6rem; }
.analisis p:not(.analisis-cuando) { color: var(--tinta-2); }
.analisis .enlace { margin-top: 0.3rem; }
.analisis-nota { margin-top: 1.75rem; text-align: center; color: var(--tinta-2); }
.analisis-nota a { color: var(--petroleo); font-weight: 600; }

/* Nuestra historia */
.historia-rejilla { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 960px) { .historia-rejilla { grid-template-columns: 1fr 1.25fr; gap: 5rem; } }
.historia-foto { justify-self: center; width: min(420px, 100%); }
.historia-foto img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--arco); background: var(--cal-2); }
.historia-foto figcaption { padding-top: 0.8rem; font-size: 0.97rem; color: var(--tinta-2); text-align: center; }
.historia-texto { display: grid; gap: 1.2rem; justify-items: start; }
.historia-texto .titulo-seccion { margin-bottom: 0.4rem; }
.historia-texto p:not(.antetitulo) { max-width: 58ch; }

/* Banda de guardias */
.banda { background: var(--petroleo-hondo); color: var(--blanco); }
.banda .contenedor { display: grid; gap: 1.25rem 3rem; align-items: center; padding-block: clamp(2.5rem, 5vw, 3.5rem); }
@media (min-width: 900px) { .banda .contenedor { grid-template-columns: 1fr auto; } }
.banda h2 { color: var(--blanco); font-size: clamp(1.8rem, 1.4rem + 1.5vw, 2.5rem); margin-bottom: 0.5rem; }
.banda p { color: rgb(255 253 249 / 0.85); max-width: 60ch; }
.banda .boton { color: var(--blanco); border-color: var(--menta); }
.banda .boton:hover { background: var(--menta); color: var(--carbon); }

/* Visítanos */
.visita-rejilla { display: grid; gap: 3rem; }
@media (min-width: 1000px) { .visita-rejilla { grid-template-columns: 1fr 1.15fr; gap: 4.5rem; } }
.visita-info { display: grid; gap: 1.5rem; align-content: start; }
.visita-info > div:first-child { display: grid; gap: 1rem; justify-items: start; }
.visita-info address { font-size: 1.25rem; }
.horario-bloque h3 { font: 700 1.05rem/1.4 var(--sans); margin-bottom: 0.5rem; color: var(--petroleo-hondo); }
.datos-contacto { margin: 0; display: grid; gap: 0.5rem; }
.datos-contacto div { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.datos-contacto dt { min-width: 7.5rem; color: var(--tinta-2); }
.datos-contacto dd { margin: 0; font-weight: 600; }
.datos-contacto a { text-decoration-color: var(--filete); text-underline-offset: 3px; }
.datos-contacto a:hover { text-decoration-color: currentColor; }

/* Listas de horario */
.horario-lista { margin: 0; display: grid; max-width: 30rem; }
.horario-lista div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--filete); }
.horario-lista dt { font-weight: 600; }
.horario-lista dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.horario-lista .hoy dt::after { content: " · hoy"; color: var(--petroleo); font-weight: 700; }
.dato .horario-lista div { border: 0; padding: 0; display: block; }
.dato .horario-lista dt { font-weight: 400; color: var(--tinta-2); font-size: 0.97rem; }
.dato .horario-lista dd { font-family: var(--serif); font-size: 1.35rem; color: var(--petroleo-hondo); text-align: left; }
.dato .horario-lista div + div { margin-top: 0.45rem; }

/* Mapa bajo demanda */
.mapa { position: relative; display: grid; min-height: 380px; overflow: hidden; border-radius: var(--radio); background: var(--cal-2); border: 1px solid var(--filete); }
@media (min-width: 1000px) { .mapa { min-height: 520px; } }
.mapa iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }
.mapa-aviso { align-self: center; justify-self: center; display: grid; gap: 1rem; justify-items: center; text-align: center; max-width: min(26rem, calc(100% - 2rem)); padding: 2rem 1.5rem; }
.mapa-titulo { font-family: var(--serif); font-size: 1.8rem; line-height: 1.15; color: var(--petroleo-hondo); }
.mapa-aviso p:not(.mapa-titulo) { font-size: 0.97rem; color: var(--tinta-2); }

/* ---------- Pie ---------- */
.pie { background: var(--carbon); color: rgb(255 253 249 / 0.8); padding-top: clamp(3.5rem, 8vw, 5.5rem); font-size: 1rem; }
.pie a { text-decoration: none; }
.pie a:hover { color: var(--blanco); text-decoration: underline; }
.pie-cabeza { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgb(255 253 249 / 0.16); }
.pie-cabeza img { height: 62px; width: auto; }
.pie-lema { font-family: var(--serif); font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.4rem); line-height: 1.1; color: var(--menta); }
.pie-rejilla { display: grid; gap: 2.5rem; padding-block: 2.75rem; }
@media (min-width: 720px) { .pie-rejilla { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .pie-rejilla { grid-template-columns: repeat(4, 1fr); } }
.pie h2 { font: 700 0.97rem/1.4 var(--sans); color: var(--menta); margin-bottom: 0.9rem; }
.pie p + p { margin-top: 0.8rem; }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.pie-final { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 1.5rem; padding-block: 1.5rem; border-top: 1px solid rgb(255 253 249 / 0.16); font-size: 0.93rem; }
.pie-final nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

/* ---------- Barra fija en el móvil ---------- */
.barra-movil { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--carbon); padding-bottom: env(safe-area-inset-bottom); }
.barra-movil a { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.65rem 0.25rem 0.7rem; color: var(--blanco); text-decoration: none; font-size: 0.93rem; font-weight: 600; }
.barra-movil a + a { border-left: 1px solid rgb(255 255 255 / 0.15); }
.barra-movil svg { width: 22px; height: 22px; }
@media (min-width: 900px) { .barra-movil { display: none; } }

/* ---------- Páginas legales ---------- */
.legal { padding-block: clamp(2.5rem, 6vw, 5rem); }
.legal .contenedor { max-width: 48rem; }
.legal h1 { font-size: clamp(2.5rem, 1.8rem + 2.4vw, 3.6rem); margin-bottom: 0.75rem; }
.legal .actualizado { color: var(--tinta-2); font-size: 1rem; margin-bottom: 2.5rem; }
.legal h2 { font-size: clamp(1.6rem, 1.35rem + 0.8vw, 2rem); margin: 2.5rem 0 0.9rem; padding-top: 1.5rem; border-top: 1px solid var(--filete); }
.legal p + p { margin-top: 1rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: 0.4rem; }
.legal a { color: var(--petroleo); }
.volver { display: inline-block; margin-bottom: 2rem; font-weight: 600; }
.error { padding-block: clamp(3rem, 10vw, 7rem); }
.error .contenedor { display: grid; gap: 1.25rem; justify-items: start; }
.error h1 { font-size: clamp(2.8rem, 2rem + 3vw, 4.4rem); }
.error p:not(.antetitulo) { max-width: 52ch; color: var(--tinta-2); }

/* Marca de dato pendiente: visible a propósito hasta que se rellene */
mark.pendiente { background: #ffe58a; color: var(--tinta); padding: 0 0.2em; }

@media print {
  .franja, .barra-movil, .mapa, .boton-menu, .banda, .sello { display: none !important; }
  .cabecera { position: static; }
  body { padding-bottom: 0; }
}
