/* ==========================================================================
   Capital Edge Team Realty — Red & White Theme
   ========================================================================== */

:root {
  --red: #c8102e;
  --red-dark: #970022;
  --red-light: #ffe3e8;
  --white: #ffffff;
  --gray-50: #f7f7f8;
  --gray-100: #eeeeee;
  --gray-300: #cccccc;
  --gray-600: #5a5a5a;
  --dark: #1a1a1a;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --max-width: 1180px;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 0.6em;
}

.section {
  padding: 4rem 0;
}

.section--alt {
  background: var(--gray-50);
}

.section-title {
  text-align: center;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  text-align: center;
  color: var(--gray-600);
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.text-red {
  color: var(--red);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--red-dark);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--red);
}

.btn-outline-red {
  background: transparent;
  border-color: var(--red);
  color: var(--red);
}

.btn-outline-red:hover {
  background: var(--red);
  color: var(--white);
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.87rem;
}

.btn-ghost {
  background: transparent;
  border-color: var(--gray-300);
  color: var(--gray-600);
}

.btn-ghost:hover {
  border-color: var(--red);
  color: var(--red);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 3px solid var(--red);
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-logo {
  height: 48px;
  width: auto;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--gray-600);
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--dark);
  margin: 5px 0;
  border-radius: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--dark);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--red);
}

.nav-cta {
  background: var(--red);
  color: var(--white) !important;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
}

.nav-cta:hover {
  background: var(--red-dark);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    border-bottom: 3px solid var(--red);
  }

  .nav-links.open {
    max-height: 420px;
  }

  .nav-links li {
    border-top: 1px solid var(--gray-100);
  }

  .nav-links a {
    display: block;
    padding: 1rem 1.25rem;
  }

  .nav-cta {
    margin: 1rem 1.25rem;
    display: inline-block;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  padding: 4.5rem 0 3.5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

.search-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.search-box input,
.search-box select {
  flex: 1 1 160px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--dark);
}

.search-box button {
  flex: 0 0 auto;
}

/* Address autocomplete dropdowns (Google Places / Canada Post AddressComplete) */
.pac-container,
.pcaautocomplete {
  font-family: inherit;
  z-index: 3000 !important;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
}

/* Address autocomplete dropdown (Photon, free OSM-based provider) */
.addr-autocomplete-wrap {
  position: relative;
}

.search-box .addr-autocomplete-wrap {
  flex: 1 1 160px;
}

.addr-autocomplete-wrap input {
  width: 100%;
}

.addr-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
  z-index: 3000;
  text-align: left;
}

.addr-suggestions li {
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  color: var(--dark);
  cursor: pointer;
}

.addr-suggestions li:hover,
.addr-suggestions li.is-active {
  background: var(--red-light);
  color: var(--red-dark);
}

/* External link confirmation modal (e.g. before opening Realtor.ca) */
.external-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
  padding: 1rem;
}

.external-modal-overlay[hidden] {
  display: none;
}

.external-modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: 100%;
  padding: 1.8rem;
  text-align: center;
}

.external-modal h3 {
  margin-top: 0;
  color: var(--red);
}

.external-modal-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1.4rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.hero-stats div {
  text-align: center;
}

.hero-stats strong {
  display: block;
  font-size: 1.6rem;
}

.hero-stats span {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* ==========================================================================
   Professional search panel (listings page)
   ========================================================================== */
.search-hero {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  padding: 2.75rem 0 3.25rem;
}

.search-hero h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  margin-bottom: 0.25rem;
}

.search-hero > .container > p {
  margin: 0 0 1.75rem;
  opacity: 0.92;
}

.search-panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.search-panel__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.field {
  flex: 1 1 170px;
  min-width: 0;
}

.field--grow {
  flex: 2 1 240px;
}

.field label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-600);
  margin-bottom: 0.3rem;
}

.field--actions {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  flex: 1 1 220px;
}

.field--actions .btn {
  flex: 1;
  padding: 0.7rem 1rem;
}

.field--inline {
  flex: 0 0 auto;
  min-width: 190px;
}

/* Results toolbar */
.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-100);
}

