/* ==========================================================================
   TOPATOPA REALTY COLLECTIVE — Modern Editorial Luxury Real Estate
   Design Language: Ojai Architectural Minimalism, Organic Earth Tones,
   Editorial Typography, and Butter-Smooth Scrolling Transitions
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Day / Warm Linen Palette */
  --bg-primary: #FAF8F5;
  --bg-surface: #FFFFFF;
  --bg-secondary: #F3EFE8;
  --bg-card: #FFFFFF;
  --bg-glass: rgba(250, 248, 245, 0.85);

  --text-primary: #1C1917;
  --text-secondary: #57534E;
  --text-muted: #8C827A;
  --text-light: #FFFFFF;

  --accent-terracotta: #A36B4F;
  --accent-terracotta-hover: #8C573C;
  --accent-sage: #606C5A;
  --accent-gold: #C2A268;
  --accent-pink-moment: #D98896;

  --border-subtle: rgba(215, 205, 192, 0.55);
  --border-strong: #D5CCC2;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 2px 8px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 8px 24px rgba(28, 25, 23, 0.06);
  --shadow-lg: 0 20px 48px rgba(28, 25, 23, 0.08);

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* ==========================================================================
   THE PINK MOMENT ATMOSPHERIC SUNSET THEME
   Celebrating Ojai's famous dusk phenomenon on the Topatopa Mountains
   ========================================================================== */
body.theme-pink-moment {
  --bg-primary: #18151D;
  --bg-surface: #221E2A;
  --bg-secondary: #2C2637;
  --bg-card: #221E2A;
  --bg-glass: rgba(24, 21, 29, 0.88);

  --text-primary: #FAF3EE;
  --text-secondary: #D4CAD6;
  --text-muted: #9D92A2;

  --accent-terracotta: #E891A0;
  --accent-terracotta-hover: #D77A8B;
  --accent-sage: #9AB291;
  --accent-gold: #E5BE7B;

  --border-subtle: rgba(232, 145, 160, 0.18);
  --border-strong: rgba(232, 145, 160, 0.35);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  position: relative;
  transition: background-color 0.6s ease, color 0.6s ease;
  -webkit-tap-highlight-color: transparent;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

body.no-scroll {
  overflow: hidden;
  touch-action: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: auto;
}

.property-thumb,
.gallery-main-img,
.editorial-main-img,
.neighborhood-img {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:active,
a.btn:active {
  transform: scale(0.97);
  transition: transform 0.1s ease;
}

/* Scroll Progress Line */
.scroll-progress-indicator {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-terracotta), var(--accent-pink-moment), var(--accent-gold));
  width: 0%;
  z-index: 2000;
  transition: width 0.1s ease-out;
}

/* ==========================================================================
   NAVIGATION BAR (Glassmorphism & Scroll Morph)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 90px;
  z-index: 1000;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
}

.site-header.header-scrolled {
  height: 72px;
  background-color: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.header-container {
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo-wrap {
  display: flex;
  flex-direction: column;
}

.brand-logo-text {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-tagline-mini {
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent-terracotta);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Pink Moment atmospheric toggle pill */
.pink-moment-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  white-space: nowrap;
  flex-shrink: 0;
}

.pink-moment-toggle:hover {
  border-color: var(--accent-pink-moment);
  color: var(--accent-pink-moment);
  box-shadow: 0 0 16px rgba(217, 136, 150, 0.25);
}

.pink-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-pink-moment);
  box-shadow: 0 0 8px var(--accent-pink-moment);
}

/* Client Auth Header Button */
.auth-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background-color: var(--text-primary);
  color: var(--bg-primary);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  white-space: nowrap;
  flex-shrink: 0;
}

.auth-header-btn:hover {
  background-color: var(--accent-terracotta);
  color: #fff;
  transform: translateY(-1px);
}

.auth-header-btn.authenticated {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.user-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
}

.saved-badge {
  background-color: var(--accent-terracotta);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.mobile-nav-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-primary);
}

/* ==========================================================================
   HERO SECTION (Editorial Architectural Impact)
   ========================================================================== */
.hero-editorial {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 40px 60px;
  overflow: hidden;
}

.hero-background-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.parallax-bg {
  width: 100%;
  height: 115%;
  object-fit: cover;
  object-position: center 35%;
  filter: brightness(0.88);
  transition: transform 0.1s ease-out;
}

