/* =========================================================
   Besbergi Inmobiliaria — sistema visual (versión 3)
   Claro, cálido y contundente: fondo crema, bloques de azul
   marino y rosa de la marca, fotos grandes y una sola familia
   tipográfica (Figtree). Bodoni queda sólo en el logo.
   ========================================================= */

:root {
  --navy-950: #111730;
  --navy-900: #1d2441;
  --navy-800: #283157;
  --navy-700: #36406c;
  --ink: #171c33;
  --text: #4c516b;
  --muted: #747990;
  --line: #e9e2dc;
  --line-strong: #d8cfc8;
  --cream: #faf7f4;
  --sand: #f3ece6;
  --white: #ffffff;

  --rose-800: #6f423d;
  --rose-700: #87524c;
  --rose-600: #a06660;
  --rose-500: #a76f69;
  --rose-300: #dcb9b3;
  --rose-200: #ecd6d0;
  --rose-100: #f6e9e5;
  --rose-50: #fbf4f1;

  --gold-500: #c9a26e;
  --gold-400: #dcbb8a;

  --wa: #128c4b;
  --wa-dark: #0e743e;

  --font: 'Figtree', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --font-logo: 'Bodoni Moda', 'Bodoni MT', Didot, 'Times New Roman', serif;

  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;

  --shadow-sm: 0 1px 2px rgba(23, 28, 51, 0.05), 0 2px 6px rgba(23, 28, 51, 0.04);
  --shadow: 0 4px 10px rgba(23, 28, 51, 0.04), 0 14px 30px rgba(23, 28, 51, 0.08);
  --shadow-lg: 0 10px 24px rgba(23, 28, 51, 0.07), 0 28px 64px rgba(23, 28, 51, 0.14);

  --header-h: 76px;
  --container: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
figure { margin: 0; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h3, h4 { font-weight: 700; line-height: 1.3; letter-spacing: -0.015em; }

::selection { background: var(--rose-200); color: var(--ink); }
:focus-visible { outline: 3px solid var(--rose-300); outline-offset: 3px; border-radius: 6px; }

.icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: -0.22em; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 300; background: var(--ink); color: var(--white); padding: 0.6rem 1rem; border-radius: var(--r-sm); font-weight: 700; }
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: calc(var(--container) + 3rem); margin: 0 auto; padding: 0 1.5rem; }

.section { padding: clamp(3.75rem, 8vw, 6.5rem) 0; }
.section--white { background: var(--white); }
.section--tight { padding-top: clamp(2rem, 4vw, 3rem); }

/* Encabezado de sección: etiqueta + título, con acción a la derecha. */
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.sec-head--center { flex-direction: column; align-items: center; text-align: center; }
.sec-head p { margin: 0.75rem 0 0; max-width: 34rem; font-size: 1.05rem; }
.kicker {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin-bottom: 0.7rem;
  font-size: 0.875rem; font-weight: 700; letter-spacing: 0.01em;
  color: var(--rose-700);
}
.kicker::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: var(--rose-500); }
.kicker--light { color: var(--rose-300); }
.kicker--light::before { background: var(--gold-400); }
.title { font-size: clamp(1.85rem, 3.5vw, 2.75rem); }
.title em, .hl { font-style: normal; color: var(--rose-600); }
.title--light { color: var(--white); }
.title--light em { color: var(--rose-300); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 50px; padding: 0 1.4rem;
  border: 1px solid transparent; border-radius: 14px;
  font-size: 0.97rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.005em; white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
.btn .icon { width: 1.15em; height: 1.15em; }
.btn--sm { min-height: 42px; padding: 0 1.05rem; font-size: 0.9rem; border-radius: 12px; }
.btn--lg { min-height: 56px; padding: 0 1.7rem; font-size: 1.02rem; }
.btn--block { width: 100%; }

.btn--primary { background: var(--navy-900); color: var(--white); box-shadow: 0 8px 20px rgba(29, 36, 65, 0.22); }
.btn--primary:hover { background: var(--navy-800); box-shadow: 0 12px 26px rgba(29, 36, 65, 0.28); }
.btn--accent { background: var(--rose-600); color: var(--white); box-shadow: 0 8px 20px rgba(160, 102, 96, 0.28); }
.btn--accent:hover { background: var(--rose-700); }
.btn--light { background: var(--white); color: var(--ink); border-color: var(--line-strong); }
.btn--light:hover { border-color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--sand); transform: none; }
.btn--whatsapp { background: var(--wa); color: var(--white); box-shadow: 0 8px 20px rgba(18, 140, 75, 0.25); }
.btn--whatsapp:hover { background: var(--wa-dark); }
.btn--white { background: var(--white); color: var(--ink); box-shadow: 0 10px 24px rgba(17, 23, 48, 0.18); }
.btn--white .icon { color: var(--rose-600); }
.cta .btn--white .icon { color: var(--wa); } /* el de WhatsApp del bloque rosa */
.btn--outline-white { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.55); }
.btn--outline-white:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); }

.link { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; color: var(--ink); }
.link .icon { transition: transform 0.25s var(--ease-out); }
.link:hover { color: var(--rose-700); }
.link:hover .icon { transform: translateX(4px); }

/* ---------- Chips y etiquetas ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.42rem 0.85rem; border-radius: 999px;
  font-size: 0.84rem; font-weight: 600; line-height: 1.2;
  background: var(--white); color: var(--ink); border: 1px solid var(--line);
}
.chip .icon { width: 1.05em; height: 1.05em; }
.chip--rose { background: var(--rose-100); color: var(--rose-800); border-color: transparent; }
.chip--rose .icon { color: var(--rose-600); }
.chip--navy { background: var(--navy-900); color: var(--white); border-color: transparent; }
.chip--glass { background: rgba(255, 255, 255, 0.14); color: var(--white); border-color: rgba(255, 255, 255, 0.2); }

.tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.34rem 0.7rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; line-height: 1.2;
  background: var(--white); color: var(--ink);
  box-shadow: 0 2px 8px rgba(17, 23, 48, 0.16);
}
.tag--venta { background: var(--navy-900); color: var(--white); }
.tag--alquiler { background: var(--rose-600); color: var(--white); }

/* ---------- Logo ---------- */
.monogram { display: block; overflow: visible; }
.logo { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--navy-900); line-height: 1; }
.logo__mark { width: 44px; height: 44px; flex: none; }
.logo__text { display: flex; flex-direction: column; align-items: center; }
.logo__word { font-family: var(--font-logo); font-size: 1.45rem; font-weight: 500; letter-spacing: 0.13em; margin-right: -0.13em; }
.logo__sub { margin-top: 0.36rem; font-size: 0.5rem; font-weight: 600; letter-spacing: 0.6em; margin-right: -0.6em; color: var(--rose-600); }
.logo--v { flex-direction: column; gap: 0.85rem; }
.logo--v .logo__mark { width: 72px; height: 72px; }
.logo--v .logo__word { font-size: 2rem; }
.logo--v .logo__sub { font-size: 0.58rem; margin-top: 0.5rem; }

