/* ===========================
   Ravi Puri for Forsyth County Sheriff
   Stylesheet
   =========================== */

:root {
  --navy: #0b2545;
  --navy-dark: #071a33;
  --navy-light: #143a6b;
  --gold: #c9a227;
  --gold-light: #e4c766;
  --gold-dark: #8a6a13;
  --red: #a61c22;
  --white: #ffffff;
  --gray-light: #f5f6f8;
  --gray-border: #e2e5ea;
  --gray: #5b6472;
  --text: #1b1f27;

  --font-heading: 'Merriweather', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;

  --max-width: 1180px;
  --radius: 6px;
  --shadow: 0 4px 18px rgba(11, 37, 69, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* site-header / site-footer are custom elements that hold the real
   <header>/<footer> markup — without this they default to display:inline */
site-header,
site-footer {
  display: block;
}

/* ---------- Accessibility utilities ---------- */

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 1000;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* Visible, consistent focus indicator for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold-dark);
  outline-offset: 2px;
  border-radius: 2px;
}

.hero :focus-visible,
.section--navy :focus-visible,
.site-footer :focus-visible,
.cta-band :focus-visible {
  outline-color: var(--gold-light);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

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

.section {
  padding: 72px 0;
}

.section--tight {
  padding: 48px 0;
}

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

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

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold-dark);
  margin-bottom: 12px;
}

/* var(--gold) only meets AA contrast on dark backgrounds */
.hero .eyebrow,
.section--navy .eyebrow {
  color: var(--gold-light);
}

.section-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-heading h2 {
  font-size: 2.1rem;
}

.section-heading p {
  color: var(--gray);
  font-size: 1.08rem;
}

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

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 14px 30px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-gold:hover {
  background: var(--gold-light);
  box-shadow: 0 8px 20px rgba(201, 162, 39, 0.35);
}

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

.btn-outline:hover {
  background: var(--white);
  color: var(--navy);
}

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

.btn-navy:hover {
  background: var(--navy-light);
  box-shadow: 0 8px 20px rgba(11, 37, 69, 0.35);
}

.btn-red {
  background: var(--red);
  color: var(--white);
}

.btn-red:hover {
  background: #c22530;
  box-shadow: 0 8px 20px rgba(166, 28, 34, 0.35);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.88rem;
}

.btn-block {
  display: block;
  width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
}

.announcement-bar {
  background: var(--navy-dark);
  color: var(--white);
  text-align: center;
  font-size: 0.85rem;
  padding: 8px 16px;
  letter-spacing: 0.02em;
}

.announcement-bar a {
  color: var(--gold-light);
  font-weight: 700;
  border-bottom: 1px solid rgba(228, 199, 102, 0.5);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 46px;
  width: 46px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
}

.brand-tag {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a:not(.btn) {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-links a:not(.btn):hover,
.nav-links a.active:not(.btn) {
  color: var(--navy);
  border-bottom-color: var(--gold-dark);
}

.nav-links .btn[aria-current='page'] {
  box-shadow: inset 0 0 0 2px var(--navy);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  background: var(--navy);
  border-radius: 2px;
}

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

.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 85% 20%, rgba(201, 162, 39, 0.18), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(166, 28, 34, 0.15), transparent 40%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 88px 0 76px;
}

.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--gold-light);
}

.hero p.lead {
  font-size: 1.2rem;
  color: #d7dfec;
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-badge-frame {
  display: flex;
  justify-content: center;
}

.hero-photo {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, var(--navy-light), var(--navy-dark));
  border-radius: 12px;
  border: 4px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 44px;
  flex-wrap: wrap;
}

.hero-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--gold-light);
}

.hero-stat span {
  font-size: 0.85rem;
  color: #c3cde0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Placeholder image blocks ---------- */

.placeholder-img {
  background: var(--gray-light);
  border: 1px dashed #b9c0cc;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
}

.placeholder-img svg {
  width: 46%;
  opacity: 0.55;
}

/* ---------- Cards / Grids ---------- */

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

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

.issue-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 28px;
}

.issue-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.3rem;
}

.issue-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.issue-card p {
  color: var(--gray);
  font-size: 0.97rem;
  margin-bottom: 0;
}

/* ---------- Quote / Endorsement cards ---------- */

.quote-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
}

.quote-card::before {
  content: "\201C";
  font-family: Georgia, serif;
  font-size: 3.5rem;
  color: var(--gold);
  position: absolute;
  top: 6px;
  left: 18px;
  opacity: 0.6;
}

.quote-card blockquote {
  margin: 18px 0 18px;
  font-style: italic;
  color: var(--text);
}

