/* =========================================================================
   Mónica Fogeler & Cía. — hoja de estilo única
   Paleta tomada del logo: azul #30598B.
   ========================================================================= */

/* ------------------------------------------------------------- Tipografía */
/* Variables (un archivo cubre todos los pesos), servidas desde el propio
   dominio: sin pedidos a terceros y sin saltos de fuente al cargar. */
@font-face {
  font-family: 'Jost';
  src: url('../fonts/jost-var.woff2') format('woff2-variations'),
       url('../fonts/jost-var.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var.woff2') format('woff2-variations'),
       url('../fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ------------------------------------------------------------------ Tokens */
:root {
  --brand-900: #0f1e31;
  --brand-800: #16304c;
  --brand-700: #1f3c60;
  --brand-600: #27496f;
  --brand:     #30598b;
  --brand-400: #5a81b0;
  --brand-200: #b8cbe0;
  --brand-100: #e3ecf5;
  --brand-50:  #f2f7fb;

  --gold:      #b08542;
  --gold-soft: #d9bc8a;

  --ink:    #14212e;
  --body:   #3f4c5a;
  --muted:  #6b7887;
  --line:   #e4e9ef;
  --line-2: #eef2f6;
  --paper:  #ffffff;
  --sand:   #f8f6f2;
  --mist:   #f4f7fa;

  --ok:   #1f7a52;
  --err:  #b3261e;

  --font-display: 'Jost', 'Century Gothic', 'Futura', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-xs: 6px;
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --sh-sm: 0 1px 2px rgba(20, 33, 46, .05), 0 2px 8px rgba(20, 33, 46, .04);
  --sh:    0 2px 6px rgba(20, 33, 46, .06), 0 12px 28px -12px rgba(20, 33, 46, .18);
  --sh-lg: 0 8px 20px -6px rgba(20, 33, 46, .12), 0 30px 60px -30px rgba(20, 33, 46, .35);

  --wrap: 1200px;
  --gap: clamp(1.25rem, 3vw, 2rem);
  --nav-h: 76px;
}

/* -------------------------------------------------------------- Base ----- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3.1vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 1.25rem + 2vw, 2.6rem); }
h3 { font-size: clamp(1.18rem, 1.05rem + .6vw, 1.45rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }
a { color: var(--brand); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--brand-700); }
img { max-width: 100%; display: block; }
ul { margin: 0 0 1rem; padding-left: 1.1rem; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.5rem, 860px); margin-inline: auto; }

.sr-only {
  position: absolute; 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: 200;
  background: var(--brand); color: #fff; padding: .65rem 1rem; border-radius: var(--r-sm);
  transition: top .2s ease;
}
.skip-link:focus { top: 1rem; color: #fff; }

.ico { width: 1.15em; height: 1.15em; flex: none; }

/* ------------------------------------------------------------- Botones --- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  --btn-bd: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .82rem 1.5rem;
  font: 500 .95rem/1.2 var(--font-sans);
  letter-spacing: .01em;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bd); border-radius: var(--r-pill);
  cursor: pointer; text-align: center;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -12px rgba(48, 89, 139, .75);
}
.btn:active { transform: translateY(0); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--brand); --btn-bd: var(--brand-200); }
.btn--ghost:hover { --btn-bg: var(--brand-50); --btn-bd: var(--brand); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--brand-700); --btn-bd: #fff; }
.btn--outline-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,.45); }
.btn--outline-light:hover { --btn-bg: rgba(255,255,255,.12); --btn-bd: #fff; }
.btn--wa { --btn-bg: #1fa855; --btn-fg: #fff; --btn-bd: #1fa855; }
.btn--wa:hover { box-shadow: 0 10px 22px -12px rgba(31, 168, 85, .8); }
.btn--sm { padding: .55rem 1.05rem; font-size: .875rem; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-display); font-weight: 500; letter-spacing: .01em;
}
.link-arrow .ico { transition: transform .2s ease; }
.link-arrow:hover .ico { transform: translateX(3px); }

/* ------------------------------------------------------------- Topbar ---- */
.topbar {
  background: var(--brand-900);
  color: rgba(255, 255, 255, .8);
  font-size: .82rem;
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; }
.topbar a { color: rgba(255, 255, 255, .85); display: inline-flex; align-items: center; gap: .4rem; }
.topbar a:hover { color: #fff; }
.topbar__group { display: flex; align-items: center; gap: 1.4rem; }
@media (max-width: 900px) { .topbar { display: none; } }

/* ---------------------------------------------------------------- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-2);
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: var(--nav-h);
}
.nav__logo { display: flex; align-items: center; }
.nav__logo img { height: 42px; width: auto; transition: opacity .25s ease; }
.nav__logo img.is-light { display: none; }

.nav__menu { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
.nav__link {
  position: relative;
  font-family: var(--font-display); font-size: 1rem; font-weight: 400;
  color: var(--ink); letter-spacing: .01em; padding: .35rem 0;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1.5px;
  background: var(--gold); transition: right .25s ease;
}
.nav__link:hover::after, .nav__link[aria-current]::after { right: 0; }
.nav__actions { display: flex; align-items: center; gap: .75rem; }

/* Variante transparente sobre el hero.
   Arranca debajo de la franja de contacto (40 px) y sube al hacer scroll. */
.nav--over {
  position: fixed; left: 0; right: 0; top: 40px;
  background: transparent; border-color: transparent; backdrop-filter: none;
}
@media (max-width: 900px) { .nav--over { top: 0; } }
.nav--over .nav__link, .nav--over .nav__burger { color: #fff; }
.nav--over .nav__logo img.is-dark { display: none; }
.nav--over .nav__logo img.is-light { display: block; }
.nav--over .btn--ghost { --btn-fg: #fff; --btn-bd: rgba(255,255,255,.5); }
.nav--over .btn--ghost:hover { --btn-bg: rgba(255,255,255,.14); --btn-bd: #fff; }
.nav.is-stuck {
  position: fixed; top: 0;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(14px);
  border-color: var(--line-2);
  box-shadow: 0 6px 24px -18px rgba(20, 33, 46, .6);
}
.nav.is-stuck .nav__link, .nav.is-stuck .nav__burger { color: var(--ink); }
.nav.is-stuck .nav__logo img.is-dark { display: block; }
.nav.is-stuck .nav__logo img.is-light { display: none; }
.nav.is-stuck .btn--ghost { --btn-fg: var(--brand); --btn-bd: var(--brand-200); }

.nav__burger {
  display: none; background: none; border: 0; padding: .4rem; color: var(--ink); cursor: pointer;
}
.nav__burger .ico { width: 26px; height: 26px; }

@media (max-width: 980px) {
  .nav__burger { display: inline-flex; }
  .nav__menu {
    position: fixed; inset: 0 0 0 auto; width: min(84vw, 340px);
    flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .25rem;
    background: var(--paper); padding: 5.5rem 1.75rem 2rem;
    box-shadow: var(--sh-lg);
    transform: translateX(100%); transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
  }
  .nav__menu.is-open { transform: translateX(0); }
  .nav--over .nav__menu .nav__link, .nav__menu .nav__link { color: var(--ink); width: 100%; padding: .85rem 0; border-bottom: 1px solid var(--line-2); font-size: 1.1rem; }
  .nav__menu .nav__link::after { display: none; }
  .nav__menu .btn { margin-top: 1.25rem; width: 100%; }
  .nav__actions .btn--ghost { display: none; }
  .nav__overlay {
    position: fixed; inset: 0; background: rgba(15, 30, 49, .45);
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; z-index: 99;
  }
  .nav__overlay.is-open { opacity: 1; visibility: visible; }
}

/* --------------------------------------------------------------- Hero --- */
.hero {
  position: relative;
  min-height: clamp(560px, 82vh, 760px);
  display: flex; align-items: flex-end;
  padding: calc(var(--nav-h) + 4.5rem) 0 clamp(3rem, 7vw, 5.5rem);
  background: var(--brand-900);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.03);
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(15, 30, 49, .82) 0%, rgba(15, 30, 49, .55) 38%, rgba(15, 30, 49, .92) 100%),
    linear-gradient(100deg, rgba(31, 60, 96, .75) 0%, rgba(15, 30, 49, .2) 60%);
}
.hero__inner { position: relative; color: #fff; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-size: .82rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 1.1rem;
}
.hero__eyebrow::before { content: ''; width: 34px; height: 1px; background: var(--gold-soft); }
.hero h1 { color: #fff; max-width: 16ch; margin-bottom: 1rem; font-weight: 400; }
.hero h1 strong { font-weight: 600; color: #fff; }
.hero__lead {
  max-width: 52ch; font-size: clamp(1rem, .95rem + .35vw, 1.16rem);
  color: rgba(255, 255, 255, .86); margin-bottom: 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.hero__credit {
  position: absolute; right: 0; bottom: -1.5rem;
  font-size: .74rem; color: rgba(255, 255, 255, .5);
}

/* ---------------------------------------------------------- Buscador ---- */
.searchbar {
  background: rgba(255, 255, 255, .97);
  border-radius: var(--r);
  box-shadow: var(--sh-lg);
  padding: 1.1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: .75rem;
  align-items: end;
}
.searchbar--page { box-shadow: var(--sh); border: 1px solid var(--line); }
.searchbar--extended { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.searchbar--extended .btn { grid-column: 1 / -1; justify-self: end; min-width: 190px; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field__label {
  font-family: var(--font-display); font-size: .74rem; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
}
.field input, .field select {
  width: 100%; padding: .7rem .85rem;
  font: 400 .95rem var(--font-sans); color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7887' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center;
  padding-right: 2.2rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(48, 89, 139, .13);
}
.field textarea {
  width: 100%; padding: .7rem .85rem; min-height: 120px; resize: vertical;
  font: 400 .95rem/1.6 var(--font-sans); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper);
}
@media (max-width: 900px) {
  .searchbar { grid-template-columns: 1fr 1fr; }
  .searchbar .btn { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .searchbar { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ Secciones - */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section--sand { background: var(--sand); }
.section--mist { background: var(--mist); }
.section--ink { background: var(--brand-900); color: rgba(255, 255, 255, .78); }
.section--ink h2, .section--ink h3 { color: #fff; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head p { margin: 0; color: var(--muted); max-width: 56ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-size: .78rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--brand);
  margin-bottom: .75rem;
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--gold); }
.section--ink .eyebrow { color: var(--gold-soft); }
@media (max-width: 760px) {
  .section-head { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------- Grid --- */
.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 1.85rem); }
/* Las fotos del panel son más anchas que las celdas: sin min-width: 0 el
   tamaño min-content de la imagen deforma la grilla. */
.grid > * { min-width: 0; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* ---------------------------------------------------------- Tarjetas ---- */
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .28s cubic-bezier(.2, .7, .3, 1), box-shadow .28s ease, border-color .28s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh); border-color: var(--brand-200); }
.card__media {
  position: relative; aspect-ratio: 4 / 3; background: var(--brand-50); overflow: hidden;
  min-width: 0;
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .3, 1);
}
.card:hover .card__media img { transform: scale(1.055); }
.card__media--empty {
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand-100), var(--brand-50));
}
.card__media--empty img { width: 42%; height: auto; opacity: .35; object-fit: contain; }

.card__badges {
  position: absolute; top: .85rem; left: .85rem; display: flex; flex-wrap: wrap; gap: .4rem;
}
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .32rem .7rem;
  font: 500 .74rem/1.3 var(--font-display); letter-spacing: .09em; text-transform: uppercase;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .94); color: var(--brand-700);
  box-shadow: 0 2px 8px rgba(20, 33, 46, .12);
}
.badge--venta { background: var(--brand); color: #fff; }
.badge--alquiler { background: var(--gold); color: #fff; }
.badge--ghost { background: rgba(15, 30, 49, .62); color: #fff; backdrop-filter: blur(4px); }

.card__code {
  position: absolute; right: .85rem; bottom: .85rem;
  padding: .28rem .6rem; border-radius: var(--r-xs);
  background: rgba(15, 30, 49, .68); color: #fff; backdrop-filter: blur(4px);
  font: 500 .72rem/1.3 var(--font-display); letter-spacing: .06em;
}

.card__body { display: flex; flex-direction: column; gap: .55rem; padding: 1.15rem 1.25rem 1.35rem; flex: 1; }
.card__price {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--ink);
  letter-spacing: -.01em; line-height: 1.1;
}
.card__price small { font-size: .8rem; font-weight: 400; color: var(--muted); letter-spacing: .02em; }
.card__title {
  font-family: var(--font-display); font-size: 1.06rem; font-weight: 400; color: var(--ink);
  line-height: 1.32; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card:hover .card__title { color: var(--brand); }
.card__place {
  display: flex; align-items: center; gap: .35rem;
  font-size: .875rem; color: var(--muted);
}
.card__place .ico { width: 1rem; height: 1rem; color: var(--brand-400); }
.card__specs {
  display: flex; flex-wrap: wrap; gap: .35rem 1rem;
  margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--line-2);
  font-size: .84rem; color: var(--body);
}
.card__specs span { display: inline-flex; align-items: center; gap: .35rem; }
.card__specs .ico { width: 1.05rem; height: 1.05rem; color: var(--brand-400); }
.card__link { position: absolute; inset: 0; z-index: 1; }
.card__link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Tarjeta horizontal (destacado grande) */
.card--wide { flex-direction: row; }
.card--wide .card__media { aspect-ratio: auto; flex: 0 0 46%; }
@media (max-width: 780px) {
  .card--wide { flex-direction: column; }
  .card--wide .card__media { aspect-ratio: 4 / 3; flex: none; }
}

/* ------------------------------------------------------------ Servicios - */
.svc {
  display: flex; flex-direction: column; gap: .7rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.svc:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: var(--brand-200); }
.svc__icon {
  display: grid; place-items: center; width: 52px; height: 52px;
  border-radius: 14px; background: var(--brand-50); color: var(--brand);
  margin-bottom: .35rem;
}
.svc__icon .ico { width: 26px; height: 26px; }
.svc h3 { margin: 0; }
.svc p { margin: 0; font-size: .95rem; color: var(--muted); }

/* ---------------------------------------------------------------- Stats - */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.5rem; }
.stat { text-align: center; padding: .5rem; }
.stat__n {
  font-family: var(--font-display); font-size: clamp(2.2rem, 1.6rem + 2.2vw, 3.1rem);
  font-weight: 500; color: #fff; line-height: 1; letter-spacing: -.02em;
}
.section--sand .stat__n, .section--mist .stat__n { color: var(--brand); }
.stat__l {
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255, 255, 255, .65); margin-top: .55rem;
}
.section--sand .stat__l, .section--mist .stat__l { color: var(--muted); }

/* ---------------------------------------------------------------- Zonas - */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem 1.05rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-pill);
  font-size: .9rem; color: var(--body);
  transition: all .2s ease;
}
.chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.chip small { color: var(--muted); font-size: .8rem; }
.chip--active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip--active small { color: rgba(255, 255, 255, .75); }
.chip--active:hover { background: var(--brand-700); color: #fff; }

/* ----------------------------------------------------------- Franja CTA - */
.cta {
  position: relative; overflow: hidden;
  background: linear-gradient(115deg, var(--brand-800) 0%, var(--brand) 55%, var(--brand-600) 100%);
  color: #fff;
  border-radius: var(--r-lg);
  padding: clamp(2.25rem, 5vw, 3.5rem);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.cta::before {
  content: ''; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px;
  background: url('../img/isotipo-light.png') center / contain no-repeat; opacity: .07;
}
.cta h2 { color: #fff; margin-bottom: .35rem; }
.cta p { color: rgba(255, 255, 255, .82); margin: 0; max-width: 52ch; }
.cta__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* -------------------------------------------------------------- Footer -- */
.footer { background: var(--brand-900); color: rgba(255, 255, 255, .68); padding: clamp(3rem, 6vw, 4.5rem) 0 0; }
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: 3rem;
}
.footer h4 {
  color: #fff; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 500; margin-bottom: 1.1rem;
}
.footer a { color: rgba(255, 255, 255, .68); }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; font-size: .94rem; }
.footer__logo img { height: 54px; width: auto; margin-bottom: 1.1rem; }
.footer__about { font-size: .93rem; max-width: 34ch; }
.footer__contact li { display: flex; gap: .6rem; align-items: flex-start; }
.footer__contact .ico { width: 1.1rem; height: 1.1rem; color: var(--brand-400); margin-top: .18rem; }
.footer__map {
  border-radius: var(--r); overflow: hidden; height: 190px; border: 1px solid rgba(255, 255, 255, .12);
}
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 1.4rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .82rem; color: rgba(255, 255, 255, .5);
}
.footer__bottom a { color: rgba(255, 255, 255, .6); }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------- WhatsApp fijo -- */
.wa-fab {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 90;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: #1fa855; color: #fff;
  box-shadow: 0 10px 26px -8px rgba(31, 168, 85, .7);
  transition: transform .2s ease;
}
.wa-fab:hover { transform: scale(1.06); color: #fff; }
.wa-fab .ico { width: 28px; height: 28px; }
@media print { .wa-fab { display: none; } }

/* ----------------------------------------------------------- Encabezado - */
.pagehead {
  background: linear-gradient(160deg, var(--brand-900), var(--brand-700));
  color: #fff; padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem);
}
.pagehead h1 { color: #fff; margin-bottom: .4rem; }
.pagehead p { color: rgba(255, 255, 255, .78); max-width: 58ch; margin: 0; }
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
  font-size: .84rem; color: rgba(255, 255, 255, .6); margin-bottom: 1rem;
}
.breadcrumb a { color: rgba(255, 255, 255, .78); }
.breadcrumb .ico { width: .85rem; height: .85rem; opacity: .6; }

/* -------------------------------------------------------------- Listado - */
.results-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin: 2rem 0 1.5rem;
}
.results-bar__count { font-family: var(--font-display); color: var(--ink); font-size: 1.05rem; }
.results-bar__count strong { font-weight: 600; }
.sort { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--muted); }
.sort select { padding: .5rem .8rem; }

.active-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.tagfilter {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .5rem .4rem .85rem;
  background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--r-pill);
  font-size: .85rem; color: var(--brand-700);
}
.tagfilter a { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--brand); background: rgba(48, 89, 139, .1); }
.tagfilter a:hover { background: var(--brand); color: #fff; }
.tagfilter .ico { width: .7rem; height: .7rem; stroke-width: 2.2; }

.empty {
  text-align: center; padding: clamp(3rem, 8vw, 5rem) 1.5rem;
  border: 1px dashed var(--line); border-radius: var(--r); background: var(--brand-50);
}
.empty .ico { width: 44px; height: 44px; color: var(--brand-400); margin-bottom: 1rem; }

.pagination { display: flex; justify-content: center; align-items: center; gap: .4rem; margin-top: 3rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; padding: 0 .6rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-family: var(--font-display); font-size: .95rem; color: var(--body); background: var(--paper);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .is-gap { border: 0; background: none; min-width: 24px; }

/* ---------------------------------------------------------- Ficha prop -- */
.prop { padding: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 5rem); }
.prop__layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(1.75rem, 3.5vw, 3rem); align-items: start; }
@media (max-width: 1040px) { .prop__layout { grid-template-columns: 1fr; } }

