/* ==========================================================================
   Domus Prime Inmobiliaria — hoja de estilos
   Vanilla CSS, sin frameworks. Variables en :root para personalizar marca.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* Paleta: neutros cálidos + navy aspiracional + acento dorado (uso <15%) */
  --color-bg: #faf7f1;
  --color-bg-alt: #f1ece0;
  --color-surface: #ffffff;
  --color-text: #1b2027;
  --color-text-muted: #5c6470;
  --color-primary: #0b2545;
  --color-primary-light: #163c63;
  --color-primary-dark: #071831;
  --color-accent: #b9954a;
  --color-accent-soft: #efe4cc;
  --color-border: #e3dac9;
  --color-success: #2f6f4f;

  --font-base: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(11, 37, 69, 0.06);
  --shadow-md: 0 12px 32px rgba(11, 37, 69, 0.10);
  --shadow-lg: 0 24px 64px rgba(11, 37, 69, 0.16);

  --container: 1220px;
  --header-h: 84px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Accesibilidad ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- Utilidades ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding: 96px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--color-primary); }
.section-head p { margin-top: 14px; color: var(--color-text-muted); font-size: 1.05rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-primary-light); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--color-accent); color: var(--color-primary-dark); }
.btn-accent:hover { box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--color-primary); border-color: var(--color-border); }
.btn-ghost:hover { background: var(--color-surface); border-color: var(--color-primary); }
.btn-light { background: #fff; color: var(--color-primary); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
}
.badge.alquiler { background: var(--color-accent); color: var(--color-primary-dark); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 500;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(250, 247, 241, 0.62);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 1px 0 rgba(11, 37, 69, 0.06);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), height 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.site-header.is-scrolled {
  height: 72px;
  background: rgba(250, 247, 241, 0.88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow-sm);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--color-primary); }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--color-primary);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 20px; height: 20px; }

.nav-desktop { display: flex; align-items: center; gap: 36px; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--color-accent);
  transition: width 0.25s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none; border: none;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 10px; right: 10px;
  height: 2px; background: var(--color-primary);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

.mobile-panel {
  position: fixed; inset: 0;
  background: var(--color-primary-dark);
  z-index: 490;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 28px;
  transform: translateY(-100%);
  transition: transform 0.4s var(--ease);
}
.mobile-panel.is-open { transform: translateY(0); }
.mobile-panel a { color: #fff; font-size: 1.5rem; font-weight: 700; }
.mobile-panel .btn-accent { margin-top: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--color-primary-dark);
  color: #fff;
}
.hero-bg-clip {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 620px at 82% 8%, rgba(185, 149, 74, 0.28), transparent 60%),
    linear-gradient(200deg, var(--color-primary) 0%, var(--color-primary-dark) 62%, #05131f 100%);
}
.hero-bg-pattern {
  position: absolute; inset: -10% -10% -10% -10%;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 68px);
  will-change: transform;
}
@supports (animation-timeline: view()) {
  .hero-bg-pattern {
    animation: hero-drift linear;
    animation-timeline: scroll(root);
    animation-range: 0 80vh;
  }
}
@keyframes hero-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-40px, 60px, 0); }
}
.hero-inner { position: relative; z-index: 2; padding-top: var(--header-h); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-accent-soft);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  padding: 8px 16px; border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
.hero h1 em { font-style: normal; color: var(--color-accent-soft); }
.hero p.lead { margin-top: 20px; font-size: 1.15rem; color: rgba(255,255,255,0.78); max-width: 46ch; }
.hero-actions { display: flex; gap: 16px; margin-top: 36px; flex-wrap: wrap; }