.quote-source {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quote-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gray-light);
  border: 1px solid var(--gray-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--navy);
}

.quote-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
}

.quote-role {
  font-size: 0.82rem;
  color: var(--gray);
}

/* ---------- Events ---------- */

.event-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 24px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.event-date {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  text-align: center;
  padding: 14px 8px;
}

.event-date .month {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.event-date .day {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
}

.event-info h3 {
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.event-meta {
  color: var(--gray);
  font-size: 0.9rem;
}

.event-meta span {
  margin-right: 16px;
}

.event-card.event-past {
  opacity: 0.75;
}

/* ---------- Timeline (About page) ---------- */

.timeline {
  border-left: 3px solid var(--gold);
  margin-left: 10px;
  padding-left: 30px;
}

.timeline-item {
  position: relative;
  margin-bottom: 34px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--navy);
  border: 3px solid var(--gold);
  border-radius: 50%;
}

.timeline-item h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.timeline-year {
  color: var(--red);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label,
legend {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: var(--navy);
}

fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

.required-mark {
  color: var(--red);
}

input,
select,
textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(138, 106, 19, 0.25);
}

textarea {
  resize: vertical;
  min-height: 130px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.checkbox-row input {
  margin-top: 4px;
}

.checkbox-row label {
  font-weight: 400;
  color: var(--text);
  margin: 0;
}

.form-note {
  font-size: 0.82rem;
  color: var(--gray);
}

/* ---------- Donate page ---------- */

.donate-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 28px 0;
}

.donate-amount {
  display: block;
  position: relative;
  border: 2px solid var(--gray-border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 18px 10px;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.donate-amount:hover {
  border-color: var(--gold-dark);
  background: #fbf6e6;
}

.amount-input:checked + .donate-amount {
  border-color: var(--gold-dark);
  background: #fbf6e6;
}

.amount-input:checked + .donate-amount::after {
  content: '\2713';
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 0.85rem;
  color: var(--gold-dark);
}

.amount-input:focus-visible + .donate-amount {
  outline: 3px solid var(--gold-dark);
  outline-offset: 2px;
}

.disclaimer-box {
  background: var(--gray-light);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 0.82rem;
  color: var(--gray);
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--red);
  color: var(--white);
  text-align: center;
  padding: 56px 0;
}

.cta-band h2 {
  color: var(--white);
  margin-bottom: 14px;
}

.cta-band p {
  color: #f6dcde;
  max-width: 560px;
  margin: 0 auto 28px;
}

/* ---------- Volunteer ways-to-help list ---------- */

.way-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.way-list li {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--gray-border);
}

.way-list li:last-child {
  border-bottom: none;
}

.way-num {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
}

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

.site-footer {
  background: var(--navy-dark);
  color: #c3cde0;
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-grid h4 {
  color: var(--white);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 10px;
}

.footer-grid a {
  display: inline-block;
  padding: 4px 0;
  color: #c3cde0;
  font-size: 0.92rem;
}

.footer-grid a:hover {
  color: var(--gold-light);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-brand img {
  height: 40px;
  width: 40px;
}

.social-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.social-row a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.social-row a svg {
  width: 18px;
  height: 18px;
}

.social-row a:hover {
  background: var(--gold);
  color: var(--navy-dark);
}

.social-row--light a {
  background: var(--gray-light);
  color: var(--navy);
}

.social-row--light a:hover {
  background: var(--gold);
  color: var(--navy-dark);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.78rem;
  color: #8a96ac;
}

/* Produced-by credit sits centered between the other two lines on wide
   screens; on narrow screens it drops to the last (bottom) stacked line */
.footer-bottom-copyright {
  order: 1;
}

.footer-bottom-credit {
  order: 2;
}

.footer-bottom-paid-for {
  order: 3;
}

.footer-bottom a {
  color: #8a96ac;
}

.footer-bottom a:hover {
  color: var(--gold-light);
}

/* ---------- Utility ---------- */

.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

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

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 56px 0;
  }

  .hero-photo {
    max-width: 300px;
    margin: 0 auto;
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .donate-amounts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 24px;
    border-bottom: 1px solid var(--gray-border);
    box-shadow: var(--shadow);
    display: none;
  }

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

  .nav-links a:not(.btn) {
    width: 100%;
    padding: 12px 0;
  }

  .nav-links .btn {
    margin-top: 8px;
  }

  .nav-toggle {
    display: block;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .event-card {
    grid-template-columns: 90px 1fr;
  }

  .event-card .btn {
    grid-column: 1 / -1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-bottom-credit {
    order: 3;
  }

  .footer-bottom-paid-for {
    order: 2;
  }

  .donate-amounts {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}
