/* ============================================================
   Best Homes Properties — Stylesheet
   Brand colors sampled directly from the company logo:
   cyan #2FB7CF · lime #CFFF30 · coral #FF5757
   ============================================================ */

:root{
  --color-cyan: #2FB7CF;
  --color-cyan-dark: #1D93A8;
  --color-lime: #CFFF30;
  --color-lime-dark: #A8D400;
  --color-coral: #FF5757;

  --color-navy-950: #071624;
  --color-navy-900: #0A1E30;
  --color-navy-800: #0F2C42;
  --color-navy-700: #163C57;

  --color-bg: #FFFFFF;
  --color-bg-muted: #F3F8F9;
  --color-bg-alt: #EEF6F7;
  --color-text: #10202B;
  --color-text-muted: #4B6270;
  --color-border: #DCE8EA;

  --color-on-dark: #F4FBFC;
  --color-on-dark-muted: #AEC7D1;

  --shadow-sm: 0 2px 8px rgba(10, 30, 48, 0.06);
  --shadow-md: 0 8px 24px rgba(10, 30, 48, 0.10);
  --shadow-lg: 0 20px 48px rgba(10, 30, 48, 0.16);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 128px;

  --font-display: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

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

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

html{
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

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

body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg-muted);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,h2,h3,h4{
  font-family: var(--font-display);
  color: var(--color-navy-900);
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  font-weight: 600;
}

p{ margin: 0 0 var(--space-2); }
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }
ul{ margin: 0; padding: 0; list-style: none; }
button{ font-family: inherit; cursor: pointer; }

.container{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

section{ padding: var(--space-7) 0; }
@media (max-width: 768px){
  section{ padding: var(--space-6) 0; }
}

.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-cyan-dark);
}
.eyebrow::before{
  content: "";
  width: 22px;
  height: 2px;
  background: var(--color-coral);
  border-radius: 2px;
}

.section-head{
  max-width: 640px;
  margin: 0 auto var(--space-5);
  text-align: center;
}
.section-head h2{ font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-top: var(--space-1); }
.section-head p{ color: var(--color-text-muted); font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), background 220ms var(--ease), color 220ms var(--ease), border-color 220ms var(--ease);
  min-height: 44px;
  white-space: nowrap;
}
.btn:active{ transform: translateY(1px); }
.btn-lime{
  background: var(--color-lime);
  color: var(--color-navy-950);
  box-shadow: 0 10px 24px rgba(207,255,48,0.28);
}
.btn-lime:hover{ background: var(--color-lime-dark); box-shadow: 0 14px 30px rgba(207,255,48,0.34); transform: translateY(-2px); }

.btn-outline-light{
  border-color: rgba(244,251,252,0.55);
  color: var(--color-on-dark);
}
.btn-outline-light:hover{ background: rgba(244,251,252,0.12); border-color: var(--color-on-dark); transform: translateY(-2px); }

.btn-cyan{
  background: var(--color-cyan);
  color: #fff;
  box-shadow: 0 10px 24px rgba(47,183,207,0.28);
}
.btn-cyan:hover{ background: var(--color-cyan-dark); transform: translateY(-2px); }

.btn-ghost{
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-navy-900);
}
.btn-ghost:hover{ border-color: var(--color-cyan); color: var(--color-cyan-dark); }

.btn-sm{ padding: 10px 18px; font-size: 0.85rem; min-height: 40px; }

.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 3px solid var(--color-cyan);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 260ms var(--ease), padding 260ms var(--ease), box-shadow 260ms var(--ease);
}
.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.site-header.is-scrolled{
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 20px rgba(10,30,48,0.08);
  padding: 12px 0;
}

.brand{ display: flex; align-items: center; }
.brand img{ height: 40px; width: auto; }
.logo-white{ display: none; }
.site-header.is-scrolled .logo-white{ display: none; }
.site-header:not(.is-scrolled) .logo-cyan{ display: none; }
.site-header:not(.is-scrolled) .logo-white{ display: block; }

.main-nav{ display: flex; align-items: center; gap: var(--space-4); }
.main-nav ul{ display: flex; gap: var(--space-3); }
.main-nav a{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-on-dark);
  position: relative;
  padding: 6px 2px;
  transition: color 200ms var(--ease);
}
.site-header.is-scrolled .main-nav a{ color: var(--color-navy-800); }
.main-nav a::after{
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--color-coral);
  transition: right 220ms var(--ease);
  border-radius: 2px;
}
.main-nav a:hover::after{ right: 0; }

.header-actions{ display: flex; align-items: center; gap: var(--space-2); }