.hero-search {
  position: relative;
  isolation: isolate;
  z-index: 2;
  margin-top: 44px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-radius: var(--radius-lg);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 8px;
}
.hero-search > * { position: relative; z-index: 1; }
.hero-search select, .hero-search input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-family: inherit;
  font-size: 0.9rem;
}
.hero-search select option { color: #111; }
.hero-search input::placeholder { color: rgba(255,255,255,0.55); }
.hero-search .btn { justify-content: center; }

/* ---------- Efecto liquid glass (fondo animado detrás de los buscadores) ---------- */
/* Recorta solo el fondo animado, nunca la barra entera: así el desplegable
   personalizado puede desbordar hacia abajo sin que .hero-search/.filters-bar
   lo corten con overflow:hidden. */
.liquid-clip {
  position: absolute; inset: 0; z-index: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.liquid-blobs { position: absolute; inset: -50%; filter: blur(38px); pointer-events: none; }
.liquid-blobs span { position: absolute; border-radius: 50%; will-change: transform; }
.liquid-blobs span:nth-child(1) { width: 220px; height: 220px; top: -6%; left: 8%; background: radial-gradient(circle, var(--color-accent) 0%, transparent 72%); animation: liquid-float-1 17s ease-in-out infinite; }
.liquid-blobs span:nth-child(2) { width: 260px; height: 260px; bottom: -14%; right: 4%; background: radial-gradient(circle, #ffffff 0%, transparent 72%); animation: liquid-float-2 21s ease-in-out infinite; }
.liquid-blobs span:nth-child(3) { width: 190px; height: 190px; top: 22%; right: 26%; background: radial-gradient(circle, var(--color-primary-light) 0%, transparent 72%); animation: liquid-float-3 19s ease-in-out infinite; }
.hero-search .liquid-clip, .filters-bar .liquid-clip { position: absolute; z-index: 0; }
.hero-search .liquid-clip { opacity: 0.55; }
.filters-bar .liquid-clip { opacity: 0.22; }

/* Sheen "liquid glass" que recorre la barra de búsqueda */
.hero-search::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,0.16) 35%, transparent 50%);
  background-size: 220% 100%;
  animation: liquid-sheen 9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes liquid-sheen {
  0%, 100% { background-position: 120% 0; }
  50% { background-position: -20% 0; }
}
@keyframes liquid-float-1 { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(36px, 26px) scale(1.18); } }
@keyframes liquid-float-2 { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px,-22px) scale(0.88); } }
@keyframes liquid-float-3 { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-22px, 24px) scale(1.12); } }

.hero-stats { display: flex; gap: 36px; margin-top: 56px; flex-wrap: wrap; }
.hero-stat strong { display: block; font-size: 2rem; color: var(--color-accent-soft); }
.hero-stat span { font-size: 0.85rem; color: rgba(255,255,255,0.65); }

.hero-visual {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: box-shadow 0.3s var(--ease);
}
.hero-visual:hover { box-shadow: var(--shadow-lg), 0 0 0 3px rgba(185, 149, 74, 0.5); }
.hero-visual:hover .hero-visual-card { background: rgba(11, 37, 69, 0.85); }
.hero-visual:hover .hero-visual-card svg { transform: translateX(3px); }
.hero-visual-card svg { transition: transform 0.25s var(--ease); }
.hero-visual img, .hero-visual .ph-svg { width: 100%; height: 100%; object-fit: cover; }
@supports (animation-timeline: view()) {
  .hero-visual img, .hero-visual .ph-svg {
    animation: hero-visual-parallax linear;
    animation-timeline: scroll(root);
    animation-range: 0 100vh;
  }
}
@keyframes hero-visual-parallax { from { transform: translateY(0) scale(1); } to { transform: translateY(26px) scale(1.05); } }
.hero-visual-card {
  position: absolute; left: 20px; bottom: 20px; right: 20px;
  background: rgba(11, 37, 69, 0.72);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.hero-visual-card strong { font-size: 1.3rem; }
.hero-visual-card span { font-size: 0.8rem; color: rgba(255,255,255,0.7); }
.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.scroll-cue .dot { width: 6px; height: 10px; border-radius: 3px; background: rgba(255,255,255,0.6); animation: scroll-cue-move 1.8s ease-in-out infinite; }
@keyframes scroll-cue-move { 0%, 100% { transform: translateY(0); opacity: 1;} 50% { transform: translateY(6px); opacity: 0.4; } }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); filter: blur(0); }
.reveal-stagger.is-visible { transition-delay: calc(var(--i, 0) * 90ms); }

