/* ==========================================================================
   Farm Credit Services of Colusa-Glenn, ACA — shared site styles
   Centered, semantic, responsive, accessible.
   ========================================================================== */

:root {
  --green-950: #0d2b1d;
  --green-800: #1c4f38;
  --green-700: #276246;   /* primary */
  --green-600: #38765a;
  --green-100: #e7f0ea;
  --green-50:  #f3f8f4;
  --gold:      #c9a227;
  --gold-dark: #a8871b;
  --cream:     #faf6ee;
  --ink:       #202a25;
  --muted:     #5c6b63;
  --border:    #e2dccb;
  --white:     #ffffff;
  --danger:    #b3423a;

  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 8px 24px rgba(32, 42, 37, 0.08);
  --shadow-sm: 0 2px 8px rgba(32, 42, 37, 0.06);
  --maxw:      1120px;

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.65;
  background: var(--cream);
}

img { max-width: 100%; height: auto; vertical-align: middle; }

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

h1, h2, h3, h4 { line-height: 1.2; color: var(--green-950); margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em 1.2em; padding: 0; }

/* Accessibility helpers */
.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; left: 12px; top: -60px; z-index: 300;
  background: var(--green-800); color: #fff; padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

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

/* ----------------------------- Header / Nav ----------------------------- */
.brandbar {
  background: linear-gradient(120deg, var(--green-950) 0%, var(--green-800) 55%, var(--green-700) 100%);
  color: #fff;
  padding: 22px 0;
}
.brand {
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
}
.brand img { width: 74px; height: auto; border-radius: 10px; box-shadow: var(--shadow-sm); }
.brand h1, .brand p { margin: 0; color: #fff; }
.brand .name { font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.15; }
.brand .tagline { font-size: .95rem; color: var(--green-100); }

nav.mainnav {
  position: sticky; top: 0; z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
nav.mainnav .container {
  display: flex; flex-wrap: wrap; gap: 0 6px;
  justify-content: center;
}
nav.mainnav a {
  color: var(--ink);
  padding: 14px 14px;
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
nav.mainnav a:hover { text-decoration: none; color: var(--green-700); border-color: var(--green-100); }
nav.mainnav a[aria-current="page"] { color: var(--green-700); border-color: var(--green-700); }

/* ------------------------------- Layout --------------------------------- */
main { padding: 40px 0 48px; }
.page-head {
  background: linear-gradient(120deg, var(--green-700), var(--green-600));
  color: #fff; padding: 30px 0 34px;
}
.page-head h1 { color: #fff; margin: 0 0 4px; }
.page-head p { color: var(--green-100); margin: 0; max-width: 760px; }

.section { margin: 0 0 44px; }
.section-head { margin-bottom: 18px; }
.section-head .kicker {
  display: inline-block; font-weight: 700; font-size: .8rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dark);
  margin-bottom: 6px;
}

/* Card grid */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.card h3 { margin: 0 0 8px; }
.card p { color: var(--muted); font-size: .97rem; }
.card .more { margin-top: auto; padding-top: 12px; font-weight: 600; }

/* Panels / highlight */
.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.hero {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  display: grid; gap: 28px;
}
.hero h2 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); }
.hero .stats { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.stat { text-align: center; padding: 14px; background: var(--green-50); border-radius: var(--radius-sm); }
.stat strong { display: block; font-size: 1.4rem; color: var(--green-700); }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: .95rem;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .1s ease, background .15s ease, box-shadow .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-800); }
.btn-gold { background: var(--gold); color: var(--green-950); }
.btn-gold:hover { background: var(--gold-dark); color: var(--green-950); }
.btn-outline { background: transparent; color: var(--green-700); border-color: var(--green-700); }
.btn-outline:hover { background: var(--green-50); }

/* CTA band */
.cta {
  background: linear-gradient(120deg, var(--green-800), var(--green-600));
  color: #fff; border-radius: var(--radius); padding: 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cta h2, .cta p { color: #fff; }
.cta p { margin: 0; }

/* Callout */
.callout {
  background: var(--green-100);
  border-left: 5px solid var(--green-700);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px; margin: 0 0 1.2em;
}
.callout.gold { background: #f7efd8; border-left-color: var(--gold); }

/* Contact / details lists */
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  padding: 14px 0; border-bottom: 1px solid var(--border);
  display: flex; gap: 12px; align-items: flex-start;
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list .ico { flex: 0 0 22px; margin-top: 3px; }
.office { margin-bottom: 22px; }
.office h3 { margin-bottom: 4px; }

/* Downloads table */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
th { background: var(--green-800); color: #fff; font-size: .92rem; }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--green-50); }

/* FAQ accordion */
details {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden;
}
summary {
  cursor: pointer; padding: 16px 18px; font-weight: 700;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; color: var(--green-700); line-height: 1; }
details[open] summary::after { content: "–"; }
details .body { padding: 0 18px 16px; color: var(--muted); }

/* Breadcrumbs */
.breadcrumb { font-size: .9rem; color: var(--muted); margin: 0 0 16px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.breadcrumb a { color: var(--green-700); }

/* Trust area */
.trust { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: center; }
.trust img { width: 92px; height: auto; filter: drop-shadow(var(--shadow-sm)); }

/* --------------------------------- Footer -------------------------------- */
footer.site-footer {
  background: var(--green-950);
  color: #cfdcd4;
  padding: 40px 0 26px;
  margin-top: 40px;
}
.site-footer a { color: var(--green-100); }
.site-footer .cols { display: grid; gap: 28px; grid-template-columns: 2fr 1fr 1fr 1fr; margin-bottom: 26px; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; }
.site-footer li { margin: 6px 0; font-size: .94rem; }
.site-footer .fine {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px;
  font-size: .85rem; color: #9fb4a9;
}

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero .stats { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; }
  main { padding: 28px 0 32px; }
  nav.mainnav a { padding: 12px 12px; font-size: .9rem; }
  .cta { flex-direction: column; text-align: left; align-items: flex-start; }
}