.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: .6rem; border-radius: var(--r); overflow: hidden; }
/* min-width/height: 0 es obligatorio: sin eso, una foto más ancha que su
   columna (las del panel son de 1440 px) infla la celda por min-content y
   aplasta la columna lateral. */
.gallery__main, .gallery__side { min-width: 0; min-height: 0; }
.gallery__main { position: relative; aspect-ratio: 3 / 2; }
.gallery__side { display: grid; grid-template-rows: 1fr 1fr; gap: .6rem; }
.gallery__side > * { min-height: 0; }
.gallery__side .gallery__item { aspect-ratio: auto; }
.gallery__item { position: relative; overflow: hidden; background: var(--brand-50); border: 0; padding: 0; cursor: zoom-in; display: block; width: 100%; height: 100%; }
/* La foto va fuera del flujo: si no, una imagen vertical estira su celda y
   descuadra la columna lateral respecto de la principal. */
.gallery__item img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.gallery__item:hover img { transform: scale(1.04); }
.gallery__more {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(15, 30, 49, .6); color: #fff; font-family: var(--font-display); font-size: 1.1rem;
  backdrop-filter: blur(2px);
}
.gallery--single { grid-template-columns: 1fr; }
.gallery--single .gallery__main { aspect-ratio: 16 / 9; }
@media (max-width: 720px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery__side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .gallery__side .gallery__item { aspect-ratio: 4 / 3; }
}

