:root{
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  --text: #ffffff;
  --text-dim: rgba(255,255,255,0.85);
  --accent: #bda98a; /* subtle gold for the button */
  --accent-hover: #a8926f;
  --overlay: rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: #000;
}

/* Header */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  background: transparent;
  padding: 14px 20px;
}
.nav-inner{
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}
.brand { display: inline-flex; align-items: center; }
.logo{ height: 44px; width: auto; display: block; }

/* Desktop nav */
.primary-nav{
  margin-left: auto;
  display: none; /* hidden by default, enabled at 992px+ */
  gap: 24px;
  align-items: center;
}
.primary-nav a{
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.primary-nav a:hover{ color: #fff; }
.primary-nav .phone{ letter-spacing: 0.06em; }

.primary-nav a {
  position: relative;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.12em;
  font-weight: 600;
  padding-bottom: 4px; /* space for the underline */
  transition: color 0.2s ease;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: #fff;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.primary-nav a:hover {
  color: #fff;
}

.primary-nav a:hover::after {
  transform: scaleX(1);
}


/* Mobile menu button (decorative placeholder) */
.menu-btn{
  margin-left: auto;
  width: 38px; height: 30px;
  background: transparent; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; flex-direction: column; justify-content: space-between;
}
.menu-btn span{
  display: block; height: 3px; background: #fff; border-radius: 2px;
}

/* Hero */
.hero{
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  background-image: url("main-assets/responsivebackground.png"); /* mobile default */
  background-size: cover;
  background-position: center;
}
.overlay{
  position: absolute;
  inset: 0;
  background: var(--overlay);
}
.hero-content{
  position: relative;
  z-index: 1;
  padding: 100px 16px 40px;
  width: 100%;
  max-width: 1100px;
}

/* Title styling similar to screenshots */
.hero-title{
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.23;
  margin: 0 0 10px;
  font-size: 42px;
}
.hero-title .amp{
  display: block;
  font-size: 48px;
  margin: 6px 0;
}
@media (min-width: 560px){
  .hero-title{ font-size: 54px; }
  .hero-title .amp{ font-size: 60px; }
}
@media (min-width: 992px){
  .hero-title{ font-size: 64px; }
  .hero-title .amp{ font-size: 72px; }
}

/* Subhead */
.subhead{
  margin: 18px auto 28px;
  letter-spacing: 0.28em;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-dim);
}

/* Search */
.search{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}
.search-box{
  display: flex;
  align-items: center;
  width: 100%;
  background: rgba(255,255,255,0.95);
  color: #111;
  border-radius: 4px;
  padding: 10px 14px;
}
.search-box .icon{
  width: 22px; height: 22px; fill: #666; flex: 0 0 auto; margin-right: 10px;
}
.search-box input{
  border: 0;
  outline: none;
  font-size: 16px;
  width: 100%;
  padding: 10px 6px;
  background: transparent;
  color: #111;
}
.search-btn{
  appearance: none;
  /* border: 2px solid var(--accent); */
  border: 2px solid #FF5B00;
  /* border: 2px solid #FF03FF; */
  /* background: transparent; */
  background: #FF5B00;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.28em;
  font-size: 13px;
  padding: 14px 26px;
  border-radius: 3px;
  cursor: pointer;
  transition: all .2s ease;
}
.search-btn:hover{
  background: var(--accent);
  border-color: var(--accent-hover);
}

/* Footer spacer (optional) */
/* .site-footer{ height: 40px; } */

/* Larger screens: show desktop nav, adjust backgrounds/spacing */
@media (min-width: 992px){
  .primary-nav{ display: flex; }
  .menu-btn{ display: none; }
  .site-header{ padding: 18px 28px; }
  .hero{
    background-image: url("main-assets/desktopbackground.jpg");
  }
  .hero-content{
    padding-top: 160px;
  }
  .search{
    flex-direction: row;
    gap: 10px;
  }
  .search-btn{ min-width: 180px; }
}

/* Prevent background scroll when menu open */
body.no-scroll { overflow: hidden; }

/* Mobile nav panel (hidden by default) */

.mobile-nav{
  position: fixed;
  top: 68px;             /* sits just below the header */
  left: 0;
  right: 0;
  background: #002349;   /* was rgba(0,0,0,0.92) */
  display: grid;
  gap: 18px;
  padding: 22px 20px 28px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
  z-index: 19;
}
.mobile-nav a{
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.14em;
  font-weight: 600;
  font-size: 14px;
}
.mobile-nav a.phone{ letter-spacing: 0.06em; }
.mobile-nav.open{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Desktop: hide mobile panel, show full nav (already present) */
@media (min-width: 992px){
  .mobile-nav{ display: none; }
}

/* ---------- Neighborhoods Section ---------- */
.neighborhoods{
  background: #fff;
  color: #111;
  padding: 64px 20px 84px;
}
.neighborhoods .section-inner{
  max-width: 1200px;
  margin: 0 auto;
}
.neighborhoods .section-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.neighborhoods h2{
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 42px;
  line-height: 1.15;
}
@media (min-width: 992px){
  .neighborhoods h2{ font-size: 48px; }
}

.neighborhoods .controls{
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.neighborhoods .control{
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: #111;
  padding: 6px 4px;
}
.neighborhoods .control:hover{ opacity: 0.75; }
.neighborhoods .divider{ color: #9a9a9a; }

/* Cards grid */
.neighborhoods .cards{
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}
@media (min-width: 640px){
  .neighborhoods .cards{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px){
  .neighborhoods .cards{ grid-template-columns: repeat(4, 1fr); }
}

/* Card */
.neighborhoods .card{
  position: relative;
}
.neighborhoods .image-wrap{
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eee;
}
.neighborhoods .image-wrap img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hover overlay + Explore */
.neighborhoods .hover-overlay{
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.0);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: background .18s ease, opacity .18s ease;
}
.neighborhoods .card:hover .hover-overlay{
  background: rgba(255,255,255,0.55);
  opacity: 1;
}
.neighborhoods .explore-btn{
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 12px;
  padding: 10px 18px;
  border: 2px solid var(--accent);
  color: #222;
  background: rgba(255,255,255,0.9);
  transition: background .18s ease, transform .18s ease;
}
.neighborhoods .explore-btn:hover{
  transform: translateY(-1px);
}

/* Gold "stem" line and name */
.neighborhoods .stem{
  width: 1px;
  height: 50px;
  background: var(--accent);
  margin: 18px 0 8px 6px;
}
.neighborhoods .name{
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 14px;
}

/* View All button */
.neighborhoods .view-all{
  display: flex;
  justify-content: center;
  margin-top: 36px;
}
.neighborhoods .view-all-btn{
  display: inline-block;
  padding: 16px 34px;
  border: 2px solid var(--accent);
  background: rgba(189,169,138,0.12);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: #111;
  transition: background .2s ease, transform .2s ease;
}
.neighborhoods .view-all-btn:hover{
  background: rgba(189,169,138,0.2);
  transform: translateY(-1px);
}

/* Smooth slide animations for the carousel */
.cards > .card { will-change: transform, opacity; }

.slide-left-enter-active,
.slide-left-leave-active,
.slide-right-enter-active,
.slide-right-leave-active {
  transition: transform .35s ease, opacity .35s ease;
}

/* Next -> items appear from right, old items exit to left */
.slide-left-enter { transform: translateX(40px); opacity: 0; }
.slide-left-leave-to { transform: translateX(-40px); opacity: 0; }

/* Prev -> items appear from left, old items exit to right */
.slide-right-enter { transform: translateX(-40px); opacity: 0; }
.slide-right-leave-to { transform: translateX(40px); opacity: 0; }

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce){
  .slide-left-enter-active,
  .slide-left-leave-active,
  .slide-right-enter-active,
  .slide-right-leave-active {
    transition: none;
  }
}

/* ---- Carousel layout ---- */
.neighborhoods .carousel{
  overflow: hidden;
  position: relative;
}

.neighborhoods .track{
  display: flex;
  gap: 36px;                  /* space between cards */
  will-change: transform;
}

/* Each card occupies 1/2/4 per row depending on columns.
   Width is set inline from JS for pixel-perfect sliding.   */
.neighborhoods .card{
  flex: 0 0 auto;             /* do not shrink; width set from JS */
}

/* (Keep your existing .image-wrap, .hover-overlay, .explore-btn, .stem, .name rules) */

/* Smooth slide */
.neighborhoods .track.is-animating{
  transition: transform .40s ease;
}

/* Reduce motion if user prefers */
@media (prefers-reduced-motion: reduce){
  .neighborhoods .track.is-animating{
    transition: none;
  }
}

/* Mobile-friendly header: allow wrapping so controls never get cut off */
@media (max-width: 639px){
  .neighborhoods{
    padding: 44px 14px 64px;
  }
  .neighborhoods .section-header{
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px 10px;
  }
  /* Put controls on their own line if needed */
  .neighborhoods .controls{
    margin-left: auto;
    flex-shrink: 0;
  }
  .neighborhoods .control{
    font-size: 11px;
    letter-spacing: 0.14em;
    padding: 4px 2px;
  }
  .neighborhoods .divider{ margin: 0 2px; }
}

/* ---------- About (Meet Marcela) ---------- */
.about{
  background: #fff;
  color: #111;
  padding: 64px 20px;
}
.about .section-inner{
  max-width: 1200px;
  margin: 0 auto;
}
.about .about-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 992px){
  .about .about-grid{
    grid-template-columns: 1fr 1.35fr; /* image left, text right */
    align-items: center;
    gap: 48px;
  }
}
.about .portrait img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 6px;
}
.about h2{
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 42px;
  line-height: 1.15;
}
@media (min-width: 992px){
  .about h2{ font-size: 48px; }
}
.about .about-copy p{
  margin: 12px 0;
  line-height: 1.65;
  color: #333;
}

@media (min-width: 992px){
  .site-header{
    transition: background-color .25s ease, box-shadow .25s ease;
    background: transparent;
  }
  .site-header.scrolled{
    background: #002349;          /* requested color */
    box-shadow: 0 4px 18px rgba(0,0,0,.25);
  }
}

/* ---------- Footer ---------- */
.site-footer{
  background: #002349;
  color: #ffffff;
}
.site-footer .footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 36px;
  display: grid;
  gap: 18px;
}