/* ---------- Header ---------- */
.site-header {
  --mono-a: #bc8b84; --mono-b: #a76f69; --mono-c: #8b5751; /* isotipo rosa sobre claro */
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(250, 247, 244, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(23, 28, 51, 0.05); }
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: center; flex: none; }

.main-nav { display: flex; align-items: center; gap: 0.35rem; }
.main-nav__links { display: flex; align-items: center; gap: 0.15rem; }
.main-nav__links a {
  padding: 0.55rem 0.85rem; border-radius: 10px;
  font-size: 0.95rem; font-weight: 600; color: var(--text);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.main-nav__links a:hover { background: var(--sand); color: var(--ink); }
.main-nav__links a.is-active { color: var(--ink); background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.main-nav__foot { display: flex; align-items: center; gap: 0.75rem; margin-left: 0.75rem; }
.nav-instagram { display: none; }
.nav-whatsapp .icon { color: #4ade80; }

.nav-toggle { display: none; position: relative; width: 46px; height: 46px; margin-right: -8px; background: none; border: 0; border-radius: 12px; cursor: pointer; color: var(--ink); }
.nav-toggle span { position: absolute; left: 11px; width: 24px; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform 0.3s var(--ease-out), opacity 0.2s var(--ease), top 0.3s var(--ease-out); }
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 29px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* ---------- Portada ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(1.75rem, 4vw, 3.25rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  background:
    radial-gradient(52% 60% at 92% 12%, rgba(167, 111, 105, 0.2) 0%, transparent 70%),
    var(--cream);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr); gap: clamp(2.5rem, 5vw, 4.75rem); align-items: center; }
.hero__title { margin: 1.1rem 0 1.1rem; font-size: clamp(2.5rem, 5.3vw, 4.3rem); line-height: 1.03; letter-spacing: -0.04em; }
.hero__title .hl { position: relative; display: inline-block; }
/* Subrayado curvo: el arco del anillo del logo. */
.hero__title .hl::after {
  content: ''; position: absolute; left: 2%; right: 0; bottom: -0.16em; height: 0.3em;
  border: solid var(--gold-400); border-width: 0 0 4px; border-radius: 0 0 60% 60% / 0 0 100% 100%;
  opacity: 0.9;
}
.hero__lead { max-width: 33rem; margin-bottom: 1.9rem; font-size: 1.14rem; line-height: 1.6; }

/* Buscador */
.search { max-width: 640px; padding: 0.85rem; background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); }
.seg { display: inline-flex; gap: 2px; padding: 4px; background: var(--sand); border-radius: 14px; }
.seg__opt { position: relative; }
.seg__opt input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg__opt span, .seg a {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 1.05rem; border-radius: 10px;
  font-size: 0.92rem; font-weight: 700; color: var(--muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.seg__opt input:checked + span, .seg a.is-active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg__opt input:focus-visible + span { outline: 3px solid var(--rose-300); outline-offset: 2px; }
.seg small { font-size: 0.78rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 999px; background: var(--sand); color: var(--muted); }
.seg a.is-active small { background: var(--rose-100); color: var(--rose-800); }
.search__row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.6rem; margin-top: 0.7rem; }

/* Campo con etiqueta adentro (buscador y filtros) */
.field {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  min-height: 56px; padding: 0.5rem 0.95rem;
  background: var(--white); border: 1px solid var(--line-strong); border-radius: 14px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field:hover { border-color: var(--muted); }
.field:focus-within { border-color: var(--navy-900); box-shadow: 0 0 0 4px var(--rose-100); }
.field > span { font-size: 0.74rem; font-weight: 700; color: var(--muted); line-height: 1.3; }
.field select, .field input {
  width: 100%; padding: 0; border: 0; outline: 0; background: transparent;
  font-size: 0.98rem; font-weight: 600; color: var(--ink); line-height: 1.35;
}
.field input::placeholder { color: var(--muted); font-weight: 500; }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 1.5rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171c33' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right center / 16px;
}
.field--icon { padding-left: 2.7rem; }
.field--icon > .icon { position: absolute; left: 0.95rem; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); }

.hero__stats { display: flex; flex-wrap: wrap; gap: 0.75rem 2.25rem; margin-top: 1.9rem; }
.hero__stats li { display: flex; align-items: baseline; gap: 0.5rem; }
.hero__stats li + li { padding-left: 2.25rem; border-left: 1px solid var(--line-strong); }
.hero__stats strong { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.hero__stats span { font-size: 0.93rem; font-weight: 500; }

/* Composición de fotos */
.hero__visual { position: relative; isolation: isolate; }
.hero__visual::before { content: ''; position: absolute; z-index: -1; inset: 1.75rem -1.5rem -1.5rem 1.75rem; border-radius: var(--r-xl); background: var(--rose-200); }
.hero__ring { position: absolute; z-index: -1; width: 46%; right: -17%; top: -13%; }
.hero__photo { position: relative; aspect-ratio: 5 / 5.6; max-height: 610px; width: 100%; overflow: hidden; border-radius: var(--r-xl); background: var(--navy-900); box-shadow: var(--shadow-lg); }
.hero__slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.4s var(--ease); }
.hero__slide.is-active { opacity: 1; }
.hero__card {
  position: absolute; left: -2.25rem; bottom: 2.25rem; z-index: 2;
  display: flex; align-items: center; gap: 0.9rem;
  width: min(350px, 88%); padding: 0.7rem 1rem 0.7rem 0.7rem;
  background: var(--white); border-radius: 20px; box-shadow: var(--shadow-lg);
  transition: transform 0.3s var(--ease-out);
}
.hero__card:hover { transform: translateY(-4px); }
.hero__card img { width: 76px; height: 76px; flex: none; object-fit: cover; border-radius: 14px; }
.hero__card div { min-width: 0; flex: 1; }
.hero__card small { display: block; font-size: 0.76rem; font-weight: 700; color: var(--rose-700); }
.hero__card strong { display: block; font-size: 1.12rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); line-height: 1.25; }
.hero__card span { display: block; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero__card > .icon { width: 36px; height: 36px; padding: 9px; border-radius: 50%; background: var(--sand); color: var(--ink); }
.hero__pill {
  position: absolute; right: -1.25rem; top: 2.25rem; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 0.5rem 1.05rem 0.5rem 0.5rem; border-radius: 999px;
  background: var(--white); box-shadow: var(--shadow);
  font-size: 0.9rem; font-weight: 700; color: var(--ink);
}
.hero__pill .icon { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--rose-600); color: var(--white); }

