/* ================================================================
   Brisas de Osorno · Sitio de leads
   Paleta inspirada en el sur de Chile: verde bosque, crema, carbón
   ================================================================ */

:root {
  --green-900: #1f3a2b;
  --green-700: #2f5d44;
  --green-500: #4f8a6a;
  --green-50:  #eaf3ed;
  --sand-100: #f7f3ec;
  --sand-200: #ece4d4;
  --ink-900: #161b18;
  --ink-700: #353d38;
  --ink-500: #6c7670;
  --line: #e3ddd0;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(20, 30, 25, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 30, 25, 0.10);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Tipografía display ===== */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--ink-900);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}
.section-title {
  font-size: clamp(28px, 3.4vw, 42px);
  margin-bottom: 8px;
}
.section-sub {
  color: var(--ink-500);
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-title { text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-700);
  font-weight: 600;
  margin-bottom: 14px;
}
.eyebrow.light { color: var(--green-50); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-primary {
  background: var(--green-700);
  color: var(--white);
  border-color: var(--green-700);
}
.btn-primary:hover { background: var(--green-900); border-color: var(--green-900); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-block { width: 100%; }
.btn-link {
  background: none;
  border: none;
  color: var(--green-700);
  font-weight: 600;
  text-decoration: underline;
  padding: 0;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  flex: 0 0 40px;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--green-700);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: grid; place-items: center;
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: 'Playfair Display', serif; font-size: 18px; }
.brand-text em { font-style: normal; font-size: 11px; color: var(--ink-500); letter-spacing: 0.08em; text-transform: uppercase; }

.main-nav { display: flex; gap: 28px; margin-left: auto; }
.main-nav a {
  font-size: 14.5px;
  color: var(--ink-700);
  font-weight: 500;
  position: relative;
}
.main-nav a:hover { color: var(--green-700); }
.main-nav a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -22px; height: 2px;
  background: var(--green-700);
  transform: scaleX(0);
  transition: transform .2s;
}
.main-nav a:hover::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-btn {
  position: relative;
  width: 38px; height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--sand-100);
  display: grid; place-items: center;
  font-size: 16px;
  color: var(--green-700);
  transition: background .2s, transform .15s;
}
.icon-btn:hover { background: var(--sand-200); transform: translateY(-1px); }
.hamburger {
  display: none;
  background: none; border: none;
  width: 36px; height: 36px;
  flex-direction: column; gap: 5px;
  justify-content: center; align-items: center;
}
.hamburger span { width: 22px; height: 2px; background: var(--ink-900); }

/* En pantallas angostas el logo debe achicarse o empuja al hamburguesa fuera
   de la pantalla. El !important es necesario para ganarle al style="" inline
   del <img> del logo, que trae max-width:none. */
