/* =========================================================================
   NYB Eagle Properties — Main Stylesheet
   Palette derived from brand seal: deep navy, antique gold, warm cream.
   ========================================================================= */

:root {
  --navy:        #0a1a3c;
  --navy-dark:   #060f26;
  --navy-mid:    #142a56;
  --gold:        #c9a227;
  --gold-light:  #e8c766;
  --cream:       #f7f5ef;
  --cream-2:     #efe9da;
  --ink:         #1b2333;
  --ink-soft:    #4c5568;
  --white:       #ffffff;
  --danger:      #b3372c;
  --success:     #2f7a4f;

  --bg:          var(--cream);
  --bg-alt:      var(--white);
  --text:        var(--ink);
  --text-soft:   var(--ink-soft);
  --border:      #e3ddcb;
  --card-bg:     var(--white);
  --header-bg:   var(--navy);
  --header-text: var(--white);

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(10,26,60,.08);
  --shadow-md: 0 8px 24px rgba(10,26,60,.12);
  --shadow-lg: 0 20px 48px rgba(10,26,60,.18);
  --transition: 180ms ease;
}

[data-theme="dark"] {
  --bg:          #0b1424;
  --bg-alt:      #101c33;
  --text:        #eef1f8;
  --text-soft:   #a9b3c9;
  --border:      #223050;
  --card-bg:     #101c33;
  --header-bg:   #060f26;
  --header-text: #f2ede0;
  --cream-2:     #16233d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); margin: 0 0 .5em; line-height: 1.15; font-weight: 700; }
p { margin: 0 0 1em; color: var(--text-soft); }
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--gold); margin-bottom: .6em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--navy-dark); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: currentColor; color: var(--header-text); }
.btn-outline:hover { background: rgba(255,255,255,.08); }
/* Use this (instead of inline "color:var(--navy)") for any outline button that
   sits on a card/page background rather than the dark header — it always
   reads against --text, which itself flips between dark and light theme, so
   the button never disappears no matter which theme is active. Enforced
   globally: every "View Details / Call / Badge / History / Resend code"
   style secondary button in the codebase uses this one class. */
.btn-outline-card { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline-card:hover { background: var(--bg-alt); border-color: var(--gold); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-mid); }
.btn-sm { padding: 8px 16px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--navy-dark); color: #cfd6e6; font-size: .82rem;
  padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.topbar a { color: #cfd6e6; }
.topbar a:hover { color: var(--gold-light); }
.topbar .sep { opacity: .4; margin: 0 6px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--header-bg); position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; gap: 24px; transition: padding var(--transition); }
.brand { display: flex; align-items: center; gap: 16px; }
.brand img { height: clamp(90px, 10vw, 230px); width: clamp(90px, 10vw, 230px); object-fit: cover; border-radius: 50%; border: 3px solid var(--gold); transition: height var(--transition), width var(--transition); }
.brand-text { color: var(--header-text); text-align: center; }
.brand-text strong { display: block; font-family: var(--font-display); font-size: clamp(1.9rem, 4.5vw, 3.2rem); font-weight: 800; letter-spacing: .03em; line-height: 1.05; margin-bottom: 2px; }
.brand-text span { display: block; font-size: .82rem; color: var(--gold-light); letter-spacing: .05em; }

/* Once the visitor scrolls, shrink the header so the huge logo doesn't
   permanently eat screen space — it's still large again the moment they
   scroll back to the top. Toggled by main.js. */