.lang-switch{
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.35);
}
.site-header.is-scrolled .lang-switch{
  background: var(--color-bg-muted);
  border-color: var(--color-border);
}
.lang-btn{
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 6px 10px 6px 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--color-on-dark);
  transition: background 200ms var(--ease), color 200ms var(--ease);
  min-height: 36px;
}
.site-header.is-scrolled .lang-btn{ color: var(--color-text-muted); }
.lang-btn svg{ width: 20px; height: 14px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,0.12); flex-shrink: 0; }
.lang-btn[aria-pressed="true"]{ background: rgba(255,255,255,0.92); color: var(--color-navy-900); }
.site-header.is-scrolled .lang-btn[aria-pressed="true"]{ background: #fff; color: var(--color-navy-900); box-shadow: var(--shadow-sm); }

.nav-toggle{
  display: none;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}
.site-header.is-scrolled .nav-toggle{ background: var(--color-bg-muted); border-color: var(--color-border); }
.nav-toggle svg{ width: 22px; height: 22px; stroke: var(--color-on-dark); }
.site-header.is-scrolled .nav-toggle svg{ stroke: var(--color-navy-900); }

@media (max-width: 560px){
  .lang-btn span{
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
  .lang-btn{ padding: 6px; }
  .lang-btn svg{ width: 22px; height: 15px; }
  .header-actions{ gap: 8px; }
  .brand img{ height: 32px; }
}

@media (max-width: 900px){
  .main-nav{
    position: fixed;
    inset: 0 0 0 auto;
    height: 100vh;
    width: min(320px, 84vw);
    background: var(--color-navy-900);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px var(--space-3) var(--space-3);
    transform: translateX(100%);
    transition: transform 320ms var(--ease);
  }
  .main-nav.is-open{ transform: translateX(0); }
  .main-nav ul{ flex-direction: column; gap: var(--space-2); width: 100%; }
  .main-nav a{ color: var(--color-on-dark); font-size: 1.15rem; display: block; }
  .nav-toggle{ display: flex; }
  .nav-backdrop{
    display: none;
    position: fixed; inset: 0; background: rgba(7,22,36,0.55);
    z-index: 90;
  }
  .nav-backdrop.is-open{ display: block; }
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--color-on-dark);
  overflow: hidden;
  background: var(--color-navy-950);
}
/* Desktop/tablet: no section padding on top (.hero-content already clears the header) and a
   bottom strip reserved for the scroll cue, so the longer Spanish text still fits one screen
   and the cue stays fully visible in both languages. Phones keep the default padding. */
@media (min-width: 561px){
  .hero{ padding: 0 0 calc(46px + 2 * var(--space-3)); }
}
.hero-media{ position: absolute; inset: 0; z-index: 0; }
/* The photo is sized to the screen, not to the text: the Spanish headline is one line
   longer, which made the hero taller and "cover" zoomed the photo in more than in English.
   If the text runs past one screen, the photo fades into the dark background below it. */
.hero-media img{
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100vh; object-fit: cover; object-position: center center;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 120px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 120px), transparent);
}
.hero-media::after{
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,22,36,0.75) 0%, rgba(7,22,36,0.55) 42%, rgba(7,22,36,0.82) 92%, var(--color-bg-muted) 100%),
    linear-gradient(90deg, rgba(7,22,36,0.55) 0%, rgba(7,22,36,0.15) 55%);
}
.hero-content{
  position: relative;
  z-index: 1;
  padding-top: 120px;
  max-width: 820px; /* room for "Propiedades que inspiran" on one line */
}
.hero .eyebrow{ color: var(--color-lime); }
.hero .eyebrow::before{ background: var(--color-lime); }
.hero h1{
  color: #fff;
  /* Also scales with screen height, so the (longer) Spanish hero fits short laptop screens;
     full size from about 850px tall. */
  font-size: clamp(2.2rem, min(5.4vw, calc(14vh - 62px)), 3.6rem);
  margin: var(--space-2) 0 var(--space-3);
}
.hero h1 em{
  display: block;
  font-style: normal;
  color: var(--color-lime);
}
.hero-lead{
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--color-on-dark);
  max-width: 520px;
  text-wrap: balance;
  margin-bottom: var(--space-2);
}
/* Values line: kept as a small accent under the lead */
.hero-sub{
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-on-dark-muted);
  margin-bottom: var(--space-4);
}
.hero-sub .dot{ color: var(--color-coral); margin: 0 6px; }
/* Search bar: sends the visitor down to the filtered listings (handled in script.js) */
.hero-search{
  display: flex;
  align-items: center;
  max-width: 640px;
  background: #fff;
  border-radius: 999px;
  padding: 6px;
  margin-bottom: var(--space-5);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
}
.hero-search select{
  flex: 0 0 auto;
  border: none;
  border-right: 1px solid var(--color-border);
  background: transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-navy-900);
  padding: 0 14px 0 18px;
  min-height: 44px;
  cursor: pointer;
  outline: none;
}
.hero-search input{
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--color-text);
  padding: 0 16px;
  min-height: 44px;
}
.hero-search input::placeholder{ color: var(--color-text-muted); }
.hero-search:focus-within{ box-shadow: 0 18px 40px rgba(0,0,0,0.28), 0 0 0 3px rgba(207,255,48,0.45); }
.hero-search-btn{
  flex-shrink: 0;
  width: 48px; height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--color-lime);
  color: var(--color-navy-900);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.hero-search-btn:hover{ background: var(--color-lime-dark); transform: scale(1.05); }
.hero-search-btn svg{ width: 20px; height: 20px; }
@media (max-width: 480px){
  .hero-search select{ padding: 0 8px 0 12px; font-size: 0.85rem; }
  .hero-search input{ padding: 0 10px; font-size: 0.9rem; }
}
.hero-location{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-on-dark-muted);
}
.hero-location svg{ width: 16px; height: 16px; color: var(--color-coral); flex-shrink: 0; }

