: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: adaptive grid, photos fill their tiles, click to enlarge =====
   2026-10-02: replaced the fixed-height "contain" boxes (which left every photo
   floating small inside a padded tile, and squeezed portraits to 70% width) with
   an adaptive grid where each photo fills its tile edge-to-edge. Portraits span
   two rows so they stay large. The full, uncropped photo opens in the lightbox. */
.gallery{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows:200px;
  grid-auto-flow:dense;
  gap:12px;
}
@media (max-width:900px){
  .gallery{ grid-auto-rows:170px; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width:600px){
  .gallery{ grid-auto-rows:150px; grid-template-columns:repeat(2, minmax(0,1fr)); }
}

.gallery figure{ margin:0; min-width:0; position:relative; }
.gallery figure.portrait{ grid-row:span 2; }

/* The tile is a link: focusable, opens the lightbox (or the image itself without JS) */
.gallery .thumb{
  position:relative;
  display:block;
  width:100%; height:100%;
  border-radius:12px;
  overflow:hidden;
  background:#eef1f5;
  border:1px solid var(--border);
  box-shadow:0 4px 14px rgba(0,0,0,.12);
  cursor:zoom-in;
  text-decoration:none;
}
.gallery .thumb img{
  display:block;
  width:100%; height:100%;
  object-fit:cover;              /* fill the tile; the lightbox shows the whole photo */
  transition:transform .35s ease;
}
.gallery .thumb:hover img,
.gallery .thumb:focus-visible img{ transform:scale(1.04); }
.gallery .thumb:focus-visible{ outline:3px solid var(--brand); outline-offset:2px; }

/* Expand hint in the corner on hover/focus */
.gallery .thumb::after{
  content:"\26F6";
  position:absolute; top:8px; right:8px;
  width:30px; height:30px; display:grid; place-items:center;
  color:#fff; font-size:16px;
  background:rgba(0,0,0,.45); border-radius:8px;
  opacity:0; transition:opacity .2s;
}
.gallery .thumb:hover::after,
.gallery .thumb:focus-visible::after{ opacity:1; }

/* Caption overlays the bottom of the tile (clicks pass through to the link) */
.gallery figcaption{
  position:absolute; left:0; right:0; bottom:0;
  padding:22px 10px 8px;
  color:#fff; font-size:.85rem; line-height:1.3;
  background:linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.65));
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  pointer-events:none;
}

/* ===== Lightbox (dependency-free; markup + behaviour live in property.php) ===== */
.lb{
  position:fixed; inset:0; z-index:1000;
  background:rgba(10,12,16,.94);
  display:flex; align-items:center; justify-content:center;
  padding:16px;
}
.lb[hidden]{ display:none; }
.lb img{
  max-width:95vw; max-height:84vh;
  width:auto; height:auto;
  object-fit:contain;
  border-radius:8px;
  box-shadow:0 20px 60px rgba(0,0,0,.6);
  user-select:none;
}
.lb-cap{
  position:absolute; left:0; right:0; bottom:14px;
  text-align:center; color:#eee; font-size:.95rem; padding:0 70px;
}
.lb-count{ color:#aaa; font-size:.8rem; margin-left:.6em; }
.lb-btn{
  position:absolute; top:50%; transform:translateY(-50%);
  width:48px; height:48px; border-radius:50%;
  border:0; background:rgba(255,255,255,.14); color:#fff;
  font-size:30px; line-height:1; cursor:pointer;
  display:grid; place-items:center;
}
.lb-btn:hover{ background:rgba(255,255,255,.28); }
.lb-prev{ left:14px; }
.lb-next{ right:14px; }
.lb-close{
  position:absolute; top:12px; right:12px;
  width:44px; height:44px; border-radius:50%;
  border:0; background:rgba(255,255,255,.14); color:#fff;
  font-size:26px; cursor:pointer; display:grid; place-items:center;
}
.lb-close:hover{ background:rgba(255,255,255,.28); }
body.lb-open{ overflow:hidden; }
@media (max-width:600px){
  .lb-btn{ width:40px; height:40px; font-size:24px; }
  .lb-cap{ padding:0 12px; bottom:10px; font-size:.85rem; }
}
/* Neighborhood block (moved above gallery) */
.neighborhood ul{ margin:.4rem 0 0; padding-left:1.1rem; }
.neighborhood li{ margin:.25rem 0; color:var(--muted); }