:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f7fb;
  color: #1f2937;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #eef4ff 0%, transparent 35%),
    radial-gradient(circle at bottom right, #f8f0ff 0%, transparent 30%),
    #f4f7fb;
}

img {
  max-width: 100%;
  display: block;
}

.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;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  background: #027aba;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 20px 0;
}

.site-header a,
.site-header h1,
.site-header p {
  color: #ffffff;
}

.header-inner,
.footer-inner {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(280px, 25%) minmax(0, 75%);
  gap: 2rem;
  align-items: start;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}

.brand p {
  margin: 0.4rem 0 0;
  color: #475569;
}

.brand a {
  color: inherit;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.primary-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.primary-nav a,
nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
}

.nav-cta {
  margin-left: auto;
  padding: 10px 1.25rem;
  text-decoration: none;
}

.primary-nav a:hover,
nav a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.nav-cta:hover {
  background: #f75616;
}

.mobile-menu-toggle {
  display: none;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-search-toggle {
  display: none;
  width: 100%;
  border: 1px solid rgba(2, 122, 186, 0.28);
  background: #eff6ff;
  color: #0f172a;
  border-radius: 0.85rem;
  padding: 0.95rem 1rem;
  text-align: left;
  font-weight: 700;
  margin-bottom: 1rem;
}

.nav-cta {
  background: #f75616;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(247, 86, 22, 0.18);
}

.hero {
  padding: 3rem 0 2rem;
}

.hero-grid {
  align-items: stretch;
}

.hero-copy {
  flex: 1.2;
}

.hero-copy .eyebrow {
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: #0f172a;
}

.hero-copy h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 3.5vw, 3.3rem);
  line-height: 1.05;
}

.hero-copy p {
  margin: 0;
  max-width: 42rem;
  color: #475569;
  line-height: 1.75;
}

.hero-card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  padding: 2rem;
  min-width: 280px;
}

.hero-card h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.search-form {
  display: grid;
  gap: 1rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field-group label {
  font-size: 0.85rem;
  color: #475569;
}

select,
input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  font: inherit;
  background: #f8fafc;
  color: #0f172a;
}

.range-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.btn {
  border: none;
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 18px 30px rgba(59, 130, 246, 0.2);
}

.results-section {
  padding: 2.5rem 0 4rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.25fr);
  gap: 2rem;
  align-items: start;
}

.contact-details,
.contact-form-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.contact-form{
  width: 100% !important;
}

.contact-details h3,
.contact-form-card h3 {
  margin-top: 0;
}

.form-success,
.form-errors {
  margin-bottom: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 0.9rem;
}

.form-success {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #d1fae5;
}

.form-errors {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.form-errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

.form-errors li {
  margin-bottom: 0.5rem;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-header .eyebrow {
  margin: 0 0 0.35rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1.8rem;
}

#result-count {
  margin: 0;
  color: #475569;
  font-weight: 600;
}

.listings-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.listing-card {
  background: #ffffff;
  border-radius: 1.75rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}

.listing-card:hover {
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.top-ad-ribbon {
  position: absolute;
  top: 10px;
  left: -10px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: rotate(-10deg);
}

.top-ad-ribbon::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid #d97706;
  border-top: 10px solid transparent;
}

.listing-image {
  position: relative;
}

.listing-card img {
  height: 220px;
  object-fit: cover;
  width: 100%;
}

.listing-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  justify-content: space-between;
}

.listing-title {
  margin: 0 0 0.2rem;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
}

.listing-location,
.listing-details {
  margin: 0;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.2;
}

.listing-location {
  font-weight: 600;
  color: #475569;
}

.listing-details {
  color: #94a3b8;
}

.listing-details i {
  display: inline-block;
  margin-right: 0.4rem;
  width: 1em;
  color: #64748b;
}

.listing-price {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #1e40af;
  font-weight: 700;
  font-size: 1.05rem;
}

.negotiable-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #059669;
  background-color: rgba(16, 185, 129, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.negotiable-badge i {
  margin-right: 0.2rem;
}



.site-footer {
  padding: 1.5rem 0;
  background: #ffffff;
  border-top: 2px solid rgba(148, 163, 184, 0.24);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
}

.footer-inner {
  justify-content: center;
}

@media (max-width: 860px) {
  .hero-grid,
  .section-header,
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 1.5rem;
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    gap: 1rem;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(2, 122, 186, 0.98);
    border-radius: 0 0 1rem 1rem;
    z-index: 20;
  }

  .primary-nav.open {
    display: flex;
  }

  .primary-nav a {
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
  }

  .nav-cta {
    order: 3;
    width: 100%;
    text-align: center;
    padding: 10px 0.85rem;
    text-decoration: none;
  }


  .mobile-search-toggle {
    display: block;
  }

  .hero-card .search-form {
    display: none;
  }

  .search-form.open {
    display: grid;
  }

  .hero-card {
    min-width: auto;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .header-inner {
    padding-right: 4rem;
  }

  .mobile-menu-toggle {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    margin-left: 0;
    order: 1;
  }

  .nav-cta {
    order: 2;
    width: auto;
    text-align: left;
    padding: 10px 1.25rem;
  }
}