.site-header.is-scrolled .container { padding-top: 8px; padding-bottom: 8px; }
.site-header.is-scrolled .brand img { height: 52px; width: 52px; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--header-text); padding: 10px 14px; border-radius: 8px; font-weight: 500; font-size: .93rem;
  transition: background var(--transition);
}
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,.1); color: var(--gold-light); }
.main-nav-logins { display: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-toggle {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: var(--header-text);
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; transition: all var(--transition);
}
.icon-toggle:hover { background: rgba(255,255,255,.18); }
.lang-switch { display: flex; gap: 2px; background: rgba(255,255,255,.08); border-radius: 999px; padding: 3px; }
.lang-switch a { padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--header-text); }
.lang-switch a.active { background: var(--gold); color: var(--navy-dark); }
.mobile-toggle { display: none; background: none; border: none; color: var(--header-text); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 1080px) {
  .main-nav { position: fixed; inset: 64px 0 0 0; background: var(--header-bg); flex-direction: column; align-items: stretch;
    padding: 16px; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .mobile-toggle { display: block; }
  .main-nav-logins { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; padding-top: 10px; }
  .main-nav-logins a { border-bottom: none; background: rgba(201,162,39,.1); border-radius: 10px; margin-bottom: 8px; font-weight: 700; color: var(--gold-light); }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-dark) 100%);
  color: var(--white); padding: 72px 0 110px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(201,162,39,.18), transparent 55%);
  pointer-events: none;
}
.hero-banner-layer { position: absolute; inset: 0; z-index: 0; }
.hero-banner-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero-banner-slide.active { opacity: 1; }
.hero-banner-layer::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(10,26,60,.88) 0%, rgba(20,42,86,.82) 55%, rgba(6,15,38,.9) 100%);
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { max-width: 760px; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); color: var(--white); }
.hero h1 em { color: var(--gold-light); font-style: normal; }
.hero p.lead { color: #cfd6e6; font-size: 1.1rem; max-width: 560px; }

.search-card {
  background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 24px; margin-top: -64px; position: relative; z-index: 5;
}
.search-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.search-tabs button {
  border: none; background: var(--cream-2); color: var(--text-soft); padding: 10px 20px; border-radius: 999px;
  font-weight: 600; cursor: pointer; font-size: .88rem; transition: all var(--transition);
}
.search-tabs button.active { background: var(--navy); color: var(--white); }
.search-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 900px) { .search-grid { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: .78rem; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-alt); color: var(--text); font-size: .92rem; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }

.stats-row { display: flex; gap: 40px; margin-top: 30px; flex-wrap: wrap; }
.stat b { display: block; font-size: 1.6rem; color: var(--gold-light); font-family: var(--font-display); }
.stat span { color: #b9c1d6; font-size: .82rem; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 36px; gap: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-alt { background: var(--cream-2); }

/* Category cards */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.cat-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 26px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cat-card .icon { font-size: 1.8rem; margin-bottom: 12px; }

/* Property cards */
.prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.prop-card {
  background: var(--card-bg); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition); display: flex; flex-direction: column;
}
.prop-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.prop-media { position: relative; aspect-ratio: 4/3; background: var(--cream-2); overflow: hidden; }
.prop-media img { width: 100%; height: 100%; object-fit: cover; }
.prop-badge { position: absolute; top: 12px; left: 12px; background: var(--gold); color: var(--navy-dark); font-size: .72rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.prop-badge.rent { background: var(--navy); color: var(--white); }
.prop-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.prop-price { font-family: var(--font-display); font-size: 1.3rem; color: var(--navy); font-weight: 700; }
[data-theme="dark"] .prop-price { color: var(--gold-light); }
.prop-title { font-weight: 600; font-size: 1rem; margin: 6px 0 4px; }
.prop-loc { color: var(--text-soft); font-size: .85rem; margin-bottom: 10px; }
.prop-excerpt { color: var(--text-soft); font-size: .85rem; line-height: 1.5; margin: -4px 0 10px; }
.prop-meta { display: flex; gap: 14px; font-size: .82rem; color: var(--text-soft); border-top: 1px solid var(--border); padding-top: 12px; margin-top: auto; }

/* Locations grid */
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.loc-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; text-align: center; font-weight: 600; transition: all var(--transition); }
.loc-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.loc-card small { display: block; font-weight: 400; color: var(--text-soft); margin-top: 4px; font-size: .78rem; }

