/* ENG Properties — Shared Styles */

:root {
  /* Brand colors */
  --primary-blue: #3b3e90;
  --dark-navy: #26255a;
  --accent-purple: #564d9c;
  --light-blue: #5a5eb8;

  /* Neutrals */
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --medium-gray: #e9ecef;
  --border-light: #dee2e6;
  --text-dark: #2c3e50;
  --text-light: #6c757d;

  /* Accents */
  --success: #28a745;
  --warning: #ffc107;
  --gold: #ffd700;

  /* Effects */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background: var(--white);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

html { overflow-x: hidden; }

/* The hidden attribute must always win, even over component
   display rules (.btn, .active-grid, Leaflet containers, etc.). */
[hidden] { display: none !important; }

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

a {
  color: var(--primary-blue);
  text-decoration: none;
}

/* Typography */
h1, h2 {
  font-family: 'Archivo Black', sans-serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--dark-navy);
}

h3, h4, h5, h6 {
  font-family: 'Lora', serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark-navy);
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin-bottom: 1.5rem; letter-spacing: -0.02em; }
h2 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 1.25rem; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: 1rem; }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); margin-bottom: 0.75rem; }

p { margin-bottom: 1rem; color: var(--text-dark); }

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 5rem 0;
}

@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  section { padding: 3rem 0; }
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled { box-shadow: var(--shadow-md); }

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-logo-text {
  font-family: 'Archivo Black', sans-serif;
  color: var(--dark-navy);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.nav-back {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
}

.nav-back:hover { color: var(--primary-blue); }

@media (max-width: 768px) {
  .nav-container { padding: 0.75rem 1.25rem; }
  .nav-logo-text { font-size: 1rem; }
}

/* Inner page hero */
.page-hero {
  background: linear-gradient(135deg, var(--primary-blue), var(--dark-navy));
  color: var(--white);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.page-hero.has-bg-photo {
  background: var(--dark-navy);
}

.page-hero .hero-bg-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.page-hero .hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(38, 37, 90, 0.85), rgba(59, 62, 144, 0.78));
  z-index: 1;
}

.page-hero > .container {
  position: relative;
  z-index: 2;
}

.page-hero .eyebrow {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1rem;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
  max-width: 900px;
}

.page-hero .subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin-bottom: 2rem;
}

.page-hero .hero-dre {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem 2rem;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  line-height: 1.2;
}

.btn-primary {
  background: var(--primary-blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--dark-navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.btn-secondary:hover {
  background: var(--primary-blue);
  color: var(--white);
}

.btn-on-dark {
  background: var(--white);
  color: var(--primary-blue);
}

.btn-on-dark:hover {
  background: var(--light-gray);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 62, 144, 0.08);
  border-radius: 12px;
  color: var(--primary-blue);
}

.card-icon svg { width: 32px; height: 32px; }

.card h4 {
  color: var(--dark-navy);
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-dark);
  font-size: 0.975rem;
  margin: 0;
}