/* 1 column on mobile, 2 on tablet, 4 on desktop */
@media (min-width: 640px){
  .site-footer .footer-inner{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px){
  .site-footer .footer-inner{ grid-template-columns: repeat(4, 1fr); }
}

.footer-item{ display: flex; align-items: flex-start; }

/* Contact rows */
.info-line{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1.5;
}

.icon{
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: 0 0 auto;
  opacity: 0.9;
}

.link{
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
}
.link:hover{
  border-bottom-color: rgba(255,255,255,0.5);
}

.addr{
  font-style: normal;     /* keep consistent with other text */
  color: #ffffff;
  opacity: 0.95;
}

/* Social buttons */
.footer-item.social{
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.social-btn{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid rgba(255,255,255,0.4);
  color: #ffffff;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease;
}
.social-btn:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.7);
  background-color: rgba(255,255,255,0.06);
}
.social-icon{
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.menu-backdrop{
  position: fixed;
  top: 68px;     /* match .mobile-nav top */
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 18;   /* just under .mobile-nav (19) and over page content */
}

/* Hide the backdrop on desktop */
@media (min-width: 992px){
  .menu-backdrop{ display: none !important; }
}


/* ---------- Subpage Hero ---------- */
.sub-hero{
  position: relative;
  background: #002349; /* brand color fallback */
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 38vh;
  padding: 48px 20px;
  overflow: hidden;
}
.sub-hero::before{
  /* Optional subtle gradient overlay; tweak/remove if desired */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.18));
}
.sub-hero .sub-hero-inner{
  position: relative; z-index: 1;
  max-width: 1100px;
}
.sub-hero h1{
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.15;
}
.sub-hero .sub-hero-sub{
  margin: 0;
  letter-spacing: .14em;
  font-weight: 700;
  font-size: 12px;
  opacity: .9;
}
@media (min-width: 992px){
  .sub-hero{ min-height: 46vh; }
  .sub-hero h1{ font-size: 54px; }
}