.prop__header { margin: 2rem 0 1.5rem; }
.prop__badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.prop__title { margin-bottom: .5rem; }
.prop__place { display: flex; align-items: center; gap: .45rem; color: var(--muted); }
.prop__place .ico { color: var(--brand-400); }

/* Las líneas las dibuja cada celda, no el fondo del contenedor: así una
   última fila incompleta no deja un bloque gris colgando. */
.specs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  background: var(--paper);
  border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2);
  border-radius: var(--r); overflow: hidden;
  margin: 2rem 0;
}
.spec {
  padding: 1.1rem 1rem; text-align: center;
  border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
}
.spec .ico { width: 22px; height: 22px; color: var(--brand); margin-bottom: .45rem; }
.spec__v { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); font-weight: 500; line-height: 1.2; }
.spec__l { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .2rem; }

.prose { color: var(--body); font-size: 1.02rem; }
.prose h2, .prose h3 { margin-top: 2rem; }
.prose p { margin-bottom: 1rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }

.feature-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .7rem; }
.feature-list li { display: flex; align-items: flex-start; gap: .6rem; font-size: .95rem; }
.feature-list .ico { width: 1.05rem; height: 1.05rem; color: var(--brand); margin-top: .3rem; flex: none; }

.block { margin: clamp(2rem, 4vw, 3rem) 0; }
.block > h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem); margin-bottom: 1.1rem; }