.hero-overlay-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(24, 21, 29, 0.45) 0%,
    rgba(24, 21, 29, 0.2) 40%,
    rgba(24, 21, 29, 0.65) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  text-align: center;
  color: #FFFFFF;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent-pink-moment);
  margin-bottom: 20px;
  font-weight: 600;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6.5vw, 5.8rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.hero-headline em {
  font-style: italic;
  font-weight: 400;
  color: #F8EBE2;
}

.hero-subhead {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 300;
  max-width: 720px;
  margin: 0 auto 40px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.hero-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-scroll-prompt {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.85;
}

.scroll-line-animated {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.scroll-line-animated::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: #FFFFFF;
  animation: scrollDown 2s infinite cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes scrollDown {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

/* ==========================================================================
   BUTTONS & COMMON UI TOKENS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-terracotta);
  color: #FFFFFF;
  border: 1px solid var(--accent-terracotta);
}

.btn-primary:hover {
  background-color: var(--accent-terracotta-hover);
  border-color: var(--accent-terracotta-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(163, 107, 79, 0.35);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--accent-terracotta);
  color: var(--accent-terracotta);
  transform: translateY(-2px);
}

.btn-hero-outline {
  background-color: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
}

.btn-hero-outline:hover {
  background-color: #FFFFFF;
  color: #1C1917;
  transform: translateY(-2px);
}

.btn-outline-sm {
  padding: 8px 18px;
  font-size: 0.78rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn-outline-sm:hover {
  border-color: var(--accent-terracotta);
  color: var(--accent-terracotta);
}

.btn-ghost-sm {
  padding: 8px 14px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-ghost-sm:hover {
  color: var(--accent-terracotta);
}

.btn-secondary-sm {
  padding: 10px 20px;
  font-size: 0.82rem;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-weight: 600;
}

.btn-secondary-sm:hover {
  background-color: var(--border-strong);
}

/* ==========================================================================
   EDITORIAL INTRO & METRICS ROW (Inspired by anniecoxhere.com)
   ========================================================================== */
.section-editorial-intro {
  padding: 100px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.editorial-split-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}

.editorial-tag {
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  font-weight: 600;
  display: block;
  margin-bottom: 16px;
}

.editorial-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 24px;
}

.editorial-title em {
  font-style: italic;
  font-weight: 400;
}

.editorial-text {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 36px;
}

.editorial-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item h4 {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--accent-terracotta);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.editorial-visual-stack {
  position: relative;
}

.editorial-main-img {
  width: 100%;
  height: 540px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.editorial-floating-quote {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background-color: var(--bg-surface);
  padding: 24px;
  border-radius: var(--radius-md);
  max-width: min(320px, calc(100% - 48px));
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
}

.quote-stars {
  color: var(--accent-gold);
  font-size: 1rem;
  margin-bottom: 8px;
}

.quote-body {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.quote-author {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   CURATED PROPERTIES SECTION & FILTER CONTROLS
   ========================================================================== */
.section-properties {
  padding: 100px 40px;
  max-width: 1540px;
  margin: 0 auto;
}

.section-header-editorial {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 50px;
}

.section-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  font-weight: 600;
  display: block;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 300;
  line-height: 1.18;
  margin-bottom: 18px;
}

.section-subtext {
  font-size: 1.08rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Filter Controls Bar */
.properties-filter-bar {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 30px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-pills-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.pills-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 8px;
}

.neighborhood-pill {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.neighborhood-pill:hover,
.neighborhood-pill.active {
  background-color: var(--text-primary);
  color: #FFFFFF;
  border-color: var(--text-primary);
}

.filter-inputs-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  align-items: center;
}

.filter-search-box {
  position: relative;
}

.filter-search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.filter-search-input:focus {
  border-color: var(--accent-terracotta);
}

.filter-select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}

/* Properties Grid */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

.property-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.property-media {
  position: relative;
  height: 280px;
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.property-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

.property-card:hover .property-thumb {
  transform: scale(1.05);
}

.property-badges {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-neighborhood {
  background-color: rgba(28, 25, 23, 0.75);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-featured {
  background-color: var(--accent-terracotta);
  color: #FFFFFF;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-4k-gallery {
  position: absolute;
  bottom: 12px;
  left: 14px;
  background-color: rgba(18, 16, 14, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 5;
}

.badge-4k-gallery svg {
  color: #22c55e;
}

.btn-heart-favorite {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  z-index: 2;
}

.btn-heart-favorite:hover {
  transform: scale(1.12);
  color: #E63946;
}

.btn-heart-favorite.active {
  color: #E63946;
}

.property-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.property-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.property-price {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.property-mortgage-est {
  font-size: 0.8rem;
  color: var(--accent-terracotta);
  font-weight: 600;
}

.property-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 6px;
}

.property-title a:hover {
  color: var(--accent-terracotta);
}

.property-address {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.property-specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 14px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  text-align: center;
}

.spec-unit strong {
  display: block;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 600;
}

.spec-unit span {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.property-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

/* ==========================================================================
   MORTGAGE & FINANCING ENGINE SECTION (Interactive Calculator)
   ========================================================================== */
.section-mortgage {
  padding: 100px 40px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.mortgage-container {
  max-width: 1400px;
  margin: 0 auto;
}

.mortgage-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  margin-top: 50px;
}

.mortgage-calculator-card {
  background-color: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.calc-target-badge {
  display: inline-block;
  padding: 6px 14px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--accent-terracotta);
  font-weight: 600;
  margin-bottom: 24px;
}

.calc-input-group {
  margin-bottom: 28px;
}

.calc-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.calc-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.calc-value-badge {
  font-size: 0.85rem;
  color: var(--accent-terracotta);
  font-weight: 700;
}

.calc-text-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 1.1rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
}

.calc-text-input:focus {
  border-color: var(--accent-terracotta);
}

.calc-chips-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.down-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.down-chip:hover,
.down-chip.active {
  background-color: var(--accent-terracotta);
  color: #FFFFFF;
  border-color: var(--accent-terracotta);
}

.calc-grid-halves {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Mortgage Breakdown Card */
.mortgage-breakdown-card {
  background-color: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.breakdown-header {
  margin-bottom: 24px;
}

.monthly-total-label {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.monthly-total-amount {
  font-family: var(--font-serif);
  font-size: 3.4rem;
  font-weight: 500;
  color: var(--accent-terracotta);
  line-height: 1.1;
  margin: 6px 0;
}

.monthly-total-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Segmented Visual Bar */
.mortgage-visual-bar {
  display: flex;
  height: 14px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 20px 0 28px;
  background-color: var(--bg-secondary);
}

.bar-segment {
  height: 100%;
  transition: width 0.4s ease;
}

.bar-segment.pi { background-color: var(--accent-terracotta); }
.bar-segment.tax { background-color: var(--accent-sage); }
.bar-segment.ins { background-color: var(--accent-gold); }
.bar-segment.pmi { background-color: #E63946; }

/* Itemized Cost Breakdown */
.cost-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}

.cost-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
}

.cost-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cost-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.cost-color-dot.pi { background-color: var(--accent-terracotta); }
.cost-color-dot.tax { background-color: var(--accent-sage); }
.cost-color-dot.ins { background-color: var(--accent-gold); }
.cost-color-dot.pmi { background-color: #E63946; }

.cost-row strong {
  font-weight: 600;
}

.breakdown-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

/* ==========================================================================
   NEIGHBORHOODS SHOWCASE & THE LOCAL EDIT
   ========================================================================== */
.section-neighborhoods {
  padding: 100px 40px;
  max-width: 1540px;
  margin: 0 auto;
}

.neighborhoods-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.neighborhood-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

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

.neighborhood-image-wrap {
  position: relative;
  height: 240px;
}

.neighborhood-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

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

.neighborhood-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 50%, rgba(28, 25, 23, 0.6) 100%);
}

.neighborhood-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.neighborhood-tag {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  font-weight: 600;
  margin-bottom: 6px;
}

.neighborhood-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 10px;
}

.neighborhood-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 20px;
}

.neighborhood-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.avg-price strong {
  color: var(--accent-terracotta);
}

.explore-link {
  color: var(--text-primary);
  font-weight: 600;
  transition: color 0.2s ease;
}

.neighborhood-card:hover .explore-link {
  color: var(--accent-terracotta);
}

/* ==========================================================================
   THE LOCAL EDIT (Annie Cox Curated Ojai Spots)
   ========================================================================== */
.section-local-edit {
  padding: 100px 40px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
}

.local-edit-container {
  max-width: 1400px;
  margin: 0 auto;
}

.local-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}

.local-spot-card {
  background-color: var(--bg-card);
  padding: 30px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.local-spot-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-terracotta);
}

.spot-category {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

.spot-name {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 400;
  margin-bottom: 12px;
}

.spot-highlight {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
}

.spot-address {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: #161413;
  color: #EDE8E2;
  padding: 100px 40px 40px;
}

.footer-container {
  max-width: 1540px;
  margin: 0 auto;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-brand-desc {
  font-size: 0.92rem;
  color: #A8A199;
  line-height: 1.7;
  max-width: 360px;
  margin-bottom: 24px;
}

.footer-col-title {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.88rem;
  color: #A8A199;
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-newsletter p {
  font-size: 0.88rem;
  color: #A8A199;
  margin-bottom: 16px;
  line-height: 1.5;
}

.footer-input-row {
  display: flex;
  gap: 8px;
}

.footer-email-input {
  flex-grow: 1;
  padding: 12px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  font-size: 0.88rem;
  outline: none;
}

.footer-email-input:focus {
  border-color: var(--accent-terracotta);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  font-size: 0.8rem;
  color: #8C847C;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   CLIENT ACCOUNT DRAWER (Slide-in Panel)
   ========================================================================== */
.account-drawer {
  position: fixed;
  top: 0;
  right: -520px;
  width: min(500px, 92vw);
  max-width: 92vw;
  height: 100vh;
  background-color: var(--bg-surface);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.25);
  z-index: 2500;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  pointer-events: none;
}

.account-drawer.active {
  right: 0;
  visibility: visible;
  pointer-events: auto;
}

.drawer-header {
  padding: 24px 30px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
}

.drawer-close-btn {
  font-size: 1.4rem;
  color: var(--text-muted);
  padding: 4px;
}

.drawer-close-btn:hover {
  color: var(--text-primary);
}

.drawer-body {
  padding: 30px;
  overflow-y: auto;
  flex-grow: 1;
}

.client-profile-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.client-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--accent-terracotta);
}

.client-meta h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
}

.client-email {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.client-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.72rem;
  background-color: var(--bg-secondary);
  color: var(--accent-terracotta);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.drawer-preapproval-card {
  background: linear-gradient(135deg, rgba(163, 107, 79, 0.08), rgba(217, 136, 150, 0.1));
  border: 1px solid var(--accent-terracotta);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.preapproval-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  font-weight: 700;
  margin-bottom: 6px;
}

.drawer-preapproval-card h4 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-primary);
}

.preapproval-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.drawer-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.drawer-tab-btn {
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
}

.drawer-tab-btn.active {
  color: var(--accent-terracotta);
  border-bottom-color: var(--accent-terracotta);
}

.drawer-tab-pane {
  display: none;
}

.drawer-tab-pane.active {
  display: block;
}

.drawer-property-item {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-prop-thumb {
  width: 90px;
  height: 75px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.drawer-prop-info h5 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.drawer-prop-price {
  font-weight: 700;
  color: var(--accent-terracotta);
  font-size: 0.95rem;
  display: block;
}

.drawer-prop-specs {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.drawer-prop-actions {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
}

.action-link {
  color: var(--text-primary);
  font-weight: 600;
}

.action-link:hover {
  color: var(--accent-terracotta);
}

.action-link-btn {
  color: var(--accent-terracotta);
  font-weight: 600;
}

.action-link-remove {
  color: var(--text-muted);
}

.action-link-remove:hover {
  color: #E63946;
}

.drawer-calc-item {
  background-color: var(--bg-secondary);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.calc-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.calc-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.calc-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 3px 0;
}

.drawer-apt-item {
  background-color: var(--bg-secondary);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.apt-status-badge {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-sage);
  margin-bottom: 4px;
}

.apt-datetime {
  font-size: 0.85rem;
  color: var(--accent-terracotta);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}

.drawer-footer {
  padding: 20px 30px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   MODALS (Auth, Pre-Approval, Showing, Certificate)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(24, 21, 29, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.96);
  max-width: 600px;
  width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 2300;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 40px;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
}

.modal-close-btn {
  font-size: 1.6rem;
  color: var(--text-muted);
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.auth-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.auth-tab-btn {
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}

.auth-tab-btn.active {
  color: var(--accent-terracotta);
  border-bottom-color: var(--accent-terracotta);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-terracotta);
}

.hidden {
  display: none !important;
}

/* Pre-Approval Multi-Step Form */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.step-indicators-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--border-strong);
  transition: var(--transition-fast);
}

.step-dot.active {
  background-color: var(--accent-terracotta);
  transform: scale(1.2);
}

/* Certificate Modal */
.preapproval-cert-paper {
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 40px;
  text-align: center;
  background-color: var(--bg-surface);
  position: relative;
  box-shadow: inset 0 0 40px rgba(194, 162, 104, 0.08);
}

.cert-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  margin-bottom: 8px;
}

.cert-headline {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 400;
  margin-bottom: 20px;
}

.cert-power-box {
  margin: 24px 0;
  padding: 20px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.cert-power-box span {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cert-power-box h2 {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  color: var(--accent-terracotta);
  font-weight: 500;
  margin-top: 4px;
}

.cert-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: left;
  font-size: 0.85rem;
  padding: 20px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-pill {
  background-color: #1C1917;
  color: #FFFFFF;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  pointer-events: auto;
}

.toast-pill.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-pink-moment);
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS (Inspired by anniecoxhere.com)
   ========================================================================== */
.reveal, .reveal-up {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-fade {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible,
.reveal-up.is-visible,
.reveal-fade.is-visible,
.property-card.is-visible,
.neighborhood-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */
@media (max-width: 1200px) {
  .properties-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .neighborhoods-grid,
  .local-edit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

@media (max-width: 900px) {
  .site-header {
    height: 72px;
  }
  .header-container {
    padding: 0 16px;
    max-width: 100vw;
    box-sizing: border-box;
    width: 100%;
  }
  .brand-tagline-mini {
    display: none !important;
  }
  .brand-logo-text {
    font-size: 1.35rem;
    letter-spacing: 0.08em;
  }
  .nav-actions {
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
  }
  .editorial-split-grid,
  .mortgage-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .editorial-floating-quote {
    position: static;
    margin-top: 24px;
    left: auto;
    bottom: auto;
    max-width: 100%;
  }
  .filter-inputs-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* Luxury Mobile Navigation Drawer */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(340px, 88vw);
    height: 100vh;
    height: 100dvh;
    background-color: var(--bg-surface);
    display: flex;
    flex-direction: column;
    padding: calc(20px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.28);
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
    z-index: 2500;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    pointer-events: none;
    gap: 0;
  }
  .nav-links.mobile-open {
    right: 0;
    visibility: visible;
    pointer-events: auto;
  }
  .mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
    width: 100%;
  }
  .mobile-nav-brand {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
  }
  .mobile-nav-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    transition: var(--transition-fast);
  }
  .mobile-nav-close:active {
    transform: scale(0.92);
  }
  .nav-links li {
    width: 100%;
    margin-bottom: 2px;
  }
  .nav-links .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    font-size: 1.02rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    min-height: 48px;
    transition: var(--transition-fast);
  }
  .nav-links .nav-link:active,
  .nav-links .nav-link.active {
    background-color: var(--bg-secondary);
    color: var(--accent-terracotta);
    font-weight: 600;
  }
  .mobile-nav-concierge {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .mobile-call-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-terracotta);
    min-height: 46px;
  }
  .mobile-call-link:active {
    background-color: var(--border-strong);
  }
  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0;
    cursor: pointer;
    z-index: 2600;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
  }
  .mobile-nav-toggle:active {
    transform: scale(0.92);
  }
}

@media (max-width: 640px) {
  .site-header {
    height: 64px;
  }
  .header-container {
    padding: 0 12px;
    max-width: 100vw;
    box-sizing: border-box;
    width: 100%;
  }
  .brand-logo-text {
    font-size: 1.25rem;
    letter-spacing: 0.06em;
  }
  .nav-actions {
    gap: 6px;
    flex-shrink: 0;
  }
  .pink-moment-toggle {
    min-width: 40px;
    min-height: 40px;
    height: 40px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--radius-full);
  }
  .pink-moment-toggle span:not(.pink-dot-pulse) {
    display: none !important;
  }
  .auth-header-btn {
    min-width: 40px;
    min-height: 40px;
    height: 40px;
    padding: 0 10px;
    font-size: 0.78rem;
    gap: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
  }
  .auth-header-btn .user-name-label,
  .auth-header-btn > span:not(.saved-badge):not(.user-avatar-mini) {
    display: none !important;
  }
  .hero-editorial {
    padding: 80px 16px 36px;
    min-height: 75vh;
  }
  .hero-headline {
    font-size: clamp(1.85rem, 7vw, 2.4rem);
    line-height: 1.14;
    margin-bottom: 16px;
    word-break: break-word;
  }
  .hero-subhead {
    font-size: 0.92rem;
    margin-bottom: 22px;
    line-height: 1.5;
  }
  .hero-actions-row {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .hero-actions-row .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    font-size: 0.9rem;
  }
  .hero-scroll-prompt {
    display: none;
  }

  .section-editorial-intro,
  .section-properties,
  .section-mortgage,
  .section-neighborhoods,
  .section-local-edit {
    padding: 40px 14px;
  }
  .editorial-title {
    font-size: 1.95rem;
  }

  /* Harmonious 3-Column Editorial Stats Ribbon on Mobile */
  .editorial-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px 12px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-top: 24px;
    text-align: center;
  }
  .stat-item h4 {
    font-size: 1.6rem;
    line-height: 1.1;
    margin-bottom: 4px;
    color: var(--accent-terracotta);
  }
  .stat-item p {
    font-size: 0.72rem;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  /* Properties Catalog & Filter Bar */
  .properties-grid,
  .neighborhoods-grid,
  .local-edit-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .filter-inputs-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .properties-filter-bar {
    padding: 16px 12px;
    gap: 14px;
    max-width: 100%;
    box-sizing: border-box;
  }
  .filter-pills-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0;
    gap: 8px;
    width: 100%;
  }
  .filter-pills-row::-webkit-scrollbar {
    display: none;
  }
  .neighborhood-pill {
    scroll-snap-align: start;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 8px 16px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
  }
  .pills-label {
    flex-shrink: 0;
    font-size: 0.75rem;
    margin-right: 2px;
  }

  /* Mobile Property Card UX */
  .property-media {
    height: 240px;
  }
  .property-body {
    padding: 18px 16px;
  }
  .property-price {
    font-size: 1.65rem;
  }
  .property-title {
    font-size: 1.25rem;
  }
  .btn-heart-favorite {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    top: 12px;
    right: 12px;
  }
  .property-card-actions {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  .property-card-actions .btn-outline-sm {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
  }
  .property-card-actions > div {
    display: flex;
    gap: 8px;
    width: 100%;
  }
  .property-card-actions > div .btn-ghost-sm {
    flex: 1;
    justify-content: center;
    min-height: 42px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background-color: var(--bg-surface);
    font-size: 0.8rem;
  }

  /* Mobile Bottom Sheet Modals */
  .modal {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    transform: translateY(100%);
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    max-height: 90dvh;
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom, 0px));
    border-bottom: none;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
  }
  .modal.active {
    transform: translateY(0);
  }
  .modal-close-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-secondary);
  }

  /* Account Drawer Fullscreen Slide-over */
  .account-drawer {
    width: 100vw;
    max-width: 100vw;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .drawer-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 8px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
  }
  .drawer-tab-btn {
    padding: 8px 10px;
    font-size: 0.78rem;
    text-align: center;
  }

  /* Form Controls Anti-Zoom for iOS Safari */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="date"],
  select,
  textarea,
  .form-control,
  .filter-search-input,
  .filter-select,
  .calc-text-input {
    font-size: 16px !important;
  }

  .calc-grid-halves {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .calc-chips-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .down-chip {
    flex: 1 1 calc(50% - 8px);
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .app-card {
    padding: 20px 14px;
  }
  .mortgage-app-section {
    padding: 76px 12px 50px;
  }
  .app-stepper-wrap {
    padding: 12px 14px;
    margin-bottom: 20px;
  }
  .cert-power-box h2 {
    font-size: 1.85rem;
  }
  .cert-meta-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Mobile Toast Positioning */
  .toast-container {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    right: 16px;
    align-items: center;
    width: auto;
  }
  body.has-mobile-bar .toast-container {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
  .toast-pill {
    width: 100%;
    max-width: 380px;
    justify-content: center;
    text-align: center;
    padding: 12px 18px;
  }
}

@media (max-width: 380px) {
  .header-container {
    padding: 0 8px;
  }
  .brand-logo-text {
    font-size: 1.18rem;
    letter-spacing: 0.04em;
  }
  .nav-actions {
    gap: 4px;
  }
  .pink-moment-toggle {
    min-width: 38px;
    min-height: 38px;
    height: 38px;
    padding: 0 8px;
  }
  .auth-header-btn {
    min-width: 38px;
    min-height: 38px;
    height: 38px;
    padding: 0 8px;
  }
  .mobile-nav-toggle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  .hero-headline {
    font-size: 1.75rem;
  }
  .stat-item h4 {
    font-size: 1.4rem;
  }
}

/* ==========================================================================
   DIGITAL MORTGAGE APPLICATION SYSTEM
   ========================================================================== */
.mortgage-app-section {
  padding: 120px 40px 100px;
  max-width: 1540px;
  margin: 0 auto;
}

.app-security-banner {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 10px 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.security-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-sage);
  box-shadow: 0 0 0 3px rgba(107, 127, 106, 0.2);
}

.app-stepper-wrap {
  margin-bottom: 40px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  box-shadow: var(--shadow-sm);
}

.app-stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  gap: 10px;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  opacity: 0.5;
  transition: var(--transition-fast);
}