.results-bar__count {
  font-weight: 700;
  color: var(--dark);
}

.results-bar__controls {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  overflow: hidden;
}

.view-toggle button {
  background: var(--white);
  border: none;
  padding: 0.55rem 1rem;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
}

.view-toggle button + button {
  border-left: 1px solid var(--gray-300);
}

.view-toggle button.active {
  background: var(--red);
  color: var(--white);
}

/* Split list + map layout */
.results-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.results-layout[data-view="split"] {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

.results-layout[data-view="list"] {
  grid-template-columns: 1fr;
}

.results-layout[data-view="list"] .results-layout__map {
  display: none;
}

.results-layout[data-view="map"] {
  grid-template-columns: 1fr;
}

.results-layout[data-view="map"] .results-layout__list {
  display: none;
}

.results-layout__map {
  position: sticky;
  top: 90px;
}

#listings-map {
  width: 100%;
  height: 620px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1;
}

.results-layout[data-view="map"] #listings-map {
  height: 70vh;
}

.grid--listings {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--gray-600);
  padding: 3rem 1rem;
  background: var(--gray-50);
  border-radius: var(--radius);
}

.map-popup {
  font-size: 0.9rem;
  line-height: 1.5;
}

.map-popup__meta {
  color: var(--gray-600);
  font-size: 0.82rem;
}

.map-popup__cta {
  margin-top: 0.5rem;
}

.realm-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
}

.realm-embed iframe {
  width: 100%;
  height: 720px;
  border: 0;
  display: block;
}

@media (max-width: 640px) {
  .realm-embed iframe {
    height: 560px;
  }
}

.realm-cta-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.realm-cta-card__icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
}

.realm-cta-card__body {
  flex: 1 1 280px;
}

.realm-cta-card__body h3 {
  color: var(--white);
  margin-bottom: 0.3rem;
}

.realm-cta-card__body p {
  margin: 0;
  opacity: 0.92;
}

.realm-cta-card__btn {
  background: var(--white);
  color: var(--red);
  flex-shrink: 0;
}

.realm-cta-card__btn:hover {
  background: var(--gray-50);
}

/* Realtor.ca outbound thumbnail card */
.realtor-thumb {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--dark);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.realtor-thumb:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.realtor-thumb__icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--red-light);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.realtor-thumb__body {
  flex: 1;
}

.realtor-thumb__title {
  display: block;
  font-weight: 700;
  color: var(--dark);
}

.realtor-thumb__sub {
  display: block;
  font-size: 0.88rem;
  color: var(--gray-600);
}

.realtor-thumb__arrow {
  font-size: 1.4rem;
  color: var(--red);
  flex-shrink: 0;
}

/* Home value wizard */
.wizard {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

.wizard__progress {
  height: 8px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.wizard__progress-bar {
  height: 100%;
  background: var(--red);
  width: 20%;
  transition: width 0.25s ease;
}

.wizard__step-label {
  font-size: 0.8rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}

.wizard__step label {
  margin-top: 1rem;
}

.wizard__step label:first-child {
  margin-top: 0;
}

.wizard__nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.wizard__nav .btn {
  flex: 1;
}

.wizard__nav #wizard-back {
  flex: 0 0 auto;
}

@media (max-width: 960px) {
  .results-layout[data-view="split"] {
    grid-template-columns: 1fr;
  }

  .results-layout__map {
    position: static;
    order: -1;
  }

  #listings-map {
    height: 380px;
  }
}