/* ---------- Tipos de propiedad ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.9rem; }
@media (min-width: 961px) {
  /* Filas parejas: hasta 6 por fila y, si hay más tipos, mitad y mitad. */
  .cats { grid-template-columns: repeat(var(--cats, 6), minmax(0, 1fr)); }
}
.cat {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 1.15rem 1.2rem 1.1rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: transform 0.25s var(--ease-out), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.cat__icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 0.75rem; border-radius: 13px; background: var(--rose-100); color: var(--rose-700); transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.cat__icon .icon { width: 23px; height: 23px; }
.cat strong { font-size: 1.02rem; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.cat span { font-size: 0.88rem; color: var(--muted); }
.cat:hover { transform: translateY(-4px); border-color: var(--rose-300); box-shadow: var(--shadow); }
.cat:hover .cat__icon { background: var(--rose-600); color: var(--white); }

/* ---------- Tarjeta de propiedad ---------- */
.props { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; }
.prop {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease), border-color 0.2s var(--ease);
}
.prop:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.prop__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand); }
.prop__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.prop:hover .prop__media img { transform: scale(1.06); }
.prop__tags { position: absolute; left: 0.85rem; top: 0.85rem; display: flex; gap: 0.4rem; }
.prop__count {
  position: absolute; right: 0.85rem; bottom: 0.85rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.6rem; border-radius: 999px;
  background: rgba(17, 23, 48, 0.62); color: var(--white);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: 0.78rem; font-weight: 700;
}
.prop__count .icon { width: 14px; height: 14px; }
.prop__body { display: flex; flex-direction: column; flex: 1; padding: 1.1rem 1.25rem 1.15rem; }
.prop__kind { display: flex; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.3rem; font-size: 0.84rem; font-weight: 700; color: var(--rose-700); }
.prop__kind span { font-weight: 500; color: var(--muted); }
.prop__price { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1.2; }
.prop__price--ask { font-size: 1.2rem; }
.prop__title { margin: 0.35rem 0 0.4rem; font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.4; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prop__title a::after { content: ''; position: absolute; inset: 0; } /* toda la tarjeta es clickeable */
.prop__loc { display: flex; align-items: center; gap: 0.35rem; margin: 0 0 0.95rem; font-size: 0.9rem; color: var(--muted); }
.prop__loc .icon { width: 16px; height: 16px; color: var(--rose-600); }
.prop__facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.15rem; margin-top: auto; padding-top: 0.9rem; border-top: 1px solid var(--line); font-size: 0.9rem; font-weight: 700; color: var(--ink); }
.prop__facts li { display: inline-flex; align-items: center; gap: 0.4rem; }
.prop__facts li span { font-weight: 500; color: var(--muted); }
.prop__facts .icon { width: 18px; height: 18px; color: var(--muted); }
.prop__facts li:nth-child(n+4) { display: none; } /* máximo tres datos por tarjeta */

/* ---------- Propiedad destacada ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow); }
.feature__media { position: relative; min-height: 460px; overflow: hidden; background: var(--sand); }
.feature__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.feature:hover .feature__media img { transform: scale(1.04); }
.feature__media .prop__tags { left: 1.25rem; top: 1.25rem; }
.feature__media .prop__count { right: 1.25rem; bottom: 1.25rem; }
.feature__body { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.75rem, 3.5vw, 3rem); }
.feature__title { margin: 0.2rem 0 0.5rem; font-size: clamp(1.5rem, 2.5vw, 2.05rem); }
.feature__title a:hover { color: var(--rose-700); }
.feature__price { margin: 0.9rem 0 1.25rem; font-size: clamp(1.9rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -0.035em; color: var(--ink); line-height: 1.1; }
.feature__excerpt { margin: 1.25rem 0 1.6rem; }
.feature__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* Datos en fichas chicas (destacada y ficha) */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 0.6rem; }
.spec { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.85rem 0.95rem; border-radius: var(--r); background: var(--sand); }
.spec .icon { width: 22px; height: 22px; margin-bottom: 0.4rem; color: var(--rose-600); }
.spec strong { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); line-height: 1.2; }
.spec span { font-size: 0.84rem; color: var(--muted); line-height: 1.3; }

/* ---------- Servicios (bloque azul) ---------- */
.band-navy {
  position: relative; overflow: hidden; color: rgba(255, 255, 255, 0.76);
  background:
    radial-gradient(45% 70% at 100% 0%, rgba(167, 111, 105, 0.34) 0%, transparent 70%),
    radial-gradient(40% 60% at 0% 100%, rgba(54, 64, 108, 0.7) 0%, transparent 70%),
    var(--navy-900);
}
.band-navy .sec-head p { color: rgba(255, 255, 255, 0.72); }
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.svc {
  display: flex; flex-direction: column;
  padding: 1.7rem 1.5rem 1.5rem; border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.055); border: 1px solid rgba(255, 255, 255, 0.09);
  transition: transform 0.3s var(--ease-out), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.svc:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.1); border-color: rgba(220, 185, 179, 0.5); }
