/* ============================================================
   INNER.CSS - Shared styles for all inner pages
   ============================================================ */

/* ── Two-Column Layout ── */
.two-col-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.two-col-img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  background: var(--color-bg-slate);
}

/* ── Process Steps ── */
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 3rem;
}

.process-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.process-step__number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--color-accent);
  opacity: 0.5;
  line-height: 1;
  flex-shrink: 0;
  min-width: 2.5rem;
}

.process-step__content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.process-step__content p {
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ── Stats Row (light) ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat-block-light {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--color-border);
  text-align: center;
}

.stat-block-light:last-child {
  border-right: none;
}

.stat-block-light__number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-block-light__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.stat-block-light__desc {
  font-size: 0.8rem;
  line-height: 1.6;
}

/* ── CTA Section override for split with tighter right col ── */
.cta-section--split-wide .cta-section__inner {
  grid-template-columns: 1fr 1.2fr;
}

/* ── Listings Page ── */
.section--listings .container {
  max-width: 1440px;
}

/* Map mode: remove all container constraints so the map fills edge-to-edge */
.section--listings.section--map-active {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.section--listings.section--map-active .container {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* Give the sort/toggle/count header a small horizontal inset so it's
   not flush against the screen edge when the container has no padding */
.section--listings.section--map-active .listings-results__header {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Desktop layout: 300px sidebar spacer + results */
.listings-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  align-items: flex-start;
}

/* Spacer column — holds grid space; actual panel is position:fixed by JS */
.listings-filters-col {
  /* intentionally empty */
}

.listings-results {
  min-height: 70vh;
}

/* ── Filter Sidebar ── */
/* Desktop: position/top/left/width set by initStickyFilter JS.
   Per locked rule: NO position:sticky, NO max-height, NO overflow-y here. */
.listings-filters {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

/* Mobile-only header (title + close button) — hidden on desktop */
.filter-sidebar__header {
  display: none;
}

.filter-sidebar__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.filter-sidebar__close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.filter-sidebar__close:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(10, 39, 73, 0.04);
}

.filter-sidebar__body {
  padding: 1.25rem;
}

/* ── Listings Filter Button (mobile only) ── */
.listings-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-size: 0.775rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-primary);
  background: var(--color-white);
  color: var(--color-primary);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}

.listings-filter-btn:hover,
.listings-filter-btn.is-active {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Filter button + backdrop not needed on desktop */
@media (min-width: 1100px) {
  .listings-filter-btn {
    display: none;
  }
  .filter-drawer__backdrop {
    display: none;
  }
}

/* ── Filter Drawer Backdrop (mobile only) ── */
.filter-drawer__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 39, 73, 0.45);
  z-index: 1049;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.filter-drawer__backdrop.is-visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Listings Results Header ── */
.listings-results__header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.listings-results__header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.listings-results__sort-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.listings-filters {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.listings-filters__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.listings-filters__section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.listings-filters__section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.listings-filters form .btn {
  margin-top: 1.25rem;
  width: 100%;
  justify-content: center;
}

.listings-filters__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  display: block;
}

/* Sub-labels (Min / Max / From / To inside 2-col grids) */
.listings-filters__sublabel {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 0.3rem;
}

/* Location group wrapper */
.listings-filters__group {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.listings-filters__group-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.listings-filters__group .listings-filters__section {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.875rem;
}

.listings-filters__group .listings-filters__section:last-child {
  margin-bottom: 0;
}

/* 2-column grid for paired selects */
.listings-filters__2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Advanced filters toggle button */
.listings-filters__advanced-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 0;
  background: none;
  border: none;
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  cursor: pointer;
  transition: color 0.18s;
}

.listings-filters__advanced-toggle:hover {
  color: var(--color-accent);
}

.listings-filters__advanced-icon {
  transition: transform 0.25s ease;
}

.listings-filters__advanced-toggle[aria-expanded="true"] .listings-filters__advanced-icon {
  transform: rotate(180deg);
}

/* Collapsible advanced panel */
.listings-filters__advanced {
  padding-top: 0.5rem;
}

/* ── Label row (label + current value side by side) ── */
.listings-filters__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.625rem;
}

/* ── Days-on-Market Slider (mirrors price-slider) ── */
.dom-slider {
  padding: 0.25rem 0 0.5rem;
}

.dom-slider__values {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.875rem;
}

.dom-slider__track {
  position: relative;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    rgba(10, 39, 73, 0.2) var(--slider-min, 0%),
    var(--color-primary)  var(--slider-min, 0%),
    var(--color-primary)  var(--slider-max, 100%),
    rgba(10, 39, 73, 0.2) var(--slider-max, 100%)
  );
  margin: 10px 0;
}

