/* =========================================================
   CA Affordable Homes — Main Stylesheet
   Mobile-first, responsive, clean Squarespace-inspired
   ========================================================= */

/* ---------------------------------------------------------
   SECTION: CSS Variables
   --------------------------------------------------------- */
:root {
  /* Brand Colors */
  --color-text-primary: #f5f5f5;
  --color-text-secondary: #eae6e1;
  --color-accent: #a74d4a;
  --color-sage: #818b7e;
  --color-sage-dark: #6b7469;
  /* Dedicated button colors — darker than display sage for 4.5:1 contrast with #f5f5f5 */
  --color-sage-btn: #676e65;
  --color-sage-btn-hover: #555c53;
  --color-footer-bg: #1a1b1a;

  /* Page Colors */
  --color-white: #ffffff;
  --color-light-bg: #f8f7f5;
  --color-text-dark: #2a2a2a;
  --color-text-body: #444444;
  --color-text-muted: #777777;
  --color-border-light: #e8e4df;

  /* Typography */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Shadows & Radii */
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.07);
  --shadow-nav: 0 1px 8px rgba(0, 0, 0, 0.08);
  --radius-card: 8px;
  --radius-btn: 6px;

  /* Spacing */
  --section-py: 48px;
  --max-width: 1200px;
  --nav-height: 72px;
}

@media (min-width: 768px) {
  :root {
    --section-py: 80px;
  }
}

/* ---------------------------------------------------------
   SECTION: Reset & Base
   --------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Enforce the HTML hidden attribute even when display is set by another rule */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

@keyframes page-enter {
  from {
    opacity: 0.4;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  font-family: var(--font-body);
  color: var(--color-text-body);
  background: var(--color-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

main,
.site-footer {
  animation: page-enter 0.4s ease-out both;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-sage);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-sage-dark);
}

ul {
  list-style: none;
}

/* ---------------------------------------------------------
   SECTION: Typography
   --------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-dark);
  line-height: 1.25;
  font-weight: 500;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.2rem; }

p {
  max-width: 68ch;
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-sage);
  margin-bottom: 0.75rem;
}

/* ---------------------------------------------------------
   SECTION: Layout Utilities
   --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 40px;
  }
}

.section {
  padding: var(--section-py) 0;
}

.section--sage {
  background: var(--color-sage);
}

.section--sage h2,
.section--sage h3,
.section--sage h4,
.section--sage p,
.section--sage .section-label {
  color: var(--color-text-primary);
}

.section--sage .section-label {
  color: var(--color-text-secondary);
  opacity: 0.8;
}

/* FA icons inside feature cards on sage backgrounds */
.section--sage .feature-card .feature-icon {
  color: rgba(245, 245, 245, 0.85);
}

/* Prevent intro-section p from overriding sage text color */
.section--sage .intro-section p {
  color: var(--color-text-primary);
}

.section--light {
  background: var(--color-light-bg);
}

.section--dark {
  background: #2d2e2c;
}

.section--dark h2,
.section--dark p {
  color: var(--color-text-primary);
}

.text-center {
  text-align: center;
}

.text-center p {
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header.text-center {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 3rem;
}

/* Horizontal rule accent */
hr.accent-rule {
  border: none;
  height: 2px;
  width: 48px;
  background: var(--color-accent);
  margin: 1rem 0 1.5rem;
}

.text-center hr.accent-rule {
  margin-left: auto;
  margin-right: auto;
}

/* ---------------------------------------------------------
   SECTION: Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* Primary: sage green fill */
.btn-primary {
  background: var(--color-sage-btn);
  color: var(--color-text-primary);
  border-color: var(--color-sage-btn);
}

.btn-primary:hover {
  background: var(--color-sage-btn-hover);
  border-color: var(--color-sage-btn-hover);
  color: var(--color-text-primary);
  transform: translateY(-1px);
}

/* Secondary: sage outline */
.btn-secondary {
  background: transparent;
  color: var(--color-sage-btn);
  border-color: var(--color-sage-btn);
}

.btn-secondary:hover {
  background: var(--color-sage-btn);
  color: var(--color-text-primary);
  transform: translateY(-1px);
}

/* Accent: reddish fill */
.btn-accent {
  background: var(--color-accent);
  color: var(--color-text-primary);
  border-color: var(--color-accent);
}

.btn-accent:hover {
  background: #924240;
  border-color: #924240;
  color: var(--color-text-primary);
  transform: translateY(-1px);
}

/* Light: white fill on dark backgrounds */
.btn-light {
  background: var(--color-white);
  color: var(--color-text-dark);
  border-color: var(--color-white);
}

.btn-light:hover {
  background: var(--color-text-secondary);
  border-color: var(--color-text-secondary);
  color: var(--color-text-dark);
  transform: translateY(-1px);
}

/* On sage background */
.section--sage .btn-secondary {
  color: var(--color-text-primary);
  border-color: var(--color-text-primary);
}

.section--sage .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* ---------------------------------------------------------
   SECTION: Navigation
   --------------------------------------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-nav {
  background: var(--color-white);
  box-shadow: var(--shadow-nav);
  height: var(--nav-height);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .nav-inner {
    padding: 0 40px;
  }
}

/* Logo / Wordmark */
.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-text-dark);
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1.2;
}

.nav-logo span {
  color: var(--color-sage);
}

.nav-logo:hover {
  color: var(--color-text-dark);
}

@media (min-width: 900px) {
  .nav-logo {
    font-size: 1.65rem;
  }
}

@media (min-width: 1200px) {
  .nav-logo {
    font-size: 1.9rem;
  }
}