.svc__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1.3rem; border-radius: 15px; background: var(--rose-500); color: var(--white); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22); }
.svc__icon .icon { width: 25px; height: 25px; }
.svc h3 { margin-bottom: 0.5rem; font-size: 1.22rem; color: var(--white); }
.svc p { margin: 0 0 1.4rem; font-size: 0.96rem; line-height: 1.6; }
.svc__link { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: auto; font-size: 0.93rem; font-weight: 700; color: var(--white); }
.svc__link .icon { transition: transform 0.25s var(--ease-out); }
.svc:hover .svc__link .icon { transform: translateX(4px); }

/* ---------- Pasos ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; counter-reset: step; }
.step { position: relative; padding: 1.6rem 1.5rem 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); }
.step__num { display: block; margin-bottom: 1rem; font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--rose-300); }
.step h3 { margin-bottom: 0.4rem; font-size: 1.15rem; }
.step p { margin: 0; font-size: 0.96rem; }
.step:not(:last-child)::after {
  content: ''; position: absolute; top: 2.4rem; right: -0.9rem; z-index: 1; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a06660' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / 14px no-repeat;
  border: 1px solid var(--line);
}

/* ---------- Quiénes somos ---------- */
.about { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.brand-panel {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: 1 / 0.92; padding: 2rem 1.5rem 22%;
  border-radius: var(--r-xl); color: var(--white);
  background: radial-gradient(60% 60% at 85% 10%, rgba(167, 111, 105, 0.42) 0%, transparent 70%), linear-gradient(160deg, #2a3360 0%, var(--navy-900) 55%, var(--navy-950) 100%);
  box-shadow: var(--shadow-lg);
}
.brand-panel .logo { color: var(--white); }
.brand-panel .logo__mark { width: clamp(84px, 12vw, 112px); height: auto; aspect-ratio: 1; }
.brand-panel .logo__word { font-size: clamp(1.9rem, 3.6vw, 2.5rem); }
.brand-panel .logo__sub { color: var(--rose-300); font-size: 0.62rem; }
.brand-panel__ring { position: absolute; z-index: -1; width: 70%; right: -40%; top: -42%; opacity: 0.5; }
.brand-panel__band { position: absolute; left: 0; right: 0; bottom: 0; height: 20%; display: flex; align-items: center; justify-content: center; gap: 0.7rem; margin: 0; background: var(--rose-600); color: var(--white); font-size: clamp(0.85rem, 1.5vw, 1rem); font-weight: 700; }
.brand-panel__band span { opacity: 0.6; }
.about__lead { margin: 1rem 0 1.75rem; font-size: 1.08rem; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1.5rem; margin-bottom: 2rem; }
.checks li { display: flex; gap: 0.85rem; align-items: flex-start; }
.checks__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--rose-100); color: var(--rose-700); }
.checks__icon .icon { width: 21px; height: 21px; }
.checks strong { display: block; font-size: 1rem; font-weight: 700; color: var(--ink); }
.checks div span { display: block; font-size: 0.92rem; line-height: 1.5; }

/* ---------- Mapa ---------- */
.mapbox { overflow: hidden; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--sand); box-shadow: var(--shadow); }
.map { height: 460px; }

/* ---------- Llamado para propietarios (bloque rosa) ---------- */
.cta {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, 4vw, 4rem); align-items: center;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: var(--r-xl); color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(120deg, #8f5953 0%, var(--rose-600) 55%, #b27d77 100%);
  box-shadow: 0 24px 60px rgba(135, 82, 76, 0.3);
}
.cta__ring { position: absolute; z-index: -1; width: 460px; right: -120px; top: 50%; transform: translateY(-50%); opacity: 0.22; --mono-a: #fff; --mono-b: #fff; --mono-c: #fff; }
.cta h2 { margin: 0.9rem 0 0.9rem; font-size: clamp(1.9rem, 3.6vw, 2.85rem); color: var(--white); }
.cta p { max-width: 34rem; margin-bottom: 1.75rem; font-size: 1.08rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cta__list { display: grid; gap: 0.7rem; }
.cta__list li { display: flex; align-items: center; gap: 0.85rem; padding: 0.95rem 1.1rem; border-radius: var(--r); background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.2); font-weight: 700; color: var(--white); }
.cta__list .icon { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: var(--white); color: var(--rose-700); }

/* ---------- Instagram ---------- */
.insta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; padding: 1.5rem 1.75rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); }
.insta__id { display: flex; align-items: center; gap: 1rem; }
.insta__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, var(--rose-500), var(--navy-900)); color: var(--white); }
.insta__icon .icon { width: 26px; height: 26px; }
.insta h3 { font-size: 1.2rem; }
.insta p { margin: 0.1rem 0 0; font-size: 0.95rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, 0.68); font-size: 0.95rem; }
.footer__top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.25fr; gap: 2.5rem; padding-top: clamp(3rem, 6vw, 4.5rem); padding-bottom: 3rem; }
.site-footer .logo { color: var(--white); align-items: flex-start; }
.site-footer .logo--v { align-items: center; }
.site-footer .logo__sub { color: var(--rose-300); }
.footer__brand p { max-width: 32ch; margin: 1.25rem 0; }
.footer__title { margin-bottom: 1rem; font-size: 0.98rem; font-weight: 700; letter-spacing: 0; color: var(--white); }
.footer__col a, .footer__col p { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0; padding: 0.3rem 0; transition: color 0.2s var(--ease); }
.footer__col a:hover { color: var(--white); }
.footer__col .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--rose-300); }
.footer__social { display: flex; gap: 0.5rem; }
.footer__social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); color: var(--white); transition: background 0.2s var(--ease); }
.footer__social a:hover { background: var(--rose-600); }
.footer__seal { display: inline-flex; align-items: center; gap: 0.55rem; margin-bottom: 1.25rem; padding: 0.55rem 0.9rem; border-radius: 12px; background: rgba(255, 255, 255, 0.07); color: var(--white); font-size: 0.88rem; font-weight: 600; }
.footer__seal .icon { color: var(--gold-400); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; padding-top: 1.4rem; padding-bottom: 1.6rem; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.88rem; }
.footer__bottom p { margin: 0; }

