/* Crismar Mediterránea
   Layout: cal blanca + azul del logo; fotografía a sangre, tipografía de inscripción clásica
   para titulares y una sans cálida para leer. Móvil primero, barra inferior de acción. */
:root {
  --navy: #12346f;        /* azul marino del logo */
  --navy-deep: #0b2250;
  --sea: #8dbfe6;         /* celeste del logo */
  --sea-soft: #e6f0f9;
  --lime: #fbfaf6;        /* cal blanca */
  --sand: #f1ede4;        /* piedra caliza */
  --olive: #6d7650;
  --ink: #142038;
  --muted: #5d6679;
  --line: #e1dfd7;
  --white: #ffffff;
  --wa: #1f9d55;
  --danger: #b3412e;

  --f-display: "Marcellus", "Cormorant Garamond", Georgia, serif;
  --f-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --shadow: 0 1px 2px rgb(11 34 80 / .06), 0 8px 28px -12px rgb(11 34 80 / .22);
  --shadow-lg: 0 30px 60px -28px rgb(11 34 80 / .45);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 72px;
  --bar-h: 0px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--lime);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--lime); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .fill { fill: currentColor; stroke: none; }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgb(141 191 230 / .45); color: var(--navy-deep); }
input, textarea { caret-color: var(--navy); }
p, li, dd { text-wrap: pretty; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 16px; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---------- Tipografía ---------- */
.eyebrow { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--olive); }
.eyebrow-light { color: var(--sea); }
.h1, .h2, .h3, .h-display { font-family: var(--f-display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; color: var(--navy-deep); letter-spacing: -.005em; }
.h1 { font-size: clamp(38px, 7vw, 68px); }
.h2 { font-size: clamp(30px, 4.6vw, 48px); }
.h3 { font-size: 26px; }
.h-display { font-size: clamp(40px, 7.4vw, 84px); line-height: 1.02; }
.h1 em, .h2 em, .h-display em, .hero-title em { font-style: normal; color: var(--sea); }
.h1 em, .h2 em { color: #3f7fbf; }
.page-lede, .section-lede { color: var(--muted); font-size: 18px; max-width: 58ch; margin: 16px 0 0; }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--navy); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent;
  background: var(--bg); color: var(--fg); font-weight: 600; font-size: 15.5px; text-decoration: none;
  cursor: pointer; transition: transform .25s var(--ease), background .25s, box-shadow .25s, color .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgb(11 34 80 / .55); }
.btn:active { transform: scale(.96); transition-duration: .1s; }
.btn svg { width: 19px; height: 19px; }
.btn-primary { --bg: var(--navy); }
.btn-primary:hover { --bg: var(--navy-deep); }
.btn-whatsapp { --bg: var(--wa); }
.btn-light { --bg: #fff; --fg: var(--navy-deep); }
.btn-ghost-light { --bg: transparent; --fg: #fff; border-color: rgb(255 255 255 / .55); }
.btn-ghost-light:hover { --bg: rgb(255 255 255 / .12); }
.btn-outline { --bg: transparent; --fg: var(--navy); border-color: var(--navy); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 0; background: transparent; color: var(--navy); cursor: pointer; transition: background .2s; text-decoration: none; }
.icon-btn:hover { background: var(--sea-soft); }
.icon-btn:active { scale: .96; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; padding-block: 9px; margin-block: -9px; font-weight: 600; color: var(--navy); text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgb(251 250 246 / .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-color: var(--line); background: rgb(251 250 246 / .95); }
/* Portada: cabecera transparente sobre la foto. El logo conserva sus colores, sin fondo: solo un halo
   blanco que sigue el contorno de las letras para que se lea sobre la imagen. */
.brand { display: inline-flex; padding: 5px 12px; margin-left: -12px; border-radius: 14px; transition: background .35s, box-shadow .35s; }
.on-home .site-header:not(.scrolled):not(.solid) { background: linear-gradient(180deg, rgb(8 24 58 / .28), rgb(8 24 58 / 0)) border-box no-repeat; backdrop-filter: none; -webkit-backdrop-filter: none; border-color: transparent; }
.on-home .site-header:not(.scrolled):not(.solid) .brand img { filter: drop-shadow(0 0 1px rgb(255 255 255 / .95)) drop-shadow(0 0 5px rgb(255 255 255 / .7)); }
.on-home .site-header:not(.scrolled):not(.solid) .main-nav a { color: #fff; text-shadow: 0 1px 8px rgb(0 0 0 / .25); }
.on-home .site-header:not(.scrolled):not(.solid) .icon-btn { color: #fff; }
.on-home .site-header:not(.scrolled):not(.solid) .icon-btn:hover { background: rgb(255 255 255 / .15); }
.on-home .site-header:not(.scrolled):not(.solid) .btn-call { --bg: #fff; --fg: var(--navy-deep); }
.on-home .site-header:not(.scrolled):not(.solid) .fav-count { background: #fff; color: var(--navy-deep); }
body.on-home::before { background: var(--navy-deep); }
.on-home .hero { margin-top: calc(-1 * var(--header-h)); min-height: max(600px, calc(100svh - var(--bar-h) - env(safe-area-inset-bottom, 0px))); }
.site-header .brand img, .site-header .main-nav a, .site-header .icon-btn { transition: filter .35s, color .35s, background .2s; }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand img { height: 50px; width: auto; }
.main-nav { display: none; gap: 4px; margin-left: auto; }
.main-nav a { white-space: nowrap; position: relative; padding: 10px 12px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink); border-radius: 8px; }
.main-nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; background: var(--sea); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
.main-nav a.active { color: var(--navy); }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.btn-call { display: none; min-height: 44px; padding: 0 18px; font-size: 15px; }
.fav-count { position: absolute; top: 4px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--navy); color: #fff; font: 700 11px/19px var(--f-body); font-style: normal; text-align: center; }
.fav-count.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.45); } }
.menu-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.menu-btn span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease); }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 calc(var(--bar-h) + env(safe-area-inset-bottom, 0px)); z-index: 45; background: var(--lime); /* termina encima de la barra inferior */
  display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto;
  padding: 16px max(20px, env(safe-area-inset-right, 0px)) 24px max(20px, env(safe-area-inset-left, 0px));
  animation: menuIn .4s var(--ease);
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-12px); } }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { font-family: var(--f-display); font-size: 32px; color: var(--navy-deep); text-decoration: none; padding: 10px 0; border-bottom: 1px solid var(--line); animation: menuIn .5s var(--ease) both; }
.mobile-menu nav a:nth-child(2) { animation-delay: .03s } .mobile-menu nav a:nth-child(3) { animation-delay: .06s } .mobile-menu nav a:nth-child(4) { animation-delay: .09s } .mobile-menu nav a:nth-child(5) { animation-delay: .12s } .mobile-menu nav a:nth-child(6) { animation-delay: .15s } .mobile-menu nav a:nth-child(7) { animation-delay: .18s }
.mobile-menu-foot { display: grid; gap: 10px; margin-top: 28px; }
.mobile-menu-foot p { color: var(--muted); font-size: 14px; margin: 6px 0 0; text-align: center; }

.data-badge {
  position: fixed; z-index: 44; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(var(--bar-h) + 14px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100% - 32px));
  padding: 8px 8px 8px 14px; border-radius: 14px; background: rgb(255 255 255 / .96); color: var(--navy); font-size: 12.5px; line-height: 1.35;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: toastIn .5s var(--ease) both; animation-delay: 1.2s;
}
.data-badge::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #e3a72f; box-shadow: 0 0 0 4px rgb(227 167 47 / .18); }
.data-badge button { position: relative; flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--sand); color: var(--navy); display: grid; place-items: center; cursor: pointer; }
.data-badge button svg { width: 15px; height: 15px; }
.data-badge button::before { content: ""; position: absolute; inset: -7px; }
@media (max-width: 979px) {
  .data-badge { bottom: auto; top: calc(var(--header-h) + 10px + env(safe-area-inset-top, 0px)); animation-name: badgeDown; }
}
@keyframes badgeDown { from { opacity: 0; transform: translateY(-10px); } }

/* ---------- Vistas ---------- */
.view { animation: viewIn .3s var(--ease); }
@keyframes viewIn { from { transform: translateY(8px); } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: max(560px, calc(100svh - var(--header-h) - var(--bar-h) - env(safe-area-inset-bottom, 0px))); max-height: 900px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; isolation: isolate; }
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: 62% 50%; animation: kenburns 22s ease-out both; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgb(11 34 80 / .25) 0%, rgb(11 34 80 / 0) 30%, rgb(11 34 80 / .2) 55%, rgb(8 24 58 / .82) 100%),
  linear-gradient(90deg, rgb(8 24 58 / .45), rgb(8 24 58 / 0) 60%); }