/* Desktop Links */
.nav-links {
  position: relative;
  display: none;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-body);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--color-sage-btn);
  background: rgba(103, 110, 101, 0.08);
}

.nav-links a.active {
  color: var(--color-sage-btn);
}

/* Sliding active indicator — positioned by main.js */
.nav-indicator {
  position: absolute;
  bottom: -2px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  pointer-events: none;
  /* transition applied dynamically by JS */
}

/* CTA button in nav */
.nav-cta {
  display: none;
  margin-left: 1rem;
}

@media (min-width: 900px) {
  .nav-cta {
    display: flex;
  }
}

/* Hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.nav-hamburger:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav-hamburger:focus-visible {
  outline: 3px solid var(--color-sage);
  outline-offset: 2px;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 900px) {
  .nav-hamburger {
    display: none;
  }
}

/* Mobile menu */
.nav-mobile {
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-border-light);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  padding: 1rem 20px 1.5rem;
  z-index: 999;
  /* Smooth reveal */
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

.nav-mobile.is-open {
  max-height: 500px;
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}

.nav-mobile a:not(.btn) {
  display: block;
  padding: 0.7rem 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-body);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border-light);
  transition: color 0.2s ease;
}

.nav-mobile a:not(.btn):hover,
.nav-mobile a:not(.btn).active {
  color: var(--color-sage-btn);
}

.nav-mobile .btn {
  width: 100%;
  justify-content: center;
}

/* ---------------------------------------------------------
   SECTION: Hero
   --------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    min-height: 680px;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 70%;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 27, 26, 0.72) 0%,
    rgba(26, 27, 26, 0.45) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 60px 20px;
}

@media (min-width: 768px) {
  .hero-content {
    padding: 80px 40px;
  }
}

.hero-content h1 {
  color: var(--color-text-primary);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.hero-content p {
  color: var(--color-text-secondary);
  font-size: 1.15rem;
  margin-bottom: 2rem;
  max-width: 55ch;
}

/* ---------------------------------------------------------
   SECTION: Feature Grid (3 cols)
   --------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 600px) {
  .feature-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  /* 5-card grid: 2 columns at tablet, lone 5th card centered */
  .feature-grid--5 {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-grid--5 .feature-card:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 50%;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  /* 5-card grid: explicit 6-column placement — 3 on row 1, 2 centered on row 2 */
  .feature-grid--5 {
    grid-template-columns: repeat(6, 1fr);
  }
  .feature-grid--5 .feature-card:nth-child(1) { grid-column: 1 / 3; }
  .feature-grid--5 .feature-card:nth-child(2) { grid-column: 3 / 5; }
  .feature-grid--5 .feature-card:nth-child(3) { grid-column: 5 / 7; }
  .feature-grid--5 .feature-card:nth-child(4) { grid-column: 2 / 4; }
  .feature-grid--5 .feature-card:nth-child(5) {
    grid-column: 4 / 6;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

/* 2×2 grid — exactly 2 columns on tablet+ (never 3 or 4) */
@media (min-width: 600px) {
  .feature-grid--2x2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-card {
  padding: 1.75rem;
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.feature-card .feature-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
  color: var(--color-sage);
  line-height: 1;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.925rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Sage background feature cards */
.section--sage .feature-card {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.section--sage .feature-card h3 {
  color: var(--color-text-primary);
}

.section--sage .feature-card p {
  color: var(--color-text-secondary);
}

/* ---------------------------------------------------------
   SECTION: Benefit Cards (No Pressure section)
   --------------------------------------------------------- */
.benefit-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 600px) {
  .benefit-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Center lone last card when it sits alone on a row */
  .benefit-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 50%;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 900px) {
  .benefit-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  /* Reset — all 3 fill their own column at desktop */
  .benefit-card:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

.benefit-card {
  background: rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.25rem;
  border-left: 3px solid rgba(245, 245, 245, 0.3);
}

.benefit-card h4 {
  color: var(--color-text-primary);
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.benefit-card p {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin: 0;
  opacity: 0.85;
}

/* ---------------------------------------------------------
   SECTION: Testimonials
   --------------------------------------------------------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .testimonials-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.testimonial-card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 3.5rem;
  color: var(--color-sage);
  opacity: 0.25;
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  line-height: 1;
}

.testimonial-card blockquote {
  font-size: 0.925rem;
  color: var(--color-text-body);
  line-height: 1.65;
  margin-bottom: 1rem;
  padding-top: 1rem;
}

.testimonial-card cite {
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-sage);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.testimonial-sample-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 1.5rem;
  font-style: italic;
}

/* ---------------------------------------------------------
   SECTION: CTA Bar
   --------------------------------------------------------- */
.cta-bar {
  padding: 56px 0;
}

.cta-bar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* ---------------------------------------------------------
   SECTION: Page Header (inner pages)
   --------------------------------------------------------- */
.page-header {
  background: var(--color-sage);
  padding: 56px 0 48px;
}

.page-header h1 {
  margin-bottom: 0.75rem;
  color: var(--color-text-primary);
}

.page-header p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  max-width: 60ch;
  margin: 0;
}

.page-header .section-label {
  color: var(--color-text-secondary);
  opacity: 0.8;
}

/* ---------------------------------------------------------
   SECTION: About Page
   --------------------------------------------------------- */
.who-we-serve-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .who-we-serve-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.serve-column {
  padding: 2rem;
  border-radius: var(--radius-card);
  background: var(--color-light-bg);
}

.serve-column h3 {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-border-light);
}

.serve-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.serve-column ul li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.95rem;
  color: var(--color-text-body);
}

.serve-column ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-sage);
}


.disclaimer-block {
  background: var(--color-light-bg);
  border-left: 3px solid var(--color-border-light);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  font-style: italic;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  max-width: 72ch;
  margin: 0 auto;
}

/* ---------------------------------------------------------
   SECTION: Services Page
   --------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
  }
}

.services-column h2 {
  margin-bottom: 0.5rem;
}

.services-column .column-intro {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.service-item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border-light);
}

.service-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.service-item h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-item h4 i {
  color: var(--color-sage);
  font-size: 0.9rem;
}

.service-item ul {
  list-style: none;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.service-item ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--color-text-body);
}

.service-item ul li i {
  color: var(--color-sage);
  margin-top: 0.22rem;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* Services divider */
.services-divider {
  display: none;
}

@media (min-width: 900px) {
  .services-divider {
    display: block;
    width: 1px;
    background: var(--color-border-light);
    position: absolute;
    top: var(--section-py);
    bottom: var(--section-py);
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ---------------------------------------------------------
   SECTION: Listings / Homes Page
   --------------------------------------------------------- */
#listings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 600px) {
  #listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  #listings-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.listing-status {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
  grid-column: 1 / -1;
}

.listing-status p {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin: 0 auto;
  max-width: 50ch;
}

.listing-status i {
  display: block;
  font-size: 2rem;
  color: var(--color-sage);
  opacity: 0.4;
  margin-bottom: 1rem;
}

/* Property Card */
.property-card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.property-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.11);
}

