/* =========================
   Clay County Router Base Styles
========================= */

:root {
  --primary: #1f3c5a;
  --secondary: #e6eef5;
  --accent: #cfa64a;
  --text: #1a1a1a;
  --maxw: 1100px;

  /* Router UI Tokens */
  --nav-dark: #0f172a;
  --footer-dark: #111827;
  --soft-border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: #ffffff;
}

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 16px;
}

/* =========================
   Header
========================= */

header {
  background: var(--primary);
  color: white;
}

header .container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

header h1 {
  margin: 0;
  font-size: 1.6rem;
}

/* =========================
   Legacy Nav (Safe fallback)
========================= */

nav {
  background: #0f253a;
}

nav .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

nav a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover {
  text-decoration: underline;
}

/* =========================
   Sections
========================= */

section {
  margin-bottom: 40px;
}

h2 {
  margin-top: 0;
}

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

.grid {
  display: grid;
  gap: 18px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  border: 1px solid var(--soft-border);
  border-radius: 6px;
  padding: 18px;
  background: #fff;
  transition: 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.card h3 {
  margin-top: 0;
}

/* =========================
   Buttons
========================= */

.btn {
  display: inline-block;
  padding: 10px 18px;
  background: var(--accent);
  color: #000;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  transition: 0.2s ease;
}

.btn:hover {
  filter: brightness(1.05);
}

/* =========================
   Universal Nav (Injected)
========================= */

.site-nav {
  background: var(--nav-dark);
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.logo {
  font-weight: 700;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* City Badge */

.city-badge {
  background: #2563eb;
  color: white;
  font-size: 0.65rem;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Nav Links */

.nav-links {
  display: flex;
  flex-wrap: wrap;
}

.nav-links a {
  margin-left: 18px;
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.9;
}

.nav-links a:hover {
  opacity: 1;
}

/* =========================
   Footer (Injected)
========================= */

.site-footer {
  background: var(--footer-dark);
  color: #d1d5db;
  padding: 40px 0;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.site-footer a {
  color: #e5e7eb;
  text-decoration: none;
}

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

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
}

.site-footer ul li {
  margin-bottom: 6px;
}

/* =========================
   City Grid (GLOBAL — FIXED)
========================= */

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.city-card {
  border: 1px solid var(--soft-border);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  transition: 0.2s ease;
}

.city-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.city-card h3 {
  margin: 0 0 6px 0;
}

.city-card a {
  text-decoration: none;
  color: var(--primary);
}

.city-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
}

/* =========================
   Mobile Responsive
========================= */

/* Touch Optimization */
nav a, .btn {
  -webkit-tap-highlight-color: transparent;
}

/* Tablet */
@media (max-width: 768px) {

  .container {
    padding: 18px 14px;
  }

  header h1 {
    font-size: 1.4rem;
  }

  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nav-links a {
    margin-left: 0;
    margin-right: 16px;
  }

  .grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .btn {
    padding: 12px 16px;
    font-size: 0.95rem;
  }
}

/* Mobile */
@media (max-width: 480px) {

  .container {
    padding: 14px 10px;
  }

  header h1 {
    font-size: 1.2rem;
  }

  nav .container {
    gap: 12px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card {
    padding: 14px;
  }

  .btn {
    padding: 14px 20px;
    font-size: 1rem;
    width: 100%;
    text-align: center;
    display: block;
  }

  section {
    margin-bottom: 30px;
  }
}