/* Two-column section */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 1024px) {
  .two-col { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* Three-column grid */
.three-col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) {
  .three-col-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .three-col-grid { grid-template-columns: 1fr; }
}

/* Stat blocks */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

@media (max-width: 768px) {
  .stat-row { grid-template-columns: 1fr; gap: 2.5rem; }
}

.stat-num {
  font-family: 'Archivo Black', sans-serif;
  color: var(--primary-blue);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  font-size: 1.05rem;
}

/* Decorative stat card (for buy/sell two-col right column) */
.stat-card {
  background: linear-gradient(135deg, var(--primary-blue), var(--dark-navy));
  color: var(--white);
  padding: 3rem;
  border-radius: 18px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.stat-card .stat-card-num {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.stat-card .stat-card-label {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Stepper */
.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}

@media (max-width: 1024px) {
  .stepper { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .stepper { grid-template-columns: 1fr; gap: 1.5rem; }
}

.step {
  background: var(--white);
  padding: 2rem;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--primary-blue);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary-blue);
  color: var(--white);
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.1rem;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.step h4 {
  color: var(--dark-navy);
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--text-dark);
  font-size: 0.975rem;
  margin: 0;
}

/* Forms */
.form-section {
  background: var(--white);
}

.lead-form {
  max-width: 760px;
  margin: 0 auto;
  background: var(--light-gray);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

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

.form-row-full { grid-column: 1 / -1; }

@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .lead-form { padding: 1.5rem; }
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.form-field .required {
  color: var(--primary-blue);
  margin-left: 2px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--white);
  transition: var(--transition);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 62, 144, 0.1);
}

.form-field textarea {
  resize: vertical;
  min-height: 88px;
  font-family: 'Inter', sans-serif;
}

.lead-form button[type="submit"] {
  width: 100%;
  background: var(--primary-blue);
  color: var(--white);
  border: none;
  padding: 1.1rem 2rem;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: var(--transition);
}

.lead-form button[type="submit"]:hover {
  background: var(--dark-navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.botcheck { display: none !important; }

/* Footer */
.site-footer {
  background: var(--dark-navy);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; padding: 0 1.25rem; }
}

.footer-col h5 {
  color: var(--white);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
}

.footer-col p,
.footer-col a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.7;
  text-decoration: none;
}

.footer-col a:hover { color: var(--white); }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo img {
  height: 44px;
  width: auto;
}

.footer-logo-text {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.2rem;
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Focus state for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Section variants */
.section-light { background: var(--light-gray); }

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.section-heading h2 { margin-bottom: 0.75rem; }
.section-heading p { color: var(--text-light); font-size: 1.1rem; max-width: 700px; margin: 0 auto; }

/* Bulleted reasons (manage page) */
.reasons-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.reasons-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.reasons-list .check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(59, 62, 144, 0.1);
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.reasons-list .reason-text strong {
  color: var(--dark-navy);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
}

.reasons-list .reason-text span {
  color: var(--text-dark);
}

/* Agent grid — two agents side by side */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 880px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .agent-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Agent intro card (buy/sell pages) */
.agent-card {
  background: var(--white);
  border-radius: 18px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.agent-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-purple));
}

.agent-card .agent-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--white);
  transition: var(--transition);
}

.agent-card .agent-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.4s ease;
}

.agent-card:hover .agent-photo img { transform: scale(1.06); }