.map {
  height: 340px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line);
  background: var(--brand-50);
}
.map--sm { height: 190px; }
.leaflet-container { font-family: var(--font-sans); }

/* ------------------------------------------------------------- Sidebar -- */
.sticky { position: sticky; top: calc(var(--nav-h) + 1.25rem); display: grid; gap: 1.25rem; }
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(1.25rem, 2.5vw, 1.6rem); box-shadow: var(--sh-sm);
}
.panel--brand { background: linear-gradient(160deg, var(--brand-800), var(--brand)); color: rgba(255,255,255,.85); border: 0; }
.panel--brand h3, .panel--brand .panel__price { color: #fff; }
.panel__price { font-family: var(--font-display); font-size: clamp(1.8rem, 1.5rem + 1.2vw, 2.3rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.panel__meta { font-size: .88rem; color: rgba(255, 255, 255, .72); margin-top: .3rem; }
.panel__divider { height: 1px; background: rgba(255, 255, 255, .18); margin: 1.1rem 0; }
.panel__actions { display: grid; gap: .6rem; }
.panel h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.panel__hint { font-size: .88rem; color: var(--muted); margin-bottom: 1rem; }

.agent { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.agent__ph { width: 52px; height: 52px; border-radius: 50%; background: var(--brand-50); display: grid; place-items: center; flex: none; }
.agent__ph img { width: 60%; height: auto; }
.agent__n { font-family: var(--font-display); color: var(--ink); font-weight: 500; }
.agent__r { font-size: .84rem; color: var(--muted); }

/* ------------------------------------------------------------ Formulario */
.form { display: grid; gap: .9rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 480px) { .form__row { grid-template-columns: 1fr; } }
.form__hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form__legal { font-size: .78rem; color: var(--muted); line-height: 1.5; }

.alert {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .9rem 1.1rem; border-radius: var(--r-sm); font-size: .92rem;
  margin-bottom: 1.25rem;
}
.alert .ico { margin-top: .15rem; flex: none; }
.alert--ok { background: #e9f6ef; color: var(--ok); border: 1px solid #bfe3d0; }
.alert--err { background: #fdecea; color: var(--err); border: 1px solid #f5c6c2; }

/* ------------------------------------------------------------ Lightbox -- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(10, 20, 33, .95);
  align-items: center; justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; border-radius: 6px; }
.lightbox__btn {
  position: absolute; background: rgba(255, 255, 255, .12); border: 0; color: #fff;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  transition: background .2s ease;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .25); }
.lightbox__btn .ico { width: 24px; height: 24px; }
.lightbox__close { top: 1.25rem; right: 1.25rem; }
.lightbox__prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox__prev .ico { transform: rotate(180deg); }
.lightbox__count {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, .8); font-size: .9rem; font-family: var(--font-display);
}

/* ------------------------------------------------------- Institucional -- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split__media { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--brand-50); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__media--pattern { display: grid; place-items: center; background: linear-gradient(150deg, var(--brand-800), var(--brand)); }
.split__media--pattern img { width: 52%; height: auto; object-fit: contain; opacity: .9; }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
.timeline li { position: relative; padding-left: 2.1rem; }
.timeline li::before {
  content: ''; position: absolute; left: .38rem; top: .55rem; width: 9px; height: 9px;
  border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-100);
}
.timeline li::after {
  content: ''; position: absolute; left: .78rem; top: 1.5rem; bottom: -1.5rem; width: 1px; background: var(--line);
}
.timeline li:last-child::after { display: none; }
.timeline h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.timeline p { margin: 0; font-size: .95rem; color: var(--muted); }

.faq { display: grid; gap: .75rem; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper);
  padding: 1rem 1.25rem; transition: border-color .2s ease;
}
.faq details[open] { border-color: var(--brand-200); box-shadow: var(--sh-sm); }
.faq summary {
  cursor: pointer; font-family: var(--font-display); font-size: 1.02rem; color: var(--ink);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-size: 1.4rem; color: var(--brand); line-height: 1; font-weight: 300;
}
.faq details[open] summary::after { content: '–'; }
.faq p { margin: .85rem 0 0; font-size: .95rem; color: var(--body); }

.note {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: 1rem 1.2rem; border-left: 3px solid var(--gold); background: var(--sand);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: .92rem; color: var(--body);
}

/* -------------------------------------------------------------- Utilidad */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.stack { display: grid; gap: 1rem; }
.flex { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }

/* Aparición suave al entrar en pantalla (se desactiva con reduced-motion) */
.will-reveal { opacity: 0; transform: translateY(14px); }
.is-revealed {
  opacity: 1; transform: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .3, 1);
}

/* Chincheta del mapa */
.map-pin { background: none; border: 0; filter: drop-shadow(0 3px 5px rgba(20, 33, 46, .35)); }
.leaflet-popup-content { font-family: var(--font-sans); font-size: .88rem; }
.leaflet-popup-content strong { font-family: var(--font-display); color: var(--ink); }

.pagination a[rel="prev"] .ico { transform: rotate(180deg); }

/* Aviso discreto de catálogo de demostración */
.demo-note {
  background: #fff8e6; border-top: 1px solid #f0dfb4; color: #7a5b16;
  font-size: .82rem; text-align: center; padding: .6rem 1rem;
}

/* Ficha técnica con uno o dos datos (terrenos, cocheras): no estirar las
   celdas a todo el ancho, queda un bloque vacío feo. */
.specs--few { max-width: 420px; }