/* Property image with accent border */
.property-card__image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 4px solid var(--color-accent);
}

.property-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.property-card:hover .property-card__image-wrap img {
  transform: scale(1.03);
}

/* Status badge */
.status-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-badge--available {
  background: rgba(72, 144, 99, 0.92);
  color: #fff;
}

.status-badge--coming-soon {
  background: rgba(120, 120, 120, 0.82);
  color: #fff;
}

/* Card body */
.property-card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.property-card__name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-text-dark);
  margin-bottom: 0.4rem;
}

.property-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.property-card__meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.property-card__meta i {
  color: var(--color-sage);
  font-size: 0.75rem;
}

.property-card__price {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-sage);
  margin-bottom: 0.5rem;
}

.property-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(129, 139, 126, 0.12);
  color: var(--color-sage);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.property-card__description {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  /* Truncate to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.property-card__footer {
  margin-top: auto;
}

.property-card__footer .btn {
  width: 100%;
  justify-content: center;
}

/* ---------------------------------------------------------
   SECTION: Interest Sign-Up Form
   --------------------------------------------------------- */
.interest-form-section {
  background: var(--color-light-bg);
  border-top: 1px solid var(--color-border-light);
}

/* ---------------------------------------------------------
   SECTION: Forms
   --------------------------------------------------------- */
.form-group {
  margin-bottom: 1.25rem;
}

/* Two side-by-side form fields (e.g. First Name / Last Name); stacks on small screens */
.form-row {
  display: flex;
  gap: 0.75rem;
}
.form-row .form-group {
  flex: 1;
  min-width: 0;
}
@media (max-width: 480px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-dark);
  margin-bottom: 0.4rem;
}

.form-label .optional {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin-left: 0.25rem;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.65rem 0.875rem;
  font-family: var(--font-body);
  font-size: 0.925rem;
  color: var(--color-text-dark);
  background: var(--color-white);
  border: 1.5px solid var(--color-border-light);
  border-radius: var(--radius-btn);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.form-control::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-sage);
  box-shadow: 0 0 0 3px rgba(129, 139, 126, 0.18);
}

/* ── Partner panel: choice + property form ── */
.partner-back-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.partner-back-btn:hover { color: var(--color-text); }

/* File upload zone */
.prop-upload-zone {
  position: relative;
  border: 2px dashed var(--color-sage);
  border-radius: 8px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  background: #fff;
}
.prop-upload-zone:hover,
.prop-upload-zone.is-dragover {
  background: rgba(129, 139, 126, 0.07);
}
.prop-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.prop-upload-icon {
  font-size: 1.75rem;
  color: var(--color-sage);
  margin-bottom: 0.4rem;
  display: block;
}
.prop-upload-text {
  font-size: 0.925rem;
  color: var(--color-text);
  margin: 0 0 0.2rem;
}
.prop-upload-link { color: var(--color-sage); text-decoration: underline; }
.prop-upload-sub  { font-size: 0.78rem; color: var(--color-text-muted); margin: 0; }

/* Uploaded file list */
.prop-file-list {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.prop-file-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: #fff;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}
.prop-file-icon  { color: var(--color-sage); flex-shrink: 0; }
.prop-file-name  { flex: 1; word-break: break-all; }
.prop-file-size  { color: var(--color-text-muted); white-space: nowrap; flex-shrink: 0; }
.prop-file-remove {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  flex-shrink: 0;
  line-height: 1;
}
.prop-file-remove:hover { color: #922b21; }

/* Validation error state */
.form-group.has-error .form-control {
  border-color: #c0392b;
  background-color: #fdf6f6;
}
.form-group.has-error .form-control:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}
.form-group.has-error .il-radio-group {
  border-left: 3px solid #c0392b;
  padding-left: 0.625rem;
}
.form-error-msg {
  color: #c0392b;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  line-height: 1.4;
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

.form-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 0.5rem;
}

/* Two-column contact forms */
.contact-forms-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .contact-forms-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
  }
}

.contact-form-panel {
  background: var(--color-white);
  border-radius: var(--radius-card);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.contact-form-panel h2 {
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
}

.contact-form-panel .panel-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.75rem;
}

/* ---------------------------------------------------------
   SECTION: FAQ
   --------------------------------------------------------- */