.whatsapp-float { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: var(--white); box-shadow: 0 10px 26px rgba(18, 140, 75, 0.4); transition: transform 0.25s var(--ease-out); }
.whatsapp-float:hover { transform: scale(1.07); }
.whatsapp-float .icon { width: 30px; height: 30px; }

/* ---------- Encabezado de páginas internas ---------- */
.pagehead { padding: clamp(1.5rem, 3vw, 2.25rem) 0 1.5rem; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; font-size: 0.9rem; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { opacity: 0.5; }
.pagehead h1 { font-size: clamp(1.9rem, 3.8vw, 2.75rem); }
.pagehead p { margin: 0.6rem 0 0; font-size: 1.05rem; }

/* ---------- Listado: filtros ---------- */
.filters { padding: 0.85rem; background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.filters__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.7rem; margin-bottom: 0.7rem; }
.filters__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 0.6rem; }
.filters__grid--more { grid-template-columns: repeat(4, 1fr) auto; margin-top: 0.6rem; }
.filters__grid--nomoneda { grid-template-columns: repeat(3, 1fr) auto; } /* sin selector de moneda */
.filters__actions { display: flex; gap: 0.5rem; }
.filters__actions .btn { min-height: 56px; }
.results { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 1.75rem 0 1.25rem; }
.results p { margin: 0; font-size: 1rem; }
.results strong { font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.pager { display: flex; justify-content: center; gap: 0.4rem; margin-top: 2.5rem; }
.pager a { display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 0.6rem; border-radius: 13px; background: var(--white); border: 1px solid var(--line); font-weight: 700; color: var(--ink); transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.pager a:hover { border-color: var(--ink); }
.pager a.is-active { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }

/* ---------- Ficha ---------- */
.detail-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.5rem; }
.detail-top h1 { margin: 0.7rem 0 0.5rem; font-size: clamp(1.75rem, 3.4vw, 2.5rem); max-width: 22ch; }
.detail-top__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.detail-top__loc { display: flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 1rem; }
.detail-top__loc .icon { color: var(--rose-600); }

/* Galería en mosaico: una foto grande y cuatro chicas. */
.mosaic { position: relative; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 0.5rem; height: clamp(320px, 42vw, 520px); border-radius: var(--r-xl); overflow: hidden; }
.mosaic__item { position: relative; display: block; padding: 0; border: 0; overflow: hidden; background: var(--sand); cursor: zoom-in; }
.mosaic__item:first-child { grid-row: span 2; }
.mosaic__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out), filter 0.3s var(--ease); }
.mosaic__item:hover img { transform: scale(1.04); filter: brightness(0.94); }
.mosaic__all { position: absolute; right: 1rem; bottom: 1rem; z-index: 2; }
.mosaic__pills { position: absolute; left: 1rem; bottom: 1rem; z-index: 2; display: flex; gap: 0.5rem; }

.detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; margin-top: 2.25rem; }
.block { margin-top: 2.75rem; }
.block > h2 { margin-bottom: 1rem; font-size: 1.5rem; }
.prose { max-width: 68ch; font-size: 1.04rem; line-height: 1.75; }
.prose p:last-child { margin-bottom: 0; }
.amenities { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.65rem 1.5rem; }
.amenities li { display: flex; align-items: center; gap: 0.65rem; font-size: 1rem; font-weight: 500; color: var(--ink); }
.amenities .icon { width: 24px; height: 24px; padding: 5px; border-radius: 50%; background: var(--rose-100); color: var(--rose-700); }
.map-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.9rem 0 0; font-size: 0.95rem; }
.map-note a { font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Tarjeta lateral con el precio y la consulta */
.buy { position: sticky; top: calc(var(--header-h) + 1.25rem); padding: 1.6rem; background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); }
.buy__kind { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.85rem; font-size: 0.88rem; color: var(--muted); }
.buy__price { margin: 0; font-size: 2.2rem; font-weight: 800; letter-spacing: -0.035em; color: var(--ink); line-height: 1.1; }
.buy__price--ask { font-size: 1.6rem; }
.buy__sub { margin: 0.4rem 0 1.4rem; font-size: 0.98rem; }
.buy .btn + .btn { margin-top: 0.6rem; }
.buy__hint { margin: 0.9rem 0 0; font-size: 0.86rem; text-align: center; color: var(--muted); }
.buy__phone { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.buy__phone .icon { color: var(--rose-600); }
.agency { display: flex; align-items: center; gap: 0.85rem; margin-top: 1.1rem; padding: 0.9rem 1rem; border-radius: var(--r); background: var(--sand); }
.agency__mark { width: 44px; height: 44px; flex: none; }
.agency strong { display: block; font-size: 0.98rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.agency span { display: block; font-size: 0.84rem; line-height: 1.4; }

.mobile-cta { display: none; }

/* ---------- Aparición al hacer scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: var(--reveal-delay, 0ms); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Portada: variantes ---------- */
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
/* Sin fotos todavía: el panel de marca ocupa el lugar de la foto. */
.hero__visual--brand .brand-panel { aspect-ratio: 5 / 5.2; max-height: 560px; box-shadow: var(--shadow-lg); }
.hero__card-thumb { display: grid; place-items: center; width: 76px; height: 76px; flex: none; border-radius: 14px; background: var(--navy-900); }
.hero__card-thumb .monogram { width: 46px; height: 46px; }

/* Datos de la oficina (en "Quiénes somos" cuando todavía no hay fotos). */
.office-card {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: var(--r-xl); color: rgba(255, 255, 255, 0.82);
  background: radial-gradient(60% 60% at 85% 10%, rgba(167, 111, 105, 0.42) 0%, transparent 70%), linear-gradient(160deg, #2a3360 0%, var(--navy-900) 55%, var(--navy-950) 100%);
  box-shadow: var(--shadow-lg);
}
.office-card__ring { position: absolute; z-index: -1; width: 60%; right: -30%; top: -30%; opacity: 0.45; }
.office-card__mark { width: 58px; height: 58px; margin-bottom: 1.1rem; }
.office-card h3 { margin-bottom: 1.1rem; font-size: 1.5rem; font-weight: 800; color: var(--white); }
.office-card ul { display: grid; gap: 0.85rem; margin-bottom: 1.4rem; }
.office-card li { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 1rem; line-height: 1.5; }
.office-card li .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--rose-300); }
.office-card__seal { display: flex; width: fit-content; align-items: center; gap: 0.5rem; margin: 0 0 1.4rem; padding: 0.5rem 0.85rem; border-radius: 12px; background: rgba(255, 255, 255, 0.08); color: var(--white); font-size: 0.9rem; font-weight: 600; }
.office-card__seal .icon { color: var(--gold-400); }

/* ---------- Foto faltante ---------- */
.photo-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
  background: radial-gradient(60% 70% at 80% 10%, rgba(167, 111, 105, 0.35) 0%, transparent 70%), var(--navy-900);
  color: rgba(255, 255, 255, 0.78);
}
.photo-empty__mark { width: 28%; max-width: 112px; height: auto; aspect-ratio: 1 / 1; }
.photo-empty__label { font-size: 0.86rem; font-weight: 600; }

