/* ============================================================================
   styles.css — PAMM Properties Public Portal  (production build)
   Brand: ink #161616 · paper #FAFAF8 · red #C43A24 · blue #3F5B72
          gray #767671 · hairline #E3E1D9
   Type:  Oswald (headlines/stats) · PT Serif (body) · Inter (labels/UI)
   Signature: red diagonal slash on card top-left corner.
   ============================================================================ */

:root {
  --ink:          #161616;
  --paper:        #FAFAF8;
  --paper-dim:    #EFEDE6;
  --red:          #C43A24;
  --red-dark:     #A93120;
  --blue:         #3F5B72;
  --blue-mid:     #4E6F8A;
  --gray:         #767671;
  --hairline:     #E3E1D9;
  --hairline-dark:#CBC8BD;
  --white:        #FFFFFF;

  --font-head: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'PT Serif', Georgia, 'Times New Roman', serif;
  --font-ui:   'Inter', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); text-transform: uppercase; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ── Site passcode gate ─────────────────────────────────────────────────────── */
.site-gate {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.site-gate-card {
  background: var(--white); width: 100%; max-width: 400px;
  padding: 3rem 2.5rem 2.5rem;
  border-top: 4px solid var(--red);
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.gate-logo   { height: 58px; width: auto; margin-bottom: 0.8rem; }
.gate-title  { font-size: 1.6rem; font-weight: 600; letter-spacing: .05em; color: var(--ink); }
.gate-sub    { font-family: var(--font-ui); font-size: .84rem; color: var(--gray); text-align: center; margin-bottom: .5rem; }
.gate-input  {
  width: 100%; padding: .85rem 1rem; border: 1px solid var(--hairline);
  font-family: var(--font-ui); font-size: 1rem; text-align: center;
  letter-spacing: .12em; background: var(--paper); margin-top: .4rem;
}
.gate-input:focus { outline: none; border-color: var(--blue); background: var(--white); }
.gate-btn {
  width: 100%; margin-top: .5rem; padding: .9rem;
  background: var(--ink); color: var(--white); border: none;
  font-family: var(--font-ui); font-size: .8rem; font-weight: 700;
  letter-spacing: 1.8px; text-transform: uppercase; cursor: pointer;
  transition: background .18s;
}
.gate-btn:hover { background: var(--red); }
.gate-error { font-family: var(--font-ui); font-size: .8rem; color: var(--red); text-align: center; margin-top: .4rem; }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--hairline);
  padding: 1rem 2rem;
  background: var(--white);
  position: sticky; top: 0; z-index: 40;
}
.header-container {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.company-logo-link { display: inline-flex; align-items: center; text-decoration: none; }
.company-logo-img  { height: 46px; width: auto; display: block; }
.header-contact {
  font-family: var(--font-ui); font-size: .72rem; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; text-decoration: none;
  color: var(--ink); padding: 4px 0; border-bottom: 2px solid transparent;
  transition: border-color .15s;
}
.header-contact:hover { border-bottom-color: var(--red); }

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.page-title {
  background: var(--ink); color: var(--white);
  padding: 5rem 2rem 4.5rem; text-align: center;
  border-bottom: 4px solid var(--red);
}
.page-title h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 600; letter-spacing: .04em; margin-bottom: 1.1rem;
}
.page-title p {
  font-family: var(--font-body); color: rgba(255,255,255,.72);
  max-width: 640px; margin: 0 auto; font-size: 1.05rem; line-height: 1.7;
}
.status-count {
  font-family: var(--font-ui); font-size: .78rem; letter-spacing: 1.5px;
  text-transform: uppercase; margin-top: 2rem; color: rgba(255,255,255,.45);
}

/* ── Layout ──────────────────────────────────────────────────────────────────── */
.content-layout {
  display: flex; max-width: 1200px; margin: 3rem auto; gap: 3rem;
  padding: 0 2rem; align-items: flex-start;
}