.faq-section h2 {
  margin-bottom: 1.5rem;
}

.faq-group {
  margin-bottom: 3rem;
}

.faq-item {
  border-bottom: 1px solid var(--color-border-light);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.1rem 0;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-dark);
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--color-sage);
}

.faq-question:focus-visible {
  outline: 3px solid var(--color-sage);
  outline-offset: 2px;
  border-radius: 3px;
}

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-sage);
  transition: transform 0.25s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.is-open {
  max-height: 600px;
}

.faq-answer-inner {
  padding: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--color-text-body);
  line-height: 1.7;
}

/* ---------------------------------------------------------
   SECTION: Partners / Intro text sections
   --------------------------------------------------------- */
.intro-section {
  max-width: 820px;
  margin: 0 auto;
}

.intro-section p {
  font-size: 1.05rem;
  color: var(--color-text-body);
  max-width: none;
}

.partners-blurb {
  max-width: 640px;
}

/* ---------------------------------------------------------
   SECTION: Contact Info Block
   --------------------------------------------------------- */
.contact-info-bar {
  background: var(--color-light-bg);
  padding: 2rem 0;
  border-top: 1px solid var(--color-border-light);
}

.contact-info-bar .contact-info-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.contact-info-bar p {
  margin: 0;
  font-size: 0.925rem;
  color: var(--color-text-muted);
}

.contact-info-bar a {
  color: var(--color-sage);
  font-weight: 500;
}

.contact-response-note {
  text-align: center;
  padding: 1.25rem 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ---------------------------------------------------------
   SECTION: Footer
   --------------------------------------------------------- */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-text-secondary);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-text-primary);
  text-decoration: none;
  display: block;
  margin-bottom: 0.75rem;
}

.footer-logo span {
  color: var(--color-sage);
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  opacity: 0.75;
  max-width: 32ch;
  margin: 0;
}

.footer-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav-links a {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  opacity: 0.75;
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer-nav-links a:hover {
  opacity: 1;
  color: var(--color-text-primary);
}

.footer-contact p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  opacity: 0.75;
  margin: 0;
  max-width: none;
}

.footer-contact a {
  color: var(--color-text-secondary);
  opacity: 0.75;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-contact a:hover {
  opacity: 1;
}

/* Social icons */
.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--color-text-primary);
}

.social-link:focus-visible {
  outline: 2px solid var(--color-sage);
  outline-offset: 2px;
}

/* Footer bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  opacity: 0.55;
  margin: 0;
  max-width: none;
}

/* Equal Housing Opportunity + DRE licensing row */
.footer-eho-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Logo + caption stacked block */
.footer-eho-logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  width: 80px;
}

.footer-eho-img {
  display: block;
  width: 60px !important;
  max-width: 60px !important;
  height: auto !important;
  filter: brightness(0) invert(1);
  opacity: 0.42;
}

.footer-eho-label {
  display: block;
  font-size: 0.5rem !important;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  opacity: 0.42;
  text-align: center;
  line-height: 1.3;
  width: 80px;
}

.footer-eho-text p {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  opacity: 0.5;
  margin: 0 0 0.2rem;
  max-width: none;
}

.footer-eho-text p:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------
   SECTION: Utility / Misc
   --------------------------------------------------------- */
/* Accent top border on content sections */
.section--accent-top {
  border-top: 3px solid var(--color-accent);
}

/* Subtle separator line with accent */
.accent-line {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
  margin: 1rem 0 1.5rem;
}

