/* The public home page (includes/public_bar.php, includes/public_home.php), 2026-11-01 redesign.
   Everything is scoped to .pub-*, over Bootstrap and main.css. A phone never scrolls sideways. */
:root {
  --pub-green: #87b53a;
  --pub-deep: #2f6a12;
  --pub-ink: #1f2a17;
  --pub-body: #4a5641;
  --pub-muted: #5d6852;
  --pub-line: #d9e0cc;
  --pub-tint: #f4f7ee;
  --pub-dark: #1f2a17;
  --pub-on-dark: #d6dccd;
  --pub-on-dark-link: #c8e6a0;
}
/* clip, not hidden: hidden would make body the scroller and the sticky bar would stop sticking. */
html, body.pub-page { overflow-x: clip; max-width: 100%; }
body.pub-page { background: #fff; color: var(--pub-ink); font-family: Lato, system-ui, sans-serif; letter-spacing: normal; }
body.pub-noscroll { overflow: hidden; }
.pub, .pub-bar, .pub-modal { font-family: Lato, system-ui, sans-serif; color: var(--pub-ink); overflow-wrap: anywhere; }
.pub *, .pub-bar *, .pub-modal * { box-sizing: border-box; }
.pub h1, .pub h2, .pub h3, .pub p, .pub-modal h2, .pub-modal p { text-align: left; }
.pub p, .pub-modal p { margin: 0; }
body.pub-page { margin: 0; padding-bottom: 0 !important; }
.pub a, .pub-modal a { color: var(--pub-deep); }
.pub a:hover { color: #1f4a0a; }
.pub h1, .pub h2, .pub h3, .pub-modal h2 { font-family: Lato, system-ui, sans-serif; font-weight: 900; color: inherit; letter-spacing: normal; text-transform: none; margin: 0; }

/* Top bar */
.pub-bar { position: sticky; top: 0; z-index: 1030; background: var(--pub-green); display: flex; align-items: center; gap: 24px; padding: 10px 40px; }
.pub-bar-logo { display: block; line-height: 0; flex-shrink: 0; }
.pub-bar-logo img { height: 44px; width: auto; border-radius: 3px; }
.pub-bar-links { display: flex; gap: 28px; margin-left: auto; }
.pub-bar-links a { color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; letter-spacing: 1px; text-transform: uppercase; }
.pub-bar-links a:hover { color: #fff; text-decoration: underline; }
.pub-bar-end { display: flex; align-items: center; gap: 8px; }
.pub-bar-login { background: #fff; color: var(--pub-deep); border: 0; font: inherit; font-weight: 700; font-size: 15px; padding: 10px 18px; border-radius: 6px; text-decoration: none; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.pub-bar-login:hover { color: var(--pub-deep); background: #f1f6e8; }
.pub-bar-menu { display: none; width: 44px; height: 44px; border: 0; border-radius: 6px; background: transparent; color: #fff; align-items: center; justify-content: center; padding: 0; }

/* Sections */
.pub section { scroll-margin-top: 72px; }
.pub-wrap { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.pub-band { padding: 64px 40px; }
.pub-tint { background: var(--pub-tint); }
.pub h2 { font-size: 34px; }
.pub-lead { margin: 0; font-size: 18px; line-height: 1.5; color: var(--pub-body); }
.pub-muted { font-size: 16px; line-height: 1.6; color: var(--pub-on-dark); }

.pub-hero { max-width: 1240px; margin: 0 auto; padding: 64px 40px 56px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: center; }
.pub-hero-solo { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.pub-hero-text { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pub-eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--pub-deep); }
.pub h1 { font-size: 48px; line-height: 1.1; }
.pub-hero-photo { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pub-hero-photo img { width: 100%; height: 380px; object-fit: cover; border-radius: 12px; display: block; }
.pub-hero-photo figcaption { font-size: 14px; color: var(--pub-muted); }

.pub-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pub-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; background: var(--pub-deep); color: #fff !important; text-decoration: none; font-weight: 700; font-size: 17px; padding: 12px 24px; border-radius: 8px; border: 2px solid var(--pub-deep); text-align: center; }
.pub-btn:hover { background: #255810; border-color: #255810; }
.pub-btn-line { background: transparent; color: var(--pub-deep) !important; }
.pub-btn-line:hover { background: var(--pub-tint); }
.pub-btn-light { background: var(--pub-green); border-color: var(--pub-green); color: var(--pub-ink) !important; }
.pub-btn-light:hover { background: #9bc653; border-color: #9bc653; }
.pub-btn-line-light { background: transparent; border-color: var(--pub-on-dark-link); color: var(--pub-on-dark-link) !important; }
.pub-btn-line-light:hover { background: rgba(255, 255, 255, .06); }
.pub-btn-full { width: 100%; }

/* Offices */
.pub-building { font-size: 22px; margin-top: 8px !important; }
.pub-unit { background: #fff; border: 1px solid var(--pub-line); border-radius: 12px; overflow: hidden; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pub-unit-media { width: 100%; height: 100%; min-height: 300px; max-height: 420px; object-fit: cover; display: block; background: #e8ecdf; }
.pub-unit-body { padding: 32px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; min-width: 0; }
.pub-unit-body h3 { font-size: 26px; }
.pub-unit-addr { font-size: 15px; color: var(--pub-muted); margin-top: -10px; }
.pub-price { font-size: 30px; font-weight: 900; color: var(--pub-deep); }
.pub-price span { font-size: 17px; font-weight: 400; color: var(--pub-body); }
.pub-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; }
.pub-facts div { background: var(--pub-tint); border-radius: 8px; padding: 12px; min-width: 0; display: flex; flex-direction: column; }
.pub-facts span { font-size: 13px; color: var(--pub-muted); }
.pub-facts b { font-size: 18px; }

/* Office share */
.pub-share { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pub-share div { border: 1px solid var(--pub-line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pub-share span { font-size: 16px; color: var(--pub-muted); }
.pub-share b { font-size: 34px; font-weight: 900; }

/* Contact + footer: the dark end of the page */
.pub-dark { background: var(--pub-dark); color: #fff; }
.pub-contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: center; }
.pub-contact-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pub-dark h2 { color: #fff; }
.pub .pub-contact-link { color: var(--pub-on-dark-link); font-size: 22px; font-weight: 700; }
.pub .pub-contact-link:hover { color: #e2f3c9; }
.pub-contact-buttons { flex-direction: column; gap: 12px; }
.pub-qr { display: flex; align-items: center; gap: 20px; justify-content: flex-end; }
.pub-qr span { font-size: 16px; color: var(--pub-on-dark); text-align: right; max-width: 180px; }
.pub-qr img { width: 160px; height: 160px; background: #fff; padding: 8px; border-radius: 8px; display: block; }
.pub-footer { background: var(--pub-dark); border-top: 1px solid #3a4630; padding: 24px max(40px, calc((100% - 1160px) / 2)) 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 15px; color: var(--pub-on-dark); }
.pub .pub-footer a { color: var(--pub-on-dark-link); font-weight: 700; }

.pub-phone-only { display: none; }

/* Back to the top */
.pub-top { position: fixed; right: 20px; bottom: 20px; z-index: 1020; width: 52px; height: 52px; border-radius: 50%; background: var(--pub-deep); color: #fff !important; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); border: 2px solid #fff; }
.pub-top:hover { background: #255810; }
.pub-top[hidden] { display: none; }
@media (max-width: 760px) { .pub-top { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); width: 48px; height: 48px; } }

/* Login pop-up */
.pub-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(20, 26, 15, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pub-modal[hidden] { display: none; }
.pub-modal-card { width: 100%; max-width: 420px; background: #fff; border-radius: 14px; padding: 24px 28px 28px; box-shadow: 0 16px 48px rgba(0, 0, 0, .3); display: flex; flex-direction: column; gap: 12px; }
.pub-modal-head { display: flex; align-items: center; justify-content: space-between; }
.pub-modal h2 { font-size: 24px; }
.pub-modal-x { width: 44px; height: 44px; border: 0; background: transparent; color: var(--pub-body); border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0; }
.pub-modal-x:hover { background: var(--pub-tint); }
.pub-modal form { display: flex; flex-direction: column; gap: 8px; }
.pub-modal label { font-size: 14px; font-weight: 700; color: var(--pub-body); margin-top: 4px; text-transform: none; letter-spacing: normal; }
.pub-modal .form-control { font-size: 16px; padding: 12px; border: 1px solid #b9c4a8; border-radius: 8px; }
.pub-modal .btn-outline-secondary { border-color: #b9c4a8; }
.pub-modal .pub-btn { margin-top: 10px; }
.pub-error { background: #fdecea; color: #8a1c12; border-radius: 8px; padding: 10px 12px; font-size: 15px; }
.pub-muted-dark { margin: 0; font-size: 14px; color: var(--pub-muted); }

/* Phone and small tablet */
@media (max-width: 760px) {
  .pub-bar { padding: 8px 16px; gap: 12px; justify-content: space-between; }
  .pub-bar-logo img { height: 36px; }
  .pub-bar-menu { display: inline-flex; }
  .pub-bar-links { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; flex-direction: column; gap: 0; background: var(--pub-green); border-top: 1px solid rgba(255, 255, 255, .35); padding: 4px 16px 12px; }
  .pub-bar-links.pub-open { display: flex; }
  .pub-bar-links a { padding: 12px 0; font-size: 16px; }
  .pub-bar-login { padding: 10px 14px; }

  .pub-band { padding: 32px 16px; }
  .pub-wrap { gap: 16px; }
  .pub h2 { font-size: 26px; }
  .pub-lead { font-size: 16px; }
  .pub-hero { grid-template-columns: minmax(0, 1fr); padding: 28px 16px 32px; gap: 16px; }
  .pub h1 { font-size: 34px; line-height: 1.12; }
  .pub-eyebrow { font-size: 13px; letter-spacing: 1.5px; }
  .pub-hero-photo { order: 0; }
  .pub-hero-photo img { height: 230px; }
  .pub-hero-photo figcaption { display: none; }
  .pub-actions { flex-direction: column; }
  .pub-actions .pub-btn { width: 100%; }

  .pub-unit { grid-template-columns: minmax(0, 1fr); }
  .pub-unit-media { min-height: 0; height: 240px; }
  .pub-unit-body { padding: 20px; gap: 14px; align-items: stretch; }
  .pub-unit-body h3 { font-size: 22px; }
  .pub-price { font-size: 26px; }
  .pub-price span { font-size: 15px; }
  .pub-facts { gap: 8px; }
  .pub-facts div { padding: 10px 8px; }
  .pub-facts span { font-size: 12px; }
  .pub-facts b { font-size: 15px; }

  .pub-share { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pub-share div { flex-direction: row; justify-content: space-between; align-items: center; padding: 16px 18px; }
  .pub-share b { font-size: 24px; }

  .pub-contact { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .pub-contact-main { gap: 14px; }
  .pub .pub-contact-link { font-size: 18px; text-align: center; }
  .pub-contact-main .pub-muted { text-align: center; font-size: 15px; }
  .pub-phone-only { display: flex; }
  .pub-desktop-only { display: none !important; }
  .pub-footer { padding: 20px 72px 28px 16px; flex-direction: column; gap: 8px; font-size: 14px; } /* right: room for the back-to-top arrow */

  .pub-modal { align-items: flex-start; padding: 72px 12px 12px; }
  .pub-modal-card { padding: 20px; }
}

/* The small public pages (reset_password.php, login_link.php): the form, then the dark footer at the bottom. */
body.pub-page:has(.pub-small) { min-height: 100vh; display: flex; flex-direction: column; }
.pub-small { flex: 1 0 auto; padding-top: 24px; font-family: Lato, system-ui, sans-serif; }
.pub-small h1 { font-family: Lato, system-ui, sans-serif; font-weight: 900; }
.pub-small .btn-success { background: var(--pub-deep); border-color: var(--pub-deep); font-weight: 700; min-height: 48px; display: flex; align-items: center; justify-content: center; }
.pub-small .btn-success:hover { background: #255810; border-color: #255810; }
.pub-footer a[href^="tel:"] { white-space: nowrap; }
