/* ===================================================
   Dog License Local — Main Stylesheet
   Aesthetic: Warm civic / neighborhood — cream, forest green, amber
   Fonts: Playfair Display (headings) + Source Serif 4 (body)
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,400&family=DM+Mono:wght@400;500&display=swap');

/* ---- CSS Variables ---- */
:root {
  --cream:       #f7f3ec;
  --cream-dark:  #ede8df;
  --green:       #2d5a27;
  --green-mid:   #3d7a35;
  --green-light: #e8f1e6;
  --amber:       #c97d2a;
  --amber-light: #fdf0de;
  --charcoal:    #1e2420;
  --mid-gray:    #5a6357;
  --light-gray:  #b8c0b4;
  --white:       #ffffff;
  --red-warn:    #b84040;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 2px 12px rgba(30,36,32,0.08);
  --shadow-md: 0 4px 24px rgba(30,36,32,0.12);
  --max-w: 860px;
  --max-w-wide: 1140px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--amber); }

/* ---- Site Header ---- */
.site-header {
  background: var(--green);
  padding: 0 1.5rem;
  border-bottom: 3px solid var(--amber);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}
.header-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.site-logo span { color: var(--amber); }
.site-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-nav a {
  color: rgba(247,243,236,0.85);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  transition: background 0.18s, color 0.18s;
  letter-spacing: 0.01em;
}
.site-nav a:hover {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

/* ---- Hero (homepage) ---- */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, #1e3d1a 100%);
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 80%, rgba(201,125,42,0.12) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(201,125,42,0.08) 0%, transparent 50%);
}
.hero-inner { position: relative; z-index: 1; max-width: var(--max-w); margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(201,125,42,0.2);
  border: 1px solid rgba(201,125,42,0.4);
  color: #f0c77a;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.18;
  margin-bottom: 1.1rem;
  letter-spacing: -0.02em;
}
.hero h1 em { color: var(--amber); font-style: normal; }
.hero-sub {
  color: rgba(247,243,236,0.78);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.hero-cta-group { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.18s;
  border: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.18); }
.btn-primary { background: var(--amber); color: var(--white); }
.btn-primary:hover { background: #b56e22; color: var(--white); }
.btn-outline { background: transparent; color: var(--cream); border: 1.5px solid rgba(247,243,236,0.45); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-mid); color: var(--white); }

/* ---- State Picker Grid ---- */
.state-picker {
  background: var(--white);
  border-bottom: 1px solid var(--cream-dark);
  padding: 2.5rem 1.5rem;
}
.state-picker .section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid-gray);
  margin-bottom: 1.25rem;
  text-align: center;
}
.state-grid {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem;
}
.state-card {
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--charcoal);
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.state-card:hover {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.state-card .flag { font-size: 1.1rem; }

/* ---- Main content layout ---- */
.main-wrap {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}
.main-wrap.full { grid-template-columns: 1fr; max-width: var(--max-w); }
.content { min-width: 0; }

/* ---- Page header (county/article pages) ---- */
.page-header {
  background: var(--green);
  padding: 2.5rem 1.5rem;
  border-bottom: 3px solid var(--amber);
}
.page-header-inner { max-width: var(--max-w-wide); margin: 0 auto; }
.breadcrumb {
  font-size: 0.82rem;
  color: rgba(247,243,236,0.6);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}
.breadcrumb a { color: rgba(247,243,236,0.7); text-decoration: none; }
.breadcrumb a:hover { color: var(--amber); }
.breadcrumb span { margin: 0 0.4rem; }
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  color: var(--cream);
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin-bottom: 0.6rem;
}
.page-header .sub {
  color: rgba(247,243,236,0.75);
  font-size: 1rem;
  max-width: 580px;
}

/* ---- Info Box (quick facts) ---- */
.info-box {
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 1.75rem 0;
  box-shadow: var(--shadow);
}
.info-box h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--green);
  margin-bottom: 0.85rem;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--cream-dark);
  font-size: 0.92rem;
  gap: 1rem;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--mid-gray); font-size: 0.85rem; flex-shrink: 0; }
.info-row .value { font-weight: 600; text-align: right; }
.info-row .value.urgent { color: var(--red-warn); }
.info-row .value.good { color: var(--green); }

/* ---- Fee Table ---- */
.fee-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.fee-table th {
  background: var(--green);
  color: var(--cream);
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.fee-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--cream-dark);
  vertical-align: top;
}
.fee-table tr:last-child td { border-bottom: none; }
.fee-table tr:nth-child(even) td { background: #fafaf8; }
.fee-table .price { font-weight: 700; color: var(--green); font-family: var(--font-mono); }
.fee-table .late { color: var(--red-warn); font-weight: 600; }

/* ---- Steps ---- */
.steps { margin: 2rem 0; }
.step {
  display: flex;
  gap: 1.1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--cream-dark);
}
.step:last-child { border-bottom: none; }
.step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-body h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: var(--charcoal);
}
.step-body p { font-size: 0.92rem; color: var(--mid-gray); line-height: 1.55; }

/* ---- Headings in content area ---- */
.content h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--green);
  margin: 2.25rem 0 0.75rem;
  letter-spacing: -0.01em;
  line-height: 1.28;
}
.content h2:first-child { margin-top: 0; }
.content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--charcoal);
  margin: 1.75rem 0 0.5rem;
}
.content p { margin-bottom: 1rem; }
.content ul, .content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.content li { margin-bottom: 0.35rem; line-height: 1.6; }

/* ---- Alert / Warning ---- */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  font-size: 0.92rem;
  line-height: 1.55;
}
.alert-warn {
  background: #fff8ec;
  border-left: 4px solid var(--amber);
  color: #5a3d10;
}
.alert-info {
  background: var(--green-light);
  border-left: 4px solid var(--green);
  color: #1e3a1a;
}
.alert strong { font-weight: 600; }