/* Info text on sage bg — excludes .btn so button colors are not overridden */
.section--sage a:not(.btn) {
  color: var(--color-text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Two-column layout helper */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 900px) {
  .two-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Spacer */
.spacer { display: block; }
.spacer--sm { height: 1.5rem; }
.spacer--md { height: 2.5rem; }
.spacer--lg { height: 4rem; }

/* Visually hidden (accessible) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------
   SECTION: About — Mission Image
   --------------------------------------------------------- */

/* Grid wrapper: text column drives the row height; image column stretches to match */
.about-mission-grid {
  align-items: stretch;
  gap: 4rem;
}

/* Image column: relative container so the image can fill it absolutely */
.about-mission-img-wrap {
  position: relative;
  min-height: 300px;
  border-radius: 8px;
  overflow: hidden;
}

/* Image fills the wrapper exactly — does not affect row height calculation */
.about-mission-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ---------------------------------------------------------
   SECTION: About — Approach Grid (2×2 centered)
   --------------------------------------------------------- */
.approach-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 820px;
  margin: 0 auto;
}

@media (min-width: 560px) {
  .approach-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------------------------------------------------------
   SECTION: Services — Photo Strip
   --------------------------------------------------------- */
.photo-strip {
  width: 100%;
  height: 280px;
  /* Aerial neighborhood shot — naturally wide composition works well as a strip */
  background-image: url('https://images.unsplash.com/photo-1448630360428-65456885c650?w=800&h=280&fit=crop&crop=center&auto=format');
  background-size: cover;
  background-position: center;
}

@media (min-width: 768px) {
  .photo-strip {
    height: 360px;
    background-image: url('https://images.unsplash.com/photo-1448630360428-65456885c650?w=1600&h=360&fit=crop&crop=center&auto=format');
  }
}

/* ---------------------------------------------------------
   SECTION: Testimonials Carousel
   --------------------------------------------------------- */
.testimonials-carousel {
  position: relative;
}

.carousel-track-wrapper {
  overflow: hidden;
  border-radius: 8px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  flex-shrink: 0;
  padding: 0 0.625rem;
  box-sizing: border-box;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.carousel-btn {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: var(--color-text-dark);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.2s;
  flex-shrink: 0;
}

.carousel-btn:hover {
  background: var(--color-accent);
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.is-active {
  background: var(--color-accent);
  transform: scale(1.3);
}

/* Sage-background carousel overrides */
.section--sage .carousel-dot {
  background: rgba(255, 255, 255, 0.35);
}

.section--sage .carousel-dot.is-active {
  background: var(--color-text-dark);
}

.section--sage .carousel-btn {
  background: rgba(255, 255, 255, 0.25);
  color: var(--color-text-dark);
}

.section--sage .carousel-btn:hover {
  background: var(--color-text-dark);
  color: #fff;
}

/* ---------------------------------------------------------
   SECTION: Notify Me — Region Map + Picker
   --------------------------------------------------------- */
.notify-intro {
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.notify-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 820px) {
  .notify-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Map column */
.notify-map-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.map-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.map-cities-note {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-align: center;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sd-map {
  width: 100%;
  max-width: 260px;
}

/* SVG region groups */
.map-region-group rect {
  fill: #e2e6e0;
  stroke: #fff;
  stroke-width: 3;
  cursor: pointer;
  transition: fill 0.18s ease;
}

.map-region-group:hover rect,
.map-region-group:focus rect {
  fill: #c4cdc1;
  outline: none;
}

.map-region-group.is-selected rect {
  fill: var(--color-sage);
}

.map-region-group text,
.map-region-group tspan {
  font-family: var(--font-body);
  font-size: 10px;
  fill: #4a5447;
  pointer-events: none;
  transition: fill 0.18s ease;
}

.map-region-group.is-selected text,
.map-region-group.is-selected tspan {
  fill: #fff;
}

.map-region-group:focus-visible rect {
  outline: 2px solid var(--color-sage);
  outline-offset: 2px;
}

/* Region checkboxes */
.region-picker {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.region-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  border: 1.5px solid var(--color-border-light);
  background: var(--color-white);
  transition: border-color 0.18s ease, background 0.18s ease;
  font-size: 0.875rem;
  user-select: none;
}

.region-label:hover {
  border-color: var(--color-sage);
  background: #f1f3f0;
}

.region-label.is-selected {
  border-color: var(--color-sage);
  background: #ecefea;
  font-weight: 500;
}

.region-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--color-sage);
  cursor: pointer;
  flex-shrink: 0;
}

/* Mobile: center the map */
@media (max-width: 820px) {
  .notify-map-col {
    order: -1;
  }
  .sd-map {
    max-width: 280px;
  }
}

/* ---------------------------------------------------------
   SECTION: Animations
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------
   SECTION: Phase 2 — Interest List Questionnaire
   --------------------------------------------------------- */

/* Document-ready callout */
.il-callout {
  background: rgba(107, 116, 105, 0.08);
  border-left: 3px solid var(--color-sage);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.il-callout h3 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 0.65rem;
}
.il-callout ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.il-callout ul li {
  font-size: 0.875rem;
  color: var(--color-text-body);
}
.il-callout__time {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  font-style: italic;
}
.il-callout__time i {
  color: var(--color-sage);
  margin-right: 0.3rem;
}

/* Progress indicator */
.il-progress {
  margin-bottom: 1.75rem;
}
.il-progress__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-sage);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.il-progress__track {
  height: 4px;
  background: var(--color-border-light);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.il-progress__fill {
  height: 100%;
  background: var(--color-sage);
  border-radius: 99px;
  transition: width 0.35s ease;
}
.il-steps {
  display: flex;
  justify-content: space-between;
}
.il-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
}
.il-step__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border-light);
  border: 2px solid var(--color-border-light);
  transition: background 0.25s, border-color 0.25s;
}
.il-step.is-active .il-step__dot,
.il-step.is-done .il-step__dot {
  background: var(--color-sage);
  border-color: var(--color-sage);
}
.il-step__label {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}
.il-step.is-active .il-step__label {
  color: var(--color-sage);
  font-weight: 600;
}

/* Section heading */
.il-section-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-text-dark);
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--color-border-light);
  margin-bottom: 1.25rem;
}
.il-section-intro {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  font-style: italic;
}

/* Styled radio/checkbox pill labels */
.il-radio-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.il-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border: 1.5px solid var(--color-border-light);
  border-radius: var(--radius-btn);
  cursor: pointer;
  font-size: 0.875rem;
  background: var(--color-white);
  transition: border-color 0.18s, background 0.18s;
  user-select: none;
}
.il-radio-label:hover {
  border-color: var(--color-sage);
  background: #f1f3f0;
}
.il-radio-label input[type="radio"],
.il-radio-label input[type="checkbox"] {
  accent-color: var(--color-sage);
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}
.il-radio-label:has(input:checked) {
  border-color: var(--color-sage);
  background: #ecefea;
  font-weight: 500;
}

/* Conditional sub-fields */
.il-conditional {
  display: none;
  padding: 0.85rem 1rem;
  border-left: 2px solid var(--color-sage);
  margin-top: 0.6rem;
  margin-bottom: 0.25rem;
  background: rgba(107, 116, 105, 0.05);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}
.il-conditional.is-visible {
  display: block;
}

/* Repeating block (income members, employment entries) */
.il-repeating-block {
  border: 1.5px solid var(--color-border-light);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  margin-bottom: 0.85rem;
  background: #fafafa;
}
.il-repeating-block__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.il-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-body);
}
.il-remove-btn:hover {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.07);
}
.il-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-sage-btn);
  background: none;
  border: 1.5px dashed var(--color-sage);
  border-radius: var(--radius-btn);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.18s;
  margin-bottom: 1rem;
  font-family: var(--font-body);
}
.il-add-btn:hover {
  background: rgba(107, 116, 105, 0.08);
}