@media (max-width: 480px) {
  .header-inner { gap: 12px; }
  .brand img { height: 36px !important; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #1f3a2b 0%, #2f5d44 60%, #4f8a6a 100%);
  color: #fff;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1494526585095-c41746248156?auto=format&fit=crop&w=2000&q=70');
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  mix-blend-mode: lighten;
}
.hero-inner {
  position: relative;
  padding: 110px 24px 140px;
  text-align: center;
}
.hero h1 {
  color: #fff;
  font-size: clamp(28px, 4.4vw, 48px);
  font-weight: 700;
  max-width: none;
  margin: 0 auto 18px;
  white-space: nowrap; /* título en una sola línea en escritorio */
}
@media (max-width: 720px) {
  .hero h1 { white-space: normal; } /* en móvil se permite el corte */
}
.hero .lead {
  max-width: 720px;
  margin: 0 auto 36px;
  font-size: 17px;
  color: rgba(255,255,255,0.85);
}
.hero-ctas { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* Buscador integrado en el hero */
.hero-search {
  max-width: 880px;
  margin: 34px auto 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  padding: 14px;
  display: grid;
  /* minmax(0,…) es clave: sin él, el ancho mínimo del contenido de los <select>
     (opciones largas como "Región de La Araucanía") impide que las columnas se
     encojan y la grilla se desborda del hero. */
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: 10px;
  text-align: left;
}
.hero-search .hs-field { display: flex; flex-direction: column; gap: 4px; padding: 6px 14px; min-width: 0; }
.hero-search .hs-field + .hs-field { border-left: 1px solid var(--line); }
.hero-search label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-500); font-weight: 600;
}
.hero-search select {
  border: none; background: none; font-size: 15px; color: var(--ink-900);
  font-family: inherit; padding: 2px 0; outline: none; cursor: pointer;
  width: 100%; min-width: 0; /* permite encogerse dentro de su columna */
}
.hero-search .btn { align-self: center; height: 48px; }
@media (max-width: 760px) {
  .hero-search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-search .hs-field + .hs-field { border-left: none; }
  .hero-search .btn { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  /* En teléfono, cada campo a lo ancho: con 2 columnas los nombres de región no caben. */
  .hero-search { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .hero-search .hs-field { padding: 8px 12px; }
  .hero-search .hs-field + .hs-field { border-top: 1px solid var(--line); }
  .hero-search .btn { margin-top: 8px; }
}
.hero-stats {
  margin: 60px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 16px;
  max-width: 800px;
  padding: 0; list-style: none;
}
.hero-stats li {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 18px 12px;
  text-align: center;
  backdrop-filter: blur(6px);
}
.hero-stats strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  margin-bottom: 4px;
}
.hero-stats span { font-size: 12px; opacity: 0.8; letter-spacing: 0.08em; text-transform: uppercase; }

/* ===== Filters bar ===== */
.filters-bar {
  background: var(--sand-100);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}
.filters-bar .container {
  background: #fff;
  padding: 26px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.filters {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
}
.filter { display: flex; flex-direction: column; gap: 6px; }
.filter label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.filter select,
.filter input {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 14.5px;
  color: var(--ink-900);
  font-family: inherit;
}
.filter select:focus,
.filter input:focus {
  outline: 2px solid var(--green-500);
  border-color: var(--green-500);
}
.filter-actions { flex-direction: column; gap: 10px; }
.filter-actions .btn { width: 100%; }
.filter-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  color: var(--ink-500);
}
.sort { display: flex; gap: 10px; align-items: center; }
.sort label { font-size: 13px; }
.sort select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 13.5px;
}

/* Barra de filtros del catálogo (propiedades.html) — reusa la grilla .filters
   pero sin el solape negativo de .filters-bar (aquí no hay hero detrás). */