/* ---- FAQ ---- */
.faq { margin: 2rem 0; }
.faq-item {
  border-bottom: 1px solid var(--cream-dark);
  padding: 1rem 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.faq-a { font-size: 0.92rem; color: var(--mid-gray); line-height: 1.6; }

/* ---- Sidebar ---- */
.sidebar { position: sticky; top: 80px; }
.sidebar-card {
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.sidebar-card h4 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--green);
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--cream-dark);
}
.sidebar-card ul { list-style: none; padding: 0; }
.sidebar-card li { padding: 0.3rem 0; font-size: 0.875rem; border-bottom: 1px solid #f0ece5; }
.sidebar-card li:last-child { border-bottom: none; }
.sidebar-card a { text-decoration: none; color: var(--charcoal); }
.sidebar-card a:hover { color: var(--green); }
.deadline-badge {
  background: var(--amber-light);
  border: 1.5px solid #e8b06a;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  text-align: center;
  margin-bottom: 1.25rem;
}
.deadline-badge .date {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--amber);
  display: block;
}
.deadline-badge .label { font-size: 0.78rem; color: var(--mid-gray); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---- County grid (state pages) ---- */
.county-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.county-card {
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: var(--charcoal);
  transition: border-color 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.county-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--charcoal);
}
.county-card .county-name { font-weight: 700; font-size: 0.97rem; color: var(--green); }
.county-card .county-meta { font-size: 0.8rem; color: var(--mid-gray); font-family: var(--font-mono); }

/* ---- Article card grid ---- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.article-card {
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  text-decoration: none;
  color: var(--charcoal);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.article-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.article-card .tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
}
.article-card h3 { font-family: var(--font-display); font-size: 1.05rem; color: var(--charcoal); line-height: 1.35; }
.article-card p { font-size: 0.875rem; color: var(--mid-gray); line-height: 1.55; flex-grow: 1; }
.article-card .read-more { font-size: 0.82rem; color: var(--green); font-weight: 600; }

/* ---- Disclaimer ---- */
.disclaimer {
  background: var(--cream-dark);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.8rem;
  color: var(--mid-gray);
  line-height: 1.55;
  margin-top: 2.5rem;
  border-left: 3px solid var(--light-gray);
}

/* ---- Tool (interactive) ---- */
.tool-wrap {
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin: 1.5rem 0;
}
.tool-wrap h2 { font-family: var(--font-display); font-size: 1.5rem; color: var(--green); margin-bottom: 0.5rem; }
.tool-wrap .tool-desc { font-size: 0.9rem; color: var(--mid-gray); margin-bottom: 1.5rem; }
.tool-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; align-items: flex-end; }
.tool-field { flex: 1; min-width: 180px; }
.tool-field label {
  display: block;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mid-gray);
  margin-bottom: 0.4rem;
}
.tool-field select, .tool-field input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--cream);
  color: var(--charcoal);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%235a6357'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  cursor: pointer;
  transition: border-color 0.18s;
}
.tool-field select:focus, .tool-field input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45,90,39,0.1);
}
.tool-result {
  background: var(--green-light);
  border: 1.5px solid #a8cca2;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: none;
}
.tool-result.visible { display: block; }
.tool-result .county-h { font-family: var(--font-display); font-size: 1.3rem; color: var(--green); margin-bottom: 0.75rem; }
.tool-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.result-item { background: var(--white); border-radius: var(--radius); padding: 0.75rem 1rem; }
.result-item .r-label { font-size: 0.75rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--mid-gray); }
.result-item .r-val { font-size: 1.05rem; font-weight: 700; color: var(--charcoal); margin-top: 0.2rem; }
.result-item .r-val.red { color: var(--red-warn); }
.result-item .r-val.grn { color: var(--green); }

/* ---- Section ---- */
.section { padding: 3rem 1.5rem; }
.section-inner { max-width: var(--max-w-wide); margin: 0 auto; }
.section-alt { background: var(--white); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--charcoal);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.section-sub { color: var(--mid-gray); font-size: 0.97rem; margin-bottom: 2rem; }

/* ---- Stats bar ---- */
.stats-bar {
  background: var(--amber-light);
  border-top: 1px solid #e8b06a;
  border-bottom: 1px solid #e8b06a;
  padding: 1.25rem 1.5rem;
}
.stats-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.stat { text-align: center; }
.stat .n { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--green); line-height: 1; }
.stat .l { font-size: 0.78rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--mid-gray); margin-top: 0.25rem; }

/* ---- Footer ---- */
.site-footer {
  background: var(--charcoal);
  color: rgba(247,243,236,0.65);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
}
.footer-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-brand .logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.6rem;
}
.footer-brand .logo span { color: var(--amber); }
.footer-brand p { font-size: 0.85rem; line-height: 1.6; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247,243,236,0.4);
  margin-bottom: 0.85rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: rgba(247,243,236,0.65); text-decoration: none; font-size: 0.875rem; }
.footer-col a:hover { color: var(--amber); }
.footer-bottom {
  max-width: var(--max-w-wide);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-bottom a { color: rgba(247,243,236,0.5); text-decoration: none; }
.footer-bottom a:hover { color: var(--amber); }

/* ---- AdSense placeholder ---- */
.ad-slot {
  background: var(--cream-dark);
  border: 1px dashed var(--light-gray);
  border-radius: var(--radius);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--light-gray);
  letter-spacing: 0.06em;
  margin: 1.5rem 0;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .main-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .tool-result-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-nav { display: none; }
  .hero { padding: 2.5rem 1.25rem 2rem; }
  .section { padding: 2rem 1.25rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .stats-inner { gap: 1.5rem; }
  .state-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