.hero-content { position: relative; padding-block: 100px 40px; }
.hero .eyebrow { color: #d9ebfa; }
.hero-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(46px, 9.6vw, 112px); line-height: .98; margin: 0; letter-spacing: -.01em; text-shadow: 0 2px 30px rgb(0 0 0 / .18); }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title em { color: var(--sea); }
.hero-sub { max-width: 46ch; font-size: clamp(17px, 2vw, 20px); color: rgb(255 255 255 / .9); margin: 18px 0 0; }
.hero-in { display: inline-block; animation: rise 1s var(--ease) both; animation-delay: calc(var(--d, 0) * .12s + .15s); }
p.hero-in, div.hero-in { display: block; }
form.hero-in { display: grid; }
.hero-title .hero-in { animation-name: riseLine; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes riseLine { from { transform: translateY(105%); } }
.hero-scroll { position: absolute; left: 50%; bottom: 18px; width: 26px; height: 42px; border: 1.5px solid rgb(255 255 255 / .6); border-radius: 14px; transform: translateX(-50%); display: none; }
.hero-scroll span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: #fff; animation: scrollDot 1.8s infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

.quick-search {
  margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; max-width: 1040px;
  background: rgb(255 255 255 / .22); border-radius: var(--r); box-shadow: var(--shadow-lg);
}
/* Sin overflow:hidden (los desplegables deben poder salir del buscador): las esquinas se redondean en las piezas. */
.quick-search > :first-child { border-top-left-radius: var(--r); }
.quick-search > :nth-child(2) { border-top-right-radius: var(--r); }
.quick-search > :nth-last-child(2) { border-bottom-left-radius: var(--r); }
.quick-search > :last-child { border-radius: 0 0 var(--r) 0; }
.qs-field { background: rgb(255 255 255 / .96); padding: 12px 16px 10px; color: var(--ink); min-width: 0; }
.qs-field:nth-child(3) { grid-column: auto; }
.qs-field label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.qs-field select { width: 100%; border: 0; background: transparent; padding: 2px 0; font-size: 16px; font-weight: 500; appearance: none; cursor: pointer; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312346f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right center; background-size: 18px; padding-right: 22px; }
.qs-submit { min-height: 56px; border-radius: 0; }
/* «Mapa» junto a «Buscar»: abre el mapa con lo elegido en el buscador. */
.qs-map { --bg: rgb(255 255 255 / .96); --fg: var(--navy); min-height: 56px; border-radius: 0; gap: 8px; }
.qs-map:hover { --bg: #fff; transform: none; box-shadow: none; }
.qs-map svg { width: 20px; height: 20px; }
.qs-field input { width: 100%; border: 0; background: transparent; padding: 2px 0; font-size: 16px; font-weight: 500; outline: none; color: var(--ink); text-transform: uppercase; }
.qs-field input::placeholder { text-transform: none; color: #9aa1ae; font-weight: 400; }
.qs-field:focus-within { box-shadow: inset 0 -2px 0 var(--sea); }
.qs-ms { padding: 0; }
.qs-submit:hover { transform: none; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; background: var(--navy-deep); color: #cfe3f5; border-block: 1px solid rgb(255 255 255 / .08); }
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee span { font-family: var(--f-display); font-size: 20px; padding: 14px 26px; white-space: nowrap; }
.marquee span::after { content: "·"; margin-left: 52px; color: var(--sea); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.section { padding-block: 72px; }
.section-tight { padding-block: 40px 64px; }
.section-sand { background: var(--sand); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; margin-bottom: 32px; }
.section-head .section-lede { margin: 0; max-width: 46ch; font-size: 17px; }

.page-head { padding-block: 48px 28px; background: linear-gradient(180deg, var(--sea-soft), var(--lime)); }
.page-head-image { position: relative; color: #fff; padding-block: 90px 48px; overflow: hidden; isolation: isolate; background: var(--navy-deep); }
.page-head-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: kenburns 20s ease-out both; }
.page-head-image::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(8 24 58 / .88) 0%, rgb(8 24 58 / .6) 45%, rgb(8 24 58 / .15) 100%), linear-gradient(0deg, rgb(8 24 58 / .5), transparent 50%); }
.page-head-image .h1 { color: #fff; }
.page-head-image .h1 em { color: var(--sea); }
.page-head-image .page-lede { color: rgb(255 255 255 / .88); }

/* Revelado al hacer scroll: solo se oculta lo que aún no está en pantalla al cargar. */
.reveal.pre { opacity: 0; transform: translateY(28px); }
.reveal { transition: opacity .9s var(--ease), transform .9s var(--ease); }

/* ---------- Tarjetas de inmueble ---------- */
.rail {
  /* Mismo margen lateral que .wrap: la primera tarjeta encaja alineada con el texto, no pegada al borde. */
  --g: max(20px, env(safe-area-inset-left, 0px));
  display: grid; grid-auto-flow: column; grid-auto-columns: min(84%, 360px); gap: 16px;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: var(--g);
  margin-inline: calc(-1 * var(--g)); padding: 4px var(--g) 12px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: 1fr; gap: 28px 22px; }

.card { position: relative; display: flex; flex-direction: column; background: var(--white); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); min-width: 0; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card.enter { animation: cardIn .7s var(--ease) both; animation-delay: calc(min(var(--i, 0), 6) * 50ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(22px); } }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; text-decoration: none; color: inherit; flex: 1; }
.card-price { font-size: 24px; font-weight: 700; color: var(--navy-deep); font-variant-numeric: tabular-nums; letter-spacing: -.01em; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.card-price s { font-size: 15px; font-weight: 500; color: var(--muted); }
.price-note { font-size: 12px; color: var(--muted); line-height: 1.3; margin-top: -2px; }
.card-title { font-weight: 600; font-size: 16.5px; margin: 8px 0 0; line-height: 1.35; }
.card-place { color: var(--muted); font-size: 14.5px; margin: 0; }
.specs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink); list-style: none; }
.specs li { display: inline-flex; align-items: center; gap: 6px; }
.specs svg { width: 18px; height: 18px; color: var(--olive); }
.card-ref { font-size: 12px; color: var(--muted); margin-top: 8px; letter-spacing: .04em; }

/* ---------- Galería deslizable ---------- */
.gallery { position: relative; aspect-ratio: 4 / 3; background: var(--sand); overflow: hidden; max-width: 100%; }
.g-track { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.g-track::-webkit-scrollbar { display: none; }
.g-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; position: relative; }
.g-slide img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); background: var(--sand); }
.card:hover .g-slide img { transform: scale(1.04); }
.g-arrow {
  position: absolute; top: 50%; z-index: 3; width: 40px; height: 40px; margin-top: -20px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgb(255 255 255 / .92); color: var(--navy-deep); cursor: pointer;
  box-shadow: 0 4px 14px rgb(0 0 0 / .18); transition: opacity .25s, transform .25s var(--ease);
}
.g-arrow svg { width: 20px; height: 20px; stroke-width: 2.2; }
.g-arrow:hover { transform: scale(1.08); }
.g-arrow:active { transform: scale(.96); }
.g-arrow:disabled { opacity: 0; pointer-events: none; }
.g-prev { left: 10px; } .g-next { right: 10px; }
.g-count { position: absolute; right: 10px; bottom: 10px; z-index: 3; padding: 4px 10px; border-radius: 999px; background: rgb(11 34 80 / .72); color: #fff; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.g-count svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.g-dots { position: absolute; left: 50%; bottom: 14px; z-index: 3; display: flex; gap: 5px; transform: translateX(-50%); }
.g-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgb(255 255 255 / .55); transition: background .25s, transform .25s; }
.g-dots i.on { background: #fff; transform: scale(1.3); }
.chips { position: absolute; left: 12px; top: 12px; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.chip { padding: 5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: #fff; color: var(--navy-deep); box-shadow: 0 2px 8px rgb(0 0 0 / .12); }
.chip-new { background: var(--navy); color: #fff; }
.chip-res { background: #f6e7c7; color: #6b4d12; }
.chip-drop { background: #fde9e4; color: var(--danger); }
.fav-btn {
  position: absolute; right: 10px; top: 10px; z-index: 4; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgb(255 255 255 / .92); color: var(--navy-deep); cursor: pointer; box-shadow: 0 4px 14px rgb(0 0 0 / .15); transition: transform .2s var(--ease);
}
.fav-btn:active { transform: scale(.96); }
.fav-btn svg { width: 22px; height: 22px; transition: fill .2s, color .2s; }
.fav-btn.on { color: #d6455d; }
.fav-btn.on svg { fill: currentColor; animation: heart .5s var(--ease); }
@keyframes heart { 30% { transform: scale(1.35); } 60% { transform: scale(.92); } }
.no-photo { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 14px; }

/* ---------- Catálogo ---------- */
.catalog { padding-block: 28px 72px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.result-count { font-weight: 600; font-size: 15px; }
.toolbar-actions { display: flex; gap: 10px; align-items: center; }
.select-pill { position: relative; }
.select-pill select { appearance: none; min-height: 44px; padding: 0 38px 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 500; font-size: 14.5px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312346f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.filter-toggle { min-height: 44px; padding: 0 18px; font-size: 14.5px; }
.filter-toggle .n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--sea); color: var(--navy-deep); font-size: 12px; }
.catalog-layout { display: grid; gap: 28px; }

.filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; overflow-x: hidden; }
.filters h2 { font-family: var(--f-display); font-weight: 400; font-size: 26px; margin: 0; color: var(--navy-deep); }
.filters .field select, .filters .field input { background-color: #fff; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle-chip { position: relative; }
/* Las casillas reales quedan ocultas bajo su botón visual; sin heredar el tamaño de los campos. */
.filters .seg input, .field .seg input, .field .toggle-chip input, .filters .toggle-chip input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.toggle-chip input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.toggle-chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.toggle-chip input:focus-visible + span { outline: 2px solid var(--sea); outline-offset: 2px; }
.seg { display: flex; gap: 6px; }
.seg label { flex: 1; position: relative; min-width: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; height: 42px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.seg input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.filters-foot { display: flex; gap: 10px; }
.filters-foot .btn { flex: 1; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-close { display: inline-grid; }

.load-more { display: flex; justify-content: center; margin-top: 36px; }
.empty { text-align: center; padding: 56px 20px; background: #fff; border-radius: var(--r); border: 1px dashed var(--line); }
.empty h3 { font-family: var(--f-display); font-weight: 400; font-size: 28px; margin: 0 0 8px; color: var(--navy-deep); }
.empty p { color: var(--muted); margin: 0 auto 20px; max-width: 46ch; }
.skeleton .gallery, .skeleton .sk { background: linear-gradient(90deg, var(--sand) 0, #f8f5ef 40%, var(--sand) 80%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.skeleton .sk { height: 14px; border-radius: 6px; margin-top: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Bottom sheet de filtros en móvil */
.sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: rgb(8 20 45 / .45); animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
@media (max-width: 979px) {
  .filters {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; max-height: 88svh; overflow-y: auto;
    background: var(--lime); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
    padding: 22px max(20px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
    transform: translateY(105%); transition: transform .35s var(--ease), visibility 0s linear .35s; visibility: hidden;
  }
  .filters.open { transform: none; visibility: visible; transition: transform .4s var(--ease), visibility 0s; }
  .filters::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: -8px auto 4px; }
  .filters-foot { position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom, 0px)); background: var(--lime); padding-block: 12px; margin-bottom: -8px; }
}

/* ---------- Ficha ---------- */
.detail { padding-block: 14px 80px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin: 6px 0 14px; }
.crumbs a { color: var(--navy); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; padding-block: 11px; margin-block: -11px; }
.detail-gallery { position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
@media (max-width: 639px) {
  .detail-gallery { margin-inline: calc(-1 * max(20px, env(safe-area-inset-left, 0px))); border-radius: 0; box-shadow: none; }
}
.mosaic { display: none; }
.mosaic button { position: relative; padding: 0; border: 0; overflow: hidden; cursor: zoom-in; background: var(--sand); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .4s; }
.mosaic button:hover img { transform: scale(1.05); filter: brightness(.92); }
.mosaic .m-all { position: absolute; right: 18px; bottom: 18px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: #fff; color: var(--navy-deep); font-weight: 600; font-size: 14px; box-shadow: 0 8px 22px rgb(0 0 0 / .2); cursor: pointer; transition: transform .25s var(--ease); }
.mosaic .m-all:hover { transform: translateY(-2px); }
.mosaic .m-all svg { width: 17px; height: 17px; }
.mosaic .m-more::after { content: attr(data-more); position: absolute; inset: 0; display: grid; place-items: center; background: rgb(8 24 58 / .55); color: #fff; font-family: var(--f-display); font-size: 30px; }
.mosaic .chips { left: 18px; top: 18px; }
.detail-gallery .gallery { aspect-ratio: 4 / 3; }
.detail-gallery .g-slide img { cursor: zoom-in; }
.detail-gallery .g-arrow { width: 46px; height: 46px; margin-top: -23px; }
.detail-gallery .g-count { font-size: 13.5px; padding: 6px 12px; bottom: 14px; right: 14px; }
.g-expand { position: absolute; left: 14px; bottom: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 999px; background: rgb(255 255 255 / .92); color: var(--navy-deep); font-size: 13px; font-weight: 600; cursor: pointer; }
.g-expand svg { width: 16px; height: 16px; }
.thumbs { display: none; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.thumbs button { flex: 0 0 96px; height: 68px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; opacity: .65; transition: opacity .2s, border-color .2s; background: var(--sand); }
.thumbs button.on, .thumbs button:hover { opacity: 1; border-color: var(--navy); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-grid { display: grid; gap: 32px; margin-top: 26px; }
.detail-main { min-width: 0; }
.detail-type { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.detail-type .chip { box-shadow: none; background: var(--sea-soft); }
.detail-type .chip-new { background: var(--navy); }
.detail h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; color: var(--navy-deep); margin: 0; text-wrap: balance; }
.detail-place { color: var(--muted); margin: 8px 0 0; font-size: 16.5px; display: flex; align-items: center; gap: 6px; }
.detail-place svg { width: 18px; height: 18px; color: var(--olive); }
.detail-price { margin-top: 20px; }
.detail-price .card-price { font-size: clamp(32px, 5vw, 42px); }
.detail-price .price-note { font-size: 13.5px; margin-top: 2px; }
.key-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 26px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.key-specs div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.key-specs div { background: #fff; padding: 14px 16px; display: flex; flex-direction: column; }
.key-specs dt { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.key-specs dd { margin: 2px 0 0; font-size: 21px; font-weight: 600; color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.detail-section { margin-top: 38px; }
.detail-section h2 { font-family: var(--f-display); font-weight: 400; font-size: 28px; color: var(--navy-deep); margin: 0 0 14px; }
.desc p { margin: 0 0 14px; max-width: 68ch; }
.desc.clamped { max-height: 260px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.more-btn { border: 0; background: none; color: var(--navy); font-weight: 700; padding: 6px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; list-style: none; padding: 0; margin: 0; }
.features li { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; }
.features li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--sea-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312346f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat; }
.map-link { display: flex; align-items: center; gap: 16px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; transition: border-color .2s; }
.map-link:hover { border-color: var(--navy); }
.map-link .pin { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--sea-soft); color: var(--navy); flex: none; }
.map-link strong { display: block; }
.map-link span { color: var(--muted); font-size: 14px; }
.video-link { display: inline-flex; }

.agent-card { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 24px; display: grid; gap: 12px; }
.agent-card h2 { font-family: var(--f-display); font-weight: 400; font-size: 26px; margin: 0; color: var(--navy-deep); }
.agent-card p { margin: 0; color: var(--muted); font-size: 15px; }
.agent-card .ref-line { font-size: 13px; color: var(--muted); }
.agent-card .btn { width: 100%; }
.agent-card .form { margin-top: 6px; }
.detail-actions { display: flex; gap: 8px; }
.detail-actions .btn { flex: 1; min-height: 46px; font-size: 14.5px; padding: 0 14px; }
.on-detail .bottom-bar { display: none; }
.detail-cta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 10px; align-items: center;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: rgb(251 250 246 / .96); border-top: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: barIn .5s var(--ease); }
@keyframes barIn { from { transform: translateY(100%); } }
.detail-cta-bar .dcb-price { flex: 1; min-width: 0; line-height: 1.2; }
.detail-cta-bar .dcb-price strong { display: block; font-size: 18px; color: var(--navy-deep); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-cta-bar .dcb-price small { font-size: 10.5px; color: var(--muted); display: block; }
.detail-cta-bar .btn { min-height: 46px; padding: 0 16px; font-size: 14.5px; }
.similar { margin-top: 64px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: #050b18; color: #fff; display: flex; flex-direction: column; animation: fade .25s; }
.lb-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px)); background: linear-gradient(180deg, rgb(0 0 0 / .55), transparent); }
.lb-count { font-weight: 600; font-variant-numeric: tabular-nums; }
.lb-close { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-track { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-track figure { position: relative; flex: 0 0 100%; height: 100%; margin: 0; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; scroll-snap-stop: always; padding: 64px 0 calc(28px + env(safe-area-inset-bottom, 0px)); box-sizing: border-box; }
/* La foto entera siempre cabe en la ventana (antes, en el ordenador, había que alejar el navegador). */
.lb-track img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
/* Ordenador: la foto ocupa todo el alto (o todo el ancho si es muy apaisada); las flechas flotan encima. */
@media (min-width: 980px) { .lb-track figure { padding: 0; } .lb-track figcaption { text-shadow: 0 1px 4px rgb(0 0 0 / .8); } }
.lb-track figcaption { position: absolute; left: 0; right: 0; text-align: center; bottom: calc(6px + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: rgb(255 255 255 / .7); }
.lb-arrow { display: none; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--bar-h) + 18px + env(safe-area-inset-bottom, 0px)); z-index: 110; transform: translateX(-50%); background: var(--navy-deep); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 500; font-size: 14.5px; box-shadow: var(--shadow-lg); animation: toastIn .4s var(--ease); white-space: nowrap; max-width: calc(100% - 32px); }
.toast a { color: var(--sea); font-weight: 700; margin-left: 8px; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px); } }

/* ---------- Propietarios ---------- */
.owners { display: grid; background: var(--navy-deep); color: #fff; overflow: hidden; }
.owners-media { position: relative; min-height: 300px; overflow: hidden; }
.owners-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease); }
.owners:hover .owners-media img { transform: scale(1.04); }
.owners-copy { padding: 56px max(20px, env(safe-area-inset-right, 0px)) 64px max(20px, env(safe-area-inset-left, 0px)); }
.owners-copy .h-display { color: #fff; font-size: clamp(38px, 5.6vw, 66px); }
.owners-copy p { color: rgb(255 255 255 / .82); font-size: 17.5px; max-width: 48ch; margin: 22px 0 0; }

/* ---------- Servicios de marketing ---------- */
.services { display: grid; gap: 16px; grid-template-columns: 1fr; }
.service { text-decoration: none; position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 340px; color: #fff; display: flex; align-items: flex-end; isolation: isolate; box-shadow: var(--shadow); }
.service img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.4s var(--ease); }
.service::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(8 24 58 / 0) 35%, rgb(8 24 58 / .88)); }
.service:hover img { transform: scale(1.06); }
.service-social img { object-position: 50% 38%; }
.service-social { min-height: 500px; }
.service-social::after { background: linear-gradient(180deg, rgb(8 24 58 / 0) 28%, rgb(8 24 58 / .7) 50%, rgb(8 24 58 / .94) 78%); }
.service-copy { padding: 22px; }
.service-copy .tag { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sea); }
.service-copy h3 { font-family: var(--f-display); font-weight: 400; font-size: 28px; line-height: 1.1; margin: 6px 0 8px; }
.service-copy p { margin: 0; color: rgb(255 255 255 / .85); font-size: 15px; max-width: 40ch; }
.service .ai-note { position: absolute; top: 14px; left: 14px; font-size: 11.5px; padding: 4px 10px; border-radius: 999px; background: rgb(0 0 0 / .4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

.feature-list { display: grid; gap: 36px; }
.feature { display: grid; gap: 20px; align-items: center; }
.feature-media { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 10; box-shadow: var(--shadow); max-width: 100%; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 3.4vw, 38px); color: var(--navy-deep); margin: 0 0 10px; line-height: 1.1; }
.feature p { color: var(--muted); margin: 0 0 12px; max-width: 52ch; }
.feature ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.feature li { padding-left: 22px; position: relative; }
.feature li::before { content: ""; position: absolute; left: 0; top: 10px; width: 10px; height: 2px; background: var(--sea); }
.feature .ai-note { font-size: 12.5px; color: var(--muted); font-style: italic; }

/* Comparador antes/después (terreno → simulación) */
.compare { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); user-select: none; touch-action: pan-y; max-width: 100%; --pos: 50%; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .after { clip-path: inset(0 0 0 var(--pos)); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: #fff; transform: translateX(-1px); pointer-events: none; }
.compare .handle::after { content: "⟷"; position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center; font-size: 18px; box-shadow: 0 6px 18px rgb(0 0 0 / .25); }
.compare .lbl { position: absolute; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgb(11 34 80 / .72); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }
.compare .lbl-a { left: 12px; } .compare .lbl-b { right: 12px; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }

/* ---------- Estadísticas ---------- */
.stats-band { background: var(--sea-soft); padding-block: 56px; }
.stats { display: grid; grid-template-columns: 1fr; gap: 28px; }
/* Cifras grandes: números rectos y alineados (los de Marcellus son de estilo antiguo y bailan). */
.big-num { font-family: var(--f-body); font-weight: 300; letter-spacing: -.035em; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.stat strong { display: block; font-size: clamp(46px, 7vw, 72px); color: var(--navy-deep); }
.stat span { color: var(--muted); font-size: 15.5px; }
.stats-note { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Pasos ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { background: #fff; border-radius: var(--r); padding: 22px; border: 1px solid var(--line); position: relative; }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 14px; }
.steps h3 { font-family: var(--f-display); font-weight: 400; font-size: 24px; margin: 0 0 6px; color: var(--navy-deep); }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

.sell-hero { position: relative; color: #fff; min-height: min(84svh, 760px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.sell-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: kenburns 22s ease-out both; }
.sell-hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(8 24 58 / .2), rgb(8 24 58 / .85)); }
.sell-hero-copy { padding-block: 120px 56px; }
.sell-hero-copy .h-display { color: #fff; }
.sell-hero-copy > p:not(.eyebrow) { max-width: 50ch; color: rgb(255 255 255 / .88); font-size: 18px; margin: 20px 0 0; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 14px; }
.card-form { background: #fff; border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--lime); font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 96px; resize: vertical; }
/* Flecha propia, separada del borde (la nativa queda pegada a la derecha). */
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312346f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.field-row .field select { padding-right: 36px; background-position: right 10px center; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px var(--sea-soft); }
.field.error input, .field.error select { border-color: var(--danger); }
.field-row { display: grid; gap: 14px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--navy); flex: none; }
.consent.error { color: var(--danger); }
.form-status { margin: 0; font-size: 14.5px; min-height: 1px; }
.form-status.ok { color: var(--wa); font-weight: 600; }
.form-status.err { color: var(--danger); }
.form-split { display: grid; gap: 36px; align-items: start; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.checks li::before { content: ""; width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 13px no-repeat; }

/* ---------- Nosotros / contacto ---------- */
.about { display: grid; gap: 32px; align-items: center; }
.about-media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow); max-width: 100%; }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-copy p { color: var(--muted); font-size: 17px; max-width: 60ch; }
.about-copy .h2 { margin-bottom: 14px; }
.quote { font-family: var(--f-display); font-size: 26px !important; color: var(--navy) !important; border-left: 3px solid var(--sea); padding-left: 18px; margin-top: 22px; }
.values { display: grid; gap: 14px; }
.value { background: #fff; border-radius: var(--r); padding: 24px; }
.value h3 { font-family: var(--f-display); font-weight: 400; font-size: 25px; margin: 0 0 6px; color: var(--navy-deep); }
.value p { margin: 0; color: var(--muted); font-size: 15px; }
.office { display: grid; gap: 28px; align-items: center; }
.office address { font-style: normal; font-size: 19px; margin-top: 14px; }
.social-cards { display: grid; gap: 12px; }
.social-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: #fff; border-radius: var(--r); border: 1px solid var(--line); text-decoration: none; transition: transform .3s var(--ease), border-color .3s; }
.social-card:hover { transform: translateY(-3px); border-color: var(--navy); }
.social-card svg { width: 30px; height: 30px; color: var(--navy); }
.social-card strong { display: block; }
.social-card span span, .social-card > span { color: var(--muted); font-size: 14.5px; }
.social-card strong { color: var(--ink); font-size: 16px; }
.contact-grid { display: grid; gap: 28px; align-items: start; }
.contact-cards { display: grid; gap: 12px; }
.contact-card { display: grid; gap: 2px; padding: 20px 22px; background: #fff; border-radius: var(--r); border: 1px solid var(--line); text-decoration: none; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; min-width: 0; }
.contact-card:hover { transform: translateY(-3px); border-color: var(--navy); box-shadow: var(--shadow); }
.cc-label { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--olive); font-weight: 600; }
.contact-card strong { font-size: 19px; color: var(--navy-deep); overflow-wrap: anywhere; }
.cc-action { font-size: 14px; color: var(--navy); font-weight: 600; }
.cc-action::after { content: " →"; }
.cta-card { display: grid; gap: 10px; padding: 34px 28px; border-radius: var(--r-lg); background: var(--sand); }
.cta-card p { color: var(--muted); margin: 8px 0 0; max-width: 52ch; }
.cta-card .btn-row { margin-top: 12px; }
.prose { max-width: 72ch; }
.prose p { margin: 0 0 14px; }
.prose h2 { margin: 36px 0 14px; }
.prose h2:first-child { margin-top: 0; }

.promo-list { display: grid; gap: 18px; padding-block: 36px 8px; }
.promo { color: inherit; display: grid; background: #fff; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; }
.promo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.promo-body { padding: 22px; }
.promo-body h3 { font-family: var(--f-display); font-weight: 400; font-size: 28px; margin: 0 0 6px; color: var(--navy-deep); }
.catalog-intro { margin: 8px 0 18px; }
.catalog-intro h2 { font-family: var(--f-display); font-weight: 400; font-size: 30px; color: var(--navy-deep); margin: 0; }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy-deep); color: rgb(255 255 255 / .78); padding-block: 56px 24px; font-size: 15px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
/* Logo con sus colores originales sobre el azul del pie: un halo blanco en el contorno lo despega del fondo (como en la cabecera). */
.footer-brand img { width: 200px; height: auto; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff) drop-shadow(0 0 6px rgb(255 255 255 / .55)); }
.footer-brand p { max-width: 40ch; margin: 16px 0 0; }
.site-footer h3 { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--sea); margin: 0 0 12px; font-weight: 600; }
.site-footer a { display: block; text-decoration: none; padding: 4px 0; overflow-wrap: anywhere; }
.site-footer a:hover { color: #fff; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 40px; padding-top: 22px; border-top: 1px solid rgb(255 255 255 / .12); font-size: 13px; color: rgb(255 255 255 / .55); }
.footer-legal a { display: inline; padding: 0; }

/* ---------- Barra inferior móvil ---------- */
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  background: rgb(255 255 255 / .96); border-top: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.bottom-bar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; border-radius: 12px; }
.bottom-bar a.active { color: var(--navy); }
.bottom-bar .bb-wa { color: var(--wa); }
.bottom-bar .bb-call { color: var(--navy); }
.bottom-bar .fav-count { top: 0; right: calc(50% - 22px); }
body { --bar-h: 64px; }

/* =================== Breakpoints =================== */
@media (min-width: 640px) {
  .qs-field:nth-child(3) { grid-column: auto; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .key-specs { grid-template-columns: repeat(var(--n, 4), 1fr); }
  .key-specs div:last-child:nth-child(odd) { grid-column: auto; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .promo { grid-template-columns: 1.1fr 1fr; }
  .promo img { height: 100%; aspect-ratio: auto; }
  .detail-gallery .gallery { aspect-ratio: 16 / 10; }
  .footer-grid { grid-template-columns: 2fr 1fr 1.4fr 1fr; }
  .footer-brand { grid-column: auto; }
  .hero-scroll { display: block; }
  /* Hueco reservado bajo el buscador para el indicador de scroll (42 px + 18 px + aire). */
  .hero-content { padding-bottom: 86px; }
}
@media (min-width: 980px) {
  :root { --header-h: 84px; }
  body { --bar-h: 0px; }
  .bottom-bar, .menu-btn, .mobile-menu { display: none !important; }
  .main-nav { display: flex; }
  .header-actions { margin-left: 0; }
  .btn-call { display: inline-flex; }
  .brand img { height: 58px; }
  .rail { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; scroll-padding-inline: 0; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .catalog-layout { grid-template-columns: 290px 1fr; align-items: start; }
  .filters { position: sticky; top: calc(var(--header-h) + 20px); background: #fff; border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; }
  .catalog-layout .grid { grid-template-columns: repeat(2, 1fr); }
  .filter-toggle, .sheet-close { display: none !important; }
  .owners { grid-template-columns: 1.05fr 1fr; min-height: 620px; }
  .owners-copy { padding: 88px 64px; align-self: center; }
  .services { grid-template-columns: repeat(4, 1fr); }
  .service { min-height: 440px; }
  .service:nth-child(even) { transform: translateY(36px); }
  .services { padding-bottom: 36px; }
  .feature { grid-template-columns: 1.15fr 1fr; gap: 56px; }
  .feature:nth-child(even) .feature-media, .feature:nth-child(even) .compare { order: 2; }
  .feature-list { gap: 72px; }
  .steps { grid-template-columns: repeat(5, 1fr); }
  .values { grid-template-columns: repeat(4, 1fr); }
  .about { grid-template-columns: 1.1fr 1fr; gap: 64px; }
  .office { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1.1fr; gap: 40px; }
  .form-split { grid-template-columns: 1fr 1.1fr; gap: 64px; }
  .cta-card { grid-template-columns: 1fr auto; align-items: center; padding: 44px 48px; }
  .cta-card .btn-row { margin: 0; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 370px; gap: 56px; }
  .detail-aside { position: sticky; top: calc(var(--header-h) + 20px); }
  .detail-cta-bar { display: none; }
  .thumbs { display: flex; }
  .has-mosaic .gallery, .has-mosaic + .thumbs { display: none; }
  .has-mosaic .mosaic { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; height: min(560px, 62vh); position: relative; }
  .has-mosaic .mosaic button:first-of-type { grid-row: 1 / 3; }
  .has-mosaic { box-shadow: none; }
  .lb-arrow { display: grid; width: 54px; height: 54px; margin-top: -27px; }
  .lb-arrow.g-prev { left: 24px; } .lb-arrow.g-next { right: 24px; }
  .section { padding-block: 104px; }
  .page-head { padding-block: 72px 40px; }
  .page-head-image { padding-block: 140px 72px; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .card .g-arrow { opacity: 0; }
  .card:hover .g-arrow:not(:disabled) { opacity: 1; }
}
@media (min-width: 1200px) {
  .catalog-layout .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (hover: none) {
  .card:hover, .btn:hover:not(:active), .g-arrow:hover:not(:active) { transform: none; }
  .card:hover .g-slide img { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important;
    transition-property: opacity, color, background-color, border-color, box-shadow !important; transition-duration: .15s !important; transition-delay: 0s !important; }
  .card:hover, .btn:hover, .btn:active, .g-arrow:hover, .card:hover .g-slide img { transform: none; }
  .reveal.pre { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

/* ---------- Mapa (Google Maps se carga solo al pulsar) ---------- */
.map-embed { position: relative; min-height: 300px; border-radius: var(--r-lg); overflow: hidden; background: var(--sea-soft); border: 1px solid var(--line); max-width: 100%; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-embed .map-cover {
  position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--navy-deep);
  background:
    repeating-linear-gradient(28deg, transparent 0 46px, rgb(18 52 111 / .07) 46px 48px),
    repeating-linear-gradient(-62deg, transparent 0 70px, rgb(18 52 111 / .07) 70px 73px),
    linear-gradient(160deg, #e9f2fa, #f4f1ea);
}
.map-cover .pin-big { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--navy); box-shadow: 0 14px 30px -10px rgb(11 34 80 / .6); animation: pinDrop 1.1s var(--ease) both; }
.map-cover .pin-big::after { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--sea); }
@keyframes pinDrop { from { transform: translateY(-30px) rotate(-45deg); opacity: 0; } }
.map-cover > span { padding: 18px 22px; border-radius: var(--r); background: rgb(251 250 246 / .82); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.map-cover strong { display: block; font-family: var(--f-display); font-weight: 400; font-size: 24px; }
.map-cover span { display: block; color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.map-cover em { display: inline-block; margin-top: 14px; font-style: normal; font-weight: 600; font-size: 14px; color: var(--navy); padding: 9px 16px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); }
.office-map { grid-column: 1 / -1; }
.contact-map { margin-top: 12px; min-height: 240px; }

@media (min-width: 980px) {
  .data-badge { left: auto; right: max(20px, env(safe-area-inset-right, 0px)); bottom: 20px; }
}
@media (min-width: 980px) and (max-width: 1180px) {
  .header-inner { gap: 12px; }
  .main-nav a { padding: 10px 8px; font-size: 14.5px; }
  .main-nav a::after { left: 8px; right: 8px; }
  .btn-call { width: 44px; padding: 0; }
  .btn-call span { display: none; }
}

/* Arrastre horizontal gestionado por la web: sin ajuste mientras el dedo arrastra, y sin mover la página. */
.g-track.dragging, .lb-track.dragging { scroll-snap-type: none; scroll-behavior: auto; }
.g-track img, .lb-track img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }

@media (min-width: 640px) and (max-height: 720px) {
  .hero-scroll { display: none; }
  .hero-content { padding-bottom: 40px; }
}

/* ---------- Inversión ---------- */
.invest-grid { display: grid; gap: 16px; }
.invest-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.invest-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.invest-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--sea-soft); color: var(--navy); margin-bottom: 18px; }
.invest-icon svg { width: 26px; height: 26px; }
.invest-card h3 { font-family: var(--f-display); font-weight: 400; font-size: 27px; margin: 0 0 8px; color: var(--navy-deep); }
.invest-card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.fine-print { margin: 22px 0 0; font-size: 13px; color: var(--muted); max-width: 52ch; }
.field-label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
@media (min-width: 640px) { .invest-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .steps.steps-4 { grid-template-columns: repeat(4, 1fr); } }

/* Buscador de la portada en una sola fila a partir de 980 px */
@media (min-width: 980px) {
  .quick-search { grid-template-columns: 1.15fr 1.15fr 1fr 1fr auto auto; }
  .quick-search > :first-child { border-radius: var(--r) 0 0 var(--r); }
  .quick-search > :nth-child(2), .quick-search > :nth-last-child(2) { border-radius: 0; }
  .quick-search > :nth-last-child(2) { padding: 0 24px; }
  .quick-search > :last-child { padding: 0 22px; border-radius: 0 var(--r) var(--r) 0; }
}

/* ---------- Selector múltiple ---------- */
.ms { position: relative; min-width: 0; max-width: 100%; }
.ms-btn {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; background: transparent; color: var(--ink);
  text-align: left; cursor: pointer; padding: 12px 40px 10px 16px; position: relative; min-width: 0;
}
.ms-btn::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; transition: transform .25s var(--ease);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312346f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.ms.open .ms-btn::after { transform: rotate(180deg); }
.ms-label { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ms-value { align-self: stretch; min-width: 0; font-size: 16px; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 0; }
.ms.has-value .ms-value { color: var(--navy); font-weight: 600; }
.ms-panel {
  position: absolute; z-index: 40; left: 0; top: calc(100% + 8px); width: max(100%, 290px); max-width: min(360px, calc(100vw - 32px));
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 12px; display: grid; gap: 10px; animation: msIn .25s var(--ease);
}
@keyframes msIn { from { opacity: 0; transform: translateY(6px); } }
.quick-search .ms-panel { top: auto; bottom: calc(100% + 10px); }   /* en la portada se abre hacia arriba */
.ms-title { display: none; margin: 0; font-family: var(--f-display); font-size: 24px; color: var(--navy-deep); }
.ms-search { width: 100%; min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 16px; background: var(--lime); }
.ms-search:focus { outline: none; border-color: var(--navy); }
.ms-list { display: grid; gap: 2px; max-height: 280px; overflow-y: auto; overscroll-behavior: contain; }
.ms-list label { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; cursor: pointer; font-size: 15.5px; }
.ms-list label:hover { background: var(--sea-soft); }
.ms-list label:has(input:checked) { color: var(--navy); font-weight: 600; }
.ms-list input, .field .ms-list input { flex: none; width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; border: 0; accent-color: var(--navy); }
.ms-none { margin: 6px 10px; color: var(--muted); }
.ms-foot { display: flex; gap: 8px; }
.ms-foot .btn { flex: 1; min-height: 44px; padding: 0 14px; font-size: 14.5px; }
/* En los filtros: parece un campo más y la lista se despliega dentro del panel. */
.ms-inline .ms-btn { min-height: 50px; justify-content: center; padding: 12px 44px 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.ms-inline.open .ms-btn { border-color: var(--navy); box-shadow: 0 0 0 4px var(--sea-soft); }
.ms-inline .ms-label { display: none; }
.ms-inline .ms-value { font-size: 15.5px; }
.ms-inline .ms-panel { position: static; width: auto; max-width: none; margin-top: 8px; box-shadow: none; padding: 8px; }
.ms-inline .ms-list { max-height: 240px; }
/* Móvil: hoja inferior con fondo oscuro */
.ms-panel.as-sheet {
  position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 95; width: auto; max-width: none; border-radius: 22px 22px 0 0;
  padding: 18px max(20px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  animation: sheetIn .35s var(--ease);
}
@keyframes sheetIn { from { transform: translateY(100%); } }
.ms-panel.as-sheet .ms-title { display: block; }
.ms-panel.as-sheet .ms-list { max-height: 50svh; }
body.ms-sheet::after { content: ""; position: fixed; inset: 0; z-index: 94; background: rgb(8 20 45 / .45); animation: fade .3s; }

/* ---------- Lista / mapa ---------- */
.view-toggle { display: inline-flex; padding: 3px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); }
.view-toggle button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; transition: background .2s, color .2s; }
.view-toggle button svg { width: 18px; height: 18px; }
.view-toggle button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.catalog .map-view { display: none; }
.catalog.is-map .map-view { display: block; }
.catalog.is-map [data-grid], .catalog.is-map [data-more] { display: none !important; }
.map-canvas { position: relative; z-index: 0; isolation: isolate; height: min(68svh, 620px); min-height: 380px; border-radius: var(--r-lg); overflow: hidden; background: var(--sea-soft); box-shadow: var(--shadow); }
.map-canvas.loading::after { content: "Cargando mapa…"; position: absolute; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgb(251 250 246 / .7); color: var(--navy); font-weight: 600; }
.map-note { margin: 12px 2px 0; font-size: 13.5px; color: var(--muted); }
.map-pin-wrap { background: none; border: 0; }
.map-pin {
  display: inline-block; transform: translate(-50%, -100%); padding: 5px 9px; border-radius: 999px; background: var(--navy); color: #fff;
  font: 700 12.5px/1 var(--f-body); white-space: nowrap; box-shadow: 0 4px 12px rgb(11 34 80 / .35); position: relative; cursor: pointer;
  transition: transform .2s var(--ease), background .2s;
}
.map-pin::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: inherit; border-top-color: var(--navy); }
.map-pin.is-new { background: var(--olive); }
.map-pin.is-new::after { border-top-color: var(--olive); }
.leaflet-marker-icon:hover .map-pin { background: var(--navy-deep); transform: translate(-50%, -100%) scale(1.08); }
.map-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 14px; overflow: hidden; }
.map-popup .leaflet-popup-content { margin: 0; width: 260px !important; }
.map-card { display: block; color: var(--ink); text-decoration: none; font-family: var(--f-body); }
.map-card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.map-card-body { display: grid; gap: 2px; padding: 12px 14px 14px; font-size: 14px; }
.map-card-body strong { font-size: 19px; color: var(--navy-deep); }
.map-card-body small { font-size: 11px; color: var(--muted); }
.map-card-specs { color: var(--muted); font-size: 13px; }
.map-card-link { margin-top: 6px; color: var(--navy); font-weight: 700; }
@media (max-width: 639px) {
  .toolbar-actions { width: 100%; display: grid; grid-template-columns: auto auto 1fr; }
  .toolbar-actions .select-pill select { width: 100%; padding-left: 12px; padding-right: 30px; background-position: right 10px center; }
  .view-toggle button span { display: none; }
  .view-toggle button { padding: 0 10px; }
  .map-canvas { height: 62svh; min-height: 340px; margin-inline: calc(-1 * max(20px, env(safe-area-inset-left, 0px))); border-radius: 0; }
}
/* Las opciones del desplegable no heredan el estilo de las etiquetas del buscador de la portada. */
.qs-field .ms-list label { display: flex; font-size: 15.5px; font-weight: 400; letter-spacing: normal; text-transform: none; color: var(--ink); }
.qs-field .ms-list label:has(input:checked) { color: var(--navy); font-weight: 600; }

/* ---------- Mapa en la portada ---------- */
.home-map-section .section-head .btn { gap: 8px; }
.home-map-section .section-head .btn svg { width: 19px; height: 19px; }
.home-map { height: min(64svh, 560px); }
@media (max-width: 639px) { .home-map { height: 58svh; } }

/* ---------- Mapa más visible en el móvil ---------- */
.bottom-bar .bb-map { color: var(--navy); }
.bottom-bar .bb-map.active, .bottom-bar a.active { color: var(--navy); }
.map-fab {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 14px + env(safe-area-inset-bottom, 0px)); z-index: 44; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--navy-deep); color: #fff; font: 600 15px var(--f-body); box-shadow: 0 12px 30px -10px rgb(11 34 80 / .6); cursor: pointer;
  animation: fabIn .45s var(--ease);
}
.map-fab svg { width: 20px; height: 20px; }
.map-fab:active { transform: translateX(-50%) scale(.96); }
@keyframes fabIn { from { opacity: 0; transform: translate(-50%, 16px); } }
.has-fab .toast { bottom: calc(var(--bar-h) + 76px + env(safe-area-inset-bottom, 0px)); }
.has-fab .catalog { padding-bottom: 120px; }
@media (min-width: 980px) { .map-fab { display: none !important; } .has-fab .catalog { padding-bottom: 72px; } }
/* En el móvil el cambio lista/mapa lo hace el botón flotante; la barra del listado queda para filtros y orden. */
@media (max-width: 979px) {
  .toolbar .view-toggle { display: none; }
  .toolbar-actions { grid-template-columns: auto 1fr; }
}

/* Vista ampliada con el móvil en horizontal: la foto ocupa todo el alto; contador y cerrar flotan encima.
   Solo se respetan los laterales de la muesca (safe area). */
@media (orientation: landscape) and (max-height: 540px) {
  .lb-track figure { padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); }
  .lb-top { padding-top: calc(6px + env(safe-area-inset-top, 0px)); background: linear-gradient(180deg, rgb(0 0 0 / .5), transparent); }
  .lb-close { width: 40px; height: 40px; }
  .lb-track figcaption { bottom: 6px; text-shadow: 0 1px 4px rgb(0 0 0 / .8); }
}

/* ---------- Ayudas recibidas (MOVES III) ---------- */
.aid { display: grid; gap: 28px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.aid-copy p { margin: 12px 0 0; max-width: 68ch; line-height: 1.7; }
.aid-img { width: 100%; max-width: 460px; height: auto; justify-self: center; }
@media (min-width: 980px) { .aid { grid-template-columns: 1.3fr 1fr; padding: 40px; } }
/* Botones del pie de filtros: caben los dos en el ancho del panel y alinean con los campos. */
.filters-foot { gap: 8px; }
.filters-foot .btn { min-width: 0; padding: 0 12px; font-size: 14.5px; }
/* Ordenador: el panel de filtros se ve entero, sin barra de desplazamiento propia; baja con la página. */
@media (min-width: 980px) {
  .filters { position: static; max-height: none; overflow: visible; }
}

/* ---------- Mapa a pantalla completa ---------- */
.map-full-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: #fff; color: var(--navy-deep); font: 600 13.5px var(--f-body); box-shadow: 0 2px 10px rgb(0 0 0 / .2); cursor: pointer; }
.map-full-btn svg { width: 17px; height: 17px; }
.map-canvas.map-full { position: fixed; inset: 0; z-index: 120; height: auto !important; min-height: 0; margin: 0 !important; border-radius: 0; }
.map-canvas.map-full .leaflet-top { top: env(safe-area-inset-top, 0px); }
.map-canvas.map-full .leaflet-bottom { bottom: env(safe-area-inset-bottom, 0px); }
body.map-full-open { overflow: hidden; }
/* El símbolo de WhatsApp es macizo y llega al borde: algo más pequeño para igualarse a los iconos de línea. */
.bottom-bar .bb-wa svg { width: 19px; height: 19px; margin: 1.5px; }

/* ---------- Calculadora de hipoteca ---------- */
.hp { display: grid; gap: 20px; align-items: start; }
.hp-form { display: grid; gap: 22px; }
.hp-modes span { height: auto; min-height: 48px; padding: 8px 10px; text-align: center; line-height: 1.25; font-size: 15px; }
.hp-set { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; min-width: 0; }
.hp-set legend { padding: 0; margin-bottom: 12px; font-family: var(--f-display); font-size: 23px; color: var(--navy-deep); }
.hp-set .seg span { height: auto; min-height: 44px; padding: 6px 8px; text-align: center; line-height: 1.2; }
.hp-buyer { display: grid; gap: 10px; }
.hp-buyer-t { margin: 4px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--olive); }
.hp-3, .hp-2 { grid-template-columns: 1fr; }
.hp-help { margin: -2px 0 0; font-size: 13px; color: var(--muted); }
.hp-rate { max-width: 220px; }
.hp-result { display: grid; gap: 14px; }
.hp-empty h3 { font-family: var(--f-display); font-weight: 400; font-size: 26px; color: var(--navy-deep); margin: 0 0 6px; }
.hp-empty p { margin: 0 0 16px; color: var(--muted); }
.hp-kicker { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--olive); }
.hp-big { margin: -6px 0 0; font-family: var(--f-display); font-size: clamp(40px, 7vw, 54px); line-height: 1.05; color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.hp-big small { font-family: var(--f-body); font-size: 18px; color: var(--muted); margin-left: 4px; }
.hp-scale { display: flex; height: 10px; border-radius: 99px; background: #f6dcd3; overflow: hidden; }
.hp-scale span { display: block; height: 100%; }
.s1 { --c: #2f8a57; } .s2 { --c: #e7a33e; } .s3 { --c: var(--sea); }
.hp-scale span { background: var(--c); }
.hp-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: -4px 0 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.hp-legend li::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.hp-grid2, .hp-list, .hp-break dl { margin: 0; display: grid; }
.hp-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.hp-row:first-child { border-top: 0; }
.hp-row dt { color: var(--muted); }
.hp-row dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hp-strong dt { color: var(--ink); font-weight: 600; }
.hp-strong dd { color: var(--navy-deep); font-size: 17px; }
.hp-grid2 { background: var(--sea-soft); border-radius: var(--r-sm); padding: 4px 14px; }
.hp-grid2 .hp-row { border-color: rgb(18 52 111 / .12); }
.hp-limit { margin: 0; font-size: 14.5px; color: var(--ink); }
.hp-break { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 14px; background: var(--lime); }
.hp-break summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--navy); list-style-position: inside; }
.hp-break[open] summary { border-bottom: 1px solid var(--line); }
.hp-break dl { padding-bottom: 6px; }
.hp-table { overflow-x: auto; max-height: 340px; overflow-y: auto; margin: 0 -14px; }
.hp-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.hp-table th, .hp-table td { padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hp-table th { position: sticky; top: 0; background: var(--lime); color: var(--muted); font-weight: 600; }
.hp-table th:first-child, .hp-table td:first-child { text-align: left; }
.hp-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hp-notes li { position: relative; padding: 10px 12px 10px 38px; border-radius: var(--r-sm); font-size: 14px; line-height: 1.45; }
.hp-notes li::before { content: ""; position: absolute; left: 12px; top: 12px; width: 16px; height: 16px; border-radius: 50%; }
.hp-ok { background: #eaf5ee; color: #17603a; }
.hp-ok::before { background: var(--wa) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 10px no-repeat; }
.hp-info { background: var(--sea-soft); color: var(--navy-deep); }
.hp-info::before { background: var(--navy); }
.hp-warn { background: #fbefe9; color: #8a3422; }
.hp-warn::before { background: var(--danger); }
.hp-actions { display: grid; gap: 10px; margin-top: 4px; }
.hp-legal { margin: 18px 0 0; font-size: 12.5px; color: var(--muted); max-width: 110ch; }
.hp-link { display: inline-flex; margin-top: 8px; font-size: 15px; }
@media (min-width: 640px) {
  .hp-3 { grid-template-columns: 1fr 1fr 1fr; }
  .hp-2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 980px) {
  .hp { grid-template-columns: minmax(0, 1fr) 420px; gap: 28px; }
  .hp-result { position: sticky; top: calc(var(--header-h) + 20px); }
}
.field-label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.hp-peek { position: fixed; z-index: 40; left: 16px; right: 16px; bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px) + 12px); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border: 0; border-radius: 999px; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); font-size: 15px; cursor: pointer; }
.hp-peek span { font-weight: 700; font-variant-numeric: tabular-nums; }
.hp-peek b { font-weight: 600; color: var(--sea); white-space: nowrap; }
/* Escala de precio de «¿Cuánto me puedo permitir?» (verde, naranja, azul con aval, rojo) */
.hp-picker { --z: #2f8a57; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 6px; background: #fff; }
.hp-picker[data-zona="algunos"] { --z: #d48a1f; }
.hp-picker[data-zona="aval"] { --z: #3f7fbf; }
.hp-picker[data-zona="no"] { --z: var(--danger); }
.hp-step { flex: none; width: 46px; height: 46px; border: 0; border-radius: 10px; background: var(--sea-soft); color: var(--navy); font-size: 26px; line-height: 1; cursor: pointer; }
.hp-step:hover { background: var(--navy); color: #fff; }
.hp-price { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-size: clamp(32px, 6vw, 44px); line-height: 1.1; color: var(--z); font-variant-numeric: tabular-nums; transition: color .2s; }
.hp-price svg { width: 30px; height: 30px; stroke-width: 1.8; }
.hp-slider { position: relative; padding: 6px 0 44px; }
.hp-slider input[type=range] { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 12px; margin: 10px 0 0; border-radius: 99px; cursor: pointer;
  background: linear-gradient(90deg, #2f8a57 0 var(--a), #e7a33e var(--a) var(--b), #8dbfe6 var(--b) var(--c), #f4cfc6 var(--c) 100%); }
.hp-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 7px solid var(--z, #2f8a57); box-shadow: 0 2px 8px rgb(11 34 80 / .35); }
.hp-slider input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 7px solid var(--z, #2f8a57); box-shadow: 0 2px 8px rgb(11 34 80 / .35); }
.hp-slider input[data-zona="ok"] { --z: #2f8a57; } .hp-slider input[data-zona="algunos"] { --z: #d48a1f; }
.hp-slider input[data-zona="aval"] { --z: #3f7fbf; } .hp-slider input[data-zona="no"] { --z: var(--danger); }
.hp-ticks { position: absolute; left: 15px; right: 15px; top: 30px; height: 40px; pointer-events: none; }
.hp-tick { position: absolute; transform: translateX(-50%); display: grid; justify-items: center; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.25; }
.hp-tick i { width: 2px; height: 8px; background: #a9aeb8; margin-bottom: 3px; }
.hp-tick small { font-size: 11px; font-weight: 400; }
.hp-legend .s4 { --c: #e3877a; }
.hp-verdict { --z: #2f8a57; --bg: #eaf5ee; background: var(--bg); border-left: 4px solid var(--z); border-radius: var(--r-sm); padding: 12px 14px; }
.hp-verdict[data-zona="algunos"] { --z: #d48a1f; --bg: #fdf3e3; }
.hp-verdict[data-zona="aval"] { --z: #3f7fbf; --bg: var(--sea-soft); }
.hp-verdict[data-zona="no"] { --z: var(--danger); --bg: #fbefe9; }
.hp-verdict strong { color: var(--z); font-size: 16px; }
.hp-verdict p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.5; }
.hp-tick.baja { top: 34px; }
.hp-tick.baja i { height: 40px; margin-top: -32px; }
.hp-slider:has(.baja) { padding-bottom: 78px; }
/* Cifras de la calculadora: letra de texto con números de ancho fijo, para que nada salte al cambiar los datos. */
.hp-price, .hp-big { font-family: var(--f-body); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.hp-price { flex: 1; justify-content: center; min-width: 0; font-size: clamp(28px, 5vw, 38px); white-space: nowrap; }
.hp-picker { min-height: 62px; }
.hp-big { font-size: clamp(34px, 6vw, 46px); }
.hp-big small { font-weight: 500; letter-spacing: 0; }
/* Unidad dentro de cada casilla de la calculadora (€, €/mes, años, %) */
.hp-unit { position: relative; display: block; }
.hp-unit::after { content: attr(data-unit); position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 15px; font-weight: 500; color: var(--muted); pointer-events: none; }
.hp-unit input { padding-right: 64px; }
.hp-unit[data-unit="€"] input, .hp-unit[data-unit="%"] input { padding-right: 36px; }
/* El detalle de «¿Cuánto me puedo permitir?» se repinta dentro de su propio bloque: mismo espaciado que el resto. */
[data-hp-detalle] { display: grid; gap: 14px; }
.hp-notes li::before { display: grid; place-items: center; font: 700 11px/1 var(--f-body); color: #fff; }
.hp-notes .hp-info::before { content: "i"; }
.hp-notes .hp-warn::before { content: "!"; }
.rail-more { display: flex; justify-content: center; margin-top: 28px; }
@media (max-width: 639px) { .rail-more .btn { width: 100%; } }
/* Simulador de hipoteca dentro de la ficha de una vivienda */
.mini-hp-grid { display: grid; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.mini-hp-form { display: grid; gap: 12px; align-content: start; }
.mini-hp-2 { grid-template-columns: 1fr 1fr; }
.mini-hp-form .toggle-chip { justify-self: start; }
.mini-hp-out { display: grid; gap: 10px; align-content: start; background: var(--sea-soft); border-radius: var(--r-sm); padding: 16px; }
.mini-hp-out .hp-big { font-size: clamp(32px, 5vw, 40px); }
.mini-hp-out .hp-row { border-color: rgb(18 52 111 / .12); font-size: 14.5px; }
.mini-hp-out .hp-notes li { font-size: 13.5px; }
.mini-hp-out .hp-notes .hp-info { background: #fff; }
.mini-hp-note { margin: 0; color: var(--muted); font-size: 14.5px; }
button.hp-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 600; }
@media (min-width: 720px) { .mini-hp-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.mini-hp-grid { grid-template-columns: minmax(0, 1fr); }
.mini-hp-grid > *, .mini-hp-2 > * { min-width: 0; }
.mini-hp-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (min-width: 720px) { .mini-hp-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.mini-hp-out .link-arrow { white-space: normal; }
.mini-hp-out .hp-row dt { min-width: 0; }
/* Preguntas frecuentes de las calculadoras */
.faq { margin-top: 48px; max-width: 860px; }
.faq .h2 { margin-bottom: 18px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 10px; }
.faq-item summary { cursor: pointer; padding: 16px 18px; font-weight: 600; color: var(--navy-deep); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--navy); flex: none; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0; padding: 0 18px 16px; color: var(--ink); line-height: 1.65; }
/* Contenido para buscadores que la web sustituye al cargar */
.seo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.seo-list a { display: grid; gap: 4px; text-decoration: none; color: var(--ink); background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); padding-bottom: 12px; }
.seo-list img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.seo-list strong, .seo-list span, .seo-list small { padding: 0 14px; }
.seo-detail img { width: 100%; max-width: 640px; height: auto; border-radius: var(--r-sm); margin-top: 12px; }
/* Los botones de casilla (discapacidad, primera vivienda…) solo reaccionan sobre el propio botón, no en toda la fila. */
.toggle-chip { justify-self: start; width: max-content; max-width: 100%; }

/* ---------- Portada: buscador arriba, titular con tarjetas y mapa al lado ---------- */
/* Sin foto detrás, la cabecera de la portada va clara como en el resto de la web. */
.on-home .site-header:not(.scrolled):not(.solid) { background: var(--sea-soft); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.on-home .site-header:not(.scrolled):not(.solid) .brand img { filter: none; }
.on-home .site-header:not(.scrolled):not(.solid) .main-nav a { color: var(--ink); text-shadow: none; }
.on-home .site-header:not(.scrolled):not(.solid) .main-nav a.active { color: var(--navy); }
.on-home .site-header:not(.scrolled):not(.solid) .icon-btn { color: var(--navy-deep); }
.on-home .site-header:not(.scrolled):not(.solid) .icon-btn:hover { background: var(--sea-soft); }
.on-home .site-header:not(.scrolled):not(.solid) .btn-call { --bg: var(--navy); --fg: #fff; }
.on-home .site-header:not(.scrolled):not(.solid) .fav-count { background: var(--navy); color: #fff; }
body.on-home::before { background: var(--sea-soft); }

.hero2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px 48px; max-width: 1280px; margin: 0 auto; padding: 24px max(20px, env(safe-area-inset-right, 0px)) 56px max(20px, env(safe-area-inset-left, 0px)); }
.hero2 > * { min-width: 0; }
/* Fondo celeste del logo a todo el ancho (la rejilla sigue a 1280 px): las cajas blancas se despegan del fondo. */
.hero2 { border-image: linear-gradient(var(--sea-soft) 0 0) fill 0 / / 0 100vmax; }
/* (Sin clip-path ni sombra gigante: el recorte también cortaba el mapa a pantalla completa y su botón de cerrar.) */
.hero2-search .quick-search { --r: 18px; margin: 0 auto; max-width: 1040px; background: var(--line); box-shadow: 0 1px 2px rgb(11 34 80 / .06), 0 14px 34px -20px rgb(11 34 80 / .4); }
.hero2-search .qs-field, .hero2-search .qs-map { --bg: #fff; background: #fff; }
.hero2-search .quick-search .ms-panel:not(.as-sheet) { top: calc(100% + 8px); bottom: auto; }   /* aquí arriba se abre hacia abajo */
.hero2-title { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; font-size: clamp(46px, 6vw, 84px); line-height: 1; letter-spacing: -.015em; color: var(--navy-deep); margin: 8px 0 28px; }

/* «¿Qué estás buscando?»: tres tarjetas con la foto real del último inmueble de cada tipo (la pone app.js). */
.guide { background: #fff; border-radius: 22px; padding: 20px; box-shadow: 0 1px 2px rgb(11 34 80 / .05), 0 18px 40px -26px rgb(11 34 80 / .35); }
.guide-q { margin: 0 0 16px; font-weight: 600; font-size: 16.5px; color: var(--navy-deep); }
.guide-cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -20px; padding: 2px 20px 8px; scroll-padding-inline: 20px; }
.guide-cards::-webkit-scrollbar { display: none; }
.guide-card { position: relative; scroll-snap-align: start; display: block; background: #fff; border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgb(11 34 80 / .06), 0 8px 20px -14px rgb(11 34 80 / .35); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.guide-card::before { content: ""; display: block; aspect-ratio: 1 / 1; background: var(--sand); }
.guide-card img { position: absolute; top: 0; left: 0; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; color: transparent; opacity: 0; transition: opacity .4s; }
.guide-card img.ok { opacity: 1; }
.guide-card span { display: block; padding: 14px 14px 16px; font-size: 15px; font-weight: 500; }
.guide-card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgb(11 34 80 / .06), 0 16px 30px -16px rgb(11 34 80 / .45); }
.guide-card:active { transform: scale(.97); transition-duration: .1s; }
.guide-btn { display: flex; width: max-content; max-width: 100%; margin: 22px 0 4px auto; gap: 6px; }
.guide-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.hero2-maplabel { margin: 0 0 14px; font-size: 14px; line-height: 1.4; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero2-maplabel strong { color: var(--navy-deep); }
.hero2-map { height: 420px; border-radius: 22px; overflow: hidden; }
@media (min-width: 980px) {
  .hero2 { grid-template-columns: 1fr 1fr; padding-top: 28px; }
  .hero2-search { grid-column: 1 / -1; }
  .hero2-search .quick-search { --r: 999px; }
  .hero2-search .quick-search > :first-child { padding-left: 14px; }
  .hero2-search .quick-search > :first-child .ms-btn { padding-left: 26px; }
  .hero2-right { display: flex; flex-direction: column; padding-top: 28px; }
  .hero2-map { flex: 1; height: auto; min-height: 480px; }
  .guide-cards { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; }
}
@media (hover: none) { .guide-card:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { .guide-card:hover, .guide-card:active { transform: none; } }

/* ---------- Mapas: tono a juego con la web y límites de la Región ---------- */
/* El mapa de OpenStreetMap pasa a azules suaves, como el celeste y el marino del logo; los precios resaltan encima. */
.map-canvas .leaflet-tile-pane { filter: grayscale(1) sepia(.18) hue-rotate(178deg) saturate(1.25) brightness(1.06) contrast(.9); }
@media (prefers-contrast: more) { .map-canvas .leaflet-tile-pane { filter: none; } }
/* Móvil: las tres categorías caben enteras a lo ancho, sin deslizar. */
@media (max-width: 979px) {
  .guide { padding: 16px; }
  .guide-cards { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; overflow: visible; margin: 0; padding: 0; }
  .guide-card { border-radius: 12px; }
  .guide-card span { padding: 9px 8px 11px; font-size: 13px; line-height: 1.25; }
}
/* La regla general de iconos (svg de 22 px) no debe tocar las capas que dibuja Leaflet (límite de la Región). */
.map-canvas .leaflet-overlay-pane svg { width: auto; height: auto; max-width: none; max-height: none; }

/* Portada en el móvil: en Safari del iPhone la franja de arriba toma el color del fondo de la página,
   así que en la portada el fondo es celeste y las secciones de debajo conservan el crema. */
body.on-home { background: var(--sea-soft); }
body.on-home [data-view="inicio"] > :not(.hero2) { background-color: var(--lime); }
body.on-home [data-view="inicio"] > .marquee { background-color: var(--navy-deep); }
body.on-home [data-view="inicio"] > .owners { background-color: var(--navy-deep); }
body.on-home [data-view="inicio"] > .stats-band { background-color: var(--sea-soft); }

/* «Ver todos» junto a la pregunta (en el móvil sustituye al botón grande, para que la caja quepa en la primera pantalla). */
.guide-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.guide-head .guide-q { margin: 0; }
.guide-all { display: none; align-items: center; gap: 2px; padding-block: 10px; margin-block: -10px; font-size: 14.5px; font-weight: 600; color: var(--navy); text-decoration: none; white-space: nowrap; }
.guide-all svg { width: 15px; height: 15px; stroke-width: 2.4; }
@media (max-width: 979px) {
  .guide-all { display: inline-flex; }
  .guide-btn { display: none; }
  .hero2 { gap: 18px; padding-top: 14px; padding-bottom: 32px; }
  .hero2-title { font-size: clamp(38px, 10.6vw, 46px); margin: 6px 0 16px; }
  .hero2-search .qs-field:not(.qs-ms) { padding: 9px 16px 8px; }
  .hero2-search .qs-ms .ms-btn { padding-top: 9px; padding-bottom: 8px; }
  .hero2-search .qs-submit, .hero2-search .qs-map { min-height: 50px; }
}
@media (max-width: 979px) {
  .hero2 { gap: 14px; padding-top: 12px; }
  .guide { padding: 14px 14px 12px; }
  .guide-head { margin-bottom: 12px; }
  .guide-card span { padding: 8px 8px 9px; }
}

/* Campo trampa antispam de los formularios: fuera de la vista, sin foco ni lector de pantalla */
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