/* Optional background images you can add later */
.neighborhoods-hero{
  /* supply your own assets when ready; fallback is brand color above */
  /* background-image: url('neighborhoods-hero-mobile.jpg'); */
  background-size: cover; background-position: center;
}
@media (min-width: 992px){
  .neighborhoods-hero{
    /* background-image: url('neighborhoods-hero.jpg'); */
  }
}

/* ---------- Neighborhood List ---------- */
.neigh-list{
  background: #fff;
  color: #111;
  padding: 56px 20px 84px;
}
.neigh-list .neigh-inner{
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 36px;
}
.neigh-card{
  display: flex;
  flex-direction: column;   /* mobile: stacked */
  gap: 18px;
}
.neigh-card .media{
  width: 100%;
}
.neigh-card .media img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 6px;
}
.neigh-card .copy{
  width: 100%;
}
.neigh-card .neigh-title{
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 15px;
}
.neigh-card .neigh-text{
  margin: 0;
  line-height: 1.65;
  color: #333;
}

/* Desktop: two-column with alternating sides */
@media (min-width: 992px){
  .neigh-card{
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }
  .neigh-card.flip{
    flex-direction: row-reverse; /* image on right for even rows */
  }
  .neigh-card .media,
  .neigh-card .copy{
    flex: 1 1 0;
  }
}

/* ---------- Properties List ---------- */
.prop-list{
  background: #fff;
  color: #111;
  padding: 56px 20px 84px;
}
.prop-inner{
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 28px;
}

