/* Bosques Amador — estilos
   Paleta tomada del lugar: pino de los cerros, tierra roja del predio y la neblina de Zacatlán.
   Tipografía: Bitter (letrero de parque) para títulos y Public Sans para el texto. */

:root {
  --pino: #1e3b2f;
  --pino-2: #2b5141;
  --musgo: #5f7a55;
  --tierra: #8c3b26;
  --tierra-2: #a9503a;
  --arena: #f2c27e;
  --neblina: #edf0eb;
  --papel: #f8f9f6;
  --tinta: #17211b;
  --tinta-suave: #4d5a51;
  --linea: #d4dbd2;

  --disponible: #3faf5e;
  --apartado: #e39b1b;
  --vendido: #c93a2e;
  --area: #1e6b3a;

  --titulo: "Bitter", Georgia, serif;
  --texto: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ancho: 1240px;
  --radio: 10px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--texto);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--titulo); font-weight: 600; line-height: 1.1; margin: 0; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--apartado); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; color: var(--pino); padding: .5rem 1rem; border-radius: 6px; }
.saltar:focus { left: 8px; }

/* ---------- Video de fondo ---------- */
.video-fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; background: var(--pino); }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .7rem 1.4rem;
  border-radius: 6px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.boton svg { width: 1.25rem; height: 1.25rem; }