.agent-card .agent-name {
  font-family: 'Lora', serif;
  font-weight: 700;
  color: var(--dark-navy);
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.agent-card .agent-title {
  font-family: 'Inter', sans-serif;
  color: var(--primary-blue);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.agent-card .agent-bio {
  color: var(--text-dark);
  font-size: 0.975rem;
  margin-bottom: 1.5rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.agent-card .agent-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-blue);
  color: var(--white);
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  transition: var(--transition);
}

.agent-card .agent-cta:hover {
  background: var(--dark-navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Floating "Talk to Peter" pill */
.floating-pill {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem 0.65rem 0.65rem;
  background: var(--primary-blue);
  color: var(--white);
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.floating-pill.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.floating-pill:hover {
  background: var(--dark-navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.floating-pill .pill-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--white);
  flex-shrink: 0;
  border: 2px solid var(--white);
}

.floating-pill .pill-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.floating-pill .pill-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.floating-pill .pill-label {
  font-size: 0.75rem;
  opacity: 0.85;
  font-weight: 500;
}

.floating-pill .pill-phone {
  font-size: 1rem;
  font-weight: 700;
}

@media (max-width: 480px) {
  .floating-pill {
    bottom: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
  }
  .floating-pill .pill-avatar { width: 36px; height: 36px; }
  .floating-pill .pill-label { font-size: 0.7rem; }
  .floating-pill .pill-phone { font-size: 0.9rem; }
}

/* Property gallery (manage page) */
.property-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .property-gallery { grid-template-columns: repeat(3, 1fr); }
}

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

.property-tile {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.property-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.property-tile:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.property-tile:hover img { transform: scale(1.08); }

/* Office photo block (manage page) */
.office-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 1024px) {
  .office-block { grid-template-columns: 1fr; gap: 2rem; }
}

.office-photo {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
}

.office-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrolling marquee of testimonials */
.review-marquee {
  position: relative;
  overflow: hidden;
  padding: 1rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.review-track {
  display: flex;
  gap: 1.5rem;
  padding-right: 1.5rem; /* mirrors gap so the loop wraps cleanly across the duplicate set */
  width: max-content;
  animation: review-scroll 160s linear infinite;
  will-change: transform;
}

.review-marquee:hover .review-track,
.review-marquee:focus-within .review-track {
  animation-play-state: paused;
}

@keyframes review-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.review-card {
  flex: 0 0 380px;
  background: var(--white);
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary-blue);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
}

.review-card .review-stars {
  color: var(--gold);
  margin-bottom: 0.75rem;
  letter-spacing: 2px;
  font-size: 1rem;
  line-height: 1;
}

.review-card .review-text {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.review-card .review-attribution {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text-light);
  border-top: 1px solid var(--border-light);
  padding-top: 0.75rem;
}

.review-card .review-attribution strong {
  color: var(--dark-navy);
  font-weight: 700;
}

@media (max-width: 640px) {
  .review-card { flex: 0 0 300px; padding: 1.5rem; min-height: 220px; }
  .review-card .review-text { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .review-track { animation: none; }
  .review-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}

/* Testimonial card */
.testimonial-card {
  background: var(--white);
  border-radius: 18px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  border-left: 4px solid var(--primary-blue);
}

.testimonial-card .quote-mark {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-family: 'Archivo Black', sans-serif;
  font-size: 4rem;
  color: rgba(59, 62, 144, 0.12);
  line-height: 1;
}

.testimonial-card .quote-text {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-dark);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.testimonial-card .quote-attribution {
  font-family: 'Inter', sans-serif;
  color: var(--text-light);
  font-size: 0.95rem;
}

.testimonial-card .quote-attribution strong {
  color: var(--dark-navy);
  font-weight: 700;
}

/* Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

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

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

.team-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.team-name {
  font-family: 'Lora', serif;
  font-weight: 700;
  color: var(--dark-navy);
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.team-title {
  font-family: 'Inter', sans-serif;
  color: var(--primary-blue);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.team-dre {
  color: var(--text-light);
  font-size: 0.9rem;
}

.team-callout {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.75rem 2rem;
  border: 2px solid rgba(59, 62, 144, 0.2);
  border-radius: 14px;
  text-align: center;
  color: var(--text-dark);
  background: var(--white);
}

/* Sold home cards */
.sold-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) {
  .sold-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sold-grid { grid-template-columns: 1fr; }
}

.sold-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.sold-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.sold-photo {
  aspect-ratio: 16 / 9;
  background: var(--medium-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  overflow: hidden;
  position: relative;
}

.sold-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.sold-card[data-property] {
  cursor: pointer;
  border: 0;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
  display: block;
}

.sold-card[data-property]:hover .sold-photo img,
.sold-card[data-property]:focus-visible .sold-photo img {
  transform: scale(1.05);
}

.sold-card[data-property]::after {
  content: 'View details →';
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(38, 37, 90, 0.92);
  color: var(--white);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.sold-card[data-property] {
  position: relative;
}

.sold-card[data-property]:hover::after,
.sold-card[data-property]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

/* Modal */
.sold-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sold-modal.is-open {
  display: flex;
  animation: modal-fade 0.2s ease-out;
}

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sold-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 35, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.sold-modal-content {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: 18px;
  max-width: 720px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  box-shadow: var(--shadow-xl);
}

.sold-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  background: rgba(255, 255, 255, 0.95);
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-navy);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.sold-modal-close:hover {
  background: var(--white);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.sold-modal-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--medium-gray);
  overflow: hidden;
  border-radius: 18px 18px 0 0;
}

.sold-modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sold-modal-body {
  padding: 2rem;
}

.sold-modal-eyebrow {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.sold-modal-price {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--primary-blue);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  line-height: 1.1;
}

.sold-modal-address {
  font-family: 'Lora', serif;
  font-weight: 700;
  color: var(--dark-navy);
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.sold-modal-specs {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.sold-modal-description {
  color: var(--text-dark);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.sold-modal-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.sold-modal-highlight {
  background: rgba(59, 62, 144, 0.1);
  color: var(--primary-blue);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

.sold-modal-rep {
  font-size: 0.9rem;
  color: var(--text-light);
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  font-style: italic;
}

@media (max-width: 640px) {
  .sold-modal-body { padding: 1.5rem; }
}

.sold-body { padding: 1.5rem; }

.sold-price {
  font-family: 'Archivo Black', sans-serif;
  color: var(--primary-blue);
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.sold-address {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.sold-specs {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.sold-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-light);
  font-size: 0.875rem;
  border-top: 1px solid var(--border-light);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.sold-note {
  text-align: center;
  margin-top: 2rem;
  color: var(--text-light);
  font-style: italic;
  font-size: 0.95rem;
}

/* Centered card (thank-you, 404) */
.centered-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  padding: 3.5rem 2.5rem;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.centered-card .check-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(40, 167, 69, 0.12);
  color: var(--success);
  border-radius: 50%;
}

.centered-card .big-404 {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(5rem, 14vw, 9rem);
  color: var(--primary-blue);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.centered-card h1 { margin-bottom: 1rem; }
.centered-card p { margin-bottom: 1.5rem; color: var(--text-dark); }

.recovery-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (max-width: 480px) {
  .recovery-buttons { grid-template-columns: 1fr; }
}

/* =========================================================
   MOBILE OPTIMIZATION PASS
   Mobile-first refinements consolidated at the end so they
   override any earlier rules.
   ========================================================= */

/* Inner page hero — tighten on mobile so users see content sooner */
@media (max-width: 768px) {
  .page-hero { padding: 3rem 0; }
  .page-hero h1 { margin-bottom: 1rem; }
  .page-hero .subtitle { margin-bottom: 1.5rem; }
  .page-hero .btn { width: 100%; max-width: 320px; }
}

/* Navbar — guarantee no horizontal overflow on narrowest devices */
@media (max-width: 480px) {
  .nav-container { padding: 0.65rem 1rem; gap: 0.75rem; }
  .nav-logo { gap: 0.5rem; }
  .nav-logo img { height: 34px; }
  .nav-logo-text { font-size: 0.95rem; letter-spacing: -0.02em; }
  .nav-back { font-size: 0.9rem; }
}

@media (max-width: 360px) {
  .nav-logo-text { display: none; }
}

/* Body H2 spacing on mobile */
@media (max-width: 768px) {
  .section-heading { margin-bottom: 2rem; }
  h1, h2 { letter-spacing: -0.02em; }
  .section-heading p { font-size: 1rem; }
}

/* Primary CTA buttons full-width on mobile inside form contexts */
@media (max-width: 768px) {
  .btn { padding: 0.95rem 1.5rem; font-size: 1rem; }
}

/* Property cards — always show "View details" badge on touch (no hover) */
@media (hover: none) {
  .sold-card[data-property]::after {
    opacity: 1;
    transform: translateY(0);
    bottom: 0.6rem;
    right: 0.6rem;
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
  }
}

/* Sold card body — tighten padding on mobile */
@media (max-width: 480px) {
  .sold-body { padding: 1.25rem; }
  .sold-price { font-size: 1.5rem; }
  .sold-address { font-size: 0.95rem; }
  .sold-specs { font-size: 0.9rem; }
  .sold-meta { font-size: 0.8rem; flex-direction: column; gap: 0.15rem; align-items: flex-start; }
}

/* Agent card — tighter on mobile */
@media (max-width: 480px) {
  .agent-card { padding: 1.75rem 1.5rem; }
  .agent-card .agent-photo { width: 140px; height: 140px; margin-bottom: 1rem; }
  .agent-card .agent-name { font-size: 1.25rem; }
  .agent-card .agent-bio { font-size: 0.92rem; }
}

/* Stat row spacing */
@media (max-width: 480px) {
  .stat-row { gap: 2rem; }
  .stat-num { font-size: clamp(2.25rem, 8vw, 3rem); }
}

/* Stepper steps on mobile */
@media (max-width: 480px) {
  .step { padding: 1.5rem; }
}

/* Service cards on mobile */
@media (max-width: 480px) {
  .card { padding: 1.5rem; }
}

/* Property gallery — tighter gap on mobile */
@media (max-width: 480px) {
  .property-gallery { gap: 0.6rem; }
  .property-tile { border-radius: 10px; }
}

/* Office block on mobile — photo stacks above text */
@media (max-width: 1024px) {
  .office-photo { aspect-ratio: 16 / 10; }
}

/* Modal — full-bleed on mobile */
@media (max-width: 640px) {
  .sold-modal { padding: 0; align-items: flex-end; }
  .sold-modal-content {
    max-height: 95vh;
    border-radius: 18px 18px 0 0;
    animation: modal-slide-up 0.3s ease-out;
  }
  .sold-modal-photo { border-radius: 18px 18px 0 0; }
  .sold-modal-price { font-size: 1.75rem; }
  .sold-modal-address { font-size: 1.1rem; }
}

@keyframes modal-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* Marquee — slower speed on mobile so each review is readable */
@media (max-width: 480px) {
  .review-track { animation-duration: 200s; }
  .review-marquee {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
  }
}

/* Footer — tighter on mobile */
@media (max-width: 768px) {
  .site-footer { padding: 3rem 0 1.5rem; }
  .footer-grid { gap: 1.75rem; }
  .footer-col h5 { margin-bottom: 0.5rem; }
  .footer-bottom { margin-top: 2rem; padding-top: 1.5rem; font-size: 0.85rem; }
}

/* Floating pill — even tighter on smallest viewports so it doesn't overlap CTAs */
@media (max-width: 380px) {
  .floating-pill {
    padding: 0.45rem 0.85rem 0.45rem 0.45rem;
    bottom: 0.85rem;
    right: 0.85rem;
  }
  .floating-pill .pill-avatar { width: 32px; height: 32px; }
  .floating-pill .pill-label { font-size: 0.65rem; }
  .floating-pill .pill-phone { font-size: 0.85rem; }
}

/* Form fields — bigger tap targets on mobile, prevent iOS zoom on focus */
@media (max-width: 768px) {
  .form-field input,
  .form-field select,
  .form-field textarea {
    font-size: 16px; /* prevents iOS Safari from zooming on focus */
    padding: 0.95rem 1rem;
  }
  .lead-form button[type="submit"] {
    padding: 1.1rem 2rem;
    font-size: 1rem;
  }
  .form-field label { font-size: 0.9rem; }
}

/* Testimonial card on mobile */
@media (max-width: 480px) {
  .testimonial-card { padding: 1.75rem 1.5rem; }
  .testimonial-card .quote-text { font-size: 1.05rem; }
}

/* Sticky nav offset for in-page anchors — already covered via scroll-margin */
[id]:not(html) { scroll-margin-top: 80px; }

/* Section-heading h2 line-height tweak on mobile */
@media (max-width: 480px) {
  .section-heading h2 { line-height: 1.15; }
  .section-heading p { line-height: 1.5; }
}

/* Container side padding on smallest screens */
@media (max-width: 360px) {
  .container { padding: 0 1rem; }
}

/* =========================================================
   MEET THE TEAM PAGE
   Alternating photo/text rows down the page.
   ========================================================= */

.team-group-photo {
  max-width: 1000px;
  margin: 0 auto 4rem;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary-blue), var(--dark-navy));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.team-group-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-dept-heading {
  text-align: center;
  margin: 4rem auto 2.5rem;
  max-width: 800px;
}

.team-dept-heading h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.team-dept-heading::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--primary-blue);
  border-radius: 2px;
  margin: 1rem auto 0;
}

.team-member {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 3.5rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto 4.5rem;
}

.team-member.reverse {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.team-member.reverse .team-member-photo {
  order: 2;
}

.team-member.reverse .team-member-body {
  order: 1;
  text-align: right;
}

.team-member-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 1rem;
  max-width: 320px;
  margin: 0 auto;
  /* Soft ring + lift instead of a heavy white border */
  box-shadow: 0 0 0 1px rgba(38, 37, 90, 0.06),
              0 18px 38px rgba(38, 37, 90, 0.22);
  overflow: hidden;
}

/* Fill the circular frame edge-to-edge regardless of the photo's
   aspect ratio — no gradient ever shows behind a real headshot. */
.team-member-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.team-member-name {
  font-family: 'Lora', serif;
  font-weight: 700;
  color: var(--dark-navy);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.35rem;
}

.team-member-role {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--primary-blue);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.team-member-dre {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.team-member-bio {
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.7;
}

.team-member-bio.placeholder {
  color: var(--text-light);
  font-style: italic;
  padding: 1.25rem 1.5rem;
  background: var(--light-gray);
  border-left: 3px solid var(--border-light);
  border-radius: 0 8px 8px 0;
}

@media (max-width: 900px) {
  .team-member,
  .team-member.reverse {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
    margin-bottom: 3.5rem;
  }
  .team-member.reverse .team-member-photo { order: 0; }
  .team-member.reverse .team-member-body { order: 0; text-align: center; }
  .team-member-photo { max-width: 240px; }
}

@media (max-width: 480px) {
  .team-group-photo { margin-bottom: 2.5rem; }
  .team-dept-heading { margin: 3rem auto 1.75rem; }
  .team-member-photo { max-width: 200px; }
  .team-member-bio.placeholder { padding: 1rem 1.25rem; font-size: 0.95rem; }
}

/* =========================================================
   ACTIVE LISTINGS (buy page)
   Variant of sold-card with an "Active" badge and MLS link.
   ========================================================= */

.active-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 880px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .active-grid { grid-template-columns: 1fr; }
}

.active-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.active-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.active-photo {
  aspect-ratio: 16 / 9;
  background: var(--medium-gray);
  position: relative;
  overflow: hidden;
}

.active-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.active-card:hover .active-photo img {
  transform: scale(1.05);
}

.active-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 62, 144, 0.85), rgba(38, 37, 90, 0.85));
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
  padding: 1rem;
}

.active-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: var(--success);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.active-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
  animation: active-pulse 2s ease-in-out infinite;
}

@keyframes active-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35); }
  50%      { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.1); }
}