/* Trust badges */
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 26px; }
.trust-item { text-align: left; }
.trust-item .icon { width: 48px; height: 48px; margin-bottom: 14px; }
.trust-item .icon svg { width: 100%; height: 100%; }

/* CTA banner */
.cta-banner { background: linear-gradient(135deg, var(--navy), var(--navy-mid)); color: var(--white); border-radius: var(--radius-lg); padding: 52px; display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.cta-banner h2 { color: var(--white); }
.cta-banner p { color: #cfd6e6; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Agent cards */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 24px; }
.agent-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; text-align: center; }
.agent-photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; border: 3px solid var(--gold); }
.agent-rating { color: var(--gold); font-weight: 700; font-size: .9rem; }
.agent-actions { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }

/* Testimonials */
.testi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 24px; }
.testi-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 26px; }
.testi-stars { color: var(--gold); margin-bottom: 10px; }
.testi-name { font-weight: 700; margin-top: 12px; }

/* Newsletter */
.newsletter-box { background: var(--navy); border-radius: var(--radius-lg); padding: 48px; text-align: center; color: var(--white); }
.newsletter-box h2 { color: var(--white); }
.newsletter-form { display: flex; gap: 10px; max-width: 460px; margin: 20px auto 0; }
.newsletter-form input { flex: 1; padding: 13px 16px; border-radius: 999px; border: none; }