/* Form navigation (Back / Next / Submit) */
.il-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-light);
}
.il-nav .btn {
  min-width: 120px;
  justify-content: center;
}

/* Listing interest checkboxes */
.il-listing-checks {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.il-listing-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid var(--color-border-light);
  border-radius: var(--radius-btn);
  cursor: pointer;
  font-size: 0.875rem;
  background: var(--color-white);
  transition: border-color 0.18s, background 0.18s;
  user-select: none;
}
.il-listing-label:hover {
  border-color: var(--color-sage);
  background: #f1f3f0;
}
.il-listing-label:has(input:checked) {
  border-color: var(--color-sage);
  background: #ecefea;
  font-weight: 500;
}
.il-listing-label input[type="checkbox"] {
  accent-color: var(--color-sage);
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* Inline info note (sage-bordered) */
.il-note {
  background: rgba(107, 116, 105, 0.08);
  border-left: 3px solid var(--color-sage);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  font-style: normal;
}
.il-note i {
  color: var(--color-sage);
  margin-right: 0.35rem;
}

/* Dollar prefix input wrapper */
.il-dollar-wrap {
  position: relative;
}
.il-dollar-wrap::before {
  content: '$';
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-size: 0.925rem;
  pointer-events: none;
}
.il-dollar-wrap .form-control {
  padding-left: 1.75rem;
}

/* =========================================================
   Phase 4: Listing Modal Overlay
   ========================================================= */

/* Prevent body scroll while modal is open */
body.modal-open { overflow: hidden; }

/* Dark backdrop */
.lm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 24, 0.70);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem 1rem 3rem;
  overflow-y: auto;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.lm-overlay[hidden] { display: none; }

/* Modal panel — top padding creates a safe zone for the close button */
.lm-panel {
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.24);
  width: 100%;
  max-width: 740px;
  position: relative;
  padding: 3.75rem 2rem 2rem;
  margin: auto;
  outline: none;
}

/* Close button — sits in the top padding zone, never over content */
.lm-close {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-light);
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-charcoal);
  font-size: 1rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  z-index: 2;
}
.lm-close:hover {
  background: var(--color-cream);
  border-color: var(--color-sage);
  color: var(--color-sage);
}

/* Header block */
.lm-header {
  margin-bottom: 1.25rem;
}
/* Reset status badge from absolute (card overlay) to inline flow inside modal */
.lm-header .status-badge {
  position: static;
  display: inline-block;
  margin-top: 0.5rem;
}
.lm-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.3rem;
  color: var(--color-charcoal);
}
.lm-address {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}
.lm-price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-sage);
  margin: 0.25rem 0 0;
}

/* ── Carousel ── */
.lm-carousel {
  border-radius: calc(var(--radius-card) - 4px);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: #edecea;
  position: relative;
}
.lm-carousel--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-style: italic;
}
.lm-carousel--placeholder i {
  font-size: 2rem;
  opacity: 0.35;
}
.lm-carousel--placeholder p,
.lm-carousel--single p { margin: 0; }

.lm-carousel__img,
.lm-slides img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  background: #1c1c1a;
  display: block;
}

/* Slides — only active slide is visible */
.lm-slide        { display: none; }
.lm-slide.is-active { display: block; }

/* Prev / next arrows */
.lm-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.90);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-charcoal);
  font-size: 0.875rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  transition: background 0.15s;
  z-index: 2;
}
.lm-arrow:hover  { background: #fff; }
.lm-arrow--prev  { left: 0.6rem; }
.lm-arrow--next  { right: 0.6rem; }

/* Dot indicators */
.lm-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0;
  background: rgba(0, 0, 0, 0.04);
}
.lm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}
.lm-dot.is-active,
.lm-dot:hover { background: var(--color-sage); }

/* ── Description sections ── */
.lm-descs        { margin-bottom: 1.5rem; }
.lm-desc-section + .lm-desc-section {
  border-top: 1px solid var(--color-border-light);
  margin-top: 1rem;
  padding-top: 1rem;
}
.lm-desc-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-sage);
  margin: 0 0 0.35rem;
}
.lm-desc-text {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.65;
  margin: 0;
}

/* ── Action buttons row ── */
.lm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-light);
}