@media (prefers-reduced-motion: reduce) {
  .active-badge::before { animation: none; }
}

.active-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.active-price {
  font-family: 'Archivo Black', sans-serif;
  color: var(--primary-blue);
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.active-address {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  font-weight: 500;
}

.active-specs {
  color: var(--text-light);
  font-size: 0.95rem;
}

.active-meta {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.active-mls-link {
  margin-top: auto;
  padding-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-blue);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.active-mls-link:hover { color: var(--dark-navy); }
.active-mls-link .arrow { transition: transform 0.25s ease; }
.active-mls-link:hover .arrow { transform: translateX(3px); }

/* =========================================================
   MEET THE TEAM CTA SECTION (used on buy / sell / manage)
   ========================================================= */

.team-cta-section {
  background: linear-gradient(135deg, var(--primary-blue), var(--dark-navy));
  color: var(--white);
  text-align: center;
}

.team-cta-section h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.team-cta-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.team-cta-section .btn {
  background: var(--white);
  color: var(--primary-blue);
}

.team-cta-section .btn:hover {
  background: var(--light-gray);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* =========================================================
   PROPERTY SEARCH BAND (buy page)
   Filters + status + view toggle. Drives the cards and the
   interactive map, both fed from the manual /js/listings.js.
   ========================================================= */

.search-band {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  max-width: 1100px;
  margin: -4rem auto 0; /* lifts the bar to overlap the hero edge */
  position: relative;
  z-index: 5;
}

@media (min-width: 921px) {
  .search-band.is-sticky {
    position: sticky;
    top: 72px;
  }
}

.search-band-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 920px) {
  .search-band-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .search-band { margin-top: -2.5rem; padding: 1.25rem; }
  .search-band-row { grid-template-columns: 1fr; }
}

.search-field {
  display: flex;
  flex-direction: column;
}

.search-field label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.search-field input,
.search-field select {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--white);
  transition: var(--transition);
}

.search-field input:focus,
.search-field select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 62, 144, 0.1);
}