.dom-slider__track input[type="range"] {
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  margin: 0;
  padding: 0;
  height: 5px;
}

.dom-slider__track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  pointer-events: all;
  cursor: pointer;
}

.dom-slider__track input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  pointer-events: all;
  cursor: pointer;
  border: none;
}

.dom-slider__track input[type="range"]::-webkit-slider-runnable-track { background: transparent; }
.dom-slider__track input[type="range"]::-moz-range-track { background: transparent; }

/* Apply button */
.listings-filters__apply {
  margin-top: 1.25rem;
  width: 100%;
  justify-content: center;
}

/* Clear all link-style button */
.listings-filters__clear {
  display: block;
  width: 100%;
  margin-top: 0.625rem;
  padding: 0.5rem;
  background: none;
  border: none;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  cursor: pointer;
  transition: color 0.18s;
  text-decoration: underline;
}

.listings-filters__clear:hover {
  color: var(--color-primary);
}

.listings-results__header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  gap: 1rem;
  position: relative;
  z-index: 0;
}

.listings-results__header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

/* Count shown below the toggle in map view only */
.map-view-count {
  display: none;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
  white-space: nowrap;
}

.section--map-active .map-view-count {
  display: block;
}

/* Hide the right-column count in map view — shown below the toggle instead */
.section--map-active .listings-results__count {
  display: none;
}

/* ── View Toggle (List / Map) ── */
.view-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
}

.view-toggle__btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-body);
  background: var(--color-white);
  color: var(--color-text-muted);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.view-toggle__btn + .view-toggle__btn {
  border-left: 1px solid var(--color-border);
}

.view-toggle__btn:hover {
  background: #f0f2f5;
  color: var(--color-primary);
}

.view-toggle__btn.is-active {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ── Listings Map Container ── */
.listings-map {
  width: 100%;
  margin-bottom: 1.75rem;
}

.listings-map[hidden] {
  display: none !important;
}

/* Inner canvas — Leaflet attaches here */
.listings-map__canvas {
  width: 100%;
  height: 100%;
}

/* ── Map view: 3-panel inline layout ──────────────────────────
   Layout:  [Filter 300px] | [Map canvas flex:1] | [Properties 320px]
   All three panels sit at equal height inside #listingsMap.

   JS moves #filterSidebar into #listingsMap as its first child when
   map mode activates, and restores it on list toggle.
   CSS overrides initStickyFilter's inline position:fixed back to
   relative so the filter participates in normal flex flow.
   ──────────────────────────────────────────────────────────── */

/* Grid collapses to 1 column so .listings-results fills the full width */
.listings-layout.is-map-view {
  grid-template-columns: 1fr;
}

.listings-layout.is-map-view .listings-filters-col {
  display: none !important;
}

.listings-layout.is-map-view .listings-results {
  grid-column: 1 / -1;
}

/* Map container: flex row host with gaps between the 3 separate panels */
.is-map-view .listings-map {
  display: flex;
  flex-direction: row;
  gap: 0.375rem;
  width: 100%;
  height: calc(100vh - var(--nav-height, 80px) - 2.5rem);
  min-height: 500px;
  border: none;
  border-radius: 0;
  overflow: visible;
  margin-bottom: 0;
  background: transparent;
  /* Explicit stacking context at z-index 0 so Leaflet's internal z-indexes
     (controls at 800, popups at 700, etc.) are contained below the fixed
     nav bar (z-index 1000) and scroll behind it correctly. */
  position: relative;
  z-index: 0;
}

/* ── Filter panel — left container ── */
.is-map-view .listings-map > .listings-filters {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 300px !important;
  height: 100% !important;
  flex-shrink: 0;
  /* overflow:hidden clips the scrollbar within the border-radius.
     The inner .filter-sidebar__body handles scrolling. */
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: none !important;
  visibility: visible !important;
  z-index: 1 !important;
  max-height: none !important;
}

/* Inner body scrolls; min-height:0 is required for overflow in a flex child */
.is-map-view .listings-map > .listings-filters .filter-sidebar__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* ── Map canvas — centre container ── */
.is-map-view .listings-map__canvas {
  flex: 1;
  min-width: 0;
  height: 100%;
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ── Properties side panel — right container ── */
.is-map-view .map-side-panel {
  position: relative;
  right: auto;
  top: auto;
  bottom: auto;
  width: 320px;
  flex-shrink: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: none;
  overflow: hidden;
}

/* ── Map Side Panel ── */
.map-side-panel {
  display: none; /* hidden until map mode activates */
}

.map-side-panel__header {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-primary);
  flex-shrink: 0;
}

.map-side-panel__count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.map-side-panel__list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Map Side Panel Cards ── */
.map-card {
  display: flex;
  gap: 0.625rem;
  padding: 0.625rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  background: var(--color-white);
  transition: border-color 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}

.map-card:hover,
.map-card.is-active {
  border-color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.map-card__img {
  width: 80px;
  height: 64px;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 2px);
  flex-shrink: 0;
  background: var(--color-border);
}

.map-card__img--empty {
  background: linear-gradient(90deg, #e8eaed 25%, #f0f2f4 50%, #e8eaed 75%);
  background-size: 200% 100%;
  animation: map-card-shimmer 1.4s infinite;
}

@keyframes map-card-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.map-card__body {
  flex: 1;
  min-width: 0;
}

.map-card__price {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.15rem;
}

.map-card__address {
  font-size: 0.75rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.1rem;
}

.map-card__city {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}

.map-card__specs {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

/* ── Map Price Pin ── */
.map-price-pin {
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-body);
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
  position: relative;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  transition: background 0.15s;
}

.map-price-pin::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--color-primary);
}

