/* ¿Cuándo hay puente? — minimalismo editorial con identidad de calendario:
   blancos cálidos, tinta casi negra, rojo de hoja de calendario y números en serif. */
:root {
  --fondo: #fafaf8;
  --superficie: #ffffff;
  --tinta: #151515;
  --tinta-2: #5f5f5c;
  --linea: #e8e8e5;
  --linea-2: #d9d9d4;
  --borde-campo: #8a8a84;
  --rojo: #c8102e;
  --rojo-hover: #a50d26;
  --rojo-suave: #fdf0f1;
  --verde: #0f6e63;
  --verde-suave: #ecf6f4;
  --finde: #f3f3f0;
  --foco: #2563eb;
  --sombra-1: 0 1px 2px rgba(21, 21, 21, .04);
  --sombra-2: 0 1px 2px rgba(21, 21, 21, .04), 0 12px 32px -16px rgba(21, 21, 21, .16);
  --radio: 14px;
  --radio-s: 10px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --suave: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #111110;
    --superficie: #1a1a19;
    --tinta: #f2f2ef;
    --tinta-2: #a9a9a3;
    --linea: #2a2a28;
    --linea-2: #3a3a37;
    --borde-campo: #8c8c86;
    --rojo: #ff6b7a;
    --rojo-hover: #ff8794;
    --rojo-suave: #2d1518;
    --verde: #6fd3c2;
    --verde-suave: #12302b;
    --finde: #222220;
    --foco: #93b4ff;
    --sombra-1: none;
    --sombra-2: 0 12px 32px -16px rgba(0, 0, 0, .7);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--fondo); color: var(--tinta); font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--rojo); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--rojo-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; letter-spacing: -.025em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 3.4vw, 3.4rem); margin: .25em 0 .4em; letter-spacing: -.035em; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); margin: 0 0 .9rem; }
h3 { font-size: 1.05rem; margin: 0 0 .3rem; letter-spacing: -.01em; }
p { text-wrap: pretty; }
.saltar { position: absolute; left: -999px; top: 0; background: var(--tinta); color: var(--fondo); padding: .6rem 1rem; z-index: 20; }
.saltar:focus { left: 1rem; }
[hidden] { display: none !important; }

.envoltura { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .envoltura { padding: 0 28px; } }

/* Cabecera: fija y translúcida; en móvil el menú es una fila deslizable */
.cabecera { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--fondo) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--linea); }
.cabecera-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .2rem 1.5rem; padding-top: .7rem; padding-bottom: .55rem; }
.marca { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--tinta); }
.marca:hover { color: var(--tinta); }
.marca-hoja { position: relative; width: 30px; height: 32px; border-radius: 7px; background: var(--superficie); border: 1.5px solid var(--rojo); display: grid; place-items: end center; padding-bottom: 1px; overflow: hidden; transition: transform .3s var(--suave); }
.marca:hover .marca-hoja { transform: rotate(-6deg); }
.marca-hoja::before { content: ""; position: absolute; inset: 0 0 auto; height: 9px; background: var(--rojo); }
.marca-hoja b { font: 700 14px/1 var(--serif); color: var(--rojo); }
.marca-txt { font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; }
.marca-txt em, .pie-marca em { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--rojo); }
nav[aria-label="Principal"] { width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
nav[aria-label="Principal"]::-webkit-scrollbar { display: none; }
.menu { list-style: none; display: flex; gap: .3rem; margin: 0; padding: 0 2rem 0 0; white-space: nowrap; font-size: .92rem; }
.menu a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 .75rem; border-radius: 99px; color: var(--tinta-2); text-decoration: none; transition: background .2s, color .2s; }
.menu a:hover { color: var(--tinta); background: var(--finde); }
.menu a[aria-current] { color: var(--tinta); background: var(--superficie); box-shadow: inset 0 0 0 1px var(--linea-2); }
@media (min-width: 1000px) {
  nav[aria-label="Principal"] { width: auto; -webkit-mask-image: none; mask-image: none; }
  .menu { padding: 0; }
}