.prop-card{
  display: flex;
  flex-direction: column;          /* mobile: stack */
  background: #f8f9fb;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.prop-copy{
  order: 1;                        /* info first (left) */
  padding: 24px;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.prop-title{
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
}
.prop-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.pill{
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: #002349;
  background: rgba(0,35,73,0.08);
  padding: 6px 10px;
  border-radius: 999px;
}
.prop-addr{ color: #444; }

.facts{
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: #333;
}
.facts li strong{ font-size: 16px; }

.prices{
  margin-top: auto;
  display: flex;
  gap: 18px;
  align-items: baseline;
  flex-wrap: wrap;
}
.prices .usd{ font-weight: 700; font-size: 20px; }
.prices .mxn{ font-weight: 600; font-size: 14px; color: #333; opacity: .9; }

.prop-media{
  order: 2;                        /* image second (right) */
  flex: 0 0 46%;
  min-height: 240px;
}
.prop-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 992px){
  .prop-card{
    flex-direction: row;           /* desktop: left info, right image */
    align-items: stretch;
  }
  .prop-media{
    min-height: 320px;
  }
}

/* ---------- Contact Modal ---------- */
.contact-modal{ position: fixed; inset: 0; z-index: 100; display: block; }
.cm-backdrop{
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.cm-dialog{
  position: relative;
  max-width: 1100px;
  margin: 6vh auto;
  background: rgba(0,35,73,.92); /* brand tone */
  color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,.4);
}
.cm-close{
  position: absolute; top: 10px; right: 14px;
  background: transparent; border: 0; color: #fff;
  font-size: 28px; line-height: 1; cursor: pointer;
  opacity: .85;
}
.cm-close:hover{ opacity: 1; }

.cm-grid{
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "form"
    "details";
}
.cm-form   { grid-area: form; }
.cm-details{ grid-area: details; }

@media (min-width: 992px){
  .cm-grid{
    grid-template-columns: 1fr 1.3fr;
    /* Desktop order: details left, form right */
    grid-template-areas: "details form";
  }
}
@media (min-width: 992px){
  .cm-grid{ grid-template-columns: 1fr 1.3fr; }
}

.cm-details{
  padding: 28px 22px;
  background: rgba(0,0,0,.18);
}
.cm-form{
  padding: 28px 22px;
  position: relative;
}
@media (min-width: 992px){
  .cm-details{ padding: 40px 34px; }
  .cm-form{ padding: 40px 34px; }
  /* subtle divider between columns */
  .cm-form{ border-left: 1px solid rgba(255,255,255,.25); }
}

.cm-heading{
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
}
.cm-name{ margin: 0 0 14px; opacity: .9; }

.cm-row{
  display: grid; grid-template-columns: 24px 1fr; align-items: start; gap: 10px;
  margin: 14px 0;
}
.cm-ico{ width: 22px; height: 22px; fill: #fff; opacity: .9; }
.cm-label{ font-weight: 700; letter-spacing: .12em; font-size: 12px; opacity: .9; }
.cm-link, .cm-text{ color: #fff; text-decoration: none; }
.cm-link{ border-bottom: 1px solid rgba(255,255,255,.35); }
.cm-link:hover{ border-bottom-color: rgba(255,255,255,.65); }

.fi{ display: block; margin: 14px 0; }
.fi span{
  display: block; font-weight: 700; letter-spacing: .12em; font-size: 12px; opacity: .9; margin-bottom: 6px;
}
.fi input, .fi textarea{
  width: 100%; background: transparent; border: 0; outline: none;
  border-bottom: 2px solid rgba(255,255,255,.35);
  color: #fff; padding: 10px 2px 12px;
}
.fi input::placeholder, .fi textarea::placeholder{ color: rgba(255,255,255,.6); }
.fi input:focus, .fi textarea:focus{ border-bottom-color: #fff; }
.fi-textarea textarea{
  resize: vertical; min-height: 120px;
}

.consent{
  display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start;
  font-size: 12px; line-height: 1.5; opacity: .9; margin: 12px 0 18px;
}
.consent a{ color: #fff; text-decoration: underline; }

.cm-submit{
  appearance: none; cursor: pointer;
  border: 2px solid rgba(255,255,255,.75);
  background: transparent; color: #fff; font-weight: 700; letter-spacing: .18em; font-size: 12px;
  padding: 12px 18px; border-radius: 4px;
}
.cm-submit:hover{ background: rgba(255,255,255,.1); }

/* Let the dialog scroll within the viewport height */
.cm-dialog{
  max-height: 88vh;                 /* fits on small screens */
  overflow: auto;
  -webkit-overflow-scrolling: touch; /* smooth iOS scrolling */
  overscroll-behavior: contain;      /* prevent scroll chaining to page */
}

/* Also prevent scroll chaining on the modal container itself */
.contact-modal{ overscroll-behavior: contain; }

/* Lock page scroll when modal is open */
html.no-scroll,
body.no-scroll{
  overflow: hidden;
  height: 100%;
}