/* ---------- Estados vacíos y 404 ---------- */
.empty { max-width: 640px; margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) 1.5rem; text-align: center; }
.empty--card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl); }
.empty__mark { width: 72px; height: 72px; margin: 0 auto 1.25rem; }
.empty h1, .empty h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
.empty h1 em, .empty h2 em { font-style: normal; color: var(--rose-600); }
.empty p { margin: 0.9rem auto 1.75rem; max-width: 34rem; font-size: 1.05rem; }
.empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; }

/* ---------- Galería de la ficha ---------- */
.gallery { position: relative; }
/* Variantes del mosaico según la cantidad de fotos. */
.mosaic__item:nth-child(n+6) { display: none; }
.mosaic--c1 { grid-template-columns: 1fr; grid-template-rows: 1fr; height: auto; aspect-ratio: 16 / 8; }
.mosaic--c2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.mosaic--c3 { grid-template-columns: 2fr 1fr; }
.mosaic--c4 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(3, minmax(0, 1fr)); }
.mosaic--c1 .mosaic__item:first-child, .mosaic--c2 .mosaic__item:first-child { grid-row: auto; }
.mosaic--c4 .mosaic__item:first-child { grid-row: span 3; }
.mosaic--empty { display: block; position: relative; height: auto; aspect-ratio: 16 / 7; background: var(--navy-900); }
.mosaic__counter {
  display: none; position: absolute; right: 0.75rem; bottom: 0.75rem; z-index: 2;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  background: rgba(17, 23, 48, 0.68); color: var(--white); font-size: 0.82rem; font-weight: 700;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(12, 16, 33, 0.96);
  opacity: 0; visibility: hidden; transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__stage { position: absolute; inset: 4.5rem 5.5rem 3.75rem; display: grid; place-items: center; overflow: hidden; }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; cursor: zoom-in; transition: transform 0.35s var(--ease-out); }
.lightbox__stage img.is-zoomed { transform: scale(2.2); cursor: zoom-out; }
.lightbox__close, .lightbox__arrow {
  position: absolute; z-index: 2;
  display: grid; place-items: center; width: 50px; height: 50px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: var(--white); cursor: pointer;
  transition: background 0.2s var(--ease);
}
.lightbox__close:hover, .lightbox__arrow:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__arrow { top: 50%; transform: translateY(-50%); }
.lightbox__arrow--prev { left: 1.25rem; }
.lightbox__arrow--next { right: 1.25rem; }
.lightbox__counter { position: absolute; top: 1.6rem; left: 1.5rem; color: var(--white); font-weight: 700; }
.lightbox__hint { position: absolute; left: 0; right: 0; bottom: 1.2rem; margin: 0; text-align: center; font-size: 0.88rem; color: rgba(255, 255, 255, 0.6); }

/* ---------- Recorrido 360° ---------- */
.tour { overflow: hidden; border-radius: var(--r-xl); background: var(--navy-950); }
.tour__viewer { position: relative; aspect-ratio: 16 / 9; background: var(--navy-900); }
.tour__start {
  position: absolute; inset: 0; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.55rem;
  border: 0; cursor: pointer; color: var(--white);
  background: var(--navy-900) center / cover no-repeat;
}
.tour__start::before { content: ''; position: absolute; inset: 0; background: rgba(17, 23, 48, 0.5); transition: background 0.3s var(--ease); }
.tour__start:hover::before { background: rgba(17, 23, 48, 0.35); }
.tour__start > * { position: relative; }
.tour__start-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.85rem; border-radius: 999px; background: var(--rose-600); font-weight: 700; }
.tour__start-label { font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 800; letter-spacing: -0.02em; }
.tour__start-hint { font-size: 0.95rem; color: rgba(255, 255, 255, 0.85); }
.tour__viewer.is-loading::after { content: 'Cargando recorrido...'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--white); font-weight: 600; background: rgba(17, 23, 48, 0.6); }
.tour__error { margin: 0; padding: 3rem 1.5rem; text-align: center; color: var(--white); }
.tour__rooms { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.75rem; scrollbar-width: thin; }
.tour__room { flex: none; display: flex; align-items: center; gap: 0.55rem; padding: 0.35rem 0.8rem 0.35rem 0.35rem; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.16); background: transparent; color: var(--white); font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.tour__room img { width: 56px; height: 36px; object-fit: cover; border-radius: 8px; }
.tour__room:hover { background: rgba(255, 255, 255, 0.1); }
.tour__room.is-active { background: var(--white); color: var(--ink); }
.tour .pnlm-container { font-family: var(--font); background: var(--navy-900); }

/* ---------- Video ---------- */
.video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-xl); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video--vertical { aspect-ratio: 9 / 16; max-width: 360px; }

/* ---------- Planos y documentos ---------- */
.docs { display: grid; gap: 1.25rem; }
.docs h3 { margin-bottom: 0.6rem; font-size: 1rem; }
.docs ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.6rem; }
.doc { display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 0.9rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.doc:hover { border-color: var(--rose-300); box-shadow: var(--shadow-sm); }
.doc__type { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--rose-100); color: var(--rose-800); font-size: 0.75rem; font-weight: 800; }
.doc__name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; color: var(--ink); }
.doc__action { color: var(--muted); }