/* Rejilla */
.rejilla { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-top: 1.5rem; padding-bottom: 4rem; }
@media (min-width: 1040px) { .rejilla { grid-template-columns: minmax(0, 1fr) 280px; gap: 3rem; } }
.lateral { display: none; }
@media (min-width: 1040px) { .lateral { display: block; } }
.caja-lateral { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.1rem 1.2rem; box-shadow: var(--sombra-1); }
.caja-lateral h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--tinta-2); margin: 0 0 .7rem; }
.lista-ccaa { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.lista-ccaa li { border-top: 1px solid var(--linea); }
.lista-ccaa li:first-child { border-top: 0; }
.lista-ccaa a { display: block; padding: .38rem 0; color: var(--tinta); text-decoration: none; transition: color .15s, padding .2s var(--suave); }
.lista-ccaa a:hover { color: var(--rojo); padding-left: .3rem; }

/* Migas */
.migas ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 0 0 .8rem; font-size: .85rem; color: var(--tinta-2); }
.migas li + li::before { content: "/"; margin-right: .35rem; color: var(--linea-2); }
.migas a { color: var(--tinta-2); text-decoration: none; }
.migas a:hover { color: var(--tinta); text-decoration: underline; }

/* Encabezados de página */
.antetitulo { display: inline-flex; align-items: center; gap: .5rem; text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 650; color: var(--rojo); margin: 0; }
.antetitulo::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.entradilla { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.55; color: var(--tinta-2); max-width: 62ch; margin: 0 0 1.2rem; }
.entradilla strong { color: var(--tinta); font-weight: 650; }
.cab-pagina { margin-bottom: 1.8rem; }
.destacado { display: inline-block; background: var(--rojo-suave); border-left: 3px solid var(--rojo); padding: .55rem .9rem; border-radius: 0 8px 8px 0; }