/* ── MLS contact form ── */
.lm-mls-contact {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-light);
}
.lm-mls-contact__heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-charcoal);
  margin: 0 0 1rem;
}
.lm-mls-status {
  font-size: 0.85rem;
  color: var(--color-terracotta);
  margin: 0.5rem 0 0;
  min-height: 1.2em;
}
.lm-mls-success {
  color: #4a7c5b;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}
.lm-mls-success i { font-size: 1.2rem; }

/* ── MLS tag variant on cards ── */
.tag--mls {
  background: rgba(150, 115, 75, 0.12);
  color: #7a5c3a;
  border: 1px solid rgba(150, 115, 75, 0.28);
}

/* ── Mobile ── */
@media (max-width: 620px) {
  .lm-overlay { padding: 0.75rem 0.5rem 2rem; }
  .lm-panel   { padding: 3.25rem 1rem 1.5rem; border-radius: calc(var(--radius-card) - 2px); }
  .lm-carousel__img,
  .lm-slides img { max-height: 320px; }
  .lm-title   { font-size: 1.3rem; }
  .lm-actions { flex-direction: column; }
}

/* MLS external listing link */
.lm-mls-link {
  font-size: 0.9rem;
  color: var(--color-text);
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  background: var(--color-cream);
  border-left: 3px solid var(--color-sage);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}
.lm-mls-link a {
  color: var(--color-sage);
  word-break: break-all;
}

/* ==========================================================
   SECTION: Program Cards (programs.html)
   ========================================================== */

/* programs-grid is now a plain block container.
   Phase 18: layout is handled by .lst-cards-grid inside it. */
.programs-grid {
  display: block;
}

.program-card {
  background: var(--color-white);
  border: 1px solid #e0ddd8;
  border-left: 4px solid #c8c4be;
  border-radius: var(--radius-card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: box-shadow 0.25s, transform 0.25s;
}

.program-card--available {
  background: #f0faf4;
  border-color: #b8dfc8;
  border-left-color: #2f7a50;
}

.program-card--soon {
  background: #fffdf0;
  border-color: #e8d898;
  border-left-color: #c08020;
}

.program-card:hover {
  box-shadow: 0 10px 32px rgba(0,0,0,0.13);
  transform: translateY(-3px);
}

.program-card--available:hover {
  box-shadow: 0 10px 32px rgba(47,122,80,0.14);
}

.program-card--soon:hover {
  box-shadow: 0 10px 32px rgba(160,112,32,0.12);
}

/* Card header: name + status badge */
.pc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pc-title-block {
  flex: 1 1 auto;
  min-width: 0;
}

.pc-name {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  color: var(--color-text-dark);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.pc-units-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #2f7a50;
  margin: 0;
}

.pc-units-line .fa-solid {
  font-size: 0.65rem;
}

/* Status badges */
.pc-badge {
  flex-shrink: 0;
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  white-space: nowrap;
  margin-top: 0.15rem;
}

.pc-badge--available {
  background: #c6ebd6;
  color: #1c5e3a;
  border: 1px solid #9ed4b8;
}

.pc-badge--soon {
  background: #fde68a;
  color: #7c5300;
  border: 1px solid #f5c842;
}

/* Detail list */
.pc-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 1rem;
}

.program-card--available .pc-details {
  border-top-color: rgba(47, 122, 80, 0.18);
}

.program-card--soon .pc-details {
  border-top-color: rgba(192, 140, 32, 0.2);
}

.pc-detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.pc-detail-label {
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.pc-detail-label .fa-solid {
  color: var(--color-sage);
  font-size: 0.75rem;
  width: 14px;
  text-align: center;
}

.pc-detail-value {
  font-weight: 500;
  color: var(--color-text-dark);
  text-align: right;
}

/* Notes block */
.pc-notes {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  background: var(--color-light-bg);
  border-left: 3px solid var(--color-sage);
  border-radius: 0 4px 4px 0;
  padding: 0.6rem 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.pc-notes .fa-solid {
  color: var(--color-sage);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

/* MLS badge + address row */
.pc-mls-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.pc-mls-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pc-mls-badge--listed {
  background: #d1fae5;
  color: #065f46;
}

.pc-mls-badge--not-listed {
  background: #f3f4f6;
  color: #6b7280;
}

.pc-address-line {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Property specs row (beds / baths / sqft / parking pills) */
.pc-specs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.pc-spec-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  color: var(--color-text-body);
  white-space: nowrap;
}

/* MLS attribution note below grid */
.pc-mls-attribution {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--color-light-bg);
  border-radius: 6px;
  border-left: 3px solid var(--color-sage);
}

/* Programs intro context box (above grid) */
.programs-context-box {
  display: flex;
  align-items: stretch;
  background: var(--color-light-bg);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-top: 3px solid var(--color-sage);
  border-radius: var(--radius-card);
  margin: 1.75rem 0 2.5rem;
  overflow: hidden;
}

.programs-context-item {
  flex: 1;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.5rem 1.75rem;
  text-align: left;
}

.programs-context-item .fa-solid {
  color: var(--color-sage);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.programs-context-item strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 0.4rem;
}

.programs-context-item p {
  font-size: 0.84rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.6;
}

.programs-context-divider {
  width: 1px;
  background: rgba(0, 0, 0, 0.07);
  flex-shrink: 0;
  align-self: stretch;
}

@media (max-width: 640px) {
  .programs-context-box {
    flex-direction: column;
  }
  .programs-context-divider {
    width: auto;
    height: 1px;
  }
}

/* Eligibility note below programs grid */
.pc-eligibility-note {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 1.5rem;
  text-align: center;
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
}

/* Loading / empty / error state */
.programs-status {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--color-text-muted);
}

.programs-status .fa-solid {
  font-size: 2.5rem;
  color: var(--color-sage);
  margin-bottom: 1rem;
  display: block;
}

.programs-status p {
  font-size: 1rem;
  max-width: 40ch;
  margin: 0 auto;
}

.programs-status a {
  color: var(--color-sage);
  text-decoration: underline;
}

/* ---------------------------------------------------------
   SECTION: Listings Filter Bar (Phase 18)
   --------------------------------------------------------- */
.lst-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: flex-end;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: var(--color-light-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border-light);
}

.lst-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 160px;
}

.lst-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lst-filter-select {
  display: block;
  width: 100%;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-text-dark);
  background: var(--color-white);
  cursor: pointer;
}

.lst-filter-select:focus {
  outline: 2px solid var(--color-sage);
  outline-offset: 2px;
}

/* ---------------------------------------------------------
   SECTION: Listing Cards Grid (Phase 18)
   --------------------------------------------------------- */
.lst-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 560px) {
  .lst-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .lst-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.lst-card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-top: 3px solid transparent;
}

.lst-card:hover,
.lst-card:focus {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.11);
  outline: none;
}

.lst-card:focus-visible {
  outline: 2px solid var(--color-sage);
  outline-offset: 2px;
}

