:root{
  --bg: #ffffff;
  --text:#222;
  --muted:#666;
  --brand:#2a72d4;
  --brand-2:#5aa3ff;
  --ring: rgba(42,114,212,.18);
  --border:#e7e9ee;
  --radius:14px;
  --max: 1100px;
  --card-bg:#fff;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
.wrap{max-width:var(--max);margin:0 auto;padding:18px}

.site-header{
  border-bottom:1px solid var(--border);
  background:#fff;
  position:sticky; top:0; z-index:50;
}
.header-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.brand{display:flex; align-items:center; gap:10px}
.brand img{display:block; height:42px; width:auto}
.brand-name{font-weight:800; letter-spacing:.2px; color:#111}

.nav{
  display:flex; gap:10px; flex-wrap:wrap;
}
.nav a{
  color:#111; padding:.5rem .7rem; border-radius:10px;
}
.nav a:hover{background:#f4f6f9; text-decoration:none}
.nav a.active{background:#eaf2ff; color:#0a3a84}

.nav-toggle{
  display:none; border:0; background:transparent; padding:8px; border-radius:10px;
}
.nav-toggle span{display:block; width:24px; height:2px; background:#111; margin:5px 0}

@media (max-width:760px){
  .nav-toggle{display:block}
  .nav{display:none; flex-direction:column; gap:6px; width:100%;}
  .nav.open{display:flex; margin-top:8px}
  .header-row{flex-direction:column; align-items:stretch}
}

/* Sections */
h1,h2,h3{margin:.2rem 0 .4rem}
.section-title{margin:8px 0 4px}
.section-note{color:var(--muted); margin:0 0 10px}

/* Property grids */
.grid{display:grid; gap:14px}
.cols-3{grid-template-columns:repeat(3, minmax(0,1fr))}
.cols-2{grid-template-columns:repeat(2, minmax(0,1fr))}
@media (max-width:1000px){ .cols-3{grid-template-columns:repeat(2, minmax(0,1fr))} }
@media (max-width:640px){ .cols-3,.cols-2{grid-template-columns:1fr} }

/* Property card as a link */
.card-link{
  display:block; background:var(--card-bg);
  border:1px solid var(--border); border-radius:var(--radius);
  overflow:hidden; box-shadow:0 6px 20px rgba(0,0,0,.04);
}
.card-link:hover{box-shadow:0 8px 28px rgba(0,0,0,.08); text-decoration:none}
.card-media{
  aspect-ratio: 4 / 3;
  width:100%; overflow:hidden; background:#f3f5f9;
}
.card-media img{width:100%; height:100%; object-fit:cover; display:block}
.card-body{padding:12px}
.card-title{margin:0; font: 700 1rem/1.3 system-ui, -apple-system, Segoe UI, Roboto, Arial}
.card-meta{margin:.25rem 0 0; color:var(--muted); font-size:.92rem}

/* Region divider */
.hr{height:1px; background:var(--border); margin:16px 0}

/* Footer */
.site-footer{
  border-top:1px solid var(--border); background:#fff; color:#333;
}
.footer-row{display:flex; justify-content:center; padding:14px 18px}

/* Utilities */
.center{text-align:center}
/* ---------- Property Page Styles ---------- */

/* --- Buttons as pills ---------------------------------------------------- */
.pills { display:flex; gap:10px; flex-wrap:wrap; }
.pill {
  display:inline-flex; align-items:center; gap:.45rem;
  padding:.55rem .9rem; border-radius:999px;
  font-weight:700; text-decoration:none;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06); color:var(--text);
}
.pill:hover { background:rgba(255,255,255,.12); text-decoration:none; }
.pill.primary {
  background:linear-gradient(180deg, var(--brand), #0f8b63);
  color:#062015; border:1px solid rgba(255,255,255,.08);
  box-shadow:0 8px 18px var(--ring);
}
.pill.muted { color:var(--muted); }

/* --- “Hero” card image --------------------------------------------------- */
.hero-card img{ width:100%; height:auto; border-radius:12px; display:block; }

/* --- Specs grid ---------------------------------------------------------- */
.specs{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px; }
@media (max-width:900px){ .specs{ grid-template-columns:1fr 1fr; } }
@media (max-width:640px){ .specs{ grid-template-columns:1fr; } }
.spec-box{
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px; padding:12px;
}

/* ===== Gallery: responsive, no-crop, portrait 20% taller ===== */
.gallery{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

@media (min-width:700px){ .gallery{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (min-width:1100px){ .gallery{ grid-template-columns:repeat(3,minmax(0,1fr)); } }

/* Base row height (landscape). Portraits will be 1.2x this */
:root{
  --land-h: 360px;
}
@media (max-width:900px){ :root{ --land-h: 300px; } }
@media (max-width:600px){ :root{ --land-h: 240px; } }

.gallery figure{
  margin:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}

.gallery .thumb{
  width:100%;
  border-radius:12px;
  overflow:hidden;
  background:rgba(0,0,0,.04);
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 4px 14px rgba(0,0,0,.15);

  /* default = landscape box */
  height:var(--land-h);
  display:grid;
  place-items:center;
}

.gallery figure.portrait .thumb{
  /* ~20% taller box for portrait */
  height:calc(var(--land-h) * 1.2);
}

/* Image always fully visible (no crop) */
.gallery .thumb img{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  display:block;
}

/* Captions */
.gallery figcaption{
  color:#555;
  font-size:.95rem;
  text-align:center;
  line-height:1.3;
  padding-top:4px;
  max-width:95%;
}
/* === Fix portraits: full image, narrower, no crop === */

/* Base (landscapes) */
.gallery .thumb{
  height: var(--land-h, 360px);
  display: grid;
  place-items: center;
  border-radius: 12px;
  overflow: hidden;        /* keeps rounded corners only */
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

/* Make sure NOTHING else forces cover/crop */
.gallery .thumb img{
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;  /* show whole photo */
}

/* Portraits = ~20% taller box + narrower image */
.gallery figure.portrait .thumb{
  height: calc(var(--land-h, 360px) * 1.2);
}

.gallery figure.portrait .thumb img{
  max-width: 70% !important;   /* narrower so full height fits comfortably */
  max-height: 100% !important; /* keep entire image visible */
}

/* Responsive tweak: shrink base height on smaller screens */
@media (max-width: 900px){
  .gallery .thumb{ height: 300px; }
  .gallery figure.portrait .thumb{ height: 360px; }
}
@media (max-width: 600px){
  .gallery .thumb{ height: 240px; }
  .gallery figure.portrait .thumb{ height: 288px; }
}
/* Neighborhood block (moved above gallery) */
.neighborhood ul{ margin:.4rem 0 0; padding-left:1.1rem; }
.neighborhood li{ margin:.25rem 0; color:var(--muted); }