.map-price-pin.is-active {
  background: var(--color-accent);
  z-index: 1000;
}

.map-price-pin.is-active::after {
  border-top-color: var(--color-accent);
}

/* ── Map Popup Card ── */
.map-popup {
  width: 220px;
}

.map-popup__img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  border-radius: 4px 4px 0 0;
}

.map-popup__body {
  padding: 0.625rem 0.75rem 0.5rem;
}

.map-popup__price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.map-popup__address {
  font-size: 0.775rem;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.map-popup__specs {
  font-size: 0.725rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.map-popup__link {
  display: inline-block;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}

.map-popup__link:hover {
  text-decoration: underline;
}

/* ── Search This Area Button ── */
.map-search-btn {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 20px;
  padding: 0.45rem 1.1rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  white-space: nowrap;
  transition: background 0.15s;
  /* visibility controlled via JS (element.hidden / style.display) */
}

.map-search-btn:hover {
  background: #0c3060;
}

.listings-results__count {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.listings-results__count strong {
  color: var(--color-text);
}

.listings__loading,
.listings__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.load-more-wrap {
  text-align: center;
  margin-top: 3rem;
}

/* ── About Page ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.team-member {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.team-member:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.team-member__photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  background: var(--color-bg-slate);
}

.team-member__info {
  padding: 1.5rem;
}

.team-member__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.team-member__title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.team-member__bio {
  font-size: 0.825rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.team-member__contact {
  display: flex;
  gap: 0.5rem;
}

.team-member__contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: border-color var(--transition), color var(--transition);
}

.team-member__contact-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ── Values Grid ── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.value-card {
  padding: 2.5rem 2rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.value-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(10,39,73,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.value-card__icon svg {
  stroke: var(--color-primary);
}

.value-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.value-card__desc {
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ── Commercial Page ── */
.commercial-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
}

.commercial-option-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.commercial-option-card__icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: rgba(10,39,73,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.commercial-option-card__icon svg {
  stroke: var(--color-primary);
}

.commercial-option-card__title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--color-primary);
  margin-bottom: 0;
}

.commercial-option-card__desc {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--color-text-muted);
}