/* ---------- Mapas (Leaflet) ---------- */
.map--detail { height: 360px; }
.leaflet-container { font-family: var(--font); background: var(--sand); }
.map .leaflet-tile-pane { filter: saturate(0.75) contrast(0.98); }
.map .leaflet-bar { border: 0; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.map .leaflet-bar a { width: 36px; height: 36px; line-height: 36px; color: var(--ink); }
.map .leaflet-bar a:hover { background: var(--sand); color: var(--ink); }
.price-marker span {
  position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 6px));
  display: block; padding: 0.32rem 0.7rem; border-radius: 999px;
  background: var(--navy-900); color: var(--white);
  font-size: 0.82rem; font-weight: 700; white-space: nowrap;
  box-shadow: 0 6px 14px rgba(17, 23, 48, 0.28);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.price-marker span::after { content: ''; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--navy-900); border-bottom: 0; transition: border-color 0.2s var(--ease); }
.price-marker:hover span, .price-marker:focus span { background: var(--white); color: var(--ink); }
.price-marker:hover span::after, .price-marker:focus span::after { border-top-color: var(--white); }
.pin-marker span { position: absolute; width: 22px; height: 22px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--rose-600); border: 4px solid var(--white); box-shadow: 0 0 0 8px rgba(160, 102, 96, 0.25), 0 6px 14px rgba(0, 0, 0, 0.25); }
.leaflet-popup-content-wrapper { padding: 0; overflow: hidden; border-radius: 16px; box-shadow: var(--shadow-lg); }
.leaflet-popup-content { width: 220px !important; margin: 0; }
.map-popup { display: block; color: var(--ink) !important; }
.map-popup img { display: block; width: 100%; height: 128px; object-fit: cover; }
.map-popup__body { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.7rem 0.85rem 0.85rem; }
.map-popup__meta { font-size: 0.78rem; font-weight: 700; color: var(--rose-700); }
.map-popup strong { font-size: 0.92rem; font-weight: 600; line-height: 1.35; }
.map-popup__price { font-size: 1.08rem; font-weight: 800; }
.map-popup__link { font-size: 0.84rem; font-weight: 700; color: var(--muted); }

/* ---------- Aviso flotante ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 300;
  padding: 0.8rem 1.25rem; border-radius: 999px;
  background: var(--navy-900); color: var(--white); font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translate(-50%, 12px); transition: opacity 0.25s var(--ease), transform 0.25s var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Listado: filtros plegables ---------- */
.filters__top-actions { display: flex; align-items: center; gap: 0.75rem; }
.filters-toggle { display: none; }
.filters-toggle__count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--rose-600); color: var(--white); font-size: 0.75rem; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.channels { display: grid; gap: 0.7rem; }
.channel {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.95rem 1.15rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: transform 0.25s var(--ease-out), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.channel__icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--rose-100); color: var(--rose-700); transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.channel__icon .icon { width: 22px; height: 22px; }
.channel--whatsapp .channel__icon { background: #e4f4ea; color: var(--wa); }
.channel__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.channel__body strong { font-size: 1rem; font-weight: 700; color: var(--ink); line-height: 1.35; }
.channel__body span { font-size: 0.95rem; overflow-wrap: anywhere; }
.channel__arrow { flex: none; width: 20px; height: 20px; color: var(--muted); transition: transform 0.25s var(--ease-out), color 0.2s var(--ease); }
a.channel:hover { transform: translateY(-3px); border-color: var(--rose-300); box-shadow: var(--shadow); }
a.channel:hover .channel__icon { background: var(--rose-600); color: var(--white); }
a.channel--whatsapp:hover .channel__icon { background: var(--wa); }
a.channel:hover .channel__arrow { transform: translateX(3px); color: var(--ink); }
.contact-grid .agency { margin-top: 0.5rem; background: var(--white); border: 1px solid var(--line); }

.form-card { padding: clamp(1.5rem, 3.5vw, 2.25rem); background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); }
.form-card h2 { margin-bottom: 0.45rem; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.form-card h2 em { font-style: normal; color: var(--rose-600); }
.form-card > p { margin: 0 0 1.5rem; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.form-field label { font-size: 0.92rem; font-weight: 700; color: var(--ink); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; min-height: 52px; padding: 0.75rem 0.95rem;
  background: var(--white); border: 1px solid var(--line-strong); border-radius: 14px;
  font-size: 1rem; color: var(--ink); outline: 0;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.5rem;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171c33' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.95rem center / 16px;
}
.form-field textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--muted); }
.form-field input:hover, .form-field select:hover, .form-field textarea:hover { border-color: var(--muted); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--navy-900); box-shadow: 0 0 0 4px var(--rose-100); }
.form-note { margin: 0.9rem 0 0; font-size: 0.88rem; text-align: center; color: var(--muted); }
.form-feedback { margin: 0.9rem 0 0; padding: 0.7rem 0.9rem; border-radius: 12px; font-size: 0.92rem; font-weight: 600; }
.form-feedback[data-state="ok"] { background: #e4f4ea; color: #0e5a31; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .services, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(2)::after { display: none; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .filters__grid { grid-template-columns: repeat(2, 1fr); }
  .filters__grid--more { grid-template-columns: repeat(2, 1fr); }
  .filters__actions { grid-column: 1 / -1; }
  .filters__actions .btn { flex: 1; }
}

