/*
Theme Name: Las Animas County Republicans — Accountability Record
Theme URI: https://lasanimascountyrepublicans.com
Author: Vic Meyers for Democracy
Description: A sourced public-record site tracking the votes, statements, and public conduct of Las Animas County Republican Party leaders and elected officials. Not affiliated with the Las Animas County Republican Party.
Version: 3.1.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: laccr
*/

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #f4f3ef;
  color: #1c1c1c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
html, body { overflow-x: hidden; }
a { color: inherit; }

/*
 * Full-bleed-background-with-centered-content, using padding math on the
 * section element itself (no separate inner "container" wrapper div needed)
 * — every top-level section below is a single Gutenberg Group block, so we
 * avoid depending on nested markup the block editor doesn't reliably keep.
 */
.bleed-boxed {
  padding-left: max(24px, calc((100% - 1040px) / 2));
  padding-right: max(24px, calc((100% - 1040px) / 2));
}

/* ---------- Primary navigation ---------- */
.site-nav, .footer-nav { text-align: center; }
.site-nav { background: #0e1730; }
.site-nav-list, .footer-nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px;
}
.site-nav-list { padding: 12px 24px; }
.site-nav-list a, .footer-nav-list a {
  display: inline-block; padding: 6px 2px; text-decoration: none;
  color: #cfd2de; font-weight: 600; font-size: 14px; letter-spacing: .04em;
  text-transform: uppercase; border-bottom: 2px solid transparent;
}
.site-nav-list a:hover, .site-nav-list .current-menu-item > a,
.footer-nav-list a:hover { color: #fff; border-bottom-color: #b3282d; }
.footer-nav { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.footer-nav-list a { font-size: 12.5px; }

/* ---------- Header ---------- */
.site-header {
  background: #14213d;
  color: #fff;
  padding: 56px 24px 48px;
  text-align: center;
  border-bottom: 6px solid #b3282d;
}
.site-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4.5vw, 46px);
  line-height: 1.2;
  margin: 0 auto 22px;
  max-width: 780px;
  font-weight: 700;
}
.site-header .questions {
  margin: 26px auto 0;
  max-width: 780px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 3vw, 28px);
  font-style: italic;
  color: #fff;
}
.site-header .questions p { margin: 0 0 6px; }

/* ---------- Section shell ---------- */
.section { padding: 64px 24px; max-width: 1040px; margin: 0 auto; }
.section-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3.4vw, 32px);
  margin: 0 0 32px;
  color: #14213d;
}
.section-alt { background: #eceae1; max-width: none; padding-left: max(24px, calc((100% - 1040px) / 2)); padding-right: max(24px, calc((100% - 1040px) / 2)); }
.section-alt > * { max-width: 1040px; margin-left: auto; margin-right: auto; }

/* ---------- Photo gallery ---------- */
/* WordPress wraps this Group block's children in an extra
   .wp-block-group__inner-container div (a core "is-layout-flow"
   wrapper), so the grid has to be applied to that wrapper too —
   otherwise .photo-grid only ever sees ONE grid item (the wrapper)
   and every photo collapses into a single full-width column. */
.photo-grid,
.photo-grid > .wp-block-group__inner-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
/* Note: the Gutenberg image block's own <figure> IS .photo-card — there is
   no separate wrapping element — so every rule below targets .photo-card
   directly rather than a nested "figure" descendant. */
.photo-card {
  margin: 0;
  background: #fff;
  border: 1px solid #ddd9cc;
  overflow: hidden;
}
.photo-card img { width: 100%; object-fit: cover; }
.photo-card figcaption {
  padding: 16px 18px 20px;
  font-size: 14.5px;
  color: #333;
}
.photo-card.wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
}
.photo-card.wide img { height: 100%; }
@media (max-width: 720px) {
  .photo-card.wide { grid-template-columns: 1fr; }
}
/* Two photos with no matching headline to link to — shown together at the
   end of the gallery, same size side by side rather than the wide
   image+caption layout above. */
.photo-pair .photo-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- Headlines ---------- */
.headline-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.headline-list li { }
.headline-link {
  display: block;
  background: #fff;
  border: 1px solid #ddd9cc;
  border-left: 4px solid #14213d;
  padding: 18px 20px;
  text-decoration: none;
  color: #14213d;
  font-weight: 600;
  font-size: 16px;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: border-color .15s ease, background .15s ease;
}
.headline-link .outlet {
  display: block;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #b3282d;
  margin-bottom: 6px;
}
.headline-link:hover { border-left-color: #b3282d; background: #faf9f5; }

/* ---------- Legislation cards ---------- */
/* Same WordPress inner-container wrapping applies to these Group
   blocks too — grid rules target the wrapper as well as the block
   itself so the layout works whether or not WordPress adds it. */
.bill-grid,
.bill-grid > .wp-block-group__inner-container { display: grid; gap: 20px; }
.bill-card,
.bill-card > .wp-block-group__inner-container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}
.bill-card {
  background: #fff;
  border: 1px solid #ddd9cc;
  padding: 22px 24px;
}
/* Let the text column shrink below its min-content width so long bill
   titles/URLs never push the card wider than the screen. */