/* Hero de portada */
.hero { position: relative; padding: clamp(1.4rem, 4vw, 3rem) 0 1rem; }
.hero h1 span { display: block; margin-top: .35em; font-size: .42em; font-weight: 600; letter-spacing: -.015em; color: var(--tinta-2); }
.buscador { display: grid; gap: .45rem; max-width: 560px; margin-top: .4rem; }
.buscador label { font-weight: 600; font-size: .9rem; }
.buscador-fila { display: flex; flex-wrap: wrap; gap: .5rem; }
.buscador-fila select { flex: 1 1 220px; width: auto; }
.respuesta { margin-top: 1.4rem; max-width: 640px; background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.2rem 1.3rem; box-shadow: var(--sombra-2); animation: aparece .45s var(--suave); }
.respuesta p { margin: 0; }
.respuesta-et { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 650; color: var(--tinta-2); }
.respuesta-titulo { font-size: clamp(1.25rem, 1.1rem + .8vw, 1.6rem); font-weight: 700; letter-spacing: -.02em; margin: .2rem 0 .3rem !important; }
.respuesta-titulo b { color: var(--rojo); }
.respuesta-detalle { color: var(--tinta-2); }
.respuesta-siguientes { list-style: none; margin: .9rem 0 0; padding: .8rem 0 0; border-top: 1px solid var(--linea); display: grid; gap: .3rem; font-size: .95rem; color: var(--tinta-2); }
.respuesta-siguientes b { color: var(--tinta); margin-right: .2rem; }
.respuesta-fest { margin-top: .8rem !important; padding-top: .8rem; border-top: 1px solid var(--linea); font-size: .95rem; }
@keyframes aparece { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Bloques de contenido */
.bloque { margin-top: clamp(2.2rem, 5vw, 3.5rem); }
.bloque-cab { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; margin-bottom: 1rem; }
.bloque-cab h2 { margin: 0; }
.bloque-cab a { font-size: .92rem; font-weight: 550; text-decoration: none; }
.bloque-cab a::after { content: " →"; }
article > h2, article > section > h2, .texto h2 { margin-top: 2.6rem; }

/* Formularios y botones */
select, input[type="text"], input[type="date"], input[type="number"], input[type="search"] {
  font: inherit; color: var(--tinta); background: var(--superficie); border: 1px solid var(--borde-campo);
  border-radius: var(--radio-s); padding: .6rem .8rem; min-height: 46px; width: 100%; transition: border-color .15s, box-shadow .15s;
}
select:hover, input:hover { border-color: var(--tinta-2); }
select:focus, input:focus { outline: none; border-color: var(--foco); box-shadow: 0 0 0 4px color-mix(in srgb, var(--foco) 18%, transparent); }
.boton, .boton-sec { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .6rem 1.2rem; border-radius: var(--radio-s); font: 600 .98rem var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, transform .15s var(--suave), border-color .2s, color .2s; }
.boton { background: var(--rojo); color: #fff; border: 0; }
.boton:hover { background: var(--rojo-hover); color: #fff; }
.boton:active, .boton-sec:active { transform: scale(.97); }
@media (prefers-color-scheme: dark) { .boton, .boton:hover { color: #111; } }
.boton-sec { background: var(--superficie); color: var(--tinta); border: 1px solid var(--linea-2); margin: .2rem .35rem .2rem 0; }
.boton-sec:hover { border-color: var(--tinta); color: var(--tinta); }
.calc { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); padding: clamp(1rem, 3vw, 1.6rem); box-shadow: var(--sombra-2); }
.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; margin-bottom: .9rem; }
.campos label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
.campos label.check { display: flex; align-items: center; gap: .55rem; font-weight: 500; }
.check input { width: 24px; height: 24px; accent-color: var(--rojo); }
.ayuda { font-size: .9rem; color: var(--tinta-2); margin: 0 0 .6rem; }
.resultado:empty { display: none; }
.resultado { margin-top: 1.6rem; animation: aparece .4s var(--suave); }
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .7rem; }
.cifra { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio-s); padding: 1rem 1.1rem; }
.cifra b { display: block; font: 700 2.1rem/1.05 var(--serif); color: var(--rojo); font-variant-numeric: tabular-nums; }
.cifra span { font-size: .88rem; color: var(--tinta-2); }
.error { color: var(--rojo); font-weight: 600; }

/* Tablas */
.tabla-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--linea); border-radius: var(--radio); background: var(--superficie); box-shadow: var(--sombra-1); }
.tabla-festivos { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabla-festivos th, .tabla-festivos td { padding: .7rem .95rem; text-align: left; border-bottom: 1px solid var(--linea); vertical-align: top; }
.tabla-festivos thead th { font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta-2); background: var(--finde); }
.tabla-festivos tbody tr { transition: background .15s; }
.tabla-festivos tbody tr:hover { background: color-mix(in srgb, var(--finde) 60%, transparent); }
.tabla-festivos tbody tr:last-child td, .tabla-festivos tbody tr:last-child th { border-bottom: 0; }
.tabla-festivos td:first-child { white-space: nowrap; }
.tabla-festivos time b { display: inline-block; min-width: 1.4em; font: 700 1.25rem var(--serif); color: var(--rojo); font-variant-numeric: tabular-nums; }
.tabla-festivos tr.en-finde td { color: var(--tinta-2); }
.tabla-festivos tr.en-finde time b { color: var(--tinta-2); }
.tabla-festivos tr.en-finde td:nth-child(2)::after { content: " · cae en fin de semana"; font-size: .8rem; }
.tabla-num td:not(:first-child), .tabla-num th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.tabla-num tfoot th, .tabla-num tfoot td { font-weight: 700; border-top: 1px solid var(--linea-2); }
.tabla-puente tbody th { font-weight: 600; white-space: nowrap; }
.tabla-puente tbody th a { color: var(--tinta); text-decoration: none; }
.tabla-puente tbody th a:hover { color: var(--rojo); text-decoration: underline; }
.tabla-puente td small { display: block; margin-top: .25rem; color: var(--tinta-2); font-size: .85rem; line-height: 1.45; }
.estado { display: inline-block; font-size: .8rem; font-weight: 650; padding: .15rem .55rem; border-radius: 99px; white-space: nowrap; }
.estado-largo { background: var(--verde-suave); color: var(--verde); }
.estado-pedir { background: var(--rojo-suave); color: var(--rojo); }
.estado-sin { background: var(--finde); color: var(--tinta-2); }
.chip { display: inline-block; font-size: .74rem; font-weight: 650; padding: .12rem .55rem; border-radius: 99px; white-space: nowrap; }
.chip-nac { background: var(--rojo-suave); color: var(--rojo); }
.chip-auto { background: var(--verde-suave); color: var(--verde); }
.chip-local { background: var(--finde); color: var(--tinta); box-shadow: inset 0 0 0 1px var(--linea-2); }
.fuente { font-size: .84rem; color: var(--tinta-2); margin-top: .7rem; }
.fuente a { color: var(--tinta-2); }
.nota { background: var(--superficie); border: 1px solid var(--linea); border-left: 3px solid var(--verde); border-radius: 0 var(--radio-s) var(--radio-s) 0; padding: .7rem 1rem; margin-top: 1rem; }
.nota .tabla-scroll { margin: .6rem 0 .4rem; box-shadow: none; }