.stepper-step.active {
  opacity: 1;
}

.stepper-step.completed {
  opacity: 0.9;
}

.step-num-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  background-color: var(--bg-secondary);
  transition: var(--transition-fast);
}

.stepper-step.active .step-num-circle {
  border-color: var(--accent-terracotta);
  background-color: var(--accent-terracotta);
  color: #FFFFFF;
}

.stepper-step.completed .step-num-circle {
  border-color: var(--accent-sage);
  background-color: var(--accent-sage);
  color: #FFFFFF;
}

.step-label-group {
  display: flex;
  flex-direction: column;
}

.step-category-name {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.step-main-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.stepper-divider {
  flex: 1;
  height: 2px;
  background-color: var(--border-subtle);
  margin: 0 8px;
}

.mortgage-app-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.app-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.app-step-pane {
  display: none;
  animation: fadeInStep 0.35s ease forwards;
}

.app-step-pane.active {
  display: block;
}

@keyframes fadeInStep {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.pane-heading-block {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.pane-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

.pane-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 400;
  margin-bottom: 8px;
}

.pane-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Document Upload Dropzones */
.doc-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}

.doc-upload-box {
  background-color: var(--bg-secondary);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.doc-upload-box:hover {
  border-color: var(--accent-terracotta);
  background-color: rgba(199, 107, 78, 0.04);
}

.doc-upload-box.has-file {
  border-style: solid;
  border-color: var(--accent-sage);
  background-color: rgba(107, 127, 106, 0.06);
}

.doc-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--accent-terracotta);
  box-shadow: var(--shadow-sm);
}

