/*
 * Distance From What Matters — Interactive Tool Styles
 * swap.phoenixareahome.com/tools/distance
 * Accent: green (#047857)
 */

/* === Hero === */

.dist-hero {
  background: #fff;
  padding: 3.5rem 1.5rem 2.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.dist-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}

.dist-hero-tag {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #047857;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.dist-hero-inner h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  color: #0f172a;
  margin: 0 0 1rem;
}

.dist-hero-inner .lead {
  font-size: 1.1875rem;
  color: #334155;
  line-height: 1.6;
  max-width: 640px;
  margin: 0;
}

/* === Filters === */

.dist-filters {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 1.25rem 1.5rem;
}

.dist-filters-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.dist-filter-label {
  font-size: 1rem;
  font-weight: 700;
  color: #475569;
}

.dist-filter-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dist-filter-btn {
  padding: 0.5rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  font-size: 1rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  min-height: 44px;
  font-family: inherit;
}

.dist-filter-btn:hover {
  border-color: #047857;
  background: #ecfdf5;
}

.dist-filter-btn.active {
  background: #047857;
  color: #fff;
  border-color: #047857;
}

/* === Table Section === */

.dist-table-section {
  padding: 2.5rem 1.5rem;
  background: #fff;
}

.dist-table-inner {
  max-width: 960px;
  margin: 0 auto;
}

.dist-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.dist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 600px;
}

.dist-table thead {
  background: #f1f5f9;
}

.dist-table th {
  text-align: left;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.dist-table td,
.dist-table tbody th {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-variant-numeric: tabular-nums;
}

.dist-table tbody th {
  font-weight: 600;
  color: #0f172a;
  text-align: left;
  white-space: nowrap;
}

.dist-table tbody tr:last-child td,
.dist-table tbody tr:last-child th {
  border-bottom: none;
}

.dist-table tbody tr:hover {
  background: #f8fafc;
}

/* Color coding */

.dist-cell {
  font-weight: 600;
  text-align: center;
}

.dist-very-close {
  color: #047857;
  background: #ecfdf5;
}

.dist-close {
  color: #15803d;
}

.dist-medium {
  color: #1e293b;
}

.dist-far {
  color: #b45309;
}

.dist-very-far {
  color: #dc2626;
  background: #fef2f2;
}

.dist-table-note {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.4;
}

/* === Insight === */

.dist-insight-section {
  padding: 0 1.5rem 2.5rem;
  background: #fff;
}

.dist-insight-inner {
  max-width: 860px;
  margin: 0 auto;
}

.dist-insight {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 1.5rem;
}

.dist-insight-title {
  font-size: 1rem;
  font-weight: 700;
  color: #047857;
  margin: 0 0 0.5rem;
}

.dist-insight-text {
  font-size: 1rem;
  color: #334155;
  line-height: 1.6;
  margin: 0;
}

/* === CTA === */

.dist-cta-section {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 3rem 1.5rem;
}

.dist-cta-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.dist-cta-inner h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem;
}

.dist-cta-inner p {
  font-size: 1rem;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

/* === Responsive === */

@media (max-width: 767px) {
  .dist-hero-inner h1 {
    font-size: 1.875rem;
  }

  .dist-table-section {
    padding: 2rem 1rem;
  }

  .dist-filters {
    padding: 1rem;
  }

  .dist-hero {
    padding: 2.5rem 1rem 2rem;
  }

  .dist-insight-section {
    padding: 0 1rem 2rem;
  }
}

@media (max-width: 480px) {
  .dist-filter-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}
