/* PropGlen S2-F — sitewide premium footer (canonical ivory #F8F9F6). */
/* ============================================================
   B2-U / B2-Uf / B2-V — Footer geometry + acceptance + closeout
   F1 — premium alignment + page-tail handoff polish (local)
   F1-R1 — density / alignment refinement (staging correction)
   Footer Layout Tightening Corrective V1 — desktop column cluster
   Public Footer Premium V3 — balanced IA columns (Explore…Contact)
   ============================================================ */

/* Specificity must beat body.pg-public .site-footer (#fff) and legacy dark .site-footer. */
html body .site-footer.pg-footer,
html body.pg-public .site-footer.pg-footer,
html body.home-page .site-footer.pg-footer,
html body.listings-page .site-footer.pg-footer,
html body.sale-page .site-footer.pg-footer,
html body.contact-body .site-footer.pg-footer,
html body.legal-body .site-footer.pg-footer,
html body.area-page-body .site-footer.pg-footer {
  margin: 0;
  /* Desktop spacing V1: compact premium height without crowding links */
  padding: 30px 0 16px;
  background: #f8f9f6;
  color: #475569;
  border-top: 1px solid rgba(6, 43, 91, 0.1);
  font-family: var(--pg-font-sans, "Plus Jakarta Sans", system-ui, sans-serif);
}

/*
 * Keep the same centred content-width system as .container / email strip.
 * Do NOT set width:100% / max-width:inherit — that cancelled .container and
 * pinned the brand to the viewport edge while contact/social overflowed right.
 */