.lst-card--avail { border-top-color: #4a9065; }
.lst-card--soon  { border-top-color: #999; }

.lst-card-header {
  padding: 1.1rem 1.1rem 0.6rem;
}

.lst-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.lst-card-name {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text-dark);
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.01em;
}

.lst-card-sub {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lst-card-specs {
  padding: 0.55rem 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.82rem;
  color: var(--color-text-body);
  border-top: 1px solid var(--color-border-light);
}

.lst-card-specs span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lst-card-specs i {
  color: var(--color-sage);
  font-size: 0.78rem;
}

.lst-card-cta {
  padding: 0.65rem 1.1rem;
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-sage-btn);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lst-card-cta i {
  font-size: 0.75rem;
  transition: transform 0.15s ease;
}

.lst-card:hover .lst-card-cta i {
  transform: translateX(3px);
}

/* Address / Maps links on cards and in popup */
.lst-addr-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
.lst-addr-link:hover {
  color: var(--color-sage-dark);
  text-decoration-style: solid;
}
.pc-detail-value .lst-addr-link {
  color: var(--color-sage);
  font-weight: 500;
}
.pc-detail-value .lst-addr-link:hover {
  color: var(--color-sage-dark);
}

/* Card detail rows (Home Type, AMI Limit, Price) */
.lst-card-details {
  list-style: none;
  margin: 0;
  padding: 0.15rem 0;
  border-top: 1px solid var(--color-border-light);
}

.lst-card-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 1.1rem;
  font-size: 0.82rem;
}

.lst-card-detail-label {
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.lst-card-detail-label i {
  color: var(--color-sage);
  font-size: 0.78rem;
  width: 0.9rem;
  text-align: center;
}

.lst-card-detail-value {
  font-weight: 500;
  color: var(--color-text-dark);
  text-align: right;
}

/* Comments snippet on card face — max 2 lines */
.lst-card-comments {
  padding: 0.5rem 1.1rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--color-border-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Status badges */
.lst-badge {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.lst-badge--avail {
  background: rgba(74,144,101,0.12);
  color: #2d7a50;
}

.lst-badge--soon {
  background: rgba(120,120,120,0.1);
  color: #666;
}

/* MLS tag on card */
.lst-mls-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.lst-mls-tag--yes {
  color: #4a6ea8;
  font-weight: 500;
}

/* Clear filters inline link */
.lst-clear-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-sage);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
}

/* ---------------------------------------------------------
   SECTION: Listing Expanded Popup (Phase 18)
   --------------------------------------------------------- */
.lst-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.55);
  padding: 1rem;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.lst-popup-overlay.open {
  display: flex;
}

.lst-popup-box {
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  width: 100%;
  max-width: 820px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  position: relative;
  padding: 2rem 1.75rem 2rem;
  margin: auto;
}

@media (max-width: 600px) {
  .lst-popup-box {
    padding: 1.25rem 1rem 1.25rem;
    border-radius: 8px 8px 0 0;
    max-height: calc(100vh - 1rem);
    margin-top: auto;
  }
}

.lst-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--color-light-bg);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 1rem;
  transition: background 0.15s;
  z-index: 2;
}

.lst-popup-close:hover {
  background: var(--color-border-light);
  color: var(--color-text-dark);
}

.lst-popup-header {
  margin-bottom: 1.25rem;
  padding-right: 2.5rem;
}

.lst-popup-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.lst-popup-title-row h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--color-text-dark);
  margin: 0;
  line-height: 1.2;
}

.lst-popup-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.84rem;
}

.lst-popup-location {
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.lst-popup-location i {
  color: var(--color-accent);
  font-size: 0.78rem;
}

/* Popup sections */
.lst-popup-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-light);
}

.lst-popup-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.lst-popup-comments {
  font-size: 0.9rem;
  color: var(--color-text-body);
  line-height: 1.65;
  margin: 0;
}

.lst-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}

.lst-features-list li {
  font-size: 0.9rem;
  color: var(--color-text-body);
  padding-left: 1.1rem;
  position: relative;
}

.lst-features-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 5px;
  height: 5px;
  background: var(--color-sage);
  border-radius: 50%;
}

/* CTA in popup */
.lst-popup-cta {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.lst-popup-cta p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* AMI section in popup */
.lst-popup-ami {
  overflow: hidden;
}

/* ---------------------------------------------------------
   SECTION: Public AMI Tables (Phase 18)
   --------------------------------------------------------- */
.ami-tbl-wrap {
  margin-bottom: 1.25rem;
}

.ami-tbl-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 0.5rem;
}

.ami-tbl-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-btn);
  border: 1px solid var(--color-border-light);
}

.ami-public-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.ami-public-table th,
.ami-public-table td {
  padding: 0.45rem 0.65rem;
  text-align: right;
  border-bottom: 1px solid var(--color-border-light);
  white-space: nowrap;
}

.ami-public-table th {
  background: var(--color-light-bg);
  font-weight: 600;
  color: var(--color-text-dark);
  font-size: 0.77rem;
}

.ami-public-table tbody tr:last-child td {
  border-bottom: none;
}

.ami-public-table .ami-hh-cell {
  text-align: left;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Highlighted AMI column */
.ami-col-highlight {
  background: rgba(74,144,101,0.09) !important;
  color: #3a7a52 !important;
  font-weight: 600 !important;
}

th.ami-col-highlight {
  background: rgba(74,144,101,0.18) !important;
  color: #2e6642 !important;
}

.ami-hl-star {
  color: #4a9065;
  font-size: 0.75rem;
  margin-left: 0.15rem;
}

.ami-hl-note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 0.5rem;
}

.ami-disclaimer {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  font-style: italic;
  line-height: 1.55;
}