.catalog-filters {
  background: var(--sand-100);
  border-bottom: 1px solid var(--line);
  padding: 24px 0 28px;
}
.catalog-filters .container {
  background: #fff;
  padding: 24px 26px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.catalog-filters .filter-actions .btn-link {
  align-self: center;
  font-size: 13.5px;
}

/* ===== Listings grid ===== */
.listings {
  padding: 60px 0 80px;
  background: var(--white);
}

/* Grupos por localización */
.location-group { margin-bottom: 52px; }
.location-group:last-of-type { margin-bottom: 0; }
.location-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
}
.location-head h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 0;
}
.location-head .location-count {
  font-size: 13px;
  color: var(--ink-500);
  font-weight: 500;
  background: var(--green-50);
  color: var(--green-700);
  padding: 4px 12px;
  border-radius: 999px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
  gap: 26px;
}
/* Con una sola propiedad, centra la tarjeta en vez de dejarla pegada a la izquierda. */
.cards-grid:has(> .card:only-child) {
  grid-template-columns: minmax(min(290px, 100%), 400px);
  justify-content: center;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .card-media img { transform: scale(1.05); }
.badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--ink-900);
  color: #fff;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px;
}
.badge-new { background: var(--green-700); }
.badge-exclusive { background: #b8893a; }
.badge-hot { background: #b1462e; }
.fav {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.95);
  font-size: 16px;
  color: var(--green-700);
  display: grid; place-items: center;
  transition: transform .15s;
}
.fav:hover { transform: scale(1.1); color: #b1462e; }
.fav.active { color: #b1462e; }

.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card-price strong {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--green-900);
}
.card-clp { font-size: 13px; color: var(--ink-500); }
.card-title {
  font-size: 18px;
  font-weight: 600;
}
.card-loc {
  color: var(--ink-500);
  font-size: 13.5px;
  margin: 0;
}
.card-specs {
  list-style: none; padding: 0; margin: 6px 0 0;
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 13px;
  color: var(--ink-700);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.card-specs li { display: inline-flex; align-items: center; gap: 5px; }
.card-foot {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center;
}
.tag {
  background: var(--green-50);
  color: var(--green-700);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.link-more {
  color: var(--green-700);
  font-weight: 600;
  font-size: 13.5px;
}
.link-more:hover { color: var(--green-900); }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-500);
}

/* ===== Features ===== */
.features {
  background: var(--sand-100);
  padding: 80px 0;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.feature {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--line);
}
.feature-ico {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--green-50);
  display: grid; place-items: center;
  font-size: 24px;
  margin-bottom: 14px;
}
.feature h3 {
  font-size: 18px;
  margin-bottom: 6px;
}
.feature p { color: var(--ink-500); font-size: 14.5px; margin: 0; }

/* ===== Simulador de dividendo ===== */
.simulador { padding: 80px 0; background: var(--sand-100); }
.sim-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.sim-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.sim-field { margin-bottom: 22px; }
.sim-field .sf-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.sim-field label { font-size: 14px; font-weight: 600; color: var(--ink-700); }
.sim-field .sf-val { font-family: 'Playfair Display', serif; font-size: 17px; color: var(--green-900); }
.sim-field input[type=range] { width: 100%; accent-color: var(--green-700); }
.sim-field input[type=number] { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 15px; font-family: inherit; }
.sim-uf { background: var(--green-50); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; color: var(--ink-700); }
.sim-uf strong { color: var(--green-900); }
.sim-uf span { color: var(--ink-500); font-size: 12.5px; }
.sim-result { background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: #fff; border-radius: var(--radius); padding: 30px; }
.sim-result .big { font-family: 'Playfair Display', serif; font-size: clamp(34px, 5vw, 46px); line-height: 1.1; margin: 6px 0; }
.sim-result .big small { font-size: 18px; opacity: .8; }
.sim-result .sub { color: rgba(255,255,255,.8); font-size: 14px; }
.sim-line { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.18); font-size: 14.5px; }
.sim-line span:last-child { font-weight: 700; }
.sim-disclaimer { font-size: 12px; color: var(--ink-500); margin-top: 16px; line-height: 1.5; }
@media (max-width: 780px) { .sim-grid { grid-template-columns: 1fr; } }

/* ===== Misión y Visión ===== */
.mv {
  padding: 80px 0;
  background-color: var(--green-900); /* respaldo si la imagen del volcán no carga */
  background-image:
    linear-gradient(160deg, rgba(15,26,20,0.52) 0%, rgba(20,40,30,0.40) 55%, rgba(31,58,43,0.55) 100%),
    url("imagen%20volcan.jpeg");
  background-size: cover;
  background-position: center;
  background-attachment: scroll; /* la imagen baja junto con la página al hacer scroll */
}
.mv-sub {
  color: #fff;
  font-size: 18px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.45);
}
.mv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}
.mv-card {
  background: rgba(79, 138, 106, 0.40); /* verde medio #4f8a6a translúcido */
  border: 1px solid rgba(255,255,255,0.30);
  border-radius: var(--radius);
  padding: 32px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 44px rgba(10,20,15,0.38);
  position: relative;
  overflow: hidden;
}
.mv-card h3 {
  color: #fff;
  font-size: 22px;
  margin-bottom: 10px;
}
.mv-card p { color: rgba(255,255,255,0.92); font-size: 15px; margin: 0; }

/* ===== Ejecutivos ===== */
.executives {
  padding: 80px 0;
  background: var(--sand-100);
}
.exec-grid {
  display: grid;
  /* min(...) evita que el mínimo de 340px desborde en pantallas más angostas */
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 22px;
  max-width: 880px;
  margin: 0 auto;
}
.exec-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.exec-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.exec-photo {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--sand-200);
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(20,30,25,0.08);
}
.exec-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.exec-info { flex: 1; min-width: 0; }
.exec-info h3 {
  font-size: 22px;
  margin: 0 0 2px;
}
.exec-role {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-700);
  font-weight: 600;
  margin: 0 0 8px;
}
.exec-mail {
  display: block;
  font-size: 14px;
  color: var(--ink-500);
  margin-bottom: 14px;
  word-break: break-all;
}
.exec-mail:hover { color: var(--green-700); }
.exec-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

@media (max-width: 520px) {
  .exec-card { flex-direction: column; text-align: center; gap: 14px; }
  .exec-actions { justify-content: center; }
}

