/* ============================================================
   ActNow | JoeTheVoter — site-wide stylesheet
   ============================================================ */

:root {
  --color-navy: #1c2b4a;
  --color-navy-dark: #14203a;
  --color-blue: #2c6eab;
  --color-blue-light: #4a7fd6;
  --color-gold: #c99a2e;
  --color-red: #a5322a;
  --color-bg: #f6f7f9;
  --color-text: #1c1e21;
  --color-muted: #5a6270;
  --color-border: #d8dce3;
  --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

a { color: var(--color-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- Minimal grid/form shim for map-and-list.php ----------
   map-and-list.php is a reusable module built for a Bootstrap layout
   (row/col-lg-*/form-select/form-label). This site doesn't load Bootstrap
   on public pages, so these classes had no rules at all and the map +
   dropdown just stacked unstyled. Scoped, minimal replacements only —
   confirmed nothing else on the site uses these class names. */
.row { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0 0 1rem; }
.col-lg-7 { flex: 1 1 55%; min-width: 280px; }
.col-lg-5 { flex: 1 1 35%; min-width: 240px; }
.mb-4 { margin-bottom: 1rem; }
.position-relative { position: relative; }
.form-label { display: block; margin-bottom: 0.4rem; font-weight: 600; }
.form-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-size: 1rem;
}

/* ---------- Branded banner image ---------- */
.site-banner-link { display: block; line-height: 0; }
.site-banner { display: block; width: 100%; height: auto; }

/* ---------- Sticky header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--color-navy);
  border-bottom: 3px solid var(--color-gold);
}
.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.site-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.site-brand-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}
.site-brand-tag {
  font-size: 0.75rem;
  color: var(--color-gold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: #e7ebf3;
  font-weight: 600;
  padding: 0.4rem 0.2rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  border-bottom-color: var(--color-gold);
  text-decoration: none;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

@media (max-width: 800px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: 0.75rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.6rem 0; border-bottom: 1px solid rgba(255,255,255,0.15); }
}

/* ---------- Layout helpers ---------- */
main { display: block; }
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}
.container-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.page-hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
  color: #fff;
  padding: 3rem 1.25rem;
  border-bottom: 3px solid var(--color-gold);
}
.page-hero-inner { max-width: 1180px; margin: 0 auto; }
.page-hero h1 { margin: 0 0 0.5rem; font-size: 2.1rem; }
.page-hero p { margin: 0; max-width: 720px; color: #d7dcea; font-size: 1.05rem; }

h1, h2, h3 { color: var(--color-navy); }

.btn {
  display: inline-block;
  padding: 0.65rem 1.3rem;
  background: var(--color-blue);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--color-blue-light); color: #fff; text-decoration: none; }
.btn-gold { background: var(--color-gold); color: #2a1f04; }
.btn-gold:hover { background: #e0b046; color: #2a1f04; }

/* ---------- Cards / grids ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.card h3 { margin-top: 0; }
.card .card-meta {
  font-size: 0.82rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}
.tag {
  display: inline-block;
  background: #eef2fa;
  color: var(--color-navy);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.78rem;
  margin: 0.15rem 0.3rem 0.15rem 0;
}
.card-source {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-top: 0.6rem;
  border-top: 1px dashed var(--color-border);
  padding-top: 0.5rem;
}

/* ---------- Filter / search bar ---------- */
.filter-bar {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}
.filter-field { display: flex; flex-direction: column; gap: 0.3rem; flex: 1 1 200px; }
.filter-field label { font-size: 0.82rem; font-weight: 600; color: var(--color-muted); }
.filter-field input,
.filter-field select {
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 1rem;
}
.filter-actions { display: flex; gap: 0.6rem; }
.result-count { margin: 1rem 0 0.25rem; color: var(--color-muted); font-size: 0.9rem; }

/* ---------- Tables (Know Your Rights / Admin) ---------- */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
table.data-table th, table.data-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
table.data-table th { background: #eef2fa; color: var(--color-navy); }
.table-responsive { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius); }

/* ---------- Alerts ---------- */
.alert { padding: 0.85rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.25rem; }
.alert-success { background: #e6f4ea; color: #1e5b34; border: 1px solid #b7ddc2; }
.alert-error { background: #fbeaea; color: #7a2420; border: 1px solid #e6bcba; }
.alert-info { background: #eaf2fb; color: #1c3f66; border: 1px solid #bcd6ef; }

/* ---------- Black-background elements: colored border required (site
   convention) so edges stay visible against a black desktop background. ---------- */
.dark-block {
  background: #14141c;
  color: #f2f2f2;
  border: 2px solid var(--color-gold);
  border-radius: var(--radius);
  padding: 1.25rem;
}

/* ---------- Forms (about/contact page use of optin-form.css handles the
   contact form itself; this covers general form elements) ---------- */
.plain-section { padding: 2rem 0; }

/* ---------- Utility ---------- */
.text-muted { color: var(--color-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