/* Tarjetas: comunidades, destacados y herramientas */
.rejilla-ccaa { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: .6rem; }
.rejilla-ccaa a, .destacados a, .tarjetas a {
  display: flex; flex-direction: column; gap: .15rem; height: 100%; text-decoration: none; color: var(--tinta);
  background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio-s);
  transition: transform .25s var(--suave), box-shadow .25s var(--suave), border-color .2s;
}
.rejilla-ccaa a:hover, .destacados a:hover, .tarjetas a:hover { transform: translateY(-2px); box-shadow: var(--sombra-2); border-color: var(--linea-2); color: var(--tinta); }
.rejilla-ccaa a { padding: .8rem .95rem; min-height: 44px; }
.rejilla-ccaa span { font-weight: 600; }
.rejilla-ccaa small { color: var(--tinta-2); font-size: .84rem; }
.destacados { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: .7rem; }
.destacados a { padding: 1rem 1.1rem; }
.dest-mes { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 650; color: var(--rojo); }
.destacados b { font-size: 1.05rem; letter-spacing: -.01em; }
.destacados small { color: var(--tinta-2); font-size: .86rem; }
.tarjetas { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: .8rem; }
.tarjetas a { padding: 1.2rem 1.25rem; }
.tarjeta-icono { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--rojo-suave); color: var(--rojo); font-weight: 700; margin-bottom: .7rem; }
.tarjetas p { margin: 0; color: var(--tinta-2); font-size: .94rem; }