.site-footer.pg-footer > .container.pg-footer__grid,
.site-footer.pg-footer > .container.pg-footer__bottom {
  width: min(var(--container, 1160px), calc(100% - 32px));
  max-width: min(1200px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

.site-footer.pg-footer .pg-footer__grid {
  display: grid;
  /* Footer Layout Tightening V1: fixed brand track; links cluster as a unit */
  grid-template-columns: minmax(10.5rem, 13.25rem) minmax(0, 1fr);
  gap: 12px 16px;
  align-items: start;
}

.site-footer.pg-footer .pg-footer__brand {
  display: grid;
  gap: 6px;
  max-width: 13.25rem;
  min-width: 0;
  justify-items: start;
  padding-top: 0;
}

.site-footer.pg-footer .pg-footer__brand .footer-brand-logo {
  width: min(168px, 100%);
  height: auto;
}

.site-footer.pg-footer .pg-footer__brand-link {
  display: inline-block;
  max-width: 100%;
  line-height: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
}

.site-footer.pg-footer .pg-footer__brand-link:focus {
  outline: none;
}

.site-footer.pg-footer .pg-footer__brand-link:focus-visible {
  outline: 2px solid #062b5b;
  outline-offset: 3px;
}

.site-footer.pg-footer .pg-footer__brand .footer-brand img,
.site-footer.pg-footer .pg-footer__brand .footer-brand-logo,
.site-footer.pg-footer .pg-footer__brand-link .footer-brand-logo {
  margin-bottom: 0;
  display: block;
  max-width: 100%;
  height: auto;
}

.site-footer.pg-footer .pg-footer__descriptor {
  margin: 0;
  color: #062b5b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.35;
}

.site-footer.pg-footer .pg-footer__tagline,
.site-footer.pg-footer .pg-footer__brand .footer-brand-tagline {
  margin: 0;
  color: #062b5b;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.site-footer.pg-footer .pg-footer__operator,
.site-footer.pg-footer .pg-footer__brand .footer-note,
.site-footer.pg-footer .pg-footer__operator,
.site-footer.pg-footer .footer-note {
  margin: 2px 0 0;
  margin-left: 0;
  max-width: 13.25rem;
  padding-top: 0;
  border-top: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #475569;
}

.site-footer.pg-footer .pg-footer__links {
  /* V3: balanced five-column navigation cluster */
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  justify-content: stretch;
  gap: 12px 18px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.site-footer.pg-footer .pg-footer__col {
  min-width: 0;
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-content: start;
  justify-items: stretch;
}

.site-footer.pg-footer .pg-footer__col > * {
  min-width: 0;
  max-width: 100%;
}

.site-footer.pg-footer .pg-footer__col h3 {
  margin: 0 0 5px;
  color: #062b5b;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: normal;
  hyphens: manual;
}

/* Avoid awkward heading wraps where column width allows */
@media (min-width: 1280px) {
  .site-footer.pg-footer .pg-footer__col:not([data-pg-footer-group="contact"]):not([data-pg-footer-group="trust"]) h3 {
    white-space: nowrap;
  }

  .site-footer.pg-footer .pg-footer__col[data-pg-footer-group="trust"] > a,
  .site-footer.pg-footer .pg-footer__col[data-pg-footer-group="legal"] > a,
  .site-footer.pg-footer .pg-footer__col[data-pg-footer-group="legal"] > button.pg-footer__cookie-prefs {
    overflow-wrap: normal;
    word-break: normal;
  }
}

.site-footer.pg-footer .pg-footer__col > a {
  display: block;
  min-height: 0;
  max-width: 100%;
  padding: 2px 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #475569;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 160ms ease;
}

.site-footer.pg-footer .pg-footer__col > a:hover,
.site-footer.pg-footer .pg-footer__col > a:focus-visible {
  color: #0ba360;
}

.site-footer.pg-footer .pg-footer__col > a:focus-visible {
  outline: 2px solid #0ba360;
  outline-offset: 3px;
  border-radius: 4px;
}

.site-footer.pg-footer .pg-footer__col--contact {
  gap: 1px;
  min-width: 0;
  max-width: none;
}

.site-footer.pg-footer .pg-footer__col--contact > a[href^="mailto:"] {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  letter-spacing: 0;
  max-width: 100%;
}

/* F1/F1-R1 + Layout Tightening V1: social + app stay under Contact */
.site-footer.pg-footer .pg-footer__contact-aside {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(6, 43, 91, 0.08);
  min-width: 0;
  max-width: 100%;
}

.site-footer.pg-footer .pg-footer__app-label {
  margin: 0;
  color: #062b5b;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

/* Prefer one social row when width permits; wrap only as last resort */
.site-footer.pg-footer .footer-link-groups .footer-social,
.site-footer.pg-footer .footer-social {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 0;
  box-sizing: border-box;
  overflow: visible;
}

.site-footer.pg-footer .footer-link-groups .footer-social > a,
.site-footer.pg-footer .footer-social a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(6, 43, 91, 0.12);
  border-radius: 9px;
  background: #ffffff;
  color: #062b5b;
  box-shadow: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.site-footer.pg-footer .footer-social__img {
  display: block;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.site-footer.pg-footer .footer-social__img--facebook {
  width: 20px;
  height: 20px;
}

.site-footer.pg-footer .footer-social__img--instagram,
.site-footer.pg-footer .footer-social__img--linkedin {
  width: 22px;
  height: 22px;
}

.site-footer.pg-footer .footer-social__img--youtube {
  width: 23px;
  height: 23px;
}

.site-footer.pg-footer .footer-social__img--tiktok {
  width: 21px;
  height: 21px;
}

.site-footer.pg-footer .footer-link-groups .footer-social > a:hover,
.site-footer.pg-footer .footer-link-groups .footer-social > a:focus-visible,
.site-footer.pg-footer .footer-social a:hover,
.site-footer.pg-footer .footer-social a:focus-visible {
  border-color: rgba(11, 163, 96, 0.4);
  background: #ffffff;
  opacity: 1;
  color: #062b5b;
}

.site-footer.pg-footer .footer-link-groups .footer-social > a:focus-visible,
.site-footer.pg-footer .footer-social a:focus-visible {
  outline: 2px solid #0ba360;
  outline-offset: 2px;
}

/* Play badge intrinsic width (~646px) must not size the contact grid track */
.site-footer.pg-footer .footer-app__badges,
.site-footer.pg-footer .footer-app__badge {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.site-footer.pg-footer .footer-app__badge-img {
  display: block;
  width: min(136px, 100%);
  max-width: 100%;
  height: auto;
}

.site-footer.pg-footer .pg-footer__bottom {
  margin-top: 18px;
  margin-bottom: 0;
  padding: 12px 0 0;
  border-top: 1px solid rgba(6, 43, 91, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
}

/* F1-R1: if a legacy analytics prefs control is injected, hide it when
   the retained footer Cookie preferences control is already present. */
.site-footer.pg-footer:has([data-rv-open-cookie-prefs]) .rv-analytics-prefs,
.site-footer.pg-footer:has(.pg-footer__cookie-prefs) #rv-analytics-prefs {
  display: none !important;
}

/*
 * Portal style.css forces light footer copy for dark ink pages.
 * Beat .site-footer .footer-bottom p / .footer-note so copyright is readable on #F8F9F6.
 */
.site-footer.pg-footer .pg-footer__bottom,
.site-footer.pg-footer .footer-bottom,
.site-footer.pg-footer .pg-footer__bottom p,
.site-footer.pg-footer .footer-bottom p {
  color: #334155;
}

.site-footer.pg-footer .pg-footer__bottom p {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .site-footer.pg-footer .pg-footer__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .site-footer.pg-footer .pg-footer__brand {
    max-width: 28rem;
  }

  .site-footer.pg-footer .pg-footer__links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    gap: 20px 18px;
  }

  .site-footer.pg-footer .pg-footer__col {
    max-width: 100%;
    flex: none;
  }

  .site-footer.pg-footer .pg-footer__col--contact {
    grid-column: 1 / -1;
    max-width: 100%;
  }

  .site-footer.pg-footer .pg-footer__contact-aside {
    max-width: 22rem;
  }

  .site-footer.pg-footer .footer-link-groups .footer-social,
  .site-footer.pg-footer .footer-social {
    flex-wrap: wrap;
  }
}

/*
 * B2-U mobile completion
 * - Mobile nav is visible only ≤760px (style.css). Clearance pad must match that,
 *   not the broader ≤900px footer rule (which left empty space at 768).
 * - home-main's 84px bottom pad was creating a large email→footer void; footer
 *   now owns end-of-page clearance instead.
 */

/* Tablet/narrow desktop with no floating nav: compact footer bottom, no fake clearance */
@media (min-width: 761px) and (max-width: 900px) {
  .site-footer.pg-footer {
    padding-bottom: 22px;
    background: #f8f9f6;
  }
}

/* Phone: nav visible — reserve space on footer surface only (continuous #F8F9F6) */
@media (max-width: 760px) {
  .site-footer.pg-footer {
    /*
     * Floating nav ≈71px + ~8px inset. Keep copyright clear of the nav
     * without restoring a large empty void.
     */
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    background: #f8f9f6;
  }

  /*
   * The sitewide shorthand padding (30px 0 16px) outranks the rule above.
   * Area index and area guides include the mobile nav. Agent directory and
   * profile templates do not, so they keep the compact footer.
   */
  html body.pg-public.areas-index-body .site-footer.pg-footer,
  html body.pg-public.area-page-body .site-footer.pg-footer {
    /* These pages include the inset mobile nav. 78px still clips it. */
    padding-bottom: var(--mobile-nav-clearance, calc(90px + env(safe-area-inset-bottom, 0px)));
    background: #f8f9f6;
  }

  /* Remove email→footer void created by main bottom padding intended for nav clearance */
  body.home-page .home-main {
    padding-bottom: 0;
  }

  body.home-page .pg-email {
    padding-top: 16px;
    padding-bottom: 8px;
  }

  html body .site-footer.pg-footer,
  html body.pg-public .site-footer.pg-footer,
  html body.home-page .site-footer.pg-footer {
    padding-top: 24px;
  }

  html body .site-footer.pg-footer .pg-footer__grid,
  .site-footer.pg-footer .pg-footer__grid {
    gap: 16px;
  }

  .site-footer.pg-footer .pg-footer__brand {
    gap: 6px;
    max-width: 100%;
  }

  .site-footer.pg-footer .footer-brand-logo {
    width: clamp(128px, 40vw, 152px);
  }

  .site-footer.pg-footer .pg-footer__descriptor {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
  }

  .site-footer.pg-footer .pg-footer__tagline,
  .site-footer.pg-footer .pg-footer__brand .footer-brand-tagline {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .site-footer.pg-footer .pg-footer__operator,
  .site-footer.pg-footer .pg-footer__brand .footer-note {
    margin-top: 2px;
    font-size: 0.74rem;
    line-height: 1.4;
  }

  .site-footer.pg-footer .pg-footer__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 14px 12px;
  }

  .site-footer.pg-footer .pg-footer__col h3 {
    margin: 0 0 5px;
    font-size: 0.68rem;
    white-space: normal;
  }

  .site-footer.pg-footer .pg-footer__col > a,
  .site-footer.pg-footer .pg-footer__col > button.pg-footer__cookie-prefs {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 4px 0;
    font-size: 0.88rem;
  }

  .site-footer.pg-footer .pg-footer__col--contact {
    grid-column: 1 / -1;
    margin-top: 2px;
  }

  .site-footer.pg-footer .pg-footer__contact-aside {
    margin-top: 10px;
    padding-top: 10px;
    gap: 8px;
    max-width: 100%;
  }

  .site-footer.pg-footer .footer-link-groups .footer-social,
  .site-footer.pg-footer .footer-social {
    margin-top: 0;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
  }

  .site-footer.pg-footer .footer-link-groups .footer-social > a,
  .site-footer.pg-footer .footer-social a {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .site-footer.pg-footer .pg-footer__app-label {
    margin: 0;
  }

  .site-footer.pg-footer .footer-app__badge-img {
    width: min(132px, 100%);
  }

  .site-footer.pg-footer .pg-footer__bottom {
    margin-top: 16px;
    padding: 12px 0 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.76rem;
  }

  body.home-page .home-email-close__frame,
  body.home-page .pg-email__strip {
    grid-template-columns: 1fr;
    padding: 16px 14px;
  }

  body.home-page .pg-email__actions {
    align-items: stretch;
    min-width: 0;
  }

  body.home-page .pg-email__actions .button {
    width: 100%;
    min-height: 44px;
  }
}

@media (max-width: 374px) {
  .site-footer.pg-footer .pg-footer__links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
    gap: 16px 12px;
  }

  .site-footer.pg-footer .footer-brand-logo {
    width: 128px;
  }

  .site-footer.pg-footer .pg-footer__tagline,
  .site-footer.pg-footer .pg-footer__brand .footer-brand-tagline {
    font-size: 0.88rem;
  }
}

/* ============================================================
   B2-T — Purposeful premium motion (selective; no opacity hide base)
   ============================================================ */

body.home-page .pg-needs__editorial,
body.home-page .pg-email__strip,
body.home-page .pg-list__actions .button,
body.home-page .pg-email__actions .button,
body.home-page .pg-needs__actions .button {
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, background-color 160ms ease;
}

/* Hero property photo crossfade on subsequent swaps only */
body.home-page .home-hero__photo img {
  transition: opacity 550ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.home-page .home-hero__photo img.pg-hero-photo-fade {
  animation: pg-hero-photo-crossfade 550ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pg-hero-photo-crossfade {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

/* Editorial fade/rise — transform + opacity only after JS marks prep; no-JS stays fully visible */
html.pg-motion-ready body.home-page .pg-motion-prep:not(.pg-motion-in) {
  opacity: 0.001;
  transform: translate3d(0, 14px, 0);
}

html.pg-motion-ready body.home-page .pg-motion-prep {
  transition:
    opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--pg-stagger, 0ms);
  will-change: opacity, transform;
}

html.pg-motion-ready body.home-page .pg-motion-prep.pg-motion-in,
html.pg-motion-ready body.home-page .pg-motion-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

html.pg-motion-ready body.home-page .pg-motion-card.pg-motion-prep:not(.pg-motion-in) {
  opacity: 0.001;
  transform: translate3d(0, 14px, 0);
}

/* Tune existing home-rise keyframes used by main.js */
@media (prefers-reduced-motion: no-preference) {
  body.home-page .home-rise {
    animation: pg-section-rise 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

@keyframes pg-section-rise {
  from { transform: translate3d(0, 14px, 0); }
  to { transform: none; }
}

@media (hover: hover) and (pointer: fine) {
  body.home-page .pg-needs__editorial:hover,
  body.home-page .pg-email__strip:hover {
    border-color: rgba(11, 163, 96, 0.28);
  }

  body.home-page .pg-needs__editorial:focus-within,
  body.home-page .pg-list__actions .button:focus-visible,
  body.home-page .pg-email__actions .button:focus-visible,
  body.home-page .pg-needs__actions .button:focus-visible {
    outline: 2px solid var(--pg-emerald);
    outline-offset: 3px;
  }

  body.home-page .home-section-listings .home-property-card {
    transition: border-color 180ms ease, box-shadow 180ms ease;
  }

  body.home-page .home-section-listings .home-property-card:hover {
    border-color: rgba(11, 81, 63, 0.28);
    box-shadow: 0 12px 28px rgba(23, 32, 51, 0.08);
  }

  body.home-page .button,
  .site-footer.pg-footer .pg-footer__col > a {
    transition-duration: 160ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home-page .pg-needs__editorial,
  body.home-page .pg-email__strip,
  body.home-page .pg-list__actions .button,
  body.home-page .pg-email__actions .button,
  body.home-page .home-hero__photo img,
  body.home-page .home-section-listings .home-property-card,
  body.home-page .button {
    transition: none !important;
    animation: none !important;
  }

  html.pg-motion-ready body.home-page .pg-motion-prep,
  html.pg-motion-ready body.home-page .pg-motion-prep:not(.pg-motion-in),
  html.pg-motion-ready body.home-page .pg-motion-prep.pg-motion-in,
  html.pg-motion-ready body.home-page .pg-motion-in,
  html.pg-motion-ready body.home-page .pg-motion-card.pg-motion-prep:not(.pg-motion-in) {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Featured Sale — coordinated with Featured rentals; navy / pale-blue only */
body.home-page .pg-journey-featured-sale {
  background: linear-gradient(180deg, #eaf3fa 0%, #ffffff 42%);
}

body.home-page .pg-featured-sale-intro .eyebrow {
  color: #062b5b;
}

body.home-page .home-listing-panel--sale .home-listing-link--sale.button-primary {
  background: #062b5b;
  border-color: #062b5b;
  color: #ffffff;
}

body.home-page .home-listing-panel--sale .home-listing-link--sale.button-primary:hover,
body.home-page .home-listing-panel--sale .home-listing-link--sale.button-primary:focus-visible {
  background: #041f42;
  border-color: #041f42;
  color: #ffffff;
}

body.home-page .home-featured-card--sale .home-property-card--sale {
  border-color: rgba(6, 43, 91, 0.14);
}

body.home-page .home-featured-card--sale .home-property-media {
  aspect-ratio: 4 / 3;
}

body.home-page .home-featured-card--sale .sale-asking-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: #062b5b;
  color: #ffffff;
  min-height: 0;
  padding: 7px 11px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(6, 43, 91, 0.14);
}

body.home-page .home-featured-card--sale .sale-asking-badge::before {
  content: none !important;
  display: none !important;
}

body.home-page .home-featured-card--sale .sale-asking-badge__label {
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.88);
}

body.home-page .home-featured-card--sale .sale-asking-badge__value {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

body.home-page .home-featured-card--sale .home-card-link,
body.home-page .home-featured-card--sale .home-card-link--sale {
  background: #062b5b;
  border-color: #062b5b;
  color: #ffffff;
  font-weight: 650;
}

@media (hover: hover) and (pointer: fine) {
  body.home-page .home-featured-card--sale .home-property-card:hover .home-card-link,
  body.home-page .home-featured-card--sale .home-property-card:hover .home-card-link--sale {
    background: #041f42;
    border-color: #041f42;
    color: #ffffff;
  }
}

body.home-page .home-featured-card--sale .home-property-avail {
  color: #062b5b;
}

/* S2-C — dual stacked hero photographs (Rent LCP + preloaded Sale) */
body.home-page .home-hero__visual {
  position: relative;
}

body.home-page .home-hero__visual .home-hero__photo {
  inset: 0;
}

body.home-page .home-hero__visual .home-hero__photo[hidden] {
  display: none !important;
}

body.home-page .home-hero__visual .home-hero__photo--sale:not([hidden]) {
  display: block;
}

/* Areas Rent/Buy selector (independent of hero) */
body.home-page .pg-areas-mode {
  margin: 0 0 14px;
}

body.home-page .pg-areas-mode__track {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #f3f6f4;
  border: 1px solid rgba(6, 43, 91, 0.12);
}

body.home-page .pg-areas-mode__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #062b5b;
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  line-height: 1;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

body.home-page [data-pg-areas-root][data-pg-areas-mode="rent"] .pg-areas-mode__btn[data-pg-areas-mode-btn="rent"].is-active,
body.home-page .pg-areas-mode__btn[data-pg-areas-mode-btn="rent"].is-active {
  background: #0ba360;
  color: #ffffff;
}

body.home-page [data-pg-areas-root][data-pg-areas-mode="buy"] .pg-areas-mode__btn[data-pg-areas-mode-btn="buy"].is-active,
body.home-page .pg-areas-mode__btn[data-pg-areas-mode-btn="buy"].is-active {
  background: #062b5b;
  color: #ffffff;
}

body.home-page .pg-areas-mode__btn[data-pg-areas-mode-btn="rent"]:focus-visible {
  outline: 2px solid #0ba360;
  outline-offset: 2px;
}

body.home-page .pg-areas-mode__btn[data-pg-areas-mode-btn="buy"]:focus-visible {
  outline: 2px solid #062b5b;
  outline-offset: 2px;
}

body.home-page .home-areas-grid--sale .home-area-card--sale {
  border-color: rgba(6, 43, 91, 0.16);
}

body.home-page .home-areas-grid--sale .home-area-card--sale:hover {
  border-color: rgba(6, 43, 91, 0.4);
}

body.home-page .home-areas-grid--sale .home-area-card__count {
  color: #062b5b;
}

body.home-page .home-areas-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

body.home-page .home-areas-all.button-primary {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 650;
}

body.home-page .home-areas-all--rent.button-primary {
  background: #0ba360;
  border-color: #0ba360;
  color: #ffffff;
}

body.home-page .home-areas-all--rent.button-primary:hover,
body.home-page .home-areas-all--rent.button-primary:focus-visible {
  background: #099656;
  border-color: #099656;
  color: #ffffff;
}

body.home-page .home-areas-all--sale.button-primary {
  background: #062b5b;
  border-color: #062b5b;
  color: #ffffff;
}

body.home-page .home-areas-all--sale.button-primary:hover,
body.home-page .home-areas-all--sale.button-primary:focus-visible {
  background: #041f42;
  border-color: #041f42;
  color: #ffffff;
}

body.home-page .home-text-link--sale {
  color: #062b5b;
  font-weight: 650;
}

/* Buyer editorial + Buy needs journey */
body.home-page .pg-why__card--buy {
  background: linear-gradient(180deg, #eaf3fa 0%, #ffffff 70%);
  border: 1px solid rgba(6, 43, 91, 0.14);
}

body.home-page .pg-why__card-kicker {
  margin: 0 0 4px;
  color: #062b5b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.home-page .pg-needs__buy {
  background: linear-gradient(180deg, #eaf3fa 0%, #ffffff 62%);
  border: 1px solid rgba(6, 43, 91, 0.14);
  border-radius: 16px;
  padding: clamp(16px, 2.2vw, 22px);
}

body.home-page .pg-needs__buy .eyebrow {
  color: #062b5b;
}

body.home-page .pg-needs__buy h3 {
  margin: 0 0 8px;
  color: #062b5b;
}

body.home-page .pg-needs__buy-cta.button-primary {
  background: #062b5b;
  border-color: #062b5b;
  color: #ffffff;
}

body.home-page .pg-needs__buy-cta.button-primary:hover,
body.home-page .pg-needs__buy-cta.button-primary:focus-visible {
  background: #041f42;
  border-color: #041f42;
  color: #ffffff;
}

body.home-page .pg-email__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

body.home-page .pg-email__sale-link {
  white-space: normal;
}

@media (max-width: 767px) {
  body.home-page[data-pg-sale-surfaces-live="1"] .pg-needs__editorial:has(.pg-needs__buy:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home-page .pg-areas-mode__btn,
  body.home-page .home-hero__photo {
    transition: none !important;
  }
}

/* S2-B addendum — homepage Saved Search dialog mobile usability (no clip). */
body.home-page .rv-saved-search-dialog {
  max-height: min(92dvh, calc(100vh - 1.25rem));
  overflow: hidden;
}
body.home-page .rv-saved-search-dialog__panel {
  max-height: min(92dvh, calc(100vh - 1.25rem));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
@media (max-width: 430px) {
  body.home-page .rv-saved-search-dialog {
    max-width: calc(100vw - 1rem);
    width: calc(100vw - 1rem);
  }
  body.home-page .rv-saved-search-dialog__foot {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  body.home-page .rv-saved-search-dialog__foot .bayut-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========== S2-C editorial parity closeout (A–E) ========== */


/* S2-F — beat legacy dark .site-footer tokens */
.site-footer.pg-footer,
.site-footer.pg-footer p {
  color: #475569;
}
.site-footer.pg-footer h3 {
  color: #062b5b;
}
.site-footer.pg-footer::before {
  background: rgba(6, 43, 91, 0.1);
  opacity: 1;
}
.site-footer.pg-footer .pg-footer__col > a {
  color: #475569;
}
.site-footer.pg-footer .pg-footer__col > button.pg-footer__cookie-prefs {
  display: block;
  width: 100%;
  margin: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #475569;
  cursor: pointer;
}
.site-footer.pg-footer .pg-footer__col > button.pg-footer__cookie-prefs:hover,
.site-footer.pg-footer .pg-footer__col > button.pg-footer__cookie-prefs:focus-visible {
  color: #0ba360;
}
.site-footer.pg-footer .pg-footer-rent-group,
.site-footer.pg-footer .pg-footer-sale-group,
.site-footer.pg-footer .pg-footer-buy-group {
  display: grid;
  gap: 0;
  min-width: 0;
}
.site-footer.pg-footer .pg-footer-rent-group > a,
.site-footer.pg-footer .pg-footer-sale-group > a,
.site-footer.pg-footer .pg-footer-buy-group > a,
.site-footer.pg-footer a.pg-footer-sale,
.site-footer.pg-footer a.pg-footer-nd {
  display: block;
  padding-top: 1px;
  padding-bottom: 1px;
  color: #475569;
  text-decoration: none;
  transition: color 160ms ease;
}
.site-footer.pg-footer a.pg-footer-sale:hover,
.site-footer.pg-footer a.pg-footer-sale:focus-visible,
.site-footer.pg-footer a.pg-footer-nd:hover,
.site-footer.pg-footer a.pg-footer-nd:focus-visible {
  color: #0ba360;
}
body[data-pg-sale-nav-live="1"] .site-footer.pg-footer a.pg-footer-sale,
body[data-pg-nd-nav-live="1"] .site-footer.pg-footer a.pg-footer-nd {
  display: block !important;
}
.site-footer.pg-footer .pg-footer-rent-group > a.pg-footer-explore-sub,
.site-footer.pg-footer .pg-footer-sale-group > a.pg-footer-sale-sub,
.site-footer.pg-footer .pg-footer-buy-group > a.pg-footer-buy-sub,
.site-footer.pg-footer .pg-footer-explore-sub,
.site-footer.pg-footer .pg-footer-sale-sub,
.site-footer.pg-footer .pg-footer-buy-sub {
  padding-left: 0.85rem;
  font-size: 0.86rem;
  line-height: 1.35;
}
.site-footer.pg-footer .pg-footer-rent-group > a:hover,
.site-footer.pg-footer .pg-footer-rent-group > a:focus-visible,
.site-footer.pg-footer .pg-footer-sale-group > a:hover,
.site-footer.pg-footer .pg-footer-sale-group > a:focus-visible,
.site-footer.pg-footer .pg-footer-buy-group > a:hover,
.site-footer.pg-footer .pg-footer-buy-group > a:focus-visible {
  color: #0ba360;
}
.site-footer.pg-footer .pg-footer-rent-group > a:focus-visible,
.site-footer.pg-footer .pg-footer-sale-group > a:focus-visible,
.site-footer.pg-footer .pg-footer-buy-group > a:focus-visible {
  outline: 2px solid #0ba360;
  outline-offset: 3px;
  border-radius: 4px;
}
.site-footer.pg-footer .pg-preview-notice--footer {
  margin: 8px 0 0;
  max-width: 42rem;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.4;
}

/* ============================================================
   F1 — Page-tail handoff (content → footer)
   Footer owns the calm ivory breathing room. Upstream mains / tail
   sections should not stack large empty pads before it.
   ============================================================ */

body.pg-public.listings-page main.bayut-serp,
body.pg-public.commercial-page main.bayut-serp,
body.pg-public.sale-page.bayut-serp-page main.bayut-serp,
body.pg-public.area-page-body main.bayut-serp,
body.pg-public.agents-page main,
body.pg-public.contact-body main,
body.pg-public.legal-body main {
  padding-bottom: 12px;
}

body.pg-public .bayut-popular {
  margin-top: 24px;
  margin-bottom: 0;
  padding-top: 18px;
  padding-bottom: 4px;
}

/* Sale discovery: disclaimer after popular searches is real content, keep compact */
body.pg-public.sale-page .sale-disclaimer,
body.pg-public.sale-page.bayut-serp-page .sale-disclaimer {
  margin-top: 12px;
  margin-bottom: 0;
}

body.pg-public .bayut-pagination {
  margin-top: 18px;
  margin-bottom: 4px;
}

body.pg-public .bayut-serp__results:last-child,
body.pg-public .bayut-serp__layout > .bayut-serp__results:last-of-type {
  margin-bottom: 0;
}

/* Homepage email strip → footer: keep strip compact; footer pad completes rhythm */
body.home-page .pg-email {
  padding-bottom: clamp(16px, 2.4vw, 28px);
}

body.home-page .site-footer.pg-footer {
  padding-top: 28px;
}

/* Detail similar/related tails when present */
body.pg-public .detail-similar,
body.pg-public .detail-related,
body.pg-public [data-sale-similar],
body.pg-public .sale-similar {
  margin-bottom: 8px;
  padding-bottom: 4px;
}

@media (max-width: 760px) {
  body.pg-public.listings-page main.bayut-serp,
  body.pg-public.commercial-page main.bayut-serp,
  body.pg-public.sale-page.bayut-serp-page main.bayut-serp,
  body.pg-public.area-page-body main.bayut-serp {
    padding-bottom: 8px;
  }

  body.pg-public .bayut-popular {
    margin-top: 20px;
    padding-top: 16px;
    padding-bottom: 2px;
  }

  body.home-page .site-footer.pg-footer {
    padding-top: 24px;
  }
}

/* ============================================================
   Public Footer Premium V3 — IA balance + gated slot hygiene
   ============================================================ */

.site-footer.pg-footer.pg-footer--v3 .pg-footer__col h3 {
  margin-bottom: 8px;
}

.site-footer.pg-footer.pg-footer--v3 .pg-footer__col > a,
.site-footer.pg-footer.pg-footer--v3 .pg-footer__col > button.pg-footer__cookie-prefs {
  font-size: 0.84rem;
}

/* Live Buy / ND anchors sit as peer Explore links (no submenu indent). */
.site-footer.pg-footer.pg-footer--v3 a.pg-footer-sale,
.site-footer.pg-footer.pg-footer--v3 a.pg-footer-buy,
.site-footer.pg-footer.pg-footer--v3 a.pg-footer-nd {
  display: block;
  padding: 2px 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #475569;
  text-decoration: none;
}

.site-footer.pg-footer.pg-footer--v3 a.pg-footer-sale:hover,
.site-footer.pg-footer.pg-footer--v3 a.pg-footer-sale:focus-visible,
.site-footer.pg-footer.pg-footer--v3 a.pg-footer-buy:hover,
.site-footer.pg-footer.pg-footer--v3 a.pg-footer-buy:focus-visible,
.site-footer.pg-footer.pg-footer--v3 a.pg-footer-nd:hover,
.site-footer.pg-footer.pg-footer--v3 a.pg-footer-nd:focus-visible {
  color: #0ba360;
}

.site-footer.pg-footer.pg-footer--v3 a.pg-footer-sale:focus-visible,
.site-footer.pg-footer.pg-footer--v3 a.pg-footer-buy:focus-visible,
.site-footer.pg-footer.pg-footer--v3 a.pg-footer-nd:focus-visible {
  outline: 2px solid #0ba360;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Dormant gated placeholders must not reserve vertical space. */
.site-footer.pg-footer.pg-footer--v3 [data-pg-sale-footer-slot][hidden],
.site-footer.pg-footer.pg-footer--v3 [data-pg-nd-footer-slot][hidden],
.site-footer.pg-footer.pg-footer--v3 [data-pg-mi-footer-slot][hidden],
.site-footer.pg-footer.pg-footer--v3 [data-pg-owner-connect-footer-slot][hidden] {
  display: none !important;
}

@media (min-width: 1101px) and (max-width: 1279px) {
  .site-footer.pg-footer.pg-footer--v3 .pg-footer__links {
    gap: 10px 14px;
  }

  .site-footer.pg-footer.pg-footer--v3 .pg-footer__col > a,
  .site-footer.pg-footer.pg-footer--v3 .pg-footer__col > button.pg-footer__cookie-prefs,
  .site-footer.pg-footer.pg-footer--v3 a.pg-footer-sale,
  .site-footer.pg-footer.pg-footer--v3 a.pg-footer-buy,
  .site-footer.pg-footer.pg-footer--v3 a.pg-footer-nd {
    font-size: 0.8rem;
  }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .site-footer.pg-footer.pg-footer--v3 .pg-footer__links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer.pg-footer.pg-footer--v3 .pg-footer__col--contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .site-footer.pg-footer.pg-footer--v3 .pg-footer__links {
    grid-template-columns: 1fr;
    gap: 18px 0;
  }

  .site-footer.pg-footer.pg-footer--v3 .pg-footer__col--contact {
    grid-column: auto;
  }
}