.search-band-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-light);
}

.search-status {
  display: inline-flex;
  background: var(--light-gray);
  border-radius: 999px;
  padding: 0.3rem;
  gap: 0.25rem;
}

.search-status button {
  border: 0;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.search-status button.is-active {
  background: var(--primary-blue);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.search-view {
  display: inline-flex;
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
}

.search-view button {
  border: 0;
  background: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 0.55rem 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.search-view button + button { border-left: 1.5px solid var(--border-light); }
.search-view button.is-active { background: var(--primary-blue); color: var(--white); }

.search-result-count {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
  margin: 1.5rem 0 0.5rem;
}

.search-result-count strong { color: var(--dark-navy); }

/* List-view variant of the active-grid */
.active-grid.is-list {
  grid-template-columns: 1fr;
  max-width: 880px;
}

.active-grid.is-list .active-card {
  flex-direction: row;
}

.active-grid.is-list .active-photo {
  width: 38%;
  aspect-ratio: auto;
}

@media (max-width: 600px) {
  .active-grid.is-list .active-card { flex-direction: column; }
  .active-grid.is-list .active-photo { width: 100%; aspect-ratio: 16 / 9; }
}

/* Whole card is a link to its listing page */
a.active-card { text-decoration: none; color: inherit; }

/* Status badge variants (base .active-badge is green for For Sale) */
.active-badge--pending { background: var(--warning); color: var(--dark-navy); }
.active-badge--sold { background: var(--text-light); }
.active-badge--pending::before,
.active-badge--sold::before { display: none; }

/* No-results state + clear-filters link button */
.search-empty {
  text-align: center;
  color: var(--text-light);
  font-size: 1.05rem;
  margin: 2.5rem auto;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--primary-blue);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.link-btn:hover { color: var(--dark-navy); }

/* =========================================================
   INTERACTIVE MAP (Leaflet / OpenStreetMap — no API key)
   ========================================================= */

.listings-map {
  height: 560px;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  z-index: 0;
}

.listings-map--single { height: 340px; }

@media (max-width: 768px) {
  .listings-map { height: 420px; }
  .listings-map--single { height: 280px; }
}

/* Always-on map block under the active listings */
.listings-map-block { margin-top: 3rem; }

.listings-map-heading {
  font-family: 'Lora', serif;
  font-weight: 700;
  color: var(--dark-navy);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin-bottom: 0.4rem;
}

.listings-map-sub {
  color: var(--text-light);
  font-size: 0.98rem;
  max-width: 640px;
  margin-bottom: 1.5rem;
}

/* Price-pill markers */
.eng-pin-wrap {
  background: none !important;
  border: 0 !important;
}

.eng-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  background: var(--primary-blue);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(38, 37, 90, 0.45);
  border: 2px solid var(--white);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.eng-pin:hover { transform: scale(1.08); }
.eng-pin--pending { background: #b9870b; }
.eng-pin--sold { background: var(--text-light); }

/* Popup */
.leaflet-popup-content-wrapper { border-radius: 14px; padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; width: 250px !important; }

.eng-popup img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.eng-popup-body { padding: 0.9rem 1rem 1rem; }

.eng-popup-price {
  font-family: 'Archivo Black', sans-serif;
  color: var(--primary-blue);
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.eng-popup-addr {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--text-dark);
  margin-top: 0.15rem;
}

.eng-popup-specs {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0.2rem 0 0.75rem;
}

.eng-popup-btn {
  display: block;
  text-align: center;
  background: var(--primary-blue);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
}

.eng-popup-btn:hover { background: var(--dark-navy); }

.eng-popup-ext {
  display: block;
  text-align: center;
  margin-top: 0.5rem;
  color: var(--primary-blue);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
}

.eng-popup-ext:hover { text-decoration: underline; }

/* =========================================================
   LISTING DETAIL PAGE (/listing/?id=...)
   ========================================================= */

.listing-page { padding: 2.5rem 0 4.5rem; }

.listing-missing {
  max-width: 540px;
  margin: 4rem auto;
  text-align: center;
}

.listing-missing p { color: var(--text-light); margin-bottom: 2rem; }

.listing-back {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 1.75rem;
}

.listing-back:hover { color: var(--primary-blue); }

.listing-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3.5rem;
  align-items: start;
}

.listing-detail .listing-back { grid-column: 1 / -1; margin-bottom: 0; }

@media (max-width: 940px) {
  .listing-detail { grid-template-columns: 1fr; gap: 2rem; }
}

.listing-main {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--medium-gray);
}

.listing-main img { width: 100%; height: 100%; object-fit: cover; }

.listing-main .active-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
}

.listing-thumbs {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.listing-thumb {
  width: 84px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: var(--medium-gray);
}

.listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-thumb.is-active { border-color: var(--primary-blue); }

.listing-price {
  font-family: 'Archivo Black', sans-serif;
  color: var(--primary-blue);
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.listing-address {
  font-family: 'Lora', serif;
  font-weight: 700;
  color: var(--dark-navy);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0.5rem 0 0.35rem;
  letter-spacing: 0;
}

.listing-locale { color: var(--text-light); font-size: 1.05rem; }

.listing-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0;
}

.listing-specs span {
  background: rgba(59, 62, 144, 0.08);
  color: var(--text-dark);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.92rem;
  text-transform: capitalize;
}

.listing-specs span strong { color: var(--dark-navy); }

.listing-description {
  color: var(--text-dark);
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.listing-map-title {
  font-family: 'Lora', serif;
  font-size: 1.25rem;
  color: var(--dark-navy);
  margin-bottom: 0.85rem;
}

/* Highlights chips */
.listing-highlights {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin: 0 0 1.75rem;
}

.listing-highlights li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 62, 144, 0.06);
  color: var(--text-dark);
  font-size: 0.92rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
}

.listing-highlights li::before {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-blue);
  -webkit-mask: no-repeat center / 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  mask: no-repeat center / 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* Property facts grid */
.listing-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 2rem;
  border-top: 1px solid var(--border-light);
}