/* ---------- Stats bar ---------- */
.stats-bar {
  background: var(--color-primary);
  color: #fff;
  padding: 48px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat strong { display: block; font-size: 2.4rem; color: var(--color-accent-soft); }
.stat span { font-size: 0.85rem; color: rgba(255,255,255,0.7); }

/* ---------- Property cards ---------- */
.props-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.prop-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.prop-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.prop-media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.prop-media .ph-svg { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.prop-card:hover .prop-media .ph-svg { transform: scale(1.06); }
.prop-media .badges { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; }
.prop-fav {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: grid; place-items: center;
  border: none;
}
.prop-fav svg { width: 18px; height: 18px; stroke: var(--color-primary); transition: fill 0.2s var(--ease), stroke 0.2s var(--ease); }
.prop-fav.is-fav svg { fill: #e0524a; stroke: #e0524a; }
[data-fav-filter].is-active { background: var(--color-accent-soft); border-color: var(--color-accent); color: var(--color-primary); }
.prop-body { padding: 20px 22px 22px; }
.prop-price { font-size: 1.3rem; font-weight: 800; color: var(--color-primary); }
.prop-price span { font-size: 0.75rem; font-weight: 600; color: var(--color-text-muted); }
.prop-title { margin-top: 6px; font-size: 1.02rem; font-weight: 700; }
.prop-title a:hover { text-decoration: underline; }
.prop-loc { margin-top: 4px; font-size: 0.88rem; color: var(--color-text-muted); display: flex; align-items: center; gap: 6px; }
.prop-loc svg { width: 14px; height: 14px; flex-shrink: 0; }
.prop-meta { display: flex; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--color-border); font-size: 0.85rem; color: var(--color-text-muted); }
.prop-meta span { display: flex; align-items: center; gap: 6px; }
.prop-meta svg { width: 16px; height: 16px; }
.props-cta { text-align: center; margin-top: 48px; }

/* ---------- Filtros ---------- */
.filters-bar {
  position: relative;
  isolation: isolate;
  z-index: 2;
  display: flex; flex-wrap: wrap; gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}
.filters-bar > * { position: relative; z-index: 1; }
.filters-bar select, .filters-bar input {
  flex: 1; min-width: 160px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  font-family: inherit;
  background: var(--color-bg);
}
.filters-bar .btn { flex-shrink: 0; }
.filters-bar .custom-select { flex: 1; min-width: 160px; }

/* ---------- Select personalizado (reemplaza el <select> nativo) ---------- */
.custom-select { position: relative; width: 100%; }
.custom-select.is-open { z-index: 65; }
.custom-select > select {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; border: 0; padding: 0;
  opacity: 0;
  pointer-events: none;
}
.custom-select-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
}
.custom-select-trigger .cs-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-trigger .cs-chevron { flex-shrink: 0; width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.custom-select.is-open .cs-chevron { transform: rotate(180deg); }
.hero-search .custom-select-trigger {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  color: #fff;
}
.custom-select-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  z-index: 60;
  max-height: min(340px, 60vh);
  overflow-y: auto;
  margin: 0; padding: 6px;
  list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
.custom-select.is-open .custom-select-list { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.custom-select.drop-up .custom-select-list { top: auto; bottom: calc(100% + 8px); }
.custom-select.drop-up.is-open .custom-select-list { transform: translateY(0) scale(1); }
.custom-select.drop-up .custom-select-list { transform: translateY(6px) scale(0.98); }
.custom-select-list::-webkit-scrollbar { width: 6px; }
.custom-select-list::-webkit-scrollbar-track { background: transparent; }
.custom-select-list::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 999px; }
.custom-select-option {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--color-text);
  cursor: pointer;
}
.custom-select-option.is-active { background: var(--color-accent-soft); }
.custom-select-option[aria-selected="true"] { font-weight: 700; color: var(--color-primary); }
.no-results { text-align: center; padding: 60px 20px; color: var(--color-text-muted); display: none; }
.no-results.is-visible { display: block; }

/* ---------- Why us ---------- */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.feature-card {
  padding: 30px 26px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.feature-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.feature-icon svg { width: 26px; height: 26px; stroke: var(--color-primary); }
.feature-card h3 { font-size: 1.05rem; }
.feature-card p { margin-top: 8px; color: var(--color-text-muted); font-size: 0.92rem; }

/* ---------- CTA banner (vende/alquila) ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  flex-wrap: wrap;
}
.cta-banner h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); max-width: 22ch; }
.cta-banner p { color: rgba(255,255,255,0.75); margin-top: 10px; max-width: 44ch; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Testimonios ---------- */
.testi-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  scrollbar-width: none;
}
.testi-track::-webkit-scrollbar { display: none; }
.testi-card {
  scroll-snap-align: start;
  flex: 0 0 min(420px, 88vw);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 30px;
}
.testi-stars { color: var(--color-accent); letter-spacing: 2px; margin-bottom: 14px; }
.testi-quote { font-size: 1.02rem; color: var(--color-text); }
.testi-person { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.testi-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-primary);
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 0.9rem;
}
.testi-person strong { display: block; font-size: 0.92rem; }
.testi-person span { font-size: 0.8rem; color: var(--color-text-muted); }
.testi-dots { display: flex; justify-content: center; gap: 10px; margin-top: 28px; }
.testi-dots button {
  width: 9px; height: 9px; border-radius: 50%;
  border: none; background: var(--color-border);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.testi-dots button.is-active { background: var(--color-primary); transform: scale(1.25); }

/* ---------- Equipo ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.team-card { text-align: center; }
.team-photo {
  aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.team-card h3 { font-size: 1rem; }
.team-card span { display: block; font-size: 0.85rem; color: var(--color-accent); font-weight: 600; margin-top: 4px; }
.team-contact { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.team-contact a {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--color-border);
  display: grid; place-items: center; transition: background 0.2s var(--ease);
}
.team-contact a:hover { background: var(--color-accent-soft); }
.team-contact svg { width: 15px; height: 15px; }

/* ---------- Ubicación / contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info-list { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }
.contact-info-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-info-icon {
  width: 46px; height: 46px; border-radius: var(--radius-sm); flex-shrink: 0;
  background: var(--color-primary); display: grid; place-items: center;
}
.contact-info-icon svg { width: 22px; height: 22px; stroke: #fff; }
.contact-info-item strong { display: block; font-size: 0.95rem; }
.contact-info-item p, .contact-info-item a { color: var(--color-text-muted); font-size: 0.92rem; }
.map-frame {
  width: 100%; aspect-ratio: 4/3; border: 0; border-radius: var(--radius-md);
  filter: grayscale(0.2) contrast(1.05);
}

.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.85rem; font-weight: 700; }
.field input, .field select, .field textarea {
  padding: 13px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  font-family: inherit; font-size: 0.95rem;
  background: var(--color-bg);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:invalid:not(:placeholder-shown), .field textarea:invalid:not(:placeholder-shown) {
  border-color: #b3453f;
}
.field-error { font-size: 0.78rem; color: #b3453f; display: none; }
.field.has-error .field-error { display: block; }
.field.has-error input, .field.has-error textarea { border-color: #b3453f; }
.form-note { font-size: 0.78rem; color: var(--color-text-muted); margin-top: 10px; }
.form-success {
  display: none;
  background: #eaf4ee; color: var(--color-success);
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: 0.9rem; margin-bottom: 18px; font-weight: 600;
}
.form-success.is-visible { display: block; }
.form-error {
  display: none;
  background: #fbeceb; color: #b3453f;
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: 0.9rem; margin-bottom: 18px; font-weight: 600;
}
.form-error.is-visible { display: block; }
.form-submitting { opacity: 0.7; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-primary-dark); color: rgba(255,255,255,0.75); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr; gap: 40px; }
.footer-brand .brand { color: #fff; }
.footer-brand p { margin-top: 14px; font-size: 0.9rem; color: rgba(255,255,255,0.55); max-width: 32ch; }
.footer-col h4 { color: #fff; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 18px; }
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: grid; place-items: center;
}
.footer-social svg { width: 16px; height: 16px; }
.footer-bottom {
  margin-top: 48px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.8rem; color: rgba(255,255,255,0.5);
}
.footer-bottom a:hover { color: #fff; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 400;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Chatbot (FAQ, sin backend) ---------- */
.chatbot { position: fixed; right: 22px; bottom: 22px; z-index: 450; }
.chatbot-toggle {
  position: absolute; right: 0; bottom: 92px;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  display: grid; place-items: center;
  border: none; box-shadow: var(--shadow-md);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.chatbot-toggle:hover { transform: scale(1.08); background: var(--color-primary-light); }
.chatbot-toggle svg { width: 25px; height: 25px; }
.chatbot-toggle .icon-close { display: none; }
.chatbot.is-open .chatbot-toggle .icon-chat { display: none; }
.chatbot.is-open .chatbot-toggle .icon-close { display: block; }

.chatbot-panel {
  position: absolute; right: 0; bottom: 162px;
  width: min(360px, calc(100vw - 44px));
  max-height: min(520px, calc(100vh - 200px));
  display: flex; flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.chatbot.is-open .chatbot-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.chatbot-header {
  flex-shrink: 0;
  background: var(--color-primary); color: #fff;
  padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.chatbot-header strong { display: block; font-size: 0.95rem; }
.chatbot-header span { display: block; font-size: 0.75rem; color: rgba(255,255,255,0.7); margin-top: 2px; }
.chatbot-close {
  flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: none; color: #fff;
  display: grid; place-items: center; font-size: 1.1rem; line-height: 1;
}
.chatbot-close:hover { background: rgba(255,255,255,0.22); }

.chatbot-messages {
  flex: 1; overflow-y: auto;
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
  background: var(--color-bg);
}
.chatbot-msg { max-width: 84%; padding: 10px 14px; border-radius: var(--radius-md); font-size: 0.86rem; line-height: 1.5; }
.chatbot-msg.is-bot { align-self: flex-start; background: var(--color-surface); border: 1px solid var(--color-border); border-bottom-left-radius: 4px; }
.chatbot-msg.is-user { align-self: flex-end; background: var(--color-primary); color: #fff; border-bottom-right-radius: 4px; }
.chatbot-msg a { color: var(--color-accent); font-weight: 700; }
.chatbot-msg.is-user a { color: var(--color-accent-soft); }

.chatbot-quick-replies {
  flex-shrink: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0 18px 14px;
  background: var(--color-bg);
}
.chatbot-chip {
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.chatbot-chip:hover { background: var(--color-accent-soft); border-color: var(--color-accent); }

.chatbot-input-row {
  flex-shrink: 0;
  display: flex; gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}
.chatbot-input-row input {
  flex: 1; min-width: 0;
  border: 1.5px solid var(--color-border); border-radius: 999px;
  padding: 10px 16px;
  font-family: inherit; font-size: 0.86rem;
  background: var(--color-bg);
}
.chatbot-input-row button {
  flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--color-primary); color: #fff;
  display: grid; place-items: center;
  transition: background 0.2s var(--ease);
}
.chatbot-input-row button:hover { background: var(--color-primary-light); }
.chatbot-input-row svg { width: 17px; height: 17px; }

/* ---------- Placeholders SVG de propiedades ---------- */
.ph-svg { background-size: cover; background-position: center; background-repeat: no-repeat; }

/* ---------- Tarjetas de propiedad clicables ---------- */
.prop-card { position: relative; cursor: pointer; }
.prop-card:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.prop-fav { position: absolute; top: 14px; right: 14px; z-index: 3; }

/* ---------- Modal de ficha de propiedad ---------- */
.prop-modal {
  position: fixed; inset: 0; z-index: 900;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.prop-modal.is-open { display: flex; }
.prop-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(7, 24, 49, 0.6);
  backdrop-filter: blur(4px);
}
.prop-modal-panel {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  max-width: 900px; width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.3s var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.prop-modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(11, 37, 69, 0.75);
  color: #fff; border: none;
  display: grid; place-items: center;
  font-size: 1.3rem; line-height: 1;
}
.prop-modal-close:hover { background: var(--color-primary); }

.prop-modal-gallery { position: relative; aspect-ratio: 16/9; background: var(--color-bg-alt); overflow: hidden; }
.gallery-track { display: flex; height: 100%; transition: transform 0.4s var(--ease); }
.gallery-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; }
.gallery-nav {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,0.85); border: none;
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.gallery-nav.prev { left: 14px; }
.gallery-nav.next { right: 14px; }
.gallery-dots {
  position: absolute; bottom: 14px; left: 50%; translate: -50% 0;
  display: flex; gap: 8px;
}
.gallery-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.6);
}
.gallery-dots button.is-active { background: #fff; width: 22px; border-radius: 4px; }

.prop-modal-body { padding: 32px 36px 36px; }
.prop-modal-body .badge { margin-bottom: 12px; }
.prop-modal-body h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); color: var(--color-primary); }
.prop-modal-loc { margin-top: 8px; display: flex; align-items: center; gap: 6px; color: var(--color-text-muted); font-size: 0.95rem; }
.prop-modal-loc svg { width: 15px; height: 15px; flex-shrink: 0; }
.prop-modal-price { margin-top: 14px; font-size: 1.6rem; font-weight: 800; color: var(--color-primary); }
.prop-modal-meta { display: flex; gap: 20px; margin-top: 16px; padding: 16px 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.prop-modal-meta span { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--color-text-muted); }
.prop-modal-meta svg { width: 17px; height: 17px; }
.prop-modal-description { margin-top: 20px; color: var(--color-text); line-height: 1.75; }
.prop-modal-features { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; list-style: none; padding: 0; }
.prop-modal-features li { display: flex; align-items: flex-start; gap: 8px; font-size: 0.9rem; color: var(--color-text); }
.prop-modal-features svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--color-success); }
.prop-modal-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- Página de ficha de propiedad ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb [aria-current] { color: var(--color-primary); font-weight: 600; }

