/* ADU Zoning Hub — Core Styles */
:root {
  --primary: #1a56db;
  --primary-dark: #1e3a8a;
  --primary-light: #dbeafe;
  --accent: #059669;
  --accent-light: #d1fae5;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --border: #e5e7eb;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.1);
  --max-w: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.animate-in { animation: fadeInUp 0.5s ease-out both; }
.animate-fade { animation: fadeIn 0.4s ease-out both; }

/* ─── Header ───────────────────────────────────── */
.site-header {
  background: var(--primary-dark);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background 0.3s;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon { font-size: 1.5rem; }
.logo span { color: #93c5fd; }
.nav-links { display: flex; gap: 6px; list-style: none; align-items: center; }
.nav-links a {
  color: #dbeafe;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.1); text-decoration: none; }
.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: var(--radius) !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}
.nav-cta:hover { background: #047857 !important; }

/* Mobile menu */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--primary-dark);
  padding: 16px 24px 24px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  animation: slideDown 0.3s ease-out;
  z-index: 999;
}
.mobile-menu.active { display: block; }
.mobile-menu a {
  display: block;
  color: #dbeafe;
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-menu a:hover { color: #fff; text-decoration: none; }
.mobile-menu .nav-cta-mobile {
  display: block;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  margin-top: 12px;
  border: none;
}

/* ─── Hero ──────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1e40af 40%, #3b82f6 100%);
  color: #fff;
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
  border-radius: 50%;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
  line-height: 1.15;
  animation: fadeInUp 0.6s ease-out;
}
.hero p {
  font-size: 1.2rem;
  max-width: 640px;
  margin: 0 auto 32px;
  opacity: 0.9;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}
.hero-search {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}
.hero-search input {
  flex: 1;
  padding: 16px 20px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  transition: border 0.3s;
}
.hero-search input:focus { border-color: var(--accent); }
.hero-search button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 16px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.hero-search button:hover { background: #047857; transform: translateY(-1px); }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2.2rem; font-weight: 800; display: block; }
.hero-stat .label { font-size: 0.85rem; opacity: 0.75; margin-top: 2px; }

/* ─── Breadcrumbs ──────────────────────────────── */
.breadcrumbs {
  padding: 14px 0;
  font-size: 0.85rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.breadcrumbs a { color: var(--primary); }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { margin: 0 6px; color: #d1d5db; }

/* ─── Section ──────────────────────────────────── */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.5px; }
.section-subtitle { color: var(--text-light); font-size: 1.05rem; margin-bottom: 36px; max-width: 640px; }

/* ─── Cards ────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--text-light); font-size: 0.92rem; margin-bottom: 16px; line-height: 1.6; }
.card-meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-light); flex-wrap: wrap; }
.card-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}
.card:hover .card-link { gap: 8px; }

/* Icon cards */
.icon-card { text-align: center; padding: 36px 28px; }
.icon-card .icon {
  width: 56px;
  height: 56px;
  background: var(--primary-light);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 16px;
}
.icon-card-green .icon { background: var(--accent-light); }

/* ─── City page specifics ──────────────────────── */
.city-hero {
  background: linear-gradient(135deg, var(--primary-dark), #1e40af);
  color: #fff;
  padding: 48px 0 36px;
  position: relative;
}
.city-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40%;
  background: radial-gradient(ellipse at right, rgba(255,255,255,0.05), transparent);
}
.city-hero .container { position: relative; z-index: 1; }
.city-hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 8px; }
.city-hero .subtitle { opacity: 0.9; font-size: 1.1rem; max-width: 680px; line-height: 1.6; }
.city-hero .badges { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.badge {
  background: rgba(255,255,255,0.12);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.2s;
}
.badge:hover { background: rgba(255,255,255,0.2); }
.badge-green { background: rgba(5,150,105,0.25); border-color: rgba(5,150,105,0.3); }
.badge-yellow { background: rgba(217,119,6,0.25); border-color: rgba(217,119,6,0.3); }

.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ─── Data tables ──────────────────────────────── */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 20px 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.data-table th {
  text-align: left;
  padding: 14px 16px;
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) { background: var(--bg-alt); }
.data-table tr:hover { background: #eef2ff; }
.data-label { font-weight: 600; color: var(--text); min-width: 200px; }

/* ─── Info boxes ───────────────────────────────── */
.info-box {
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 24px 0;
}
.info-box-blue { background: var(--primary-light); border-left: 4px solid var(--primary); }
.info-box-green { background: var(--accent-light); border-left: 4px solid var(--accent); }
.info-box-yellow { background: var(--warning-light); border-left: 4px solid var(--warning); }
.info-box h3 { font-size: 1rem; margin-bottom: 8px; }
.info-box p { font-size: 0.92rem; color: var(--text); }
.info-box ul { padding-left: 20px; margin-top: 8px; }
.info-box li { font-size: 0.92rem; margin-bottom: 6px; line-height: 1.6; }

/* ─── CTA boxes ────────────────────────────────── */
.cta-box {
  background: linear-gradient(135deg, var(--primary-dark), #1e40af);
  color: #fff;
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  margin: 40px 0;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.06), transparent);
  border-radius: 50%;
}
.cta-box h2 { font-size: 1.5rem; margin-bottom: 10px; position: relative; }
.cta-box p { opacity: 0.9; margin-bottom: 24px; max-width: 500px; margin-left: auto; margin-right: auto; position: relative; }
.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.cta-btn:hover { background: #047857; color: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(5,150,105,0.3); }

/* ─── Lead gen form ────────────────────────────── */
.lead-form {
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 36px;
  margin: 36px 0;
  box-shadow: var(--shadow-md);
}
.lead-form h3 { font-size: 1.25rem; margin-bottom: 6px; color: var(--primary-dark); }
.lead-form .form-subtitle { color: var(--text-light); font-size: 0.9rem; margin-bottom: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
  background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.form-submit {
  grid-column: 1 / -1;
  background: var(--primary);
  color: #fff;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
}
.form-submit:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,86,219,0.3); }
.form-trust {
  font-size: 0.78rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ─── Affiliate box ────────────────────────────── */
.affiliate-box {
  background: var(--accent-light);
  border: 1px solid #6ee7b7;
  border-radius: var(--radius);
  padding: 26px;
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.affiliate-box h3 { color: #065f46; font-size: 1.05rem; margin-bottom: 4px; }
.affiliate-box p { font-size: 0.9rem; color: #065f46; margin-bottom: 12px; line-height: 1.6; }
.affiliate-link {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  align-self: flex-start;
}
.affiliate-link:hover { background: #047857; color: #fff; text-decoration: none; transform: translateY(-1px); }

/* ─── Content layout ───────────────────────────── */
.content-layout { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
.sidebar { position: sticky; top: 80px; }
.sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s;
}
.sidebar-card:hover { box-shadow: var(--shadow); }
.sidebar-card h3 { font-size: 1rem; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-light); }
.sidebar-links { list-style: none; }
.sidebar-links li { margin-bottom: 8px; }
.sidebar-links a { font-size: 0.9rem; display: flex; justify-content: space-between; padding: 4px 0; transition: all 0.2s; }
.sidebar-links a:hover { padding-left: 6px; text-decoration: none; }
.sidebar-links .arrow { color: var(--text-light); transition: transform 0.2s; }
.sidebar-links a:hover .arrow { transform: translateX(3px); }

/* TOC */
.toc { list-style: none; }
.toc li { margin-bottom: 4px; }
.toc a {
  font-size: 0.88rem;
  color: var(--text-light);
  display: block;
  padding: 6px 0 6px 14px;
  border-left: 2px solid var(--border);
  transition: all 0.2s;
}
.toc a:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); text-decoration: none; border-radius: 0 4px 4px 0; }

/* ─── FAQ ──────────────────────────────────────── */
.faq-item {
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item:hover { border-color: var(--primary); }
.faq-question {
  font-size: 1.02rem;
  font-weight: 600;
  padding: 16px 20px;
  background: var(--bg-alt);
  margin: 0;
  cursor: default;
}
.faq-answer {
  padding: 16px 20px;
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ─── Footer ───────────────────────────────────── */
.site-footer { background: #111827; color: #9ca3af; padding: 64px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 0.95rem; }
.footer-col p { font-size: 0.85rem; line-height: 1.6; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #9ca3af; font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid #1f2937; padding-top: 24px; text-align: center; font-size: 0.8rem; }
.footer-bottom a { color: #9ca3af; }

/* ─── Newsletter ───────────────────────────────── */
.newsletter {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  margin: 40px 0;
}
.newsletter h3 { font-size: 1.25rem; margin-bottom: 8px; }
.newsletter p { color: var(--text-light); margin-bottom: 18px; font-size: 0.92rem; }
.newsletter-form { display: flex; gap: 8px; max-width: 440px; margin: 0 auto; }
.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border 0.2s;
}
.newsletter-form input:focus { border-color: var(--primary); }
.newsletter-form button {
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.newsletter-form button:hover { background: var(--primary-dark); }

/* ─── Page content ─────────────────────────────── */
.page-content { max-width: 760px; margin: 0 auto; }
.page-content h2 { margin-top: 36px; margin-bottom: 12px; font-size: 1.4rem; }
.page-content p { margin-bottom: 16px; line-height: 1.75; color: #374151; }
.page-content ul, .page-content ol { margin: 12px 0 20px 20px; }
.page-content li { margin-bottom: 6px; line-height: 1.6; }

/* ─── Contact form ─────────────────────────────── */
.contact-form { max-width: 600px; margin: 0 auto; }
.contact-form .form-group { margin-bottom: 16px; }
.contact-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.88rem; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border 0.2s;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

/* ─── Steps ────────────────────────────────────── */
.steps { display: grid; gap: 0; margin: 24px 0; }
.step {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step-num {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.step-content h3 { font-size: 1rem; margin-bottom: 4px; }
.step-content p { font-size: 0.9rem; color: var(--text-light); }

/* ─── Back to top ──────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: var(--shadow-md);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ─── Responsive ───────────────────────────────── */
@media (max-width: 1024px) {
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero { padding: 56px 0 44px; }
  .hero-stats { gap: 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .hero-search { flex-direction: column; }
  .header-inner { padding: 0 16px; }
  .section { padding: 48px 0; }
  .city-hero h1 { font-size: 1.7rem; }
}
@media (max-width: 480px) {
  .hero { padding: 44px 0 32px; }
  .hero h1 { font-size: 1.6rem; }
  .hero-stats { flex-direction: column; gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .lead-form { padding: 24px; }
}