/* Footer */
.site-footer { background: var(--navy-dark); color: #a9b3c9; padding: 60px 0 20px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 { color: var(--gold-light); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .82rem; }
.footer-bottom small { display: block; margin-top: 4px; color: #8d99b8; }
.footer-bottom a:hover { color: var(--gold-light); }

.whatsapp-float {
  position: fixed; bottom: 22px; right: 22px; background: #25D366; width: 58px; height: 58px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); z-index: 90; transition: transform var(--transition);
}
.whatsapp-float svg { width: 58px; height: 58px; display: block; position: relative; z-index: 1; }
.whatsapp-float:hover { transform: scale(1.08); }

/* "Live" halo — an expanding, fading ring that pulses outward from the
   button to signal chat is active/available right now. */
.whatsapp-float::before,
.whatsapp-float::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: #25D366; z-index: 0; pointer-events: none;
  animation: wa-pulse 2.4s cubic-bezier(.25,.6,.4,1) infinite;
}
.whatsapp-float::after { animation-delay: 1.2s; }
@keyframes wa-pulse {
  0%   { transform: scale(1);    opacity: .55; }
  70%  { opacity: 0; }
  100% { transform: scale(2.1);  opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float::before, .whatsapp-float::after { animation: none; display: none; }
}

/* Generic page header (breadcrumb pages) */
.page-hero { background: var(--navy); color: var(--white); padding: 46px 0; }
.page-hero h1 { color: var(--white); }
.breadcrumb { font-size: .85rem; color: #b9c1d6; margin-bottom: 10px; }
.breadcrumb a:hover { color: var(--gold-light); }

/* Forms (contact, valuation) */
.form-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 30px; box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .9rem; }
.alert-success { background: #e5f3ea; color: var(--success); border: 1px solid #b7dcc4; }
.alert-error { background: #fbe9e7; color: var(--danger); border: 1px solid #f0bdb6; }
[data-theme="dark"] .alert-success { background: #123123; }
[data-theme="dark"] .alert-error { background: #331715; }

/* Filters sidebar (properties.php) */
.filters-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .filters-layout { grid-template-columns: 1fr; } }
.filters-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px; position: sticky; top: 90px; }
.filter-group { margin-bottom: 20px; }
.filter-group label.title { font-weight: 700; font-size: .85rem; display: block; margin-bottom: 10px; }
/* Share bar — Facebook/WhatsApp/X/LinkedIn/e-mail/copy-link row used on
   property and agent pages so the *listing/agent photo* (set as og:image
   on that page) is what shows up in the shared preview card. */
.share-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.share-bar-label { font-weight: 600; font-size: .85rem; color: var(--text-soft); }
.share-bar-icons { display: flex; align-items: center; gap: 8px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--navy); color: var(--white); transition: all var(--transition);
  text-decoration: none;
}
.share-btn:hover { background: var(--gold); transform: translateY(-2px); }
.share-btn-facebook { background: #1877F2; }
.share-btn-whatsapp { background: #25D366; }
.share-btn-x { background: #000; }
.share-btn-linkedin { background: #0A66C2; }
.share-btn-mail { background: var(--navy); }
.share-btn-copy { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); }
.share-btn-copy:hover { border-color: var(--gold); color: var(--navy); background: var(--bg-alt); transform: translateY(-2px); }
.share-btn-copy.share-btn-copied { background: var(--success); border-color: var(--success); color: var(--white); }

.pwa-install-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9999;
  display: flex; align-items: center; gap: 12px;
  background: var(--navy); color: #fff; padding: 14px; border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); max-width: 460px; margin: 0 auto;
  transform: translateY(130%); opacity: 0; transition: transform .3s ease, opacity .3s ease;
}
.pwa-install-banner.is-visible { transform: translateY(0); opacity: 1; }
.pwa-install-icon { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.pwa-install-copy { display: flex; flex-direction: column; gap: 2px; flex: 1; font-size: .85rem; line-height: 1.35; }
.pwa-install-copy strong { font-size: .93rem; }
.pwa-install-copy span { color: #cfd6e6; }
.pwa-install-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pwa-install-btn { background: var(--gold); color: var(--navy); border: none; border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: .82rem; cursor: pointer; white-space: nowrap; }
.pwa-install-btn:hover { background: var(--gold-light); }
.pwa-install-close { background: transparent; border: none; color: #fff; opacity: .65; font-size: 1rem; cursor: pointer; padding: 4px 6px; line-height: 1; }
.pwa-install-close:hover { opacity: 1; }
@media (min-width: 640px) { .pwa-install-banner { left: auto; right: 24px; bottom: 24px; width: 380px; } }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: .8rem; cursor: pointer; background: var(--bg-alt); }
.chip.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.badge-gold { background: rgba(201,162,39,.15); color: var(--gold); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-soft); }

/* Global safeguard: preserve true brand colors when any public page is
   printed or saved as PDF, instead of the browser stripping backgrounds. */
@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }
}

/* ==========================================================================
   Property gallery + full-screen lightbox
   Every property detail page renders its full photo set as a responsive
   thumbnail grid; clicking any photo opens a full-screen viewer with
   circular prev/next navigation, a rounded/shadowed image stage and a
   pill-style counter caption underneath.
   ========================================================================== */
.pgallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.pgallery-thumb {
  position: relative; width: 100%; padding-bottom: 75%; /* 4:3 */
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm); cursor: pointer; background: var(--cream-2);
  transition: transform var(--transition), box-shadow var(--transition);
}
.pgallery-thumb:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.pgallery-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.pgallery-thumb-icon {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.8);
  width: 44px; height: 44px; border-radius: 50%; background: rgba(10,26,60,.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.pgallery-thumb-icon svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2; }
.pgallery-thumb:hover .pgallery-thumb-icon { opacity: 1; transform: translate(-50%,-50%) scale(1); }

.pgallery-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(6,15,38,.92); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.pgallery-overlay.is-open { display: flex; animation: pgallery-fade-in .25s ease; }
@keyframes pgallery-fade-in { from { opacity: 0; } to { opacity: 1; } }
.pgallery-overlay-content {
  position: relative; max-width: 1000px; width: 100%; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.pgallery-image-wrap {
  width: 100%; max-height: 78vh; border-radius: var(--radius-md); overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); background: var(--navy-dark);
}
.pgallery-image-wrap img {
  width: 100%; height: 100%; max-height: 78vh; object-fit: contain; display: block;
  animation: lightbox-fade-in .2s ease;
}
@keyframes lightbox-fade-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.pgallery-caption {
  margin-top: 16px; color: var(--white); font-size: .92rem; letter-spacing: .02em;
  background: rgba(0,0,0,.5); padding: 8px 22px; border-radius: 999px;
  backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.12);
}
.pgallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(30,30,30,.7); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.15); color: #fff;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
  cursor: pointer; transition: background var(--transition), transform .15s;
  box-shadow: 0 4px 14px rgba(0,0,0,.5);
}
.pgallery-nav:hover { background: rgba(255,255,255,.2); transform: translateY(-50%) scale(1.06); }
.pgallery-nav.prev { left: 6px; }
.pgallery-nav.next { right: 6px; }
.pgallery-close {
  position: absolute; top: 10px; right: 10px; font-size: 2.2rem;
  color: rgba(255,255,255,.85); background: none; border: none; cursor: pointer;
  z-index: 5; transition: color .2s, transform .15s; line-height: 1; padding: 0 8px;
}
.pgallery-close:hover { color: #fff; transform: scale(1.1); }

@media (max-width: 640px) {
  .pgallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .pgallery-nav { width: 40px; height: 40px; font-size: 1.2rem; }
  .pgallery-nav.prev { left: 2px; }
  .pgallery-nav.next { right: 2px; }
  .pgallery-caption { font-size: .8rem; padding: 6px 16px; }
  .pgallery-close { top: 6px; right: 12px; font-size: 2rem; }
}

/* ==========================================================================
   Property spec sheet — "Property details" + "Property features"
   Two soft panels, each a two-column list of icon/label/value rows,
   matching the PrivateProperty.co.za reference layout.
   ========================================================================== */
.pdetails-block {
  background: var(--cream-2);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  margin-bottom: 24px;
}
.pdetails-block h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
}
.pdetails-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 60px;
}
.pdetail-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.pdetail-col > .pdetail-row:last-child { border-bottom: none; }
.pdetail-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px; background: var(--card-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft); box-shadow: var(--shadow-sm);
}
.pdetail-icon svg { width: 20px; height: 20px; }
.pdetail-label { flex: 1; color: var(--text-soft); font-size: .96rem; }
.pdetail-value { font-weight: 800; color: var(--text); font-size: 1rem; text-align: right; white-space: nowrap; }
.pdetail-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 50%;
  background: rgba(120,130,150,.18); font-weight: 800; color: var(--text);
}
.pdetail-check { display: inline-flex; color: var(--success); }
.pdetail-check svg { width: 19px; height: 19px; }