/* ===== Lead Section ===== */
.lead {
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: #fff;
  padding: 90px 0;
}
.lead-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.lead-copy h2 {
  color: #fff;
  font-size: clamp(28px, 3.4vw, 42px);
  margin-bottom: 16px;
}
.lead-copy p {
  color: rgba(255,255,255,0.85);
  font-size: 16px;
  margin-bottom: 20px;
}
.lead-bullets {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.lead-bullets li {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}

.lead-form {
  background: #fff;
  color: var(--ink-900);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 14px;
}
.lead-form .row { display: flex; flex-direction: column; gap: 6px; }
.lead-form .row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead-form .row > label,
.lead-form .row.two label { display: flex; flex-direction: column; gap: 6px; }
.lead-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
}
.lead-form input,
.lead-form select,
.lead-form textarea {
  font: inherit;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.lead-form textarea { resize: vertical; min-height: 88px; }
.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  outline: 2px solid var(--green-500);
  border-color: var(--green-500);
}
.lead-form .check label {
  flex-direction: row; align-items: center; gap: 10px;
  font-weight: 400; color: var(--ink-700); font-size: 13.5px;
}
.lead-form .check input { width: auto; }
.form-feedback {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--green-50);
  color: var(--green-900);
  font-size: 14px;
  font-weight: 500;
}
.form-feedback.error {
  background: #fce8e6;
  color: #8b1e1e;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--ink-900);
  color: rgba(255,255,255,0.7);
  padding-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}
