/* Páginas de proyecto y ciudad, y bloques de SEO del inicio (preguntas y enlaces).
   Se apoya en las variables y clases de styles.css. Mobile-first. */

/* ---------- Portada del inicio con foto (assets/hero/, generada por herramientas/optimizar-imagenes.mjs) ---------- */
.hero--foto { position: relative; overflow: hidden; display: flex; align-items: center; min-height: min(86svh, 720px); padding: 72px 20px 80px; background: var(--navy); }
.hero__fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 58%; }
.hero--foto::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10, 28, 42, .80) 0%, rgba(10, 28, 42, .52) 48%, rgba(10, 28, 42, .82) 100%); }
.hero--foto .hero__inner { position: relative; z-index: 2; width: 100%; }
.hero--foto h1 { font-size: clamp(2rem, 7.2vw, 3.2rem); text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.hero--foto .hero__lead { color: #eef3f6; }
@media (min-width: 900px) { .hero--foto .hero__inner { max-width: 760px; } }

/* ---------- Botones propios de estas páginas ---------- */
.btn--chat { background: var(--navy); color: var(--white); }
.btn--chat:hover { background: var(--navy-soft); }
.section--dark .btn--chat, .bloque--cta .btn--chat { background: var(--gold); color: var(--navy); }

/* ---------- Portada y mosaico de fotos (scroll): cada foto con su proporción real, sin recortes ---------- */
.portada { position: relative; background: var(--navy); }
.portada img { display: block; width: 100%; height: min(62vw, 520px); object-fit: cover; cursor: zoom-in; }
.portada__tag { position: absolute; top: 14px; left: 14px; background: var(--white); color: var(--navy); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 5px 12px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.galeria { padding-top: 12px; }
.mosaico { columns: 2; column-gap: 8px; }
.mosaico__item { margin: 0 0 8px; break-inside: avoid; }
.mosaico__item img { display: block; width: 100%; height: auto; border-radius: 10px; background: var(--sand); cursor: zoom-in; transition: filter .25s; }
.mosaico__item img:hover { filter: brightness(1.06); }

/* Aparición suave al hacer scroll (solo si hay JavaScript; sin JS todo se ve normal) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* Visor de fotos a pantalla completa */
.visor { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(8, 20, 30, .95); }
.visor[hidden] { display: none; }
.visor img { max-width: 100%; max-height: 90dvh; object-fit: contain; }
.visor__btn { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: var(--white); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.visor__cerrar { top: 12px; right: 12px; }
.visor__prev, .visor__next { top: 50%; transform: translateY(-50%); }
.visor__prev { left: 8px; }
.visor__next { right: 8px; }
.visor__cuenta { position: absolute; bottom: 14px; left: 0; right: 0; margin: 0; text-align: center; color: #dbe5eb; font-size: .85rem; }
body.visor-abierto { overflow: hidden; }
/* ---------- Resumen bajo las fotos ---------- */
.resumen { padding: 22px 0 8px; }
.migas { font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.migas a { color: inherit; text-underline-offset: 3px; }
.resumen h1 { font-size: clamp(1.55rem, 5.2vw, 2.3rem); margin: 2px 0 8px; color: var(--navy); }
.resumen__precio { font: 600 1.45rem/1.25 "Playfair Display", serif; color: var(--navy); margin: 0 0 12px; }
.insignias { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.insignias li { background: var(--gold); color: var(--navy); font-weight: 700; font-size: .8rem; padding: 6px 13px; border-radius: 999px; }
.resumen__detalle { color: var(--muted); max-width: 720px; margin: 0 0 18px; }
.acciones { display: grid; gap: 10px; max-width: 520px; }
.resumen__nota { margin: 10px 0 0; font-size: .82rem; color: var(--muted); }
.resumen__nota--claro { color: #b8c7d0; text-align: center; }

/* ---------- Bloques de contenido ---------- */
.bloque { padding: 38px 0; }
.bloque--alt { background: var(--sand); }
.bloque h2 { color: var(--navy); font-size: 1.45rem; margin-bottom: 1rem; }
.bloque h2::after { content: ""; display: block; width: 44px; height: 3px; margin-top: 8px; background: var(--gold); border-radius: 2px; }
.bloque--cta { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 100%); color: var(--white); text-align: center; }
.bloque--cta h2 { color: var(--white); }
.bloque--cta h2::after { margin-left: auto; margin-right: auto; }
.bloque--cta p { color: #dbe5eb; }
.bloque--cta .btn { max-width: 420px; }
.recorrido { margin: 20px 0 0; }

.modelos { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.modelos li { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.modelos strong { display: block; color: var(--navy); font-size: 1.02rem; }
.modelo__m2 { display: inline-block; margin: 4px 0 6px; color: var(--gold); font-weight: 700; font-size: .9rem; }
.modelos p { margin: 0; color: var(--muted); font-size: .92rem; }
.modelos .modelo__precio { margin-top: 6px; color: var(--navy); font-weight: 700; }

.plegable { border-bottom: 1px solid #e0d6c4; }
.plegable summary { cursor: pointer; font-weight: 700; color: var(--navy); min-height: 48px; display: flex; align-items: center; }
.plegable .checks, .plegable .modelos { padding-bottom: 16px; }
.amen-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.amen-lista li { background: var(--white); border: 1px solid #e0d6c4; border-radius: 999px; padding: 8px 15px; font-size: .9rem; color: var(--ink); }

/* ---------- Ubicación: el mapa de Google se carga solo al tocarlo ---------- */
.ubicacion__texto { margin: 0 0 14px; color: var(--ink); }
.mapa { position: relative; height: 320px; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, #e9e2d3, #dcd2bd); box-shadow: var(--shadow); }
.mapa iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mapa__abrir { position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; color: var(--navy); font: 700 1rem "Inter", sans-serif; cursor: pointer; }
.mapa__abrir svg { color: var(--gold); width: 44px; height: 44px; }
.mapa__abrir:hover span { text-decoration: underline; text-underline-offset: 4px; }
.mapa__acciones { display: grid; gap: 10px; margin-top: 14px; max-width: 520px; }
@media (min-width: 720px) { .mapa { height: 380px; } .mapa__acciones { grid-template-columns: 1fr 1fr; } }

/* ---------- Barra fija inferior (móvil) ---------- */
.barra-fija { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid #e6e0d6; box-shadow: 0 -4px 16px rgba(15, 42, 61, .1); }
.barra-fija .btn { flex: 1; min-height: 46px; padding: 0 12px; font-size: .95rem; }
.barra-fija .btn--chat { flex: 2; }

/* ---------- Preguntas frecuentes del inicio ---------- */
.faq { border-bottom: 1px solid #e0d6c4; padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: 14px 0; min-height: 44px; }
.faq p { margin: 0 0 14px; color: var(--muted); max-width: 720px; }

/* ---------- Listas de enlaces (otros desarrollos, explorar, ciudades) ---------- */
.enlaces { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.enlaces li { background: var(--white); border: 1px solid #e0d6c4; border-radius: 999px; padding: 8px 14px; font-size: .92rem; }
.enlaces a { color: var(--navy); font-weight: 500; text-underline-offset: 3px; }
.enlaces span { color: var(--muted); font-size: .82rem; margin-left: 4px; }
.explora h3 { font-size: 1.05rem; margin: 18px 0 8px; }
.explora h3 a { color: var(--navy); text-underline-offset: 3px; }

/* ---------- Página de ciudad ---------- */
.hero--pagina { text-align: left; padding: 36px 20px 40px; }
.hero--pagina .hero__inner { max-width: 760px; margin: 0 auto; }
.hero--pagina .migas { color: #dbe5eb; }
.hero--pagina .hero__lead { margin-bottom: 1.2rem; }
.tarjetas { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.tarjetas a { display: block; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.tarjetas a:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(15, 42, 61, .18); }
.tarjetas img { width: 100%; height: 210px; object-fit: cover; display: block; background: var(--sand); }
.tarjetas strong, .tarjetas span, .tarjetas em { display: block; padding: 0 18px; }
.tarjetas strong { color: var(--navy); font: 600 1.15rem "Playfair Display", serif; margin-top: 14px; }
.tarjetas span { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.tarjetas em { color: var(--gold); font-style: normal; font-weight: 700; margin: 8px 0 16px; }

/* ---------- Pantallas grandes ---------- */
@media (min-width: 720px) {
  .mosaico { columns: 3; column-gap: 12px; }
  .mosaico__item { margin-bottom: 12px; }
  .modelos { grid-template-columns: repeat(2, 1fr); }
  .tarjetas { grid-template-columns: repeat(2, 1fr); }
  .acciones { grid-template-columns: 2fr 1fr; }
}
@media (min-width: 900px) {
  .barra-fija { display: none; }
  body.pagina-proyecto { padding-bottom: 0; }
}
@media (min-width: 1000px) {
  .tarjetas { grid-template-columns: repeat(3, 1fr); }
}