/* ── Filters sidebar ─────────────────────────────────────────────────────────── */
.sidebar-filters {
  width: 240px; flex-shrink: 0;
  position: sticky; top: 88px;
}
.filter-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.8rem; border-bottom: 2px solid var(--ink); padding-bottom: .6rem;
}
.filter-header h3 {
  font-size: 1rem; font-weight: 600; letter-spacing: .08em; color: var(--ink);
}
.filter-header button {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-ui); font-size: .72rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: var(--blue);
  text-decoration: underline; text-underline-offset: 3px;
}
.filter-header button:hover { color: var(--red); }
.filter-group { margin-bottom: 1.8rem; font-family: var(--font-ui); }
.filter-group label {
  display: block; font-size: .72rem; font-weight: 600; color: var(--gray);
  margin-bottom: .5rem; text-transform: uppercase; letter-spacing: 1px;
}
.filter-group input[type="text"] {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--hairline);
  background: var(--white); font-family: var(--font-ui); font-size: .88rem;
}
.filter-group input[type="text"]:focus { outline: none; border-color: var(--blue); }
.filter-group input[type="range"]    { width: 100%; accent-color: var(--blue); cursor: pointer; margin-top: .3rem; }
.filter-group span { font-size: .85rem; font-weight: 600; display: block; margin-top: .35rem; color: var(--ink); }

.mobile-menu-btn {
  display: none; background: var(--ink); color: var(--white); border: none;
  padding: .65rem 1.2rem; font-family: var(--font-ui); font-size: .72rem;
  font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer;
  margin-bottom: 1.5rem;
}

/* ── Card grid ───────────────────────────────────────────────────────────────── */
.property-grid {
  flex-grow: 1;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem;
}

/* ── Property card ───────────────────────────────────────────────────────────── */
.property-card {
  background: var(--white); border: 1px solid var(--hairline);
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease;
  position: relative; display: flex; flex-direction: column;
}
.property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(22,22,22,.1);
}
.property-card:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Signature red slash */
.property-card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--red) 50%, transparent 50%); z-index: 2;
}

.card-img { width: 100%; height: 210px; object-fit: cover; display: block; }

.img-placeholder {
  height: 210px; background: var(--paper-dim);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
}
.img-placeholder span { font-family: var(--font-head); font-size: 1rem; font-weight: 600; letter-spacing: .4em; color: var(--blue); }
.img-placeholder small { font-family: var(--font-ui); font-size: .62rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gray); }

.card-details { padding: 1.4rem 1.5rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card-title   { font-size: 1.15rem; font-weight: 600; letter-spacing: .02em; margin-bottom: .9rem; line-height: 1.25; }
.card-stats   { display: flex; gap: 1.5rem; margin-bottom: .9rem; font-family: var(--font-ui); }
.stat-val     { font-size: 1.2rem; font-weight: 700; color: var(--red); display: block; }
.stat-lbl     { font-size: .68rem; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; margin-top: 1px; }
.card-utilities {
  font-size: .85rem; font-family: var(--font-ui); color: var(--blue);
  padding-top: .9rem; border-top: 1px solid var(--hairline); margin-top: auto; line-height: 1.5;
}
.card-more {
  font-family: var(--font-ui); font-size: .68rem; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--gray); margin-top: .9rem;
  transition: color .15s;
}
.property-card:hover .card-more { color: var(--red); }

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1; text-align: center;
  padding: 4.5rem 2rem; border: 1px solid var(--hairline); background: var(--white);
}
.empty-state h3 { font-size: 1.4rem; letter-spacing: .04em; margin-bottom: .65rem; }
.empty-state p  { color: var(--gray); max-width: 360px; margin: 0 auto 1.5rem; font-family: var(--font-ui); }
.empty-state button {
  background: var(--ink); color: var(--white); border: none;
  padding: .75rem 1.5rem; font-family: var(--font-ui); font-size: .75rem;
  font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer;
}
.empty-state button:hover { background: var(--red); }

/* ── Pill tags ───────────────────────────────────────────────────────────────── */
.pill-container { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .75rem; }
.pill {
  background: var(--paper-dim); color: var(--blue);
  font-family: var(--font-ui); font-size: .68rem; font-weight: 600;
  padding: .3rem .65rem; text-transform: uppercase; letter-spacing: .5px;
  border: 1px solid var(--hairline-dark);
}

/* ── Full-screen modal ───────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--paper);
  display: none; flex-direction: column;
  overflow: hidden;
}
.modal-overlay.active { display: flex; }

/* Top bar */
.modal-topbar {
  flex-shrink: 0; background: var(--white);
  border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; gap: 1rem; padding: .9rem 2rem;
}
.modal-back-btn {
  display: flex; align-items: center; gap: .5rem;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-ui); font-size: .75rem; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink); padding: 0;
  transition: color .15s;
}
.modal-back-btn:hover { color: var(--red); }
.modal-back-btn svg   { flex-shrink: 0; }
.modal-topbar-title   {
  font-family: var(--font-head); font-size: 1rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}