.boton-tierra { background: var(--tierra); color: #fff; }
.boton-tierra:hover { background: var(--tierra-2); }
.boton-pino { background: var(--pino); color: #fff; }
.boton-pino:hover { background: var(--pino-2); }
.boton-contorno { border-color: rgba(255,255,255,.75); color: #fff; }
.boton-contorno:hover { background: rgba(255,255,255,.14); }
.boton-claro { background: #fff; color: var(--pino); }
.boton-claro:hover { background: var(--neblina); }
.boton-whatsapp { background: #1f7a4a; color: #fff; width: 100%; }
.boton-whatsapp:hover { background: #18643c; }
.boton-texto { background: none; border: 0; color: var(--pino-2); padding: .4rem; min-height: 40px; text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }

/* ---------- Barra superior ---------- */
.barra {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; gap: 2rem;
  padding: .85rem clamp(1rem, 4vw, 2.5rem);
  color: #fff;
  transition: background-color .25s, box-shadow .25s;
}
.barra.solida { background: rgba(30, 59, 47, .97); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.marca { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.marca-sello { width: 30px; height: 30px; flex: none; }
.marca-texto { font-family: var(--titulo); font-weight: 700; font-size: 1.3rem; line-height: 1; }
.menu { display: flex; gap: 1.5rem; margin-left: auto; }
.menu a { text-decoration: none; font-weight: 500; font-size: .95rem; opacity: .9; }
.menu a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.barra-cta { min-height: 40px; padding: .45rem 1.1rem; font-size: .92rem; }
@media (max-width: 980px) { .menu { display: none; } .barra-cta { margin-left: auto; } }

/* ---------- Portada ---------- */
.hero {
  position: relative; min-height: min(100svh, 900px);
  display: grid; align-content: end;
  color: #fff; overflow: hidden; isolation: isolate;
  padding: 8rem clamp(1rem, 5vw, 4rem) 2.25rem;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(16,30,23,.5) 0%, rgba(16,30,23,0) 22%),
    linear-gradient(0deg, rgba(16,30,23,.9) 0%, rgba(16,30,23,.45) 40%, rgba(16,30,23,0) 66%);
}
.hero-contenido { max-width: 780px; }
.hero-lugar { font-family: var(--titulo); font-weight: 600; font-size: clamp(1.15rem, 2.2vw, 1.5rem); color: var(--arena); }
.hero-lema .resalte { font-weight: 700; color: #fff; }
.hero h1 { margin-top: .35rem; font-size: clamp(3.3rem, 10.5vw, 7.6rem); font-weight: 700; line-height: .9; letter-spacing: -.02em; }
.hero-lema { margin-top: 1.1rem; font-size: clamp(1.1rem, 2.3vw, 1.35rem); max-width: 36ch; color: #eef2e8; }
.hero-acciones { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-datos {
  display: flex; flex-wrap: wrap; gap: 1.2rem 3rem; margin: 3rem 0 0; padding-top: 1.3rem;
  border-top: 1px solid rgba(255,255,255,.25);
}
/* Cada dato: la cifra a la izquierda, centrada a lo alto de los dos renglones de texto */
.hero-datos div { display: grid; grid-template-columns: auto auto; column-gap: .75rem; align-items: center; }
.hero-datos dd { margin: 0; }
.hero-datos .dato-num {
  grid-column: 1; grid-row: 1 / span 2; align-self: center;
  font-family: var(--titulo); font-weight: 700; font-size: 2.3rem; line-height: 1; color: var(--arena);
}
.hero-datos dt { grid-column: 2; grid-row: 1; align-self: end; font-size: .95rem; font-weight: 600; line-height: 1.25; color: #fff; }
.hero-datos .dato-nota { grid-column: 2; grid-row: 2; align-self: start; font-size: .88rem; line-height: 1.25; color: #d3ddcd; }

/* ---------- Secciones ---------- */
.seccion { padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 4vw, 2.5rem); }
.seccion h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); color: var(--pino); max-width: 20ch; }

/* ---------- El lugar ---------- */
.lugar {
  display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 4vw, 2.5rem);
  max-width: calc(var(--ancho) + 5rem); margin-inline: auto;
}
.lugar-texto > p { margin-top: 1.1rem; color: var(--tinta-suave); max-width: 52ch; }
.lugar-texto { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0 clamp(1.5rem, 5vw, 4rem); align-items: end; }
.lugar-texto > h2, .lugar-texto > p { grid-column: 1; }
.lugar-texto .zonas { grid-column: 2; grid-row: 1 / span 2; }
.zonas { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.25rem; }
.zonas li { border-left: 3px solid var(--musgo); padding-left: 1.1rem; }
.zonas h3 { font-size: 1.2rem; color: var(--pino); }
.zonas p { margin-top: .3rem; color: var(--tinta-suave); font-size: .98rem; }
.zonas .zona-precio { color: var(--tierra); font-weight: 700; font-size: 1.05rem; }
.lugar-foto { position: relative; margin: 0; }
#foto-svg { display: block; width: 100%; height: auto; aspect-ratio: 1500 / 840; border-radius: var(--radio); }
.foto-lote polygon {
  fill: rgba(63, 175, 94, .38); stroke: rgba(255,255,255,.85); stroke-width: 2px;
  vector-effect: non-scaling-stroke; transition: fill .12s;
}
.foto-lote[data-estado="apartado"] polygon { fill: rgba(227, 155, 27, .6); }
.foto-lote[data-estado="vendido"] polygon { fill: rgba(201, 58, 46, .6); }
.foto-lote { cursor: pointer; }
.foto-lote:hover polygon, .foto-lote:focus-visible polygon, .foto-lote.activo polygon { fill: rgba(30, 59, 47, .8); }
.foto-lote.activo polygon { stroke: var(--arena); stroke-width: 3px; }
.foto-lote:focus-visible { outline: none; }
.foto-lote text, .foto-area text {
  font-family: var(--texto); font-weight: 700; text-anchor: middle; dominant-baseline: central;
  fill: #fff; pointer-events: none; paint-order: stroke; stroke: rgba(16,30,23,.55); stroke-width: 3px;
}
.foto-area polygon { fill: rgba(30, 107, 58, .3); stroke: #c9f0b0; stroke-width: 2px; stroke-dasharray: 8 6; vector-effect: non-scaling-stroke; }
.foto-area { cursor: pointer; }
.foto-area polygon { transition: fill .12s; }
.foto-area:hover polygon, .foto-area:focus-visible polygon, .foto-area.activo polygon { fill: rgba(30, 107, 58, .55); }
.foto-area.activo polygon { stroke: var(--arena); stroke-dasharray: none; stroke-width: 3px; }
.foto-area:focus-visible { outline: none; }
.foto-area text { font-size: 30px; }
.foto-calle polygon { fill: rgba(230, 222, 205, .22); stroke: rgba(255, 255, 255, .85); stroke-width: 1.5px; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.foto-calle { pointer-events: none; }
.foto-calle text {
  font-family: var(--texto); font-weight: 700; font-size: 20px; text-anchor: middle; dominant-baseline: central;
  fill: #fff; paint-order: stroke; stroke: rgba(16,30,23,.55); stroke-width: 3px; letter-spacing: .08em;
}
/* "Ver el área común en el mapa": brilla dos veces en color arena */
.foto-area.brillar polygon { animation: brillar 1.8s ease-in-out; }
@keyframes brillar {
  0%, 50%, 100% { fill: rgba(30, 107, 58, .3); stroke: #c9f0b0; }
  25%, 75% { fill: rgba(242, 194, 126, .72); stroke: #fff4dc; }
}
@media (prefers-reduced-motion: reduce) { .foto-area.brillar polygon { animation-duration: 2.4s; } }
.lugar-foto figcaption { margin-top: .7rem; color: var(--tinta-suave); font-size: .95rem; }
@media (max-width: 860px) { .lugar-texto { grid-template-columns: 1fr; } .lugar-texto .zonas { grid-column: 1; grid-row: auto; } }

/* ---------- Área común ---------- */
.area-comun {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  min-height: min(92svh, 820px); display: grid; align-items: center;
  padding: clamp(4rem, 9vw, 7rem) clamp(1rem, 5vw, 4rem);
}
.area-comun::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(16,30,23,.88) 0%, rgba(16,30,23,.6) 45%, rgba(16,30,23,.15) 80%);
}
.area-contenido { max-width: 600px; }
.area-comun h2 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); line-height: 1.02; }
.area-comun p { margin-top: 1.2rem; color: #e5ece0; font-size: 1.1rem; max-width: 46ch; }
.area-lista { list-style: none; margin: 1.8rem 0 2rem; padding: 0; display: grid; gap: .9rem; }
.area-lista li { display: flex; align-items: center; gap: .85rem; font-weight: 500; }
.area-lista svg { width: 28px; height: 28px; flex: none; color: #b9d8a6; }
@media (max-width: 700px) {
  .area-comun::after { background: linear-gradient(0deg, rgba(16,30,23,.92) 0%, rgba(16,30,23,.7) 60%, rgba(16,30,23,.35) 100%); }
}

/* ---------- Plano ---------- */
.plano-seccion { background: var(--neblina); }
.plano-encabezado, .plano-herramientas, .plano-cuerpo { max-width: var(--ancho); margin-inline: auto; }
.plano-encabezado p { margin-top: .8rem; max-width: 60ch; color: var(--tinta-suave); }

.plano-herramientas { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; margin-top: 2rem; margin-bottom: 1rem; }
.buscador {
  display: flex; align-items: center; gap: .5rem; flex: 0 1 320px; margin: 0; padding-right: .3rem !important;
  background: #fff; border: 1px solid var(--linea); border-radius: 6px; padding: 0 1rem;
}
.buscador svg { width: 18px; height: 18px; color: var(--tinta-suave); flex: none; }
.buscador input { border: 0; outline: 0; background: none; font: inherit; font-size: 1rem; padding: .7rem 0; width: 100%; min-width: 0; }
.buscador:focus-within { outline: 3px solid var(--apartado); outline-offset: 2px; }
.buscador-boton {
  flex: none; border: 0; border-radius: 5px; background: var(--pino); color: #fff; cursor: pointer;
  font-weight: 600; font-size: .92rem; padding: .45rem .9rem; min-height: 36px;
}
.buscador-boton:hover { background: var(--pino-2); }
/* Lote buscado: parpadea dos veces en color arena */
.lote.parpadeo polygon { animation: parpadeo 1.6s ease-in-out; }
.lote.parpadeo text { opacity: 1; }
@keyframes parpadeo {
  0%, 50%, 100% { fill: rgba(63, 175, 94, .32); stroke: rgba(23, 33, 27, .5); stroke-width: 1px; }
  25%, 75% { fill: rgba(242, 194, 126, .95); stroke: var(--tierra); stroke-width: 3px; }
}
@media (prefers-reduced-motion: reduce) { .lote.parpadeo polygon { animation-duration: 2.4s; } }
.filtros { display: flex; flex-wrap: wrap; gap: .5rem; border: 0; padding: 0; margin: 0; }
.filtro {
  border: 1px solid var(--linea); background: #fff; border-radius: 6px;
  padding: .5rem 1rem; min-height: 40px; font-size: .92rem; font-weight: 500; cursor: pointer;
}
.filtro[aria-pressed="true"] { background: var(--pino); border-color: var(--pino); color: #fff; }

.plano-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }

.mapa { position: relative; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; }
#mapa-svg {
  display: block; width: 100%; aspect-ratio: 650 / 645; height: auto; max-height: 82vh;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
#mapa-svg.zoom { touch-action: none; }
#mapa-svg.arrastrando { cursor: grabbing; }

.lote polygon {
  fill: rgba(63, 175, 94, .32);
  stroke: rgba(23, 33, 27, .5);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill .12s;
}
.lote[data-estado="apartado"] polygon { fill: rgba(227, 155, 27, .55); }
.lote[data-estado="vendido"] polygon { fill: rgba(201, 58, 46, .5); cursor: default; }
.lote polygon:hover, .lote polygon:focus-visible { fill: rgba(63, 175, 94, .62); outline: none; }
.lote[data-estado="apartado"] polygon:hover { fill: rgba(227, 155, 27, .78); }
.lote[data-estado="vendido"] polygon:hover { fill: rgba(201, 58, 46, .6); }
.lote polygon:focus-visible { stroke: var(--apartado); stroke-width: 3px; }
.lote.activo polygon { fill: rgba(30, 59, 47, .78); stroke: var(--pino); stroke-width: 2.5px; }
.lote.resaltado polygon { stroke: var(--pino); stroke-width: 2px; }
.lote.atenuado polygon { fill: rgba(255,255,255,.72); stroke: rgba(23,33,27,.15); }
.lote text {
  font-family: var(--texto); font-weight: 700; font-size: 13px; text-anchor: middle; dominant-baseline: central;
  fill: #fff; pointer-events: none; opacity: 0;
}
.lote.activo text { opacity: 1; }

.area-poly {
  fill: rgba(30, 107, 58, .28); stroke: var(--area); stroke-width: 2px; vector-effect: non-scaling-stroke;
  cursor: pointer; transition: fill .12s;
}
.area-poly:hover, .area-poly:focus-visible, .area-poly.activo { fill: rgba(30, 107, 58, .55); outline: none; }

.mapa-zoom {
  position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--linea); border-radius: 8px; overflow: hidden;
}
.mapa-zoom button { width: 42px; height: 42px; border: 0; background: none; cursor: pointer; font-size: 1.35rem; line-height: 1; display: grid; place-items: center; }
.mapa-zoom button + button { border-top: 1px solid var(--linea); }
.mapa-zoom button:hover { background: var(--neblina); }
.mapa-zoom svg { width: 18px; height: 18px; }

.mapa-tooltip {
  position: absolute; top: 0; left: 0; z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; gap: .05rem;
  background: var(--pino); color: #fff; border-radius: 8px; padding: .5rem .75rem;
  font-size: .85rem; line-height: 1.35; max-width: 240px; box-shadow: 0 6px 18px rgba(16,30,23,.25);
}
.mapa-tooltip[hidden] { display: none; }
.mapa-tooltip strong { font-family: var(--titulo); font-size: 1.05rem; }
.tip-disponible { color: #9be3ad; }
.tip-apartado { color: #ffd27f; }
.tip-vendido { color: #ffaaa1; }

.leyenda {
  display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; list-style: none; margin: 0;
  padding: .7rem 1rem; border-top: 1px solid var(--linea); background: #fff; font-size: .85rem; color: var(--tinta-suave);
}
.leyenda li { display: flex; align-items: center; gap: .45rem; }
.muestra { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(23,33,27,.35); }
.muestra-disponible { background: rgba(63, 175, 94, .55); }
.muestra-apartado { background: rgba(227, 155, 27, .7); }
.muestra-vendido { background: rgba(201, 58, 46, .65); }
.muestra-area { background: rgba(30, 107, 58, .6); border-color: var(--area); }

/* ---------- Ficha del lote ---------- */
.ficha {
  position: sticky; top: 88px;
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 1.5rem;
}
.ficha h3 { font-size: 1.5rem; color: var(--pino); }
.ficha-vacia > p, .ficha-area > p:last-child { margin-top: .6rem; color: var(--tinta-suave); font-size: .97rem; }
.resumen { display: grid; gap: .1rem; margin: 1.3rem 0 0; }
.resumen div, .ficha-datos div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--neblina); }
.resumen dt, .ficha-datos dt { color: var(--tinta-suave); font-size: .93rem; }
.resumen dd, .ficha-datos dd { margin: 0; font-weight: 600; text-align: right; }
.ficha h4 { font-family: var(--texto); font-weight: 600; font-size: .95rem; margin: 1.5rem 0 .5rem; }
.zonas-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.zonas-lista button {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: .1rem .6rem; align-items: baseline;
  border: 0; background: none; text-align: left; padding: .5rem .55rem; border-radius: 6px; cursor: pointer; font-size: .92rem;
}
.zonas-lista button:hover { background: var(--neblina); }
.z-nombre { font-weight: 600; }
.z-rango { color: var(--tinta-suave); grid-column: 1; }
.z-disp { color: #23803f; font-size: .85rem; font-weight: 600; grid-row: 1; grid-column: 2; }

.ficha-lote { position: relative; }
.ficha-cerrar {
  position: absolute; top: -.5rem; right: -.5rem; width: 44px; height: 44px; border: 0; cursor: pointer;
  border-radius: 50%; display: grid; place-items: center; background: var(--tierra); color: #fff;
  box-shadow: 0 3px 10px rgba(140, 59, 38, .35); transition: background-color .15s, transform .15s;
}
.ficha-cerrar:hover { background: var(--tierra-2); transform: scale(1.06); }
.ficha-cerrar svg { width: 20px; height: 20px; }
.ficha-cerrar svg path { stroke-width: 2.6; }
.ficha-zona { color: var(--musgo); font-weight: 600; font-size: .92rem; }
.ficha-titulo { display: flex; align-items: baseline; gap: .5rem; margin-top: .2rem; }
/* Número del lote y su estado en un mismo renglón */
.ficha-cabeza { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; padding-right: 2.6rem; }
.ficha-cabeza .estado { margin-top: .35rem; }
.ficha-titulo strong { font-weight: 700; font-size: 3.2rem; line-height: 1; color: var(--pino); }
.ficha-area .ficha-titulo strong { font-size: 2.2rem; }
.estado { display: inline-block; margin-top: .6rem; padding: .2rem .75rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.estado-disponible { background: rgba(63,175,94,.16); color: #1f7a3a; }
.estado-apartado { background: rgba(227,155,27,.18); color: #8a5a06; }
.estado-vendido { background: rgba(201,58,46,.13); color: #a12a20; }
.ficha-datos { margin: 1.2rem 0 0; }
.ficha-precio { margin-top: 1.3rem; background: var(--pino); color: #fff; border-radius: 8px; padding: 1rem 1.15rem; }
.ficha-precio p:first-child { font-size: .88rem; color: #c5d3c6; }
.ficha-precio-total { font-family: var(--titulo); font-weight: 700; font-size: 2.2rem; line-height: 1.15; }
.ficha-precio-nota { font-size: .85rem; color: #c5d3c6; }
.ficha-nota { margin-top: .9rem; font-size: .9rem; color: var(--pino); background: rgba(30,107,58,.1); border-radius: 6px; padding: .55rem .75rem; }
.ficha-acciones { display: grid; gap: .3rem; margin-top: 1.2rem; justify-items: center; }
.ficha-acciones [hidden], .ficha [hidden] { display: none; }

@media (min-width: 961px) {
  .ficha.desde-foto {
    position: fixed; top: 88px; right: clamp(1rem, 3vw, 2rem); z-index: 60; width: 360px;
    max-height: calc(100vh - 110px); overflow-y: auto; box-shadow: 0 18px 48px rgba(16,30,23,.3);
    animation: aparecer .2s ease-out;
  }
}
@keyframes aparecer { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 960px) {
  .plano-cuerpo { grid-template-columns: 1fr; }
  .ficha { position: static; }
  /* En celular el detalle sube desde abajo */
  .ficha.abierta {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60;
    max-height: 82svh; overflow-y: auto; overscroll-behavior: contain;
    border-radius: 16px 16px 0 0; border: 0; padding: 1.6rem 1.25rem 1.5rem;
    box-shadow: 0 -10px 40px rgba(16,30,23,.3);
    animation: subir .25s ease-out;
  }
  .ficha.abierta::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 4px; background: var(--linea); margin: -.8rem auto 1rem; }
  body.ficha-abierta .whatsapp-flotante { display: none; }
  /* Mientras se ve el detalle, la página de fondo queda fija en su lugar */
  body.pagina-fija { position: fixed; left: 0; right: 0; overflow: hidden; }
}
@keyframes subir { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .ficha.abierta { animation: none; } }

/* ---------- Ubicación ---------- */
.ubicacion {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center;
  max-width: calc(var(--ancho) + 5rem); margin-inline: auto;
}
.ubicacion-texto > p { margin-top: 1rem; color: var(--tinta-suave); max-width: 46ch; }
.trayecto { list-style: none; margin: 1.6rem 0 2rem; padding: 0; position: relative; }
.trayecto::before { content: ""; position: absolute; left: calc(4.3rem - 1px); top: .8rem; bottom: .8rem; border-left: 2px dashed var(--musgo); }
.trayecto li { display: grid; grid-template-columns: 3.6rem 1fr; gap: 1.4rem; align-items: center; padding: .45rem 0; position: relative; }
.trayecto li::after { content: ""; position: absolute; left: calc(4.3rem - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--papel); border: 2px solid var(--pino); }
.minutos { font-family: var(--titulo); font-weight: 700; color: var(--tierra); text-align: right; white-space: nowrap; font-size: 1rem; }
.trayecto li span:last-child { font-weight: 500; }
.ubicacion-mapa { border-radius: var(--radio); overflow: hidden; border: 1px solid var(--linea); aspect-ratio: 4 / 3; background: var(--neblina); }
.ubicacion-mapa iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 860px) { .ubicacion { grid-template-columns: 1fr; } }

/* ---------- Antes de apartar ---------- */
.saber { background: var(--neblina); }
.saber h2, .saber-lista { max-width: var(--ancho); margin-inline: auto; }
.saber-lista { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2rem; }
.saber-lista dt { font-family: var(--titulo); font-weight: 600; font-size: 1.2rem; color: var(--pino); }
.saber-lista dd { margin: .5rem 0 0; color: var(--tinta-suave); }
.saber-lista div:first-child dt { color: var(--tierra); }
@media (max-width: 860px) { .saber-lista { grid-template-columns: 1fr; gap: 1.4rem; } }

/* ---------- Contacto ---------- */
.contacto {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; text-align: center;
  padding: clamp(5rem, 11vw, 8rem) clamp(1rem, 4vw, 2.5rem);
}
.contacto::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(16,30,23,.72); }
.contacto h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--arena); }
.contacto-contenido > p { margin: 1rem auto 0; max-width: 50ch; color: #dfe7da; }
.contacto-acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 2rem; }
.contacto-acciones [hidden] { display: none; }

.pie { background: #13261d; color: #a3b3a6; padding: 2rem clamp(1rem, 4vw, 2.5rem); text-align: center; font-size: .9rem; }
.pie p:first-child { font-family: var(--titulo); color: #fff; font-size: 1.1rem; }
.pie-legal { margin: .5rem auto 0; max-width: 70ch; font-size: .82rem; }

.whatsapp-flotante {
  position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 58px; height: 58px; border-radius: 50%;
  background: #1f7a4a; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(16,30,23,.35);
}
.whatsapp-flotante[hidden] { display: none; }
.whatsapp-flotante svg { width: 30px; height: 30px; }

/* ---------- Portada: el letrero "Bienvenidos a Zacatlán" queda libre ----------
   El letrero aparece al centro y en el tercio inferior del video, así que el texto
   va arriba (sobre el cielo y los árboles) y los datos hasta abajo. */
.hero { align-content: space-between; padding-top: 6.5rem; padding-bottom: 1.75rem; }
.hero::after {
  background:
    linear-gradient(180deg, rgba(16,30,23,.82) 0%, rgba(16,30,23,.5) 34%, rgba(16,30,23,0) 56%),
    linear-gradient(0deg, rgba(16,30,23,.8) 0%, rgba(16,30,23,0) 18%);
}
.hero-datos { margin-top: 0; }
@media (min-width: 861px) {
  .hero h1 { font-size: clamp(3.4rem, 7vw, 6.4rem); }
  .hero-acciones { margin-top: 1.6rem; }
}
@media (max-width: 860px) {
  .hero { padding-top: 5.5rem; padding-bottom: 1.5rem; }
  .hero h1 { font-size: clamp(3rem, 14vw, 4.4rem); }
  .hero-lema { margin-top: .7rem; }
  .hero-acciones { margin-top: 1.2rem; }
  .hero-acciones .boton { min-height: 44px; padding: .55rem 1.1rem; }
  .hero-datos { gap: .6rem 1.6rem; padding-top: .9rem; }
  .hero-datos .dato-num { font-size: 1.8rem; }
}