@media (max-width: 760px) {
  .pdetails-block { padding: 22px 20px; }
  .pdetails-cols { grid-template-columns: 1fr; }
}

/* "Read more" collapsible long descriptions */
.desc-text.is-collapsed {
  max-height: 210px; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}
.desc-toggle { margin-top: 8px; }


/* Agent card overflow fix — 2026-10-20 */
.agent-grid { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.agent-card { min-width: 0; overflow-wrap: anywhere; }
.agent-actions { flex-wrap: wrap; }
.agent-actions > .btn { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.agent-actions > .btn svg { flex-shrink: 0; }

/* Compact phone header keeps navigation controls within 320px screens. */
@media (max-width: 600px) {
  .site-header .container, .site-header.is-scrolled .container { padding: 12px 16px; gap: 8px; }
  .site-header .brand { gap: 8px; min-width: 0; }
  .site-header .brand img, .site-header.is-scrolled .brand img { width: 40px; height: 40px; flex-shrink: 0; }
  .site-header .brand-text strong { font-size: 1.5rem; }
  .site-header .brand-text > span { display: none; }
  .site-header .header-actions { gap: 6px; flex-shrink: 0; }
  .site-header .lang-switch a { padding: 6px 8px; }
  .site-header .icon-toggle { width: 32px; height: 32px; }
}