.doc-upload-box.has-file .doc-icon-circle {
  color: var(--accent-sage);
}

.doc-box-title {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.doc-box-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.doc-file-status {
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-sage);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Real-Time Underwriting Sidebar */
.app-sidebar-sticky {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.underwriting-intel-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.dti-gauge-wrap {
  margin: 20px 0;
  padding: 20px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.dti-meter-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.dti-meter-bar {
  height: 10px;
  background-color: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 10px;
}

.dti-meter-fill {
  height: 100%;
  background-color: var(--accent-sage);
  border-radius: var(--radius-full);
  transition: width 0.4s ease, background-color 0.4s ease;
}

.dti-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-sage);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.app-advisor-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 20px;
}

.advisor-thumb {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-terracotta);
}

/* Electronic Signature Box */
.signature-box-wrap {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background-color: var(--bg-secondary);
}

.signature-preview {
  font-family: 'Brush Script MT', 'Segoe Script', cursive, sans-serif;
  font-size: 2rem;
  color: #1A365D;
  padding: 10px 0;
  border-bottom: 2px solid var(--border-strong);
  min-height: 50px;
}

/* Application Status Badges */
.app-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.app-status-badge.review {
  background-color: rgba(199, 107, 78, 0.12);
  color: var(--accent-terracotta);
  border: 1px solid rgba(199, 107, 78, 0.3);
}

