/* ==========================================================================
   Kansas Property Tax Freedom Coalition — shared site styles
   Palette pulled from the logo: deep navy, periwinkle, and gold.
   ========================================================================== */

:root {
  --navy-dark: #0b1233;
  --navy: #141c4d;
  --navy-light: #223074;
  --periwinkle: #97a6f5;
  --gold: #e8b84b;
  --gold-dark: #a9823f;
  --white: #ffffff;
  --bg-light: #f4f5fa;
  --text-dark: #1a1a2e;
  --text-muted: #5a5f7a;

  --max-width: 1100px;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(11, 18, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Verdana, Arial, sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--navy-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ---------- Header / Nav ---------- */

.site-header {
  background: var(--navy-dark);
  border-bottom: 3px solid var(--gold);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
}

.brand img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.brand-text h1 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--white);
}

.brand-text span {
  font-size: 0.85rem;
  color: var(--periwinkle);
}

.brand:hover {
  text-decoration: none;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav.main-nav a {
  display: inline-block;
  padding: 8px 14px;
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
}

nav.main-nav a:hover,
nav.main-nav a[aria-current="page"] {
  background: var(--navy-light);
  text-decoration: none;
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.hero h2 {
  font-size: 2.2rem;
  margin: 0 0 12px;
  color: var(--white);
}

.hero .tagline {
  color: var(--gold);
  font-size: 1.2rem;
  font-style: italic;
  margin: 0 auto 20px;
}

.hero p {
  max-width: 700px;
  margin: 0 auto 24px;
  color: var(--periwinkle);
}

.hero a:not(.btn) {
  color: var(--gold);
  text-decoration: underline;
  font-weight: 600;
}

.hero a:not(.btn):hover {
  color: var(--white);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy-dark);
}

.btn-gold:hover {
  background: var(--gold-dark);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--gold);
}

.btn-outline:hover {
  background: rgba(232, 184, 75, 0.15);
  text-decoration: none;
}

/* Same idea as .btn-outline, but for light backgrounds (e.g. admin pages) —
   .btn-outline's white text is meant for the dark hero section and is
   nearly invisible anywhere else. */
.btn-outline-light {
  background: transparent;
  color: var(--navy);
  border-color: var(--gold-dark);
}

.btn-outline-light:hover {
  background: rgba(169, 130, 63, 0.1);
  text-decoration: none;
}

/* ---------- Page sections ---------- */

main {
  min-height: 60vh;
}

.section {
  padding: 50px 0;
}

.section h2 {
  color: var(--navy);
  font-size: 1.8rem;
  border-bottom: 3px solid var(--gold);
  display: inline-block;
  padding-bottom: 6px;
  margin-top: 0;
}

.section-alt {
  background: var(--white);
}

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

.card {
  background: var(--white);
  border: 1px solid #e1e3ef;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h3 {
  color: var(--navy);
  margin-top: 0;
}

/* ---------- County list (Chapters index) ---------- */

.county-list {
  column-count: 4;
  column-gap: 30px;
  margin-top: 24px;
}

.county-list a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid #e1e3ef;
  break-inside: avoid;
  font-weight: 600;
}

@media (max-width: 900px) {
  .county-list {
    column-count: 2;
  }
}

@media (max-width: 550px) {
  .county-list {
    column-count: 1;
  }
}

/* ---------- Gallery (Pictures page) ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.gallery-grid figure {
  margin: 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-grid figcaption {
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.placeholder-box {
  background: var(--white);
  border: 2px dashed var(--gold-dark);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

/* ---------- Chapter photo ---------- */

.chapter-photo {
  margin: 0 0 24px;
}

.chapter-photo img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.chapter-photo .placeholder-box {
  max-width: 320px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ---------- Contact form ---------- */

.contact-form {
  max-width: 560px;
  display: grid;
  gap: 16px;
}

.contact-form label {
  font-weight: 600;
  color: var(--navy);
  display: block;
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccd0e6;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.form-status {
  max-width: 560px;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.form-status-success {
  background: #e6f4ea;
  color: #1e4620;
  border: 1px solid #a8d5b5;
}

.form-status-error {
  background: #fbe9e7;
  color: #611a15;
  border: 1px solid #e6a29a;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-dark);
  color: var(--periwinkle);
  padding: 30px 0;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--gold);
}

.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;
}

.footer-newsletter {
  margin-bottom: 20px;
}

.footer-newsletter-label {
  margin-bottom: 10px;
  font-weight: 600;
}

.newsletter-inline-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}

.newsletter-inline-form input[type="email"] {
  flex: 1 1 220px;
  padding: 10px 12px;
  border: 1px solid #ccd0e6;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
}

/* ---------- Store (product grid) ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.product-card {
  display: block;
  margin: 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.15s ease;
}

.product-card:hover {
  box-shadow: 0 4px 16px rgba(11, 18, 51, 0.2);
  text-decoration: none;
}

.product-card-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.product-card-image.placeholder-box {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  border-width: 0 0 2px;
}

.product-card-caption {
  padding: 12px 14px;
}

.product-card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: var(--navy);
}

.product-card-price {
  font-weight: 600;
  color: var(--navy);
}

.product-card-variant-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Product detail page ---------- */

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 400px) 1fr;
  gap: 32px;
  margin-top: 24px;
  align-items: start;
}

@media (max-width: 700px) {
  .product-detail {
    grid-template-columns: 1fr;
  }
}

.product-detail-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

.product-detail-image.placeholder-box {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
}

.product-picker-label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin: 16px 0 6px;
}

.product-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-option-btn {
  background: var(--white);
  border: 2px solid #ccd0e6;
  border-radius: var(--radius);
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
}

.product-option-btn-selected {
  border-color: var(--gold);
  background: rgba(232, 184, 75, 0.15);
}

.product-option-btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.product-qty-input {
  width: 80px;
  padding: 8px 10px;
  border: 2px solid #ccd0e6;
  border-radius: var(--radius);
  font: inherit;
}

/* ---------- Cart page ---------- */

.cart-table td {
  vertical-align: middle;
}

.cart-subtotal {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 16px;
}

.tag-sold-out {
  display: inline-block;
  background: var(--gold-dark);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.tag-sale {
  display: inline-block;
  background: var(--navy-light);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

/* ---------- Admin ---------- */

.admin-login-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.admin-login-container {
  max-width: 420px;
  width: 100%;
}

.admin-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccd0e6;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
}

.admin-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid #e6e8f2;
  white-space: nowrap;
}

.admin-table th {
  background: var(--bg-light);
  color: var(--navy);
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--navy-light);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.link-button:hover {
  color: var(--gold-dark);
}

.variant-color-block {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-top: 16px;
}

.variant-color-block h3 {
  margin-top: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 700px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  nav.main-nav ul {
    padding-top: 8px;
  }

  .hero h2 {
    font-size: 1.6rem;
  }
}
