/*
 * Space Swap — Page-Specific Styles
 * swap.phoenixareahome.com/space
 * Layered on top of /css/styles.css
 */

/* === Space Hero === */

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

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

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

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

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

.space-hero-note {
  font-size: 0.9375rem;
  color: #475569;
  max-width: 600px;
  line-height: 1.5;
}

/* === Section Layout === */

.space-section {
  padding: 3rem 1.5rem;
  scroll-margin-top: 80px;
}

.space-section--alt {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.space-section--dark {
  background: #0f172a;
  color: #f8fafc;
}

.space-section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.space-section-inner h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
}

.space-section--dark h2 {
  color: #f8fafc;
}

.space-section-inner .section-subtitle {
  font-size: 1rem;
  color: #475569;
  margin: 0 0 1.75rem;
  line-height: 1.5;
}

.space-section--dark .section-subtitle {
  color: #94a3b8;
}

/* === Body Copy === */

.space-prose {
  font-size: 1.0625rem;
  color: #334155;
  line-height: 1.65;
  margin: 0 0 1rem;
}

.space-prose:last-child {
  margin-bottom: 0;
}

.space-section--dark .space-prose {
  color: #cbd5e1;
}

.space-prose strong {
  color: #0f172a;
  font-weight: 600;
}

.space-section--dark .space-prose strong {
  color: #f1f5f9;
}

/* === Size Comparison Table === */

.size-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

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

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

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

.size-table td,
.size-table tbody th {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: top;
}

.size-table tbody th {
  font-weight: 700;
  text-align: left;
}

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

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

.size-phoenix {
  background: #ecfdf5;
  font-weight: 600;
  color: #047857;
}

/* === Space Callout === */

.space-callout {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-left: 4px solid #047857;
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 0;
}

.space-callout-title {
  font-size: 1rem;
  font-weight: 700;
  color: #065f46;
  margin: 0 0 0.5rem;
}

.space-callout-text {
  font-size: 0.9375rem;
  color: #334155;
  line-height: 1.55;
  margin: 0;
}

/* === Archetype Headings === */

.archetype-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 2.5rem 0 0.25rem;
}

.archetype-heading:first-of-type {
  margin-top: 0;
}

.archetype-desc {
  font-size: 0.9375rem;
  color: #475569;
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

/* === Neighborhood Cards === */

.neighborhood-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 0 0 1.5rem;
}

.neighborhood-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
}

.neighborhood-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.5rem;
}

.neighborhood-card-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.archetype-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.archetype-badge--urban {
  background: #ede9fe;
  color: #6d28d9;
}

.archetype-badge--family {
  background: #dbeafe;
  color: #1d4ed8;
}

.archetype-badge--lifestyle {
  background: #fef3c7;
  color: #92400e;
}

.neighborhood-card-tagline {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 1rem;
  font-style: italic;
}

.neighborhood-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 6px;
}

.neighborhood-stat {
  display: flex;
  flex-direction: column;
}

.neighborhood-stat-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
  font-weight: 600;
}

.neighborhood-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.neighborhood-card-details {
  margin: 0 0 1rem;
}

.neighborhood-detail {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
  line-height: 1.4;
}

.neighborhood-detail:last-child {
  border-bottom: none;
}

.neighborhood-detail-label {
  font-weight: 600;
  color: #475569;
  min-width: 50px;
  flex-shrink: 0;
}

.neighborhood-detail-value {
  color: #1e293b;
}

.neighborhood-best-for {
  font-size: 0.875rem;
  color: #334155;
  line-height: 1.5;
  margin: 0 0 0.5rem;
}

.neighborhood-best-for strong {
  color: #047857;
}

.neighborhood-think-twice {
  font-size: 0.875rem;
  color: #334155;
  line-height: 1.5;
  margin: 0;
}

.neighborhood-think-twice strong {
  color: #dc2626;
}

/* === Walk Score Table === */

.walk-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

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

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

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

.walk-table td,
.walk-table tbody th {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: top;
}

.walk-table tbody th {
  font-weight: 700;
  text-align: left;
}

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

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

.walk-score-high {
  color: #047857;
  font-weight: 700;
}

.walk-score-mid {
  color: #b45309;
  font-weight: 600;
}

.walk-score-low {
  color: #dc2626;
  font-weight: 600;
}

/* === Risk Blocks (reused from career/money pattern) === */

.risk-block {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #dc2626;
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin: 0 0 1rem;
}

.risk-block-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
}

.risk-block-text {
  font-size: 0.9375rem;
  color: #475569;
  line-height: 1.55;
  margin: 0;
}

.space-section--dark .risk-block {
  background: #1e293b;
  border-color: #475569;
  border-left-color: #f59e0b;
}

.space-section--dark .risk-block-title {
  color: #f8fafc;
}

.space-section--dark .risk-block-text {
  color: #94a3b8;
}

/* === Space CTA === */

.space-cta {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0 0;
}

.space-cta h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem;
}

.space-cta p {
  font-size: 1rem;
  color: #475569;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 1.25rem;
}

/* === Section Anchor Links (page-specific color) === */

.space-hero .section-anchors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
}

.space-hero .section-anchor {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 44px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.space-hero .section-anchor:hover {
  background: #047857;
  color: #fff;
  border-color: #047857;
}

/* === Responsive === */

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

  .neighborhood-cards {
    grid-template-columns: 1fr;
  }

  .space-section {
    padding: 2rem 1rem;
  }

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

  .risk-block {
    padding: 1rem;
  }

  .space-cta {
    padding: 1.5rem 1rem;
  }

  .neighborhood-card-header {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .neighborhood-card-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
}