.scroll-cue{
  position: absolute;
  /* At the bottom of the hero, or of the screen when the hero is taller (short laptop screens). */
  top: min(calc(100% - 46px - var(--space-3)), calc(100vh - 46px - var(--space-3)));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 30px; height: 46px;
  border: 2px solid rgba(244,251,252,0.5);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-cue span{
  width: 4px; height: 8px;
  background: var(--color-lime);
  border-radius: 999px;
  animation: scrollcue 1.8s infinite ease;
}
@keyframes scrollcue{
  0%{ opacity: 1; transform: translateY(0); }
  70%{ opacity: 0; transform: translateY(14px); }
  100%{ opacity: 0; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce){
  .scroll-cue span{ animation: none; }
}
@media (max-width: 560px){ .scroll-cue{ display: none; } }

/* ---------- Value strip ---------- */
.values{
  background: var(--color-navy-900);
  color: var(--color-on-dark);
}
.values-intro{
  max-width: 760px;
  margin: 0 auto var(--space-6);
  text-align: center;
}
.values-intro p{
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  color: #fff;
  font-weight: 500;
}
.values-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
@media (max-width: 800px){ .values-grid{ grid-template-columns: 1fr; } }
.value-card{
  background: rgba(244,251,252,0.06);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  border: 1px solid rgba(244,251,252,0.14);
  transition: transform 260ms var(--ease), background 260ms var(--ease), border-color 260ms var(--ease);
}
.value-card:hover{ transform: translateY(-6px); background: rgba(244,251,252,0.1); border-color: rgba(244,251,252,0.24); }
.value-icon{
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-2);
}
.value-icon svg{ width: 26px; height: 26px; }
.value-card:nth-child(1) .value-icon{ background: rgba(47,183,207,0.18); }
.value-card:nth-child(1) .value-icon svg{ color: var(--color-cyan); }
.value-card:nth-child(2) .value-icon{ background: rgba(255,87,87,0.18); }
.value-card:nth-child(2) .value-icon svg{ color: var(--color-coral); }
.value-card:nth-child(3) .value-icon{ background: rgba(207,255,48,0.22); }
.value-card:nth-child(3) .value-icon svg{ color: var(--color-lime); }
.value-card h3{ font-size: 1.15rem; margin-bottom: 6px; color: #fff; }
.value-card p{ color: var(--color-on-dark-muted); margin: 0; font-size: 0.96rem; }

/* ---------- Services ---------- */
.services-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
@media (max-width: 760px){ .services-grid{ grid-template-columns: 1fr; } }

.service-card{
  position: relative;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, #fff 0%, var(--color-bg-alt) 100%);
  box-shadow: var(--shadow-sm);
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease), border-color 260ms var(--ease);
}
.service-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(47,183,207,0.35); }
.service-top{ display: flex; align-items: flex-start; gap: var(--space-2); margin-bottom: var(--space-2); }
.service-icon{
  flex-shrink: 0;
  width: 54px; height: 54px;
  border-radius: 16px;
  background: var(--color-navy-900);
  display: flex; align-items: center; justify-content: center;
}
.service-icon svg{ width: 26px; height: 26px; color: var(--color-lime); }
.service-card h3{ font-size: 1.25rem; margin-bottom: 2px; }
.service-tagline{
  font-style: italic;
  color: var(--color-cyan-dark);
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.service-list li{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  color: var(--color-text);
  font-size: 0.96rem;
}
.service-list svg{ width: 18px; height: 18px; color: var(--color-lime-dark); flex-shrink: 0; margin-top: 2px; }
/* 5th service (Rollers y Toldos): spans both columns so the 2-column grid has no orphan card;
   its list runs in a row on wide screens. Coral "Nuevo" tag in the corner. */
.service-card-wide{ grid-column: 1 / -1; }
@media (min-width: 761px){
  .service-card-wide .service-list{ display: flex; flex-wrap: wrap; column-gap: var(--space-4); }
}
.service-new{
  position: absolute; top: var(--space-3); right: var(--space-3);
  background: var(--color-coral); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
/* Phones: the corner tag would cover the title, so it sits above it instead. */
@media (max-width: 760px){ .service-new{ position: static; display: inline-block; margin-bottom: var(--space-2); } }

/* ---------- Listings (dynamic) ---------- */
.listings-search{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 760px;
  margin: var(--space-4) auto 0;
}
.listings-search[hidden]{ display: none; }
.listings-search-input{
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0 18px;
  min-height: 48px;
}
.listings-search-input:focus-within{ border-color: var(--color-cyan); box-shadow: 0 0 0 3px rgba(47,183,207,0.16); }
.listings-search-input svg{ width: 18px; height: 18px; color: var(--color-text-muted); flex-shrink: 0; }
.listings-search-input input{
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--color-text);
  min-width: 0;
}
.listings-search-input input::placeholder{ color: var(--color-text-muted); }
.listings-search-input input::-webkit-search-cancel-button{ cursor: pointer; }
.listings-search select{
  flex: 1 1 160px;
  min-height: 48px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #fff;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--color-text);
  cursor: pointer;
}
.listings-search select:focus-visible{ border-color: var(--color-cyan); box-shadow: 0 0 0 3px rgba(47,183,207,0.16); }

.listings-status{
  max-width: 560px;
  margin: 0 auto var(--space-4);
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.listings-status-error{ color: var(--color-coral); border-color: rgba(255,87,87,0.35); }

/* Side-scrolling carousel: 3 cards on desktop, 2 on tablet, 1 + a peek of the next on phones. */
.listings-carousel{ position: relative; }
.listings-grid{
  --listings-gap: var(--space-3);
  display: flex;
  gap: var(--listings-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  /* Room for the card hover lift and shadow, which overflow would otherwise clip. */
  padding: 10px 6px 20px;
  margin: -10px -6px -20px;
  scroll-padding-inline: 6px; /* snap cards to the padding edge, not past it */
}
.listings-grid::-webkit-scrollbar{ display: none; }
.listings-grid > .listing-card{
  flex: 0 0 calc((100% - 2 * var(--listings-gap)) / 3);
  scroll-snap-align: start;
}
@media (max-width: 980px){
  .listings-grid > .listing-card{ flex-basis: calc((100% - var(--listings-gap)) / 2); }
}
@media (max-width: 640px){
  /* Runs to the screen edges (past the container padding) so the next card peeks in from the edge. */
  .listings-grid{
    --listings-gap: var(--space-2);
    padding-inline: var(--space-3);
    margin-inline: calc(-1 * var(--space-3));
    scroll-padding-inline: var(--space-3);
  }
  .listings-grid > .listing-card{ flex-basis: 85%; }
}
.listings-arrow{
  position: absolute;
  top: calc(50% - 22px);
  z-index: 2;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-navy-800);
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.listings-arrow svg{ width: 20px; height: 20px; }
.listings-arrow:hover{ transform: scale(1.06); }
.listings-arrow:focus-visible{ outline: 3px solid rgba(47,183,207,0.4); outline-offset: 2px; }
.listings-arrow[hidden]{ display: none; }
.listings-arrow-prev{ left: -22px; }
.listings-arrow-next{ right: -22px; }
.listings-arrow:disabled{ opacity: 0; pointer-events: none; }
/* Narrower screens have no room beside the cards: the arrows sit just inside them. */
@media (max-width: 1240px){
  .listings-arrow-prev{ left: 8px; }
  .listings-arrow-next{ right: 8px; }
}
/* Phones swipe; the peeking next card shows there is more. */
@media (max-width: 640px){ .listings-arrow{ display: none; } }

/* Less empty space between the listings and "Encuéntranos también en" (half the default). */
.listings{ padding-bottom: var(--space-5); }
.portals{ padding-top: var(--space-5); }
@media (max-width: 768px){
  .listings{ padding-bottom: var(--space-4); }
  .portals{ padding-top: var(--space-4); }
}

.listing-card{
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease);
  display: flex;
  flex-direction: column;
}
.listing-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-md); }
.listing-card-media{
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-bg-muted);
  cursor: pointer;
}
/* Absolute so a portrait cover is cropped to 4:3 instead of stretching the card. */
.listing-card-media img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.listing-card-noimg{ width: 100%; height: 100%; background: linear-gradient(135deg, var(--color-bg-muted), var(--color-border)); }

