/* Civic Education Center + ToS — Project Nearby */
/* Suburban Boundary palette */

:root {
  --sky: #EBF3F5;
  --asphalt: #4A4A4A;
  --teal: #1A6B7E;
  --sand: #D4A574;
  --forest: #2D5F3F;
  --white: #ffffff;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--sky);
  color: var(--asphalt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
.civic-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 60px;
  background: var(--white);
  border-bottom: 1px solid rgba(74,74,74,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.civic-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--asphalt);
  font-weight: 600;
  font-size: 15px;
}

.civic-nav-links {
  display: flex;
  gap: 24px;
}

.civic-nav-links a {
  font-size: 13px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
}

.civic-nav-links a:hover { text-decoration: underline; }

/* ── CIVIC HEADER ── */
.civic-header {
  background: var(--asphalt);
  padding: 72px 40px;
  text-align: center;
}

.civic-header-inner { max-width: 680px; margin: 0 auto; }

.civic-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 20px;
  font-weight: 600;
}

.civic-title {
  font-family: 'DM Serif Display', serif;
  font-size: 48px;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 20px;
}

.civic-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

/* ── TAB SECTION ── */
.tab-section {
  max-width: 820px;
  margin: 48px auto;
  padding: 0 24px;
}

.tab-bar {
  display: flex;
  border-bottom: 2px solid rgba(74,74,74,0.12);
  margin-bottom: 36px;
  gap: 0;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--asphalt);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn svg { opacity: 0.5; transition: opacity 0.15s; }

.tab-btn:hover { color: var(--teal); }
.tab-btn:hover svg { opacity: 0.8; }

.tab-btn.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.tab-btn.active svg { opacity: 1; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── CONTENT CARDS ── */
.content-card {
  display: flex;
  gap: 20px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 28px 28px 24px;
  margin-bottom: 16px;
  border: 1px solid rgba(74,74,74,0.08);
  box-shadow: 0 2px 8px rgba(74,74,74,0.06);
}

.card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg { width: 20px; height: 20px; }

.card-icon.teal {
  background: rgba(26,107,126,0.1);
  color: var(--teal);
}

.card-icon.sand {
  background: rgba(212,165,116,0.15);
  color: #a87545;
}

.card-icon.forest {
  background: rgba(45,95,63,0.1);
  color: var(--forest);
}

.card-body { flex: 1; }

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--asphalt);
  margin-bottom: 10px;
  line-height: 1.3;
}

.card-text {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
}

.card-text strong { color: var(--asphalt); font-weight: 600; }

/* ── CIVIC FOOTER BANNER ── */
.civic-footer-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--asphalt);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 32px;
}

.banner-icon {
  flex-shrink: 0;
  color: var(--sand);
}

.banner-text {
  flex: 1;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.banner-text strong { color: var(--white); }

.banner-cta {
  flex-shrink: 0;
  background: var(--teal);
  color: var(--white);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 6px;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.banner-cta:hover { opacity: 0.85; }

/* ── ToS HEADER ── */
.tos-header {
  background: var(--asphalt);
  padding: 72px 40px;
  text-align: center;
}

.tos-header-inner { max-width: 640px; margin: 0 auto; }

.tos-company {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 16px;
  font-weight: 600;
}

.tos-title {
  font-family: 'DM Serif Display', serif;
  font-size: 48px;
  color: var(--white);
  margin-bottom: 16px;
}

.tos-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}

/* ── ToS BODY ── */
.tos-body {
  max-width: 900px;
  margin: 48px auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 60px;
  align-items: start;
}

.tos-toc {
  position: sticky;
  top: 80px;
}

.tos-toc-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--asphalt);
  opacity: 0.4;
  font-weight: 600;
  margin-bottom: 16px;
}

.tos-toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tos-toc-list a {
  font-size: 13px;
  color: var(--teal);
  text-decoration: none;
  line-height: 1.5;
  display: block;
  padding: 3px 0;
}

.tos-toc-list a:hover { text-decoration: underline; }

/* ── ToS CONTENT ── */
.tos-section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(74,74,74,0.1);
}

.tos-section:last-of-type { border-bottom: none; }

.tos-section h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--asphalt);
  margin-bottom: 16px;
}

.tos-section p {
  font-size: 15px;
  color: #555;
  line-height: 1.75;
  margin-bottom: 14px;
}

.tos-section p:last-child { margin-bottom: 0; }

.tos-contact {
  background: var(--sky);
  border: 1px solid rgba(74,74,74,0.1);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 12px;
  display: inline-block;
}

.tos-contact p { font-size: 14px; margin-bottom: 4px; }
.tos-contact p:last-child { margin-bottom: 0; }

/* ── SIMPLE FOOTER ── */
.civic-footer-simple {
  background: var(--asphalt);
  padding: 32px 40px;
}

.civic-footer-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.civic-footer-inner span {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

.civic-footer-inner a {
  font-size: 13px;
  color: var(--teal);
  text-decoration: none;
}

.civic-footer-inner a:hover { text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .civic-header { padding: 56px 24px; }
  .civic-title { font-size: 36px; }

  .tab-bar { flex-direction: column; gap: 0; }
  .tab-btn { justify-content: flex-start; padding: 14px 0; }

  .civic-footer-banner { flex-direction: column; text-align: center; }
  .banner-cta { width: 100%; text-align: center; }

  .tos-body { grid-template-columns: 1fr; padding: 0 24px; }
  .tos-toc { position: static; }
  .tos-header { padding: 56px 24px; }
  .tos-title { font-size: 36px; }

  .civic-nav { padding: 0 20px; }
  .tab-section { padding: 0 16px; margin-top: 32px; }
  .civic-footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
  .content-card { flex-direction: column; gap: 16px; }
  .card-icon { width: 38px; height: 38px; }
  .civic-title, .tos-title { font-size: 30px; }
}