.app-status-badge.approved {
  background-color: rgba(107, 127, 106, 0.15);
  color: var(--accent-sage);
  border: 1px solid rgba(107, 127, 106, 0.3);
}

.drawer-app-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 992px) {
  .mortgage-app-grid {
    grid-template-columns: 1fr;
  }
  .app-sidebar-sticky {
    position: static;
  }
  .doc-upload-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-stepper-wrap {
    padding: 14px 16px;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
  }
  .app-stepper {
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
  }
  .stepper-step {
    flex: 1;
    justify-content: center;
    gap: 0;
  }
  .step-label-group {
    display: none !important;
  }
  .step-num-circle {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    font-size: 0.82rem;
  }
  .stepper-divider {
    display: block !important;
    height: 2px;
    flex: 1;
    margin: 0 4px;
    background-color: var(--border-subtle);
  }
  .app-nav-row {
    flex-direction: column-reverse;
    gap: 12px;
  }
  .app-nav-row .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
}

/* ==========================================================================
   MOBILE STICKY ESTATE ACTION BAR (Property Detail Page)
   Pinned concierge bar providing effortless 1-tap booking on mobile
   ========================================================================== */
.mobile-sticky-estate-bar {
  display: none;
}

@media (max-width: 900px) {
  .mobile-sticky-estate-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    align-items: center;
    justify-content: space-between;
    z-index: 1500;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  }
  .mobile-sticky-info {
    display: flex;
    flex-direction: column;
    max-width: 50%;
  }
  .mobile-sticky-price {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.15;
  }
  .mobile-sticky-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-sticky-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .mobile-sticky-actions .btn-primary {
    padding: 10px 16px;
    font-size: 0.82rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .mobile-sticky-actions .btn-icon-call {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: var(--bg-surface);
    color: var(--accent-terracotta);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
  }
  .mobile-sticky-actions .btn-icon-call:active {
    transform: scale(0.92);
    background: var(--border-strong);
  }

  /* Safe padding for content so sticky bar never covers footer */
  body.has-mobile-bar main {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ==========================================================================
   RESPONSIVE BENCHMARK RATES TABLE (Mortgage Page)
   Converts wide 5-column table into touch-friendly cards on mobile
   ========================================================================== */
@media (max-width: 768px) {
  .rates-table-wrap {
    padding: 20px 14px;
    overflow-x: visible;
  }
  .rates-table, 
  .rates-table thead, 
  .rates-table tbody, 
  .rates-table th, 
  .rates-table td, 
  .rates-table tr {
    display: block;
  }
  .rates-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  .rates-table tr {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
  }
  .rates-table td {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    text-align: right;
  }
  .rates-table td:last-child {
    border-bottom: none;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    margin-top: 6px;
    padding-top: 10px;
    font-size: 0.82rem;
    color: var(--text-secondary);
  }
  .rates-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: left;
  }
  .rates-table td:first-child {
    font-size: 1.05rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 10px;
    margin-bottom: 6px;
  }
  .rates-table td:first-child::before {
    display: none;
  }
  .rates-table td .rate-badge {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   MOBILE ADMIN PORTAL RESPONSIVENESS (Admin Page)
   Off-canvas sidebar drawer & top navigation bar for mobile directorate
   ========================================================================== */
.admin-mobile-topbar {
  display: none;
}

@media (max-width: 640px) {
  .admin-mobile-topbar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #1B1817;
    color: #FAF8F5;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    z-index: 1200;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
  .admin-mobile-brand {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    color: #FAF8F5;
  }
  .admin-mobile-toggle-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #FAF8F5;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: none;
    cursor: pointer;
  }
  .admin-sidebar {
    display: flex !important;
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: -290px;
    width: 280px;
    z-index: 1500;
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4);
  }
  .admin-sidebar.mobile-open {
    left: 0 !important;
  }
  .admin-sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1400;
  }
  .admin-sidebar-backdrop.active {
    display: block;
  }
  .admin-main {
    margin-left: 0 !important;
    padding: 76px 14px 40px !important;
  }
  .admin-header-row h1 {
    font-size: 1.6rem;
  }
  .search-filter-wrap {
    max-width: 100%;
    width: 100%;
  }
  .table-controls-bar {
    padding: 14px 16px;
  }
  .admin-table th, .admin-table td {
    padding: 12px 14px;
    font-size: 0.82rem;
  }
  .decision-buttons-row {
    flex-direction: column;
  }
  .decision-buttons-row .btn-approve-lg,
  .decision-buttons-row .btn-request-docs,
  .decision-buttons-row .btn-decline {
    width: 100%;
    justify-content: center;
    min-height: 46px;
  }
}


