/*
 * NumeralQ homepage visual refinements.
 * Load after style.css so these focused overrides take precedence.
 */

/* One shared content frame keeps every major homepage section on the same grid. */
:root {
  --home-content-width: 1000px;
  --home-section-soft: #f6f8fc;
  --home-section-white: #ffffff;
  --home-section-border: #e2e8f0;
}

.hero-layout,
.service-grid-inner,
.trends-inner,
.why-nq-inner,
.rpi-inner,
.popular-inner {
  width: min(100%, var(--home-content-width));
  max-width: var(--home-content-width);
  margin-inline: auto;
  box-sizing: border-box;
}

.hero-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
}

.hero-price-panel {
  padding: 0;
  background: transparent;
  border: 0;
}

.hero-price-panel .home-local-navigation {
  width: 100%;
  padding: 22px;
  background: #fff;
  border-color: #e2e8f0;
}

.hero-price-panel .home-local-navigation .search-card-header {
  margin-bottom: 14px;
}

.hero-price-panel .home-local-navigation-fields {
  grid-template-columns: minmax(0, 1fr);
}

.hero-price-panel .home-local-navigation-field input,
.hero-price-panel .home-local-navigation-field select {
  min-height: 46px;
  width: 100%;
}

.hero-form-disclaimer {
  margin: 10px 0 0;
  color: #52627a;
  font-size: .75rem;
  line-height: 1.4;
  text-align: center;
}

.hero-stats {
  margin-top: 20px;
}

.home-estimate-steps {
  padding: 22px 24px;
  color: #26344b;
  background: #f1f4fa;
  border-bottom: 1px solid #dbe2ee;
}

.home-estimate-steps-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: min(100%, var(--home-content-width));
  margin: 0 auto;
}

.footer-inner {
  max-width: var(--home-content-width);
}

.home-estimate-steps-inner > div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.home-estimate-steps-inner b {
  color: #4f46e5;
  font-size: .77rem;
  letter-spacing: .08em;
}

.home-estimate-steps-inner span {
  font-size: .88rem;
  font-weight: 650;
}

.hero-content,
.rpi-left,
.rpi-right {
  min-width: 0;
}

/* Alternate only white and one neutral surface. Section edges, not nearby
   shades of gray, provide the transitions between homepage content. */
.search-module,
.trends-section,
.rpi-section,
.popular-markets {
  background: var(--home-section-white);
}

.service-grid-section {
  background: var(--home-section-soft);
  border-top-color: var(--home-section-border);
  border-bottom-color: var(--home-section-border);
}

.service-grid-inner {
  padding-inline: 0;
}

.service-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.service-card {
  min-width: 0;
  background: var(--home-section-white);
}

.service-card-name,
.service-card-sub {
  overflow-wrap: anywhere;
}

.service-card-sub {
  color: #64748b;
}

.trends-section {
  border-bottom-color: var(--home-section-border);
}

.why-nq {
  background: var(--home-section-soft);
  border-top: 1px solid var(--home-section-border);
  border-bottom: 1px solid var(--home-section-border);
}

.rpi-section {
  border-top-color: var(--home-section-border);
  border-bottom-color: var(--home-section-border);
}

.rpi-inner {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: start;
}

.rpi-desc {
  color: #43536b;
  font-size: 0.94rem;
  line-height: 1.72;
}

.rpi-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 2px 0;
}

.rpi-city {
  color: #27364d;
}

.rpi-pct {
  color: #3e4f6b;
  text-align: right;
  font-size: 0.88rem;
}

.rpi-caption {
  color: #52627a;
  font-size: 0.82rem;
  line-height: 1.55;
  margin-bottom: 0;
  border-top-color: #dce3ef;
}

.popular-markets {
  background: var(--home-section-soft);
  border-top: 1px solid var(--home-section-border);
}

@media (max-width: 880px) {
  .hero-layout {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 650px) {
  .home-estimate-steps-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .rpi-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 760px) {
  .hero,
  .search-module,
  .service-grid-section,
  .trends-section,
  .why-nq,
  .rpi-section,
  .popular-markets {
    padding-inline: 18px !important;
  }

  .hero-layout,
  .service-grid-inner,
  .trends-inner,
  .why-nq-inner,
  .rpi-inner,
  .popular-inner {
    width: 100%;
  }

  .service-grid-inner {
    width: 100%;
  }

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

@media (max-width: 480px) {
  .rpi-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .rpi-city,
  .rpi-pct {
    overflow-wrap: anywhere;
  }
}