.brand-light .brand-mark { background: var(--green-500); }
.brand-light .brand-text strong { color: #fff; }
.brand-light .brand-text em { color: rgba(255,255,255,0.5); }
.site-footer h4 {
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.site-footer ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 14px;
}
.site-footer a:hover { color: #fff; }
.muted { font-size: 14px; color: rgba(255,255,255,0.55); margin-top: 14px; max-width: 320px; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  color: #fff;
  transition: background .2s;
}
.socials a:hover { background: var(--green-500); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0;
  font-size: 12.5px;
}
.footer-bottom .container {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-bottom a { color: rgba(255,255,255,0.7); }
.footer-bottom a:hover { color: #fff; }

/* ===== WhatsApp flotante ===== */
.whatsapp {
  position: fixed;
  bottom: 24px; right: 24px;
  background: #25d366;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  font-weight: 600;
  font-size: 14px;
  z-index: 40;
  transition: transform .2s;
}
.whatsapp:hover { transform: translateY(-2px); }
.whatsapp em { font-style: normal; }

/* ================================================================
   PROPIEDAD (detalle)
   ================================================================ */
.detail-hero {
  padding: 32px 0 16px;
  background: var(--sand-100);
}
.crumbs {
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 14px;
}
.crumbs a { color: var(--green-700); }

.detail-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  flex-wrap: wrap;
}
.detail-head h1 {
  font-size: clamp(28px, 3.4vw, 40px);
  margin-bottom: 6px;
}
.detail-head .loc { color: var(--ink-500); margin: 0; font-size: 15px; }
.detail-price {
  text-align: right;
}
.detail-price strong {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  color: var(--green-900);
  display: block;
}
.detail-price span { font-size: 14px; color: var(--ink-500); }

.gallery {
  display: grid;
  /* minmax(0,…) evita que el tamaño intrínseco de las fotos estire las celdas
     más allá de la altura declarada; el recorte lo maneja object-fit: cover. */
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin: 28px 0 40px;
  border-radius: var(--radius);
  overflow: hidden;
  height: 460px;
}
.gallery img:first-child { grid-row: 1 / span 2; height: 100%; object-fit: cover; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
/* La grilla muestra sólo las 5 primeras fotos; el lightbox recorre todas. */
.gallery img:nth-child(n+6) { display: none; }

.detail-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding-bottom: 80px;
}
.detail-body h2 {
  font-size: 24px;
  margin-bottom: 14px;
  margin-top: 32px;
}
.detail-body h2:first-child { margin-top: 0; }
.detail-body p { color: var(--ink-700); }

.spec-grid {
  list-style: none; padding: 0; margin: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.spec-grid li {
  background: var(--sand-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.spec-grid strong { display: block; font-size: 18px; color: var(--green-900); font-family: 'Playfair Display', serif; }
.spec-grid span { font-size: 12px; color: var(--ink-500); letter-spacing: 0.06em; text-transform: uppercase; }

.amenities {
  list-style: none; padding: 0; margin: 18px 0 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px;
}
.amenities li { padding: 8px 0; border-bottom: 1px dashed var(--line); color: var(--ink-700); font-size: 14.5px; }

.sticky-cta {
  position: sticky;
  top: 96px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  align-self: start;
}
.sticky-cta h3 { font-family: 'Inter', sans-serif; font-size: 16px; margin-bottom: 4px; }
.sticky-cta p { color: var(--ink-500); font-size: 13.5px; margin: 0 0 14px; }
.sticky-cta .row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.sticky-cta input, .sticky-cta textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.sticky-cta .btn { width: 100%; margin-top: 6px; }
.sticky-cta small { display: block; margin-top: 12px; color: var(--ink-500); font-size: 12px; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  /* El margin-left:auto que alinea todo a la derecha vive en .main-nav; al
     ocultarlo aquí, ese empuje se pierde y el hamburguesa queda al medio.
     Lo traspasamos a .header-actions, que es el primer elemento visible tras la marca. */
  .header-actions { margin-left: auto; }
  .filters { grid-template-columns: 1fr 1fr; }
  .lead-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail-body { grid-template-columns: 1fr; }
  .sticky-cta { position: static; }
  .gallery {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    height: 320px;
  }
  .gallery img:first-child { grid-row: auto; grid-column: 1 / span 2; }
}
@media (max-width: 640px) {
  .header-actions .btn { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr; }
  .lead-form .row.two { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .amenities { grid-template-columns: 1fr; }
  .whatsapp em { display: none; }
  .gallery { height: 240px; }
}

/* ================================================================
   FAVORITOS · badge, panel deslizable e items
   ================================================================ */
.fav-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #b1462e;
  color: #fff;
  font-size: 11px; font-weight: 700;
  line-height: 1;
  display: grid; place-items: center;
  box-shadow: 0 0 0 2px #fff;
}

body.fav-open, body.lb-open { overflow: hidden; }

.fav-backdrop {
  position: fixed; inset: 0;
  background: rgba(16, 24, 20, 0.45);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 60;
}
body.fav-open .fav-backdrop { opacity: 1; visibility: visible; }

.fav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(380px, 90vw);
  background: #fff;
  box-shadow: -16px 0 48px rgba(16, 24, 20, 0.22);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  z-index: 70;
  display: flex; flex-direction: column;
}
body.fav-open .fav-drawer { transform: translateX(0); }

.fav-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.fav-drawer-head h3 { font-size: 20px; }
.fav-close {
  width: 34px; height: 34px;
  border: none; border-radius: 50%;
  background: var(--sand-100); color: var(--ink-700);
  font-size: 15px;
  display: grid; place-items: center;
  transition: background .2s;
}
.fav-close:hover { background: var(--sand-200); }

.fav-list {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.fav-empty { text-align: center; color: var(--ink-500); padding: 48px 18px; }
.fav-empty-ico { font-size: 40px; color: var(--green-500); display: block; margin-bottom: 12px; }
.fav-empty p { font-weight: 600; color: var(--ink-700); margin: 0 0 6px; }
.fav-empty small { font-size: 13px; }

.fav-item {
  display: grid; grid-template-columns: 84px 1fr auto; gap: 12px;
  align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px;
}
.fav-item-media { display: block; width: 84px; height: 64px; border-radius: 8px; overflow: hidden; flex: none; }
.fav-item-media img { width: 100%; height: 100%; object-fit: cover; }
.fav-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fav-item-body strong { font-family: 'Playfair Display', serif; color: var(--green-900); font-size: 16px; }
.fav-item-title { font-size: 14px; font-weight: 600; color: var(--ink-900); }
.fav-item-title:hover { color: var(--green-700); }
.fav-item-loc { font-size: 12.5px; color: var(--ink-500); }
.fav-item-link { font-size: 12.5px; color: var(--green-700); font-weight: 600; margin-top: 2px; }
.fav-item-remove {
  align-self: start;
  width: 26px; height: 26px;
  border: none; border-radius: 50%;
  background: var(--sand-100); color: var(--ink-500); font-size: 12px;
  transition: background .2s, color .2s;
}
.fav-item-remove:hover { background: #fce8e6; color: #8b1e1e; }

/* ================================================================
   DETALLE · barra de acciones (guardar + compartir)
   ================================================================ */
.detail-actions { display: flex; gap: 12px; margin: 6px 0 0; flex-wrap: wrap; }
.act-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-700);
  padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: 14px;
  transition: border-color .2s, color .2s, background .2s;
}
.act-btn:hover { border-color: var(--green-500); color: var(--green-700); }
.act-btn.active { border-color: #b1462e; color: #b1462e; background: #fdf3f1; }

.share-wrap { position: relative; }
.share-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 6px; min-width: 230px; z-index: 30;
  display: flex; flex-direction: column; gap: 2px;
}
.share-menu[hidden] { display: none; }
.share-opt {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; text-align: left;
  padding: 10px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500; font-family: inherit;
  color: var(--ink-700); width: 100%;
  transition: background .2s, color .2s;
}
.share-opt:hover { background: var(--sand-100); color: var(--green-700); }

/* ================================================================
   GALERÍA · botón "ver fotos" + lightbox a pantalla completa
   ================================================================ */
.gallery { position: relative; }
.gallery-expand {
  position: absolute; right: 14px; bottom: 14px;
  background: rgba(16, 24, 20, 0.78); color: #fff; border: none;
  padding: 9px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  z-index: 2;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .2s, transform .15s;
}
.gallery-expand:hover { background: rgba(16, 24, 20, 0.92); transform: translateY(-1px); }

.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(8, 12, 10, 0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
body.lb-open .lightbox { opacity: 1; visibility: visible; }
.lb-stage {
  margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.lb-stage img {
  max-width: 90vw; max-height: 78vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  background: #fff;
}
.lb-caption { color: rgba(255, 255, 255, 0.85); font-size: 14px; text-align: center; }
.lb-close, .lb-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.12); color: #fff;
  border: none; border-radius: 50%;
  display: grid; place-items: center;
  transition: background .2s;
}
.lb-close { top: 20px; right: 22px; width: 44px; height: 44px; font-size: 18px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 30px; }
.lb-prev { left: 22px; }
.lb-next { right: 22px; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, 0.26); }
.lb-counter {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8); font-size: 13px; letter-spacing: 0.06em;
}
@media (max-width: 640px) {
  .lightbox { padding: 16px; }
  .lb-nav { width: 42px; height: 42px; font-size: 24px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* ================================================================
   PÁGINAS LEGALES (terminos.html, privacidad.html)
   ================================================================ */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 0 80px;
}
.legal .updated {
  color: var(--ink-500);
  font-size: 13px;
  margin: 0 0 8px;
}
.legal h2 {
  font-size: 21px;
  margin: 34px 0 10px;
}
.legal p { color: var(--ink-700); font-size: 15px; }
.legal a { color: var(--green-700); font-weight: 600; }
.legal a:hover { text-decoration: underline; }
.legal ul { padding-left: 22px; margin: 10px 0; }
.legal li { color: var(--ink-700); font-size: 15px; margin-bottom: 7px; }
.legal .note {
  background: var(--sand-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  margin-top: 40px;
}

/* ================================================================
   GALERÍA EN RETRATO
   script.js agrega .gallery-portrait cuando las fotos de la propiedad
   son verticales. Las celdas quedan con proporción ~3:4 para no
   recortarlas, y caben 7 fotos (1 principal + 6 miniaturas).
   Va al final del archivo para imponerse sobre las reglas de arriba.
   ================================================================ */
.gallery-portrait {
  grid-template-columns: minmax(0, 2.1fr) repeat(3, minmax(0, 1fr));
  height: 620px;
}
.gallery-portrait img:nth-child(-n+7) { display: block; }
.gallery-portrait img:nth-child(n+8) { display: none; }

@media (max-width: 980px) {
  /* Móvil: foto principal a lo ancho en 3:4 + una fila de 3 miniaturas */
  .gallery-portrait {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    height: auto;
  }
  .gallery-portrait img { height: auto; aspect-ratio: 3 / 4; }
  .gallery-portrait img:first-child {
    grid-column: 1 / -1;
    grid-row: 1;
    aspect-ratio: 3 / 4;
  }
  .gallery-portrait img:nth-child(-n+4) { display: block; }
  .gallery-portrait img:nth-child(n+5) { display: none; }
}