.badge{
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
}
.badge-venta{ background: var(--color-cyan); }

/* Highlight tag ("¡Oportunidad!"): lime on navy so it pops against both photos and white. */
.badge-highlight{
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.82rem;
  padding: 7px 14px; border-radius: 999px;
  background: var(--color-lime, #CFFF30); color: var(--color-navy-900, #0A1E30);
  box-shadow: 0 6px 18px rgba(10,30,48,0.28);
}
.badge-highlight::before{ content: "★"; font-size: 0.9em; }
.badge-highlight[hidden]{ display: none; }
.listing-card-media .badge-highlight{ position: absolute; top: 12px; right: 12px; max-width: calc(100% - 120px); }
.badge-row{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: var(--space-2); }
.badge-row .badge{ position: static; display: inline-flex; margin-bottom: 0; }
.badge-arriendo{ background: var(--color-coral); }

.listing-card-body{ padding: var(--space-3); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.listing-card-type{ font-size: 0.8rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; margin: 0; }
.listing-card-body h3{ font-size: 1.1rem; margin: 2px 0 6px; }
/* Card and popup titles link to the listing page: same look as the heading, cyan + underline on hover. */
.listing-title-link{ color: inherit; text-decoration: none; transition: color 0.2s var(--ease); }
.listing-title-link:hover{ color: var(--color-cyan-dark); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.listing-card-specs{ display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; font-family: var(--font-display); font-weight: 600; color: var(--color-navy-800); font-size: 0.92rem; }
.listing-card-specs small{ font-weight: 500; color: var(--color-text-muted); font-size: 0.72rem; text-transform: uppercase; }
/* Price: label + amount, shared by cards, popup and listing page (priceHtml() / $priceHtml).
   Navy amount for contrast, smaller cyan currency so the number reads first. */
.price-block{ display: flex; flex-direction: column; gap: 2px; margin: 0; }
.price-label{ font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }
.price-amount{ font-family: var(--font-display); font-weight: 700; color: var(--color-navy-900); line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.price-cur{ font-size: 0.62em; font-weight: 600; color: var(--color-cyan-dark); margin-right: 0.05em; letter-spacing: 0.02em; }
.price-amount.is-request{ font-size: 0.75em; color: var(--color-navy-800); }

.listing-card-price{ font-size: 1.6rem; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--color-border); }
.listing-card-cta{ margin-top: auto; align-self: flex-start; }

/* ---------- Listing modal ---------- */
.listing-modal{
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-3);
}
.listing-modal[hidden]{ display: none; }
.listing-modal-backdrop{
  position: absolute; inset: 0;
  background: rgba(7,22,36,0.72);
  backdrop-filter: blur(4px);
}
.listing-modal-panel{
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 920px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  display: grid;
  /* minmax(0, …): a long thumbnail row must never widen the photo column */
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  box-shadow: var(--shadow-lg);
}
@media (max-width: 760px){ .listing-modal-panel{ grid-template-columns: minmax(0, 1fr); } }
/* Keep the photos in view while the description scrolls (desktop two-column layout). */
@media (min-width: 761px){ .listing-modal-gallery{ position: sticky; top: 0; align-self: start; } }

.listing-modal-close{
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(7,22,36,0.55);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
}
.listing-modal-close svg{ width: 20px; height: 20px; }

.listing-modal-gallery{ background: linear-gradient(135deg, var(--color-bg-muted), var(--color-border)); display: flex; flex-direction: column; min-height: 220px; min-width: 0; }
.listing-modal-gallery img{ width: 100%; aspect-ratio: 4/3.2; object-fit: cover; }
.listing-modal-video{ width: 100%; aspect-ratio: 4/3.2; background: #000; }
.listing-modal-video[hidden]{ display: none; }
.listing-modal-video iframe{ width: 100%; height: 100%; border: 0; }
.listing-modal-thumbs{ display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.listing-modal-thumb{ position: relative; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; background: none; flex-shrink: 0; }
.listing-modal-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.listing-modal-thumb.is-active{ border-color: var(--color-cyan); }
.listing-modal-thumb-video{ background: #000; }
.listing-modal-thumb-video img{ opacity: 0.75; }

.listing-modal-body{ padding: var(--space-4); }
.listing-modal-body .badge{ position: static; display: inline-flex; margin-bottom: var(--space-2); }
.listing-modal-body h3{ font-size: 1.4rem; margin-bottom: 4px; }
.listing-modal-location{ color: var(--color-text-muted); margin-bottom: var(--space-2); }
.listing-modal-specs{ display: flex; gap: 16px; flex-wrap: wrap; font-weight: 600; color: var(--color-navy-800); margin-bottom: var(--space-2); font-size: 0.95rem; }
.listing-modal-price{ font-size: 1.9rem; margin-bottom: var(--space-2); }
.listing-modal-desc{ color: var(--color-text); white-space: pre-line; margin-bottom: var(--space-3); }
.listing-modal-actions{ display: flex; gap: 10px; flex-wrap: wrap; }
.listing-modal-actions .btn{ flex: 1 1 auto; }

/* ---------- About / Team ---------- */
.about-intro{
  max-width: 780px;
  margin: 0 auto var(--space-6);
  text-align: center;
}
.about-intro p{ color: var(--color-text-muted); font-size: 1.08rem; }

/* Marissa and Micaela presented as one team: both in a single card, side by side
   (stacked on phones) with a thin divider; no buttons here (contact section has them). */
.team-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  max-width: 860px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4) var(--space-3);
}
.team-grid > .team-card + .team-card{ border-left: 1px solid var(--color-border); }
@media (max-width: 640px){
  .team-grid{ grid-template-columns: 1fr; padding: var(--space-3) var(--space-2); }
  .team-grid > .team-card + .team-card{ border-left: none; border-top: 1px solid var(--color-border); }
}
/* ---------- Nosotras: image hero + story card + team ---------- */
#nosotras{ padding-top: 0; }
.about-hero{
  position: relative;
  min-height: clamp(480px, 80vh, 760px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-navy-950);
  color: #fff;
}
.about-hero-img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
/* Dark navy veil, strongest at the bottom where the text sits (keeps white text above 4.5:1). */
.about-hero::after{
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,22,36,0.15) 0%, rgba(7,22,36,0.45) 45%, rgba(7,22,36,0.92) 100%),
    linear-gradient(90deg, rgba(7,22,36,0.55) 0%, rgba(7,22,36,0) 60%);
}
.about-hero-content{
  position: relative; z-index: 1;
  padding-top: 140px;
  padding-bottom: calc(var(--space-8) + var(--space-3)); /* room for the story card that overlaps */
}
.about-hero .eyebrow{ color: var(--color-lime); }
.about-hero .eyebrow::before{ background: var(--color-lime); }
.about-hero h2{
  color: #fff;
  font-size: clamp(2.6rem, 6.5vw, 4.8rem);
  line-height: 1.05;
  margin: var(--space-2) 0 var(--space-2);
  text-shadow: 0 2px 24px rgba(7,22,36,0.35);
}
.about-hero-lead{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  color: var(--color-lime);
  max-width: 640px;
  margin-bottom: var(--space-4);
}
.about-milestones{
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5);
}
.about-milestones li{ display: flex; flex-direction: column; padding-left: var(--space-2); border-left: 3px solid var(--color-lime); }
.about-milestones strong{ font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; color: #fff; }
.about-milestones span{ font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(244,251,252,0.85); }

/* The story card overlaps the bottom of the image. */
.story{
  position: relative; z-index: 2;
  max-width: 1040px;
  margin: calc(-1 * var(--space-8)) auto 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-5);
}
.story-timeline{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.story-step{ position: relative; padding-top: var(--space-1); }
.story-year{
  display: inline-block;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1;
  color: var(--color-cyan);
  margin-bottom: var(--space-1);
}
.story p{ color: var(--color-text-muted); font-size: 1.02rem; line-height: 1.75; margin-bottom: 0; }
.story-values{
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}
.story-close{
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 4px solid var(--color-lime);
  background: var(--color-bg-muted);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}
.story p.story-close{ color: var(--color-navy-800); }

.about-team-head{ margin-top: var(--space-7); }
.about-team-head p{ margin-top: var(--space-2); }

@media (max-width: 760px){
  .about-hero{ min-height: 560px; }
  .about-hero-img{ object-position: 55% center; }
  .about-hero-content{ padding-top: 110px; padding-bottom: calc(var(--space-7) + var(--space-3)); }
  /* Three milestones in one even row on phones. */
  .about-milestones{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
  .about-milestones li{ padding-left: 10px; }
  .about-milestones strong{ font-size: 1.45rem; }
  .about-milestones span{ font-size: 0.66rem; letter-spacing: 0.04em; line-height: 1.3; }
  .story{ margin-top: calc(-1 * var(--space-7)); padding: var(--space-4) var(--space-3); }
  .story-timeline, .story-values{ grid-template-columns: 1fr; gap: var(--space-3); }
  .about-team-head{ margin-top: var(--space-6); }
}

.team-card{
  text-align: center;
  padding: var(--space-3) var(--space-3) var(--space-2);
}
.team-photo{
  width: 190px; height: 190px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--space-2);
  border: 5px solid #fff;
  box-shadow: 0 0 0 3px var(--color-cyan), 0 18px 40px rgba(10,30,48,0.18);
}
.team-photo img{ width: 100%; height: 100%; object-fit: cover; }
.team-card h3{ margin-bottom: 4px; font-size: 1.4rem; }
.team-role{
  color: var(--color-coral);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0;
}


/* ---------- Portals ---------- */
.portals{
  background: var(--color-bg-muted);
  text-align: center;
}
.portals p.eyebrow{ display: inline-flex; margin-bottom: var(--space-3); justify-content: center; }
.portals-row{
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.portal-badge{
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}
.portal-badge:hover{ transform: translateY(-4px); box-shadow: var(--shadow-md); }
.portal-badge img{ height: 34px; width: auto; }


/* ---------- Contact ---------- */
.contact{
  background: var(--color-navy-900);
  color: var(--color-on-dark);
}
.contact .eyebrow{ color: var(--color-lime); }
.contact .eyebrow::before{ background: var(--color-lime); }
.contact .section-head h2{ color: #fff; }
.contact .section-head p{ color: var(--color-on-dark-muted); }

.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.contact-grid > *{ min-width: 0; }
@media (max-width: 860px){ .contact-grid{ grid-template-columns: 1fr; } }

.contact-card{
  background: rgba(244,251,252,0.06);
  border: 1px solid rgba(244,251,252,0.14);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.contact-row{
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(244,251,252,0.12);
}
.contact-row:last-child{ border-bottom: none; }
.contact-row svg{ width: 22px; height: 22px; color: var(--color-lime); flex-shrink: 0; margin-top: 2px; }
.contact-row h4{ color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; font-family: var(--font-display); }
.contact-row p, .contact-row a{ color: var(--color-on-dark-muted); font-size: 0.98rem; overflow-wrap: break-word; word-break: break-word; }
.contact-row > div{ min-width: 0; }
.contact-row a:hover{ color: var(--color-lime); }

/* Google reviews card: closes the Instagram section */
.reviews-card{
  margin-top: var(--space-5);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-4);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-5);
  border: 1px solid rgba(10,30,48,0.08);
  box-shadow: 0 18px 40px rgba(10,30,48,0.10);
}
.reviews-logo{ display: block; }
.reviews-logo img{ display: block; width: 210px; height: auto; }
.reviews-text h3{ font-family: var(--font-display); color: var(--color-navy-900); font-size: 1.3rem; margin-bottom: 6px; }
.reviews-text p{ color: #4a5a66; font-size: 0.98rem; max-width: 520px; }
.reviews-btn{ white-space: nowrap; }
@media (max-width: 860px){
  .reviews-card{ grid-template-columns: 1fr; text-align: center; justify-items: center; gap: var(--space-2); padding: var(--space-4) var(--space-3); }
  .reviews-logo img{ width: 190px; }
  .reviews-text p{ margin: 0 auto; }
}

.contact-people{ display: flex; flex-direction: column; gap: var(--space-2); }
.contact-person{
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(244,251,252,0.06);
  border: 1px solid rgba(244,251,252,0.14);
  border-radius: var(--radius-md);
  padding: var(--space-2);
}
.contact-person img{ width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.contact-person .cp-name{ font-family: var(--font-display); font-weight: 600; color: #fff; font-size: 0.98rem; }
.contact-person .cp-role{ color: var(--color-on-dark-muted); font-size: 0.82rem; margin-bottom: 6px; }
.contact-person .btn{ margin-left: auto; flex-shrink: 0; }
@media (max-width: 480px){
  .contact-person{ flex-wrap: wrap; }
  .contact-person .btn{ margin-left: 0; width: 100%; }
}
/* Two columns: the team cards share the full height of the details + map column,
   as large centered cards, so both sides carry the same visual weight. */
@media (min-width: 861px){
  .contact-people{ height: 100%; }
  .contact-person{
    flex: 1;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-3);
    border-radius: var(--radius-lg);
  }
  .contact-person img{
    width: 132px; height: 132px;
    box-shadow: 0 0 0 4px rgba(207,255,48,0.22), var(--shadow-md);
  }
  .contact-person .cp-name{ font-size: 1.35rem; }
  .contact-person .cp-role{ font-size: 0.95rem; margin-bottom: 0; }
  .contact-person .btn{ margin-left: 0; padding: 14px 34px; font-size: 1rem; }
}

.map-frame{
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(244,251,252,0.14);
  height: 260px;
}
.map-frame iframe{ width: 100%; height: 100%; border: 0; filter: grayscale(0.2) contrast(1.05); }

/* ---------- Instagram ---------- */
/* White: it follows the light-gray portals band, then the navy values band. */
.instagram{ background: var(--color-bg); }
.ig-grid{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.ig-grid[hidden]{ display: none; }
@media (max-width: 900px){ .ig-grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px){ .ig-grid{ gap: 6px; } }
.ig-post{
  position: relative;
  display: block;
  aspect-ratio: 4 / 5; /* Instagram's own grid shape; most posts are 4:5 */
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-border);
  box-shadow: var(--shadow-sm);
}
.ig-post img{ width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.ig-post::after{
  content: "";
  position: absolute; inset: 0;
  background: rgba(10,30,48,0);
  transition: background 300ms var(--ease);
}
.ig-post:hover img{ transform: scale(1.05); }
.ig-post:hover::after{ background: rgba(10,30,48,0.18); }
.ig-post:focus-visible{ outline: 3px solid var(--color-cyan); outline-offset: 3px; }
.ig-post-badge{
  position: absolute; top: 8px; right: 8px; z-index: 1;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(10,30,48,0.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ig-post-badge svg{ width: 14px; height: 14px; }
.ig-cta{ text-align: center; }
.ig-follow{ gap: 8px; }
.ig-follow svg{ width: 20px; height: 20px; }

/* ---------- Footer ---------- */
.site-footer{
  background: var(--color-navy-950);
  color: var(--color-on-dark-muted);
  padding: var(--space-6) 0 var(--space-3);
}
.footer-top{
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgba(244,251,252,0.12);
}
.footer-top > *{ min-width: 0; }
@media (max-width: 760px){ .footer-top{ grid-template-columns: 1fr; gap: var(--space-4); } }
.footer-brand img{ height: 38px; margin-bottom: var(--space-2); }
.footer-brand p{ font-size: 0.92rem; max-width: 320px; }
.footer-col h4{
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.footer-col ul{ display: flex; flex-direction: column; gap: 10px; }
.footer-col a{ font-size: 0.94rem; transition: color 200ms var(--ease); overflow-wrap: break-word; word-break: break-word; }
.footer-col a:hover{ color: var(--color-lime); }
/* Contact list with an icon before each item (email, phones, Instagram, address). */
.footer-contact a, .footer-contact-item{ display: inline-flex; align-items: flex-start; gap: 10px; }
.footer-contact svg, .footer-ig svg{ width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--color-lime); }
.footer-contact span{ min-width: 0; }
.footer-contact-item{ font-size: 0.94rem; }
.footer-ig{ display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.footer-ig svg{ margin-top: 0; }
.footer-bottom{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-3);
  font-size: 0.85rem;
}
.footer-tag{ color: var(--color-cyan); font-family: var(--font-display); font-weight: 500; }

/* ---------- Reveal-on-scroll ---------- */
[data-reveal]{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
[data-reveal].is-visible{ opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){
  [data-reveal]{ opacity: 1; transform: none; transition: none; }
}

/* ---------- Property detail page (propiedad.php) ---------- */
.pd-notfound{
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding-top: 140px;
  text-align: center;
}
.pd-notfound .container{ max-width: 560px; }
.pd-notfound h1{ font-size: 1.8rem; margin: var(--space-2) 0; }
.pd-notfound p{ color: var(--color-text-muted); margin-bottom: var(--space-3); }

.pd-page{ padding-top: 120px; padding-bottom: var(--space-7); }
.pd-back{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--color-cyan-dark);
  margin-bottom: var(--space-3);
}
.pd-back svg{ width: 18px; height: 18px; }
.pd-back:hover{ color: var(--color-navy-900); }

.pd-gallery-main{
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/8;
  background: var(--color-bg-muted);
  box-shadow: var(--shadow-md);
}
.pd-gallery-main img{ width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px){ .pd-gallery-main{ aspect-ratio: 4/3; } }

.pd-main-video{ position: absolute; inset: 0; background: #000; }
.pd-main-video[hidden]{ display: none; }
.pd-main-video iframe{ width: 100%; height: 100%; border: 0; }

/* Desktop: thumbnails in a scrolling column as tall as the main photo.
   contain: size stops the column from growing the row, so the photo sets the height. */
.pd-gallery.has-thumbs{ display: grid; grid-template-columns: 1fr 128px; gap: 12px; }
.pd-gallery-thumbs{
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto; contain: size; padding-right: 4px;
  scrollbar-width: thin;
}
.pd-thumb{ position: relative; width: 100%; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; border: 3px solid transparent; padding: 0; background: none; flex-shrink: 0; cursor: pointer; }
/* Phone/tablet: one row under the photo, swipe sideways. */
@media (max-width: 760px){
  .pd-gallery.has-thumbs{ grid-template-columns: 1fr; gap: 10px; }
  .pd-gallery-thumbs{ flex-direction: row; overflow-x: auto; overflow-y: hidden; contain: none; padding: 0 0 4px; scroll-snap-type: x proximity; }
  .pd-thumb{ width: 84px; scroll-snap-align: start; }
}

/* Arrows + counter on the main photo */
.pd-nav{
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,0.88); color: var(--color-navy-900);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); cursor: pointer;
}
.pd-nav svg{ width: 22px; height: 22px; }
.pd-nav-prev{ left: 14px; }
.pd-nav-next{ right: 14px; }
.pd-nav:hover{ background: #fff; }
.pd-counter{
  position: absolute; right: 14px; bottom: 14px; z-index: 2;
  background: rgba(10,30,48,0.72); color: #fff;
  font-size: 0.82rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
@media (max-width: 640px){ .pd-nav{ width: 36px; height: 36px; } .pd-nav-prev{ left: 8px; } .pd-nav-next{ right: 8px; } }
.pd-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.pd-thumb.is-active{ border-color: var(--color-cyan); }
.pd-thumb-video{ background: #000; }
.pd-thumb-video img{ opacity: 0.75; }
.pd-thumb-play{
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 24px; height: 24px;
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
  pointer-events: none;
}

.pd-layout{
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-5);
  align-items: start;
}
@media (max-width: 860px){ .pd-layout{ grid-template-columns: 1fr; } }

.pd-main .badge{ position: static; display: inline-flex; margin-bottom: var(--space-2); }
.pd-main h1{ font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-bottom: 6px; }
.pd-location{
  display: flex; align-items: center; gap: 8px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.pd-location svg{ width: 18px; height: 18px; color: var(--color-coral); flex-shrink: 0; }

.pd-specs{
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: var(--space-4);
}
.pd-specs span{
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: var(--color-navy-800);
}
.pd-specs small{ color: var(--color-text-muted); font-weight: 500; margin-left: 4px; }

.pd-description{ color: var(--color-text); line-height: 1.75; white-space: pre-line; }

.pd-section-title{ font-size: 1.25rem; margin: var(--space-5) 0 var(--space-2); }
.pd-specs + .pd-section-title{ margin-top: 0; }

/* Características: label / value table, two columns on wide screens */
.pd-features{
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-4);
  margin: 0;
}
.pd-features > div{
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--color-border);
}
.pd-features dt{ color: var(--color-text-muted); }
.pd-features dd{ margin: 0; font-weight: 600; color: var(--color-navy-800); text-align: right; }
@media (max-width: 560px){ .pd-features{ grid-template-columns: 1fr; } }

/* Comodidades: checkmark lists per group */
.pd-amenities{ display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-4); }
.pd-amenity-group h3{ font-size: 0.95rem; color: var(--color-navy-800); margin-bottom: 8px; }
.pd-amenity-group ul{ list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pd-amenity-group li{ position: relative; padding-left: 26px; color: var(--color-text); }
.pd-amenity-group li::before{
  content: ""; position: absolute; left: 0; top: 0.3em;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--color-cyan) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 10px no-repeat;
}
@media (max-width: 560px){ .pd-amenities{ grid-template-columns: 1fr; } }

.pd-map{ border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); aspect-ratio: 16/9; }
.pd-map iframe{ width: 100%; height: 100%; border: 0; display: block; }

/* Compact versions inside the homepage modal (one column, smaller text) */
.listing-modal-subtitle{ font-size: 1rem; margin: var(--space-3) 0 6px; }
.pd-features-compact{ grid-template-columns: 1fr; font-size: 0.92rem; margin-bottom: var(--space-2); }
.pd-features-compact > div{ padding: 7px 0; }
.pd-amenities-compact{ grid-template-columns: 1fr; gap: var(--space-2); font-size: 0.92rem; margin-bottom: var(--space-3); }

.pd-sidebar{
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 100px;
}
.pd-price{ font-size: 2rem; margin: 0 0 6px; }
/* Price right under the title on phones/tablets, where the sidebar drops to the bottom. */
.pd-price-top{
  display: inline-flex; font-size: clamp(2rem, 4vw, 2.6rem);
  padding: 12px 20px; margin: 0 0 var(--space-3);
  background: var(--color-bg-muted); border: 1px solid var(--color-border); border-left: 5px solid var(--color-cyan);
  border-radius: var(--radius-sm);
}
/* Desktop: the sticky sidebar already shows the price beside the title. */
@media (min-width: 861px){ .pd-price-top{ display: none; } }
.pd-sidebar .btn{ width: 100%; }

/* ---------- WhatsApp floating button ---------- */
.wa-float{
  position: fixed;
  right: var(--space-3);
  bottom: var(--space-3);
  z-index: 80;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(37,211,102,0.45);
  transition: transform 220ms var(--ease);
}
.wa-float:hover{ transform: translateY(-4px) scale(1.05); }
.wa-float svg{ width: 28px; height: 28px; color: #fff; }

.visually-hidden{
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* New service "Rollers y toldos": full-bleed banner between the portals band and Instagram, like the hero.
   The image is never cropped (its text and icons reach the edges): it spans the full width and is capped
   at one screen tall; any leftover space at the sides shows a blurred copy of itself, so it always looks full. */
.ns-section{ padding: 0; background: var(--color-navy-900); color: var(--color-on-dark); }
.ns-hero{ position: relative; overflow: hidden; background: var(--color-navy-950); }
.ns-hero-bg{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(30px) brightness(0.55); transform: scale(1.2); }
.ns-hero-img{ position: relative; display: block; width: 100%; height: auto; max-height: 100vh; object-fit: contain; }
.ns-strip{ display: flex; align-items: center; justify-content: center; gap: var(--space-2) var(--space-4); flex-wrap: wrap; padding-top: var(--space-4); padding-bottom: var(--space-4); text-align: center; }
.ns-strip p{ margin: 0; color: var(--color-on-dark-muted); font-size: 1.05rem; max-width: 560px; }