.prop-detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }

.prop-detail-gallery-main { position: relative; aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden; background: var(--color-bg-alt); box-shadow: var(--shadow-sm); }
.prop-detail-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.prop-detail-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.prop-detail-thumb { width: 84px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid transparent; padding: 0; flex-shrink: 0; }
.prop-detail-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prop-detail-thumb.is-active { border-color: var(--color-accent); }

.prop-detail-body { margin-top: 28px; }
.prop-detail-body .badge { margin-bottom: 12px; }
.prop-detail-body h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--color-primary); }
.prop-detail-loc { margin-top: 8px; display: flex; align-items: center; gap: 6px; color: var(--color-text-muted); font-size: 0.98rem; }
.prop-detail-loc svg { width: 16px; height: 16px; flex-shrink: 0; }
.prop-detail-price { margin-top: 16px; font-size: 1.8rem; font-weight: 800; color: var(--color-primary); }
.prop-detail-meta { display: flex; gap: 24px; margin-top: 18px; padding: 18px 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.prop-detail-meta span { display: flex; align-items: center; gap: 6px; font-size: 0.95rem; color: var(--color-text-muted); }
.prop-detail-meta svg { width: 18px; height: 18px; }
.prop-detail-description { margin-top: 24px; color: var(--color-text); line-height: 1.8; font-size: 1.02rem; }
.prop-detail-features { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; list-style: none; padding: 0; }
.prop-detail-features li { display: flex; align-items: flex-start; gap: 8px; font-size: 0.95rem; color: var(--color-text); }
.prop-detail-features svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; color: var(--color-success); }