/* Two-column body */
.modal-body-wrap {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 1fr 400px;
  width: 100%; overflow: hidden;
}
.modal-gallery-col {
  overflow-y: auto; padding: 2rem;
  border-right: 1px solid var(--hairline);
}
.modal-sidebar-col {
  overflow-y: auto; padding: 2rem 2rem 3rem;
}

/* Gallery */
.modal-gallery { width: 100%; }
.modal-main-img,
.modal-gallery .img-placeholder {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block;
}
.modal-gallery .img-placeholder { height: auto; min-height: 240px; }
.thumb-strip    { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.modal-thumb    {
  width: 86px; height: 60px; flex-shrink: 0; object-fit: cover;
  cursor: pointer; border: 2px solid transparent; padding: 0; background: none; display: block;
  transition: border-color .15s;
}
.modal-thumb.active { border-color: var(--red); }
.modal-thumb:hover  { border-color: var(--blue); }

/* Sidebar detail */
.modal-sidebar h2 {
  font-size: 1.9rem; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; line-height: 1.15;
}
.modal-price   { font-family: var(--font-ui); color: var(--red); font-weight: 700; font-size: 1.2rem; margin-top: .6rem; }
.modal-divider { border: none; border-top: 1px solid var(--hairline); margin: 1.4rem 0; }
.modal-label   {
  font-family: var(--font-ui); font-size: .68rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--gray); margin-bottom: .4rem;
}
.modal-utilities { font-size: .95rem; line-height: 1.65; }

/* Floor plan button */
.fp-open-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1.2rem; padding: .6rem 1rem;
  background: var(--paper-dim); border: 1px solid var(--hairline-dark);
  color: var(--blue); font-family: var(--font-ui); font-size: .78rem;
  font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.fp-open-btn:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* CTA column */
.modal-cta-col { display: flex; flex-direction: column; gap: .7rem; margin-top: 1.8rem; }
.req-btn {
  display: block; width: 100%; text-align: center;
  background: var(--blue); color: var(--white);
  padding: .9rem 1.4rem; text-decoration: none;
  font-family: var(--font-ui); font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  border: 1px solid var(--blue); cursor: pointer; transition: background .15s, border-color .15s;
}
.req-btn:hover            { background: var(--ink); border-color: var(--ink); }
.req-btn-outline          { background: transparent; color: var(--blue); }
.req-btn-outline:hover    { background: var(--blue); color: var(--white); }
.copy-link-btn {
  background: none; border: none; font-family: var(--font-ui);
  font-size: .72rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--gray); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
  text-align: center; transition: color .15s;
}
.copy-link-btn:hover { color: var(--red); }

/* Mobile modal */
@media (max-width: 880px) {
  .modal-body-wrap  { grid-template-columns: 1fr; overflow-y: auto; overflow-x: hidden; }
  .modal-gallery-col{ border-right: none; border-bottom: 1px solid var(--hairline); padding: 1.5rem; overflow-y: visible; }
  .modal-sidebar-col{ padding: 1.5rem 1.5rem 3rem; overflow-y: visible; }
  .modal-topbar     { padding: .8rem 1.5rem; }
  .modal-sidebar h2 { font-size: 1.5rem; }
}