.bill-card-main { min-width: 0; }
.bill-card-main h3, .bill-card-main p, .bill-card-main li { overflow-wrap: anywhere; }
.bill-card-main h3 { margin: 0 0 8px; font-size: 18px; }
.bill-card-main h3 a { text-decoration: none; color: #14213d; border-bottom: 2px solid #e0b64d; }
.bill-card-main h3 a:hover { color: #b3282d; }
.bill-card-main p { margin: 0; color: #3d3b34; font-size: 15px; }
/* Per-bill vote breakdown (Healthy School Meals for All) */
.bill-card-main .vote-list { margin: 12px 0 0; padding-left: 22px; color: #3d3b34; font-size: 14.5px; }
.bill-card-main .vote-list li { margin: 0 0 8px; }
.bill-card-main .vote-list a { color: #14213d; font-weight: 600; text-decoration: none; border-bottom: 2px solid #e0b64d; }
.bill-card-main .vote-list a:hover { color: #b3282d; }
/* Attribution page */
.attribution { font-size: 18px; line-height: 1.7; }

/* ---------- Contact page (Contact Form 7) ---------- */
.page-id-54 main.section { max-width: 720px; }
.wpcf7 {
  background: #fff;
  border: 1px solid #ddd9cc;
  border-top: 5px solid #b3282d;
  padding: 32px 36px 36px;
  margin-top: 8px;
}
.wpcf7 form p { margin: 0 0 20px; }
.wpcf7 form label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #14213d;
  margin-bottom: 8px;
}
.wpcf7 .wpcf7-form-control-wrap { display: block; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: #1c1c1c;
  background: #faf9f5;
  border: 1px solid #cfcabb;
  border-radius: 4px;
  padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.wpcf7 textarea { min-height: 180px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 textarea:focus {
  outline: none;
  border-color: #14213d;
  box-shadow: 0 0 0 3px rgba(20,33,61,.15);
  background: #fff;
}
.wpcf7 input[type="submit"] {
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: #b3282d;
  border: 0;
  border-radius: 999px;
  padding: 14px 34px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.wpcf7 input[type="submit"]:hover { background: #8c1d20; }
.wpcf7 input[type="submit"]:active { transform: translateY(1px); }
.wpcf7 .wpcf7-spinner { margin-left: 12px; }
.wpcf7 .wpcf7-not-valid-tip { color: #8c1d20; font-size: 13px; margin-top: 6px; }
.wpcf7 .wpcf7-response-output {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 4px;
  border: 1px solid #ddd9cc;
  background: #f1ecd9;
  color: #6b5a1e;
}
.wpcf7 form.sent .wpcf7-response-output { background: #e6f0e3; color: #2d5a29; border-color: #c7dcc2; }
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output { background: #fbe4e2; color: #8c1d20; border-color: #efc4c2; }

/* Small "Paid for by" link at the bottom of the contact page */
.paid-for-link {
  margin: 40px 0 0;
  text-align: center;
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.paid-for-link a { color: #6b6a63; text-decoration: none; border-bottom: 1px solid #cfcabb; }
.paid-for-link a:hover { color: #b3282d; border-bottom-color: #b3282d; }
.vote-pill {
  justify-self: end;
  white-space: nowrap;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .04em;
  padding: 8px 16px;
  border-radius: 999px;
  text-transform: uppercase;
}
.vote-pill p { margin: 0; }
.vote-no { background: #fbe4e2; color: #8c1d20; }
.vote-yes { background: #e6f0e3; color: #2d5a29; }
.vote-note { background: #f1ecd9; color: #6b5a1e; }


/* ---------- Footer ---------- */
.site-footer {
  background: #14213d;
  color: #cfd2de;
  padding: 48px 0 32px;
  text-align: center;
}
.site-footer .cta {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 3vw, 30px);
  color: #fff;
  margin: 0 0 24px;
}
.site-footer .disclaimer {
  max-width: 640px;
  margin: 0 auto;
  font-size: 12.5px;
  line-height: 1.7;
  color: #9aa0b4;
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 20px;
}
.site-footer .disclaimer strong { color: #cfd2de; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .section { padding: 36px 16px; }
  .section-alt { padding-left: 16px; padding-right: 16px; }
  .section-title { margin-bottom: 20px; }
  .site-header { padding: 36px 18px 30px; }
  .site-header h1 { font-size: clamp(24px, 7vw, 32px); margin-bottom: 14px; }
  .site-header .questions { font-size: clamp(18px, 5.2vw, 22px); }
  .site-nav-list { gap: 2px 20px; padding: 10px 12px; }
  .site-nav-list a { font-size: 13px; }

  .photo-grid,
  .photo-grid > .wp-block-group__inner-container { gap: 16px; }
  .photo-card figcaption { padding: 12px 14px 16px; font-size: 14px; }

  .headline-list { gap: 10px; }
  .headline-link { padding: 12px 14px; font-size: 14px; line-height: 1.45; }

  .bill-grid,
  .bill-grid > .wp-block-group__inner-container { gap: 14px; }
  .bill-card { padding: 16px 16px 18px; }
  .bill-card,
  .bill-card > .wp-block-group__inner-container { grid-template-columns: 1fr; gap: 12px; align-items: start; }
  .bill-card-main h3 { font-size: 17px; line-height: 1.3; }
  .bill-card-main p { font-size: 14.5px; }
  .bill-card-main .vote-list { padding-left: 18px; font-size: 14px; }
  .vote-pill { justify-self: start; white-space: normal; max-width: 100%; font-size: 12px; padding: 7px 14px; }

  .wpcf7 { padding: 22px 18px 24px; }
  .wpcf7 input[type="submit"] { width: 100%; }
  .attribution { font-size: 16px; }
  .site-footer { padding: 36px 16px 24px; }
  .site-footer .cta { font-size: 22px; }
}