/* Calendario anual */
.anual { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr)); gap: .8rem; }
.mini-mes { width: 100%; border-collapse: separate; border-spacing: 2px; background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio-s); padding: .55rem .5rem .6rem; font-variant-numeric: tabular-nums; font-size: .84rem; }
.mini-mes caption { font-weight: 650; text-align: left; padding: 0 0 .4rem .25rem; caption-side: top; }
.mini-mes th { font-size: .68rem; color: var(--tinta-2); padding: .2rem 0; font-weight: 600; }
.mini-mes td { text-align: center; padding: .28rem 0; border-radius: 6px; }
.mini-mes td.finde { color: var(--tinta-2); background: var(--finde); }
.mini-mes td.fest { background: var(--rojo); color: #fff; font-weight: 700; }
@media (prefers-color-scheme: dark) { .mini-mes td.fest { color: #111; } }
.mini-mes td.pedir { box-shadow: inset 0 0 0 2px var(--verde); color: var(--verde); font-weight: 700; }
.leyenda { font-size: .86rem; color: var(--tinta-2); display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; }
.ley { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-left: .5rem; vertical-align: middle; }
.ley-fest { background: var(--rojo); }
.ley-pedir { box-shadow: inset 0 0 0 2px var(--verde); }
.ley-finde { background: var(--finde); border: 1px solid var(--linea); }

/* Puentes */
.puentes { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.puente { display: grid; grid-template-columns: 70px 1fr; gap: 1rem; align-items: start; background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio-s); padding: .95rem 1.05rem; transition: border-color .2s; }
.puente:hover { border-color: var(--linea-2); }
.puente p { margin: 0; }
.puente h3 { margin: .1rem 0 .2rem; }
.puente-dias { text-align: center; border-radius: 10px; padding: .45rem 0; background: var(--rojo-suave); color: var(--rojo); }
.puente-dias b { display: block; font: 700 1.85rem/1 var(--serif); }
.puente-dias span { font-size: .74rem; }
.puente-largo .puente-dias { background: var(--verde-suave); color: var(--verde); }
.puente-et { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 650; color: var(--tinta-2); }

/* FAQ y texto */
.faq { margin-top: 2.6rem; }
.faq details { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio-s); padding: 0 1.1rem; margin-bottom: .5rem; transition: border-color .2s; }
.faq details[open] { border-color: var(--linea-2); }
.faq summary { cursor: pointer; font-weight: 600; padding: .85rem 0; min-height: 44px; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--tinta-2); font-weight: 400; font-size: 1.3rem; line-height: 1; transition: transform .25s var(--suave); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 0; color: var(--tinta-2); }
.texto { max-width: 70ch; }
.legal h2 { font-size: 1.2rem; }
mark.pendiente { background: var(--rojo-suave); color: var(--rojo); padding: 0 .3em; border-radius: 4px; }
.otros { margin-top: 2.4rem; }
.lista-ciudades { columns: 2; }

/* Anuncios: vacíos hasta activar AdSense, nunca junto a botones o resultados */
.ad-slot:empty { display: none; }
.ad-slot { margin: 2.5rem 0; min-height: 100px; }
.ad-etiqueta { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--tinta-2); margin-bottom: .25rem; }

/* Pie */
.pie { border-top: 1px solid var(--linea); font-size: .9rem; color: var(--tinta-2); }
.pie-in { display: grid; gap: 1.5rem; padding-top: 2.4rem; padding-bottom: 2.4rem; }
@media (min-width: 760px) { .pie-in { grid-template-columns: 2fr 1fr; } }
.pie-marca { font-weight: 700; font-size: 1.1rem; color: var(--tinta); margin: 0; letter-spacing: -.02em; }
.pie-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.pie-links a { color: var(--tinta-2); text-decoration: none; }
.pie-links a:hover { color: var(--tinta); text-decoration: underline; }

/* Aparición suave al hacer scroll, solo donde el navegador lo soporta */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .bloque, .puente, .mini-mes, .faq details { animation: aparece linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Buscador de municipios y listas simples */
.filtro { display: grid; gap: .35rem; max-width: 420px; margin: 0 0 1rem; font-weight: 600; font-size: .9rem; }
.filtro input { font: inherit; color: var(--tinta); background: var(--superficie); border: 1px solid var(--borde-campo); border-radius: var(--radio-s); padding: .6rem .8rem; min-height: 46px; }
.filtro input:focus { outline: none; border-color: var(--foco); box-shadow: 0 0 0 4px color-mix(in srgb, var(--foco) 18%, transparent); }
.lista-simple { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.lista-simple li { padding: .55rem .9rem; background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio-s); }