.prop-detail-sidebar {
  position: sticky; top: calc(var(--header-h) + 24px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.prop-detail-sidebar h3 { font-size: 1.05rem; color: var(--color-primary); }
.prop-detail-sidebar p { margin-top: 8px; color: var(--color-text-muted); font-size: 0.9rem; }
.prop-detail-sidebar .btn { width: 100%; justify-content: center; margin-top: 14px; }

.prop-detail-related { margin-top: 64px; }

/* ---------- Calculadora de hipoteca ---------- */
.mortgage-calc {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.mortgage-result {
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.mortgage-result.is-visible { opacity: 1; pointer-events: auto; }
.mortgage-result-main { text-align: center; padding: 24px; background: var(--color-bg-alt); border-radius: var(--radius-md); }
.mortgage-result-main span { display: block; font-size: 0.85rem; color: var(--color-text-muted); }
.mortgage-result-main strong { display: block; margin-top: 6px; font-size: 2.2rem; font-weight: 800; color: var(--color-primary); }
.mortgage-result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; text-align: center; }
.mortgage-result-grid span { display: block; font-size: 0.8rem; color: var(--color-text-muted); }
.mortgage-result-grid strong { display: block; margin-top: 4px; font-size: 1.1rem; color: var(--color-primary); }
.mortgage-disclaimer { margin-top: 20px; font-size: 0.8rem; color: var(--color-text-muted); line-height: 1.6; }
.mortgage-cta { display: flex; gap: 14px; margin-top: 20px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .props-grid, .features-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .prop-detail-grid { grid-template-columns: 1fr; }
  .prop-detail-sidebar { position: static; }
}
@media (max-width: 860px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: block; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-search { grid-template-columns: 1fr 1fr; }
  .hero-search .btn { grid-column: span 2; }
  .cta-banner { padding: 40px 28px; }
}
@media (max-width: 620px) {
  .section { padding: 64px 0; }
  .props-grid, .features-grid, .team-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-search { grid-template-columns: 1fr; }
  .hero-search .btn { grid-column: auto; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 24px; }
  .cta-banner { flex-direction: column; align-items: flex-start; }
  .prop-modal { padding: 0; }
  .prop-modal-panel { max-height: 100vh; height: 100%; border-radius: 0; }
  .prop-modal-body { padding: 24px 20px 28px; }
  .prop-modal-features { grid-template-columns: 1fr; }
  .prop-detail-features { grid-template-columns: 1fr; }
  .prop-detail-thumbs { flex-wrap: wrap; }
  .mortgage-calc { padding: 24px 20px; }
  .mortgage-result-grid { grid-template-columns: 1fr; }
}