@media (max-width: 960px) {
  .hero__grid, .about, .cta, .feature, .detail { grid-template-columns: 1fr; }
  .hero__visual { max-width: 560px; margin: 0.5rem 1.5rem 0 0; }
  .hero__photo { aspect-ratio: 4 / 3.4; }
  .hero__card { left: 1rem; bottom: 1rem; }
  .hero__pill { right: -0.75rem; top: 1.25rem; }
  .feature__media { min-height: 0; aspect-ratio: 16 / 10; }
  .brand-panel { max-width: 520px; }
  .cta__ring { width: 320px; right: -110px; top: 0; transform: none; }
  .buy { position: static; box-shadow: var(--shadow); }
  .detail > aside { order: -1; }

  /* Menú del celular: hoja a pantalla completa */
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: fixed; inset: var(--header-h) 0 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 1rem 1.5rem 1.75rem; overflow-y: auto;
    background: var(--cream);
  }
  .main-nav.is-open { display: flex; animation: sheet-in 0.3s var(--ease-out); }
  .main-nav__links { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav__links a { padding: 1.05rem 0.25rem; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
  .main-nav__links a:hover, .main-nav__links a.is-active { background: none; box-shadow: none; color: var(--rose-700); }
  .main-nav__foot { flex-direction: column; align-items: stretch; gap: 0.9rem; margin: auto 0 0; padding-top: 1.5rem; }
  .main-nav__foot .btn { min-height: 54px; font-size: 1rem; }
  .nav-instagram { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-weight: 600; color: var(--ink); }
  /* El blur del header encierra a los elementos fixed de adentro: en el
     celular se saca para que el menú ocupe toda la pantalla. */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(250, 247, 244, 0.97); }
  .site-header.menu-open { background: var(--cream); }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  :root { --header-h: 66px; }
  .logo__mark { width: 40px; height: 40px; }
  .logo__word { font-size: 1.28rem; }
  .logo__sub { font-size: 0.44rem; }
  .search__row { grid-template-columns: 1fr 1fr; }
  .search__row .btn { grid-column: 1 / -1; }
  .seg { display: flex; }
  .seg__opt { flex: 1; }
  .seg__opt span, .seg a { justify-content: center; width: 100%; padding-inline: 0.5rem; }
  .hero__stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 1.1rem; }
  .hero__stats li { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
  .hero__stats li + li { padding-left: 1.1rem; }
  .hero__stats strong { font-size: 1.5rem; }
  .hero__stats span { font-size: 0.86rem; }
  .specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .spec { padding: 0.75rem 0.8rem; }
  .spec strong { font-size: 1.08rem; }
  .amenities { grid-template-columns: 1fr 1fr; gap: 0.65rem 1rem; }
  .amenities li { font-size: 0.95rem; }
  .hero__visual { margin-right: 1rem; }
  .hero__visual::before { inset: 1rem -1rem -1rem 1rem; }

  /* Filas que se deslizan con el dedo en lugar de apilarse */
  .cats, .props--row {
    display: flex; gap: 0.9rem; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -1.5rem; padding: 0.25rem 1.5rem 1.25rem; scrollbar-width: none;
  }
  .cats::-webkit-scrollbar, .props--row::-webkit-scrollbar { display: none; }
  .cat { flex: 0 0 152px; scroll-snap-align: start; }
  .props--row .prop { flex: 0 0 min(82vw, 330px); scroll-snap-align: start; }

  .services, .steps, .checks { grid-template-columns: 1fr; }
  .step::after { display: none !important; }
  .step { display: grid; grid-template-columns: auto 1fr; gap: 0 1.1rem; align-items: start; }
  .step__num { grid-row: span 2; margin: 0; font-size: 2.1rem; }
  .footer__top { grid-template-columns: 1fr; gap: 2rem; }
  .insta { flex-direction: column; align-items: flex-start; }
  .insta .btn { width: 100%; }
  .cta__actions .btn { width: 100%; }
  .filters__grid, .filters__grid--more { grid-template-columns: 1fr 1fr; }
  .field--wide { grid-column: 1 / -1; }

  /* Galería: en el celular, fotos que se deslizan */
  .mosaic { display: flex; height: auto; gap: 0.5rem; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 0; margin: 0 -1.5rem; padding: 0 1.5rem; scrollbar-width: none; }
  .mosaic::-webkit-scrollbar { display: none; }
  .mosaic__item { flex: 0 0 88%; aspect-ratio: 4 / 3; border-radius: var(--r-lg); scroll-snap-align: center; }
  .mosaic__all, .mosaic__pills { display: none; }

  .has-mobile-cta { padding-bottom: 84px; }
  .has-mobile-cta .whatsapp-float { display: none; }
  .mobile-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.8rem 1.25rem calc(0.8rem + env(safe-area-inset-bottom));
    background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(23, 28, 51, 0.08);
  }
  .mobile-cta small { display: block; font-size: 0.8rem; color: var(--muted); line-height: 1.2; }
  .mobile-cta strong { display: block; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1.2; }
}

@media (max-width: 480px) {
  .search__row { grid-template-columns: 1fr; }
  .filters__grid, .filters__grid--more { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Ajustes responsive de los componentes de arriba ---------- */
@media (min-width: 961px) {
  /* En la ficha la tarjeta fija ya tiene WhatsApp: sin botón flotante. */
  .page-detail .whatsapp-float { display: none; }
}

@media (max-width: 960px) {
  .contact-grid { grid-template-columns: 1fr; }
  html:has(.main-nav.is-open) { overflow: hidden; }
  html:has(.main-nav.is-open) .whatsapp-float { display: none; }
  .hero__visual--brand .brand-panel { aspect-ratio: 4 / 3.2; }
}

@media (max-width: 760px) {
  .lightbox__stage { inset: 4rem 0.5rem 3.5rem; }
  .lightbox__arrow { width: 42px; height: 42px; }
  .lightbox__arrow--prev { left: 0.4rem; }
  .lightbox__arrow--next { right: 0.4rem; }
  .lightbox__close { top: 0.7rem; right: 0.7rem; }
  .lightbox__hint { display: none; }

  /* Galería: todas las fotos en una fila que se desliza, con contador. */
  .mosaic, .mosaic--c1, .mosaic--c2, .mosaic--c3, .mosaic--c4 { display: flex; height: auto; aspect-ratio: auto; }
  .mosaic__item, .mosaic__item:nth-child(n+6) { display: block; }
  .mosaic--c1 .mosaic__item { flex-basis: 100%; }
  .mosaic__counter { display: block; right: 0.75rem; }
  .mosaic--empty { margin: 0; border-radius: var(--r-lg); aspect-ratio: 4 / 3; }

  .filters-toggle { display: inline-flex; }
  .js .filters__form:not(.is-open) { display: none; }
  .filters__top-actions .link { display: none; }

  .empty--card { padding-left: 1.25rem; padding-right: 1.25rem; }
  .map--detail, .map { height: 320px; }
}