.commercial-option-card__types {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.commercial-option-card__types li {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  padding-left: 1.25rem;
  position: relative;
}

.commercial-option-card__types li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.commercial-option-card__btn {
  margin-top: 1.75rem;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Contact Page ── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 5rem;
  align-items: flex-start;
}

.contact-info__item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.contact-info__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(10,39,73,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info__icon svg {
  stroke: var(--color-primary);
}

.contact-info__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.contact-info__value {
  font-size: 0.9rem;
  color: var(--color-text);
  font-weight: 500;
}

.contact-form {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.contact-form__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1.75rem;
}

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

/* ── Map Placeholder ── */
.map-placeholder {
  height: 360px;
  background: var(--color-bg-slate);
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

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

/* ── REALTOR.ca attribution badge (required by CREA DDF) ── */
.realtor-badge {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: var(--color-bg-slate);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

.realtor-badge__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.realtor-badge__link:hover {
  text-decoration: underline;
}

.realtor-badge__note {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ── Tag Input ── */
/* ── Price Range Slider ── */
.price-slider {
  padding: 0.25rem 0 0.5rem;
}

.price-slider__values {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.875rem;
}

.price-slider__track {
  position: relative;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    rgba(10, 39, 73, 0.2) var(--slider-min, 0%),
    var(--color-primary)  var(--slider-min, 0%),
    var(--color-primary)  var(--slider-max, 100%),
    rgba(10, 39, 73, 0.2) var(--slider-max, 100%)
  );
  margin: 10px 0;
}

.price-slider__track input[type="range"] {
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  margin: 0;
  padding: 0;
  height: 5px;
}

.price-slider__track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  pointer-events: all;
  cursor: pointer;
}

.price-slider__track input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  pointer-events: all;
  cursor: pointer;
  border: none;
}

.price-slider__track input[type="range"]::-webkit-slider-runnable-track { background: transparent; }
.price-slider__track input[type="range"]::-moz-range-track { background: transparent; }

/* ── Number Filter Inputs ── */
.filter-number-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.filter-number-input::placeholder { color: var(--color-text-muted, #9ca3af); }

.filter-number-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Hide browser spinner arrows */
.filter-number-input::-webkit-outer-spin-button,
.filter-number-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.filter-number-input[type=number] { -moz-appearance: textfield; }

/* ── Reveal for inner pages ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-block-light:nth-child(2) {
    border-right: none;
  }

  .stat-block-light:nth-child(1),
  .stat-block-light:nth-child(2) {
    border-bottom: 1px solid var(--color-border);
  }

  /* Listings: collapse to single column, sidebar becomes a drawer */
  .listings-layout {
    grid-template-columns: 1fr;
  }

  .listings-filters-col {
    display: none;
  }

  /* Sidebar transforms into a slide-in drawer */
  .listings-filters {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: 400px;
    max-width: 92vw;
    z-index: 1050;
    border: none;
    border-radius: 0;
    box-shadow: -4px 0 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .listings-filters.is-open {
    transform: translateX(0);
  }

  /* Show mobile header (title + close button) */
  .filter-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
  }

  .filter-sidebar__body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

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

  .two-col-img {
    height: 320px;
  }

  .two-col-section__visual {
    order: -1;
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .commercial-options {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .is-map-view .map-side-panel {
    width: 260px;
  }

  .is-map-view .listings-map > .listings-filters {
    width: 260px !important;
  }
}

@media (max-width: 640px) {
  .process-steps {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .stat-block-light {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding: 1.75rem 1.5rem;
  }

  .stat-block-light:last-child {
    border-bottom: none;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .value-card {
    padding: 1.75rem 1.5rem;
  }

  .commercial-option-card {
    padding: 2rem 1.5rem;
  }

  .page-hero {
    padding: calc(var(--nav-height) + 2.5rem) 0 2.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .two-col-img {
    height: 240px;
  }

  .map-placeholder {
    height: 260px;
  }

  .contact-form {
    padding: 1.75rem 1.25rem;
  }

  .listings-results__header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  /* Filter button + count row — at top */
  .listings-results__header-right {
    order: -2;
    justify-content: space-between;
    width: 100%;
  }

  /* Sort row — middle */
  .listings-results__header-left {
    order: -1;
    width: 100%;
  }

  .listings-results__header-left .form-select {
    width: 100%;
    min-width: 0;
  }

  /* View toggle row — bottom */
  .listings-results__header-center {
    order: 1;
    justify-content: flex-start;
  }

  /* Mobile map mode: stack filter (hidden via drawer) + canvas + side panel vertically */
  .is-map-view .listings-map {
    flex-direction: column;
    height: auto;
  }

  /* Filter panel is hidden on mobile — it uses the drawer instead */
  .is-map-view .listings-map > .listings-filters {
    display: none !important;
  }

  .is-map-view .listings-map__canvas {
    width: 100%;
    height: 1020px;
    flex-shrink: 0;
  }

  .is-map-view .map-side-panel {
    width: 100%;
    height: 300px;
    flex-shrink: 0;
    border-left: none;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  }
}

@media (max-width: 480px) {
  .page-hero {
    padding: calc(var(--nav-height) + 2rem) 0 2rem;
  }

  .process-step__number {
    font-size: 2rem;
    min-width: 2rem;
  }

  .value-card {
    padding: 1.5rem 1.25rem;
  }

  .commercial-option-card {
    padding: 1.75rem 1.25rem;
  }

  .team-member__info {
    padding: 1.25rem;
  }

  .contact-info__item {
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .contact-info__icon {
    width: 40px;
    height: 40px;
  }
}