@media (max-width: 560px) {
  .listing-facts { grid-template-columns: 1fr; }
}

.listing-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
}

.listing-facts dt {
  color: var(--text-light);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.listing-facts dd {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--dark-navy);
  text-align: right;
  text-transform: capitalize;
}

/* =========================================================
   HERO FORM (sell page) — form is the hero
   ========================================================= */

.hero-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 3.5rem;
  align-items: start;
}

@media (max-width: 920px) {
  .hero-form { grid-template-columns: 1fr; gap: 2.25rem; }
}

.hero-form-copy h1 { color: var(--white); }

.hero-form-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.hero-form-points li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: rgba(255, 255, 255, 0.92);
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
}

.hero-form-points .tick {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.hero-form .lead-form {
  max-width: none;
  margin: 0;
  background: var(--white);
  box-shadow: var(--shadow-xl);
}

.hero-form .lead-form .form-intro {
  font-family: 'Lora', serif;
  font-weight: 700;
  color: var(--dark-navy);
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

/* =========================================================
   CTA BAND — full-width single-CTA closer
   (Browse Our Inventory on manage; reusable site-wide)
   ========================================================= */

.cta-band {
  background: linear-gradient(135deg, var(--primary-blue), var(--dark-navy));
  color: var(--white);
  text-align: center;
}

.cta-band h2 { color: var(--white); margin-bottom: 1rem; }

.cta-band p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto 2rem;
}

.cta-band .btn {
  background: var(--white);
  color: var(--primary-blue);
}

.cta-band .btn:hover {
  background: var(--light-gray);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* =========================================================
   TEAM MEMBER CONTACT — "Connect With Us" (Pete & Katy)
   ========================================================= */

.team-member-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.team-member.reverse .team-member-contact {
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .team-member-contact,
  .team-member.reverse .team-member-contact {
    justify-content: center;
  }
}

.team-member-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  transition: var(--transition);
}

.team-member-contact a.contact-primary {
  background: var(--primary-blue);
  color: var(--white);
}

.team-member-contact a.contact-primary:hover {
  background: var(--dark-navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.team-member-contact a.contact-ghost {
  background: transparent;
  color: var(--primary-blue);
  border: 1.5px solid rgba(59, 62, 144, 0.35);
}

.team-member-contact a.contact-ghost:hover {
  background: rgba(59, 62, 144, 0.08);
  border-color: var(--primary-blue);
}

.team-member-connect-label {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 1.5rem;
  margin-bottom: -0.5rem;
}

.team-member.reverse .team-member-connect-label { text-align: right; }

@media (max-width: 900px) {
  .team-member.reverse .team-member-connect-label,
  .team-member-connect-label { text-align: center; }
}