/* ── Floor plan overlay ──────────────────────────────────────────────────────── */
.fp-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; background: #111;
}
.fp-overlay-bar {
  flex-shrink: 0; height: 54px; background: var(--ink);
  border-bottom: 3px solid var(--red);
  display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem;
}
.fp-overlay-title {
  font-family: var(--font-head); font-size: 1rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--white);
}
.fp-overlay-close {
  background: none; border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.7); font-size: 1.2rem; cursor: pointer;
  padding: 4px 10px; line-height: 1; transition: color .15s, border-color .15s;
}
.fp-overlay-close:hover { color: var(--white); border-color: rgba(255,255,255,.6); }
.fp-overlay-body {
  flex: 1; overflow: auto;
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
}
.fp-overlay-body img    { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.fp-overlay-body iframe { width: 100%; height: 100%; border: none; background: var(--white); }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
  background: #111111; color: var(--white);
  padding: 60px 40px 40px; margin-top: 80px; border-top: 4px solid var(--red);
}
.footer-content {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px;
}
.footer-section h4 {
  font-family: var(--font-ui); font-size: 13px; letter-spacing: 1.5px;
  text-transform: uppercase; margin-bottom: 14px; color: var(--white);
}
.footer-section p  { font-size: 14px; color: #999; margin: 7px 0; }
.footer-section a  { color: #ccc; text-decoration: none; }
.footer-section a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  max-width: 1200px; margin: 2rem auto 0;
  padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: flex-end;
}
.staff-login-btn {
  font-family: var(--font-ui); font-size: .68rem; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,.25); text-decoration: none;
  padding: 4px 0; border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.staff-login-btn:hover { color: rgba(255,255,255,.6); border-bottom-color: rgba(255,255,255,.35); }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
/* ── Tablet ─────────────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .content-layout {
    flex-direction: column;
    margin: 2rem auto;
    gap: 2rem;
    padding: 0 1.5rem;
  }
  .mobile-menu-btn { display: inline-flex; align-self: flex-start; }
  .sidebar-filters {
    width: 100%;
    position: static;
    display: none;
    border: 1px solid var(--hairline);
    padding: 1.5rem;
    background: var(--white);
  }
  .sidebar-filters.active { display: block; }
  .page-title { padding: 3.5rem 1.5rem 3rem; }
  .site-footer { padding: 44px 24px 32px; }
}

/* ── Phone ──────────────────────────────────────────────────────────────────
   Fix the "hugs left" bug: give the whole page comfortable side margins,
   center the hero copy, keep cards edge-to-edge but with breathing room. */
@media (max-width: 620px) {
  .site-header      { padding: .9rem 1.25rem; }
  .header-container { padding: 0; gap: .5rem; }
  .company-logo-img { height: 40px; }

  .page-title {
    padding: 3rem 1.25rem 2.5rem;
    text-align: center;
  }
  .page-title h1 {
    font-size: clamp(1.9rem, 8vw, 2.4rem);
    margin-bottom: .9rem;
  }
  .page-title p  { font-size: .98rem; padding: 0 .25rem; }
  .status-count  { font-size: .72rem; margin-top: 1.4rem; }

  .content-layout {
    padding: 0 1.25rem;
    margin: 2rem auto 0;
  }

  .property-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .card-img, .img-placeholder { height: 220px; }
  .card-details               { padding: 1.25rem 1.25rem 1.35rem; }
  .card-title                 { font-size: 1.15rem; }
  .card-stats                 { gap: 1.75rem; }

  /* Filter drawer: sensible padding */
  .sidebar-filters { padding: 1.25rem 1.25rem 1rem; }

  /* Footer stacks and centers nicely */
  .site-footer      { padding: 40px 1.5rem 32px; margin-top: 60px; }
  .footer-content   { flex-direction: column; gap: 24px; text-align: center; }
  .footer-section h4{ margin-bottom: 10px; }
  .footer-bottom    { justify-content: center; }

  /* Modal: give the top bar and content real side padding */
  .modal-topbar        { padding: .75rem 1.25rem; }
  .modal-topbar-title  { font-size: .9rem; }
  .modal-gallery-col   { padding: 1.25rem 1.25rem 1rem; }
  .modal-sidebar-col   { padding: 1rem 1.25rem 3rem; }
  .modal-sidebar h2    { font-size: 1.4rem; }
  .modal-price         { font-size: 1.05rem; }

  /* Buttons: comfortable tap targets */
  .req-btn             { padding: .95rem 1.2rem; font-size: .8rem; }
  .fp-open-btn         { padding: .7rem 1rem; font-size: .78rem; }

  /* Floor plan overlay pad */
  .fp-overlay-bar      { padding: 0 1.25rem; }
  .fp-overlay-body     { padding: 1rem; }
}

/* ── Small phone (iPhone SE etc.) ───────────────────────────────────────── */
@media (max-width: 400px) {
  .page-title h1 { font-size: 1.75rem; }
  .card-img, .img-placeholder { height: 200px; }
  .card-stats    { gap: 1.25rem; }
  .stat-val      { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* ── Multi floor plan buttons ─────────────────────────────────────────── */
.fp-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.2rem;
}
.fp-btn-row .fp-open-btn { margin-top: 0; }