/* ==========================================================================
   Agent contact modal
   ========================================================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal.open {
  display: block;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal__panel {
  position: relative;
  background: var(--white);
  max-width: 480px;
  width: calc(100% - 2rem);
  margin: 8vh auto 0;
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem 1.6rem;
  box-shadow: var(--shadow-lg);
  border-top: 5px solid var(--red);
  max-height: 84vh;
  overflow-y: auto;
}

.modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.8rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--gray-600);
  cursor: pointer;
}

.modal__close:hover {
  color: var(--red);
}

.modal__property {
  font-weight: 700;
  color: var(--red);
  margin-bottom: 0.4rem;
}

.modal__office {
  margin: 1.2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
  font-size: 0.78rem;
  color: var(--gray-600);
  text-align: center;
}

.agent-contact {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  margin-top: 0.8rem;
  background: var(--gray-50);
}

.agent-contact__avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-contact__name {
  font-weight: 700;
}

.agent-contact__title {
  font-size: 0.78rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.agent-contact__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Cards / Listings
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.6rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-media {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--gray-100);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  background: var(--red);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.card-body {
  padding: 1rem 1.1rem 1.2rem;
}

.card-price {
  color: var(--red);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.card-address {
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.card-city {
  color: var(--gray-600);
  font-size: 0.88rem;
  margin-bottom: 0.6rem;
}

.card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--gray-600);
  border-top: 1px solid var(--gray-100);
  padding-top: 0.6rem;
  margin-bottom: 0.9rem;
}

.card-source {
  font-size: 0.7rem;
  color: var(--gray-600);
  opacity: 0.7;
  text-transform: uppercase;
  margin-top: 0.6rem;
  text-align: center;
}

/* Feature list */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.8rem;
}

.feature {
  text-align: center;
  padding: 1.6rem 1rem;
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--red-light);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.6rem;
  font-weight: 800;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.team-card {
  text-align: center;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.4rem;
}

.team-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  border: 4px solid var(--red-light);
}

.team-role {
  color: var(--red);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}

.team-contact {
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* Testimonials */
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.reviews-stars {
  color: var(--red);
  font-size: 1.3rem;
  letter-spacing: 0.15rem;
  margin-bottom: 0.6rem;
}

/* FAQ */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  gap: 0.9rem;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 1.4rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--red);
  font-size: 1.4rem;
  font-weight: 800;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "\2013";
}

.faq-item p {
  padding: 0 1.4rem 1.1rem;
  margin: 0;
  color: var(--gray-600);
}

/* CTA band */
.cta-band {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 3.5rem 0;
}

.cta-band h2 {
  color: var(--white);
}

/* Forms */
.form-grid {
  display: grid;
  gap: 1rem;
  max-width: 640px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.form-note {
  font-size: 0.8rem;
  color: var(--gray-600);
}

/* Filters (listings page) */
.filters {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 1.2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
  margin-bottom: 2rem;
  align-items: end;
}

.filters .btn {
  height: 42px;
}

.status-banner {
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  display: none;
}

.status-banner.show {
  display: block;
}

.status-banner.info {
  background: #fff4e5;
  color: #8a5300;
  border: 1px solid #ffdca0;
}

.status-banner.error {
  background: #fdeaea;
  color: #a3231f;
  border: 1px solid #f5c2c0;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination button {
  border: 1px solid var(--gray-300);
  background: var(--white);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
}

.pagination button.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 37%, var(--gray-100) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius);
  height: 320px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* Map */
.map-frame {
  border: 0;
  width: 100%;
  height: 340px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--dark);
  color: #ddd;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 {
  color: var(--white);
  font-size: 1rem;
}

.footer-grid a {
  color: #ccc;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.footer-grid a:hover {
  color: var(--red);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1.2rem;
  text-align: center;
  font-size: 0.8rem;
  color: #999;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Mortgage calculator */
.mc-form {
  max-width: 900px;
  margin: 0 auto 1.5rem;
}

.mc-form-row {
  grid-template-columns: repeat(3, 1fr);
}

.mc-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: var(--white);
}

.mc-table th,
.mc-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
  white-space: nowrap;
}

.mc-table th {
  background: var(--gray-50);
  font-weight: 700;
  color: var(--dark);
}

.mc-table tbody tr:last-child td {
  border-bottom: none;
}

.mc-row--unavailable td {
  color: var(--gray-600);
  font-style: italic;
}

.mc-form-row--custom {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--gray-300);
  grid-template-columns: repeat(2, 1fr);
}

.mc-row--custom {
  background: var(--red-light);
}

.mc-row--custom td {
  font-weight: 600;
}

@media (max-width: 640px) {
  .mc-form-row {
    grid-template-columns: 1fr;
  }
}
