/* =========================================================
   Pro Animal Ag Foundation — site styles
   Design language adapted from the Myrias research site:
   clean off-white base, fixed left sidebar, card grids,
   long-form content pages. Warm agricultural-green accent.
   ========================================================= */

:root {
  --accent:       #2f7a4f;   /* primary green */
  --accent-dark:  #235c3b;
  --accent-soft:  #e8f1ea;
  --ink:          #222;
  --ink-soft:     #444;
  --muted:        #777;
  --bg:           #ffffff;
  --sidebar-bg:   #f7f8f5;
  --border:       #e6e7e1;
  --border-soft:  #ececea;
  --pig:          #9a5f33;   /* warm brown */
  --chicken:      #c0891e;   /* amber */
}

/* ----- Reset + base ----- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

/* ----- Layout ----- */
.sidebar {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: 260px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 20;
}
.sidebar-inner { padding: 22px 16px 40px; }
.main {
  margin-left: 260px;
  padding: 36px 48px 90px;
  min-height: 100vh;
}

#sidebar-toggle {
  display: none;
  position: fixed;
  top: 10px; left: 10px;
  z-index: 30;
  background: #fff;
  border: 1px solid #d0d0cc;
  width: 38px; height: 38px;
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 880px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; width: 280px; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 60px 18px 64px; }
  #sidebar-toggle { display: block; }
}

/* ----- Sidebar brand + nav ----- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 4px;
  padding: 4px 6px;
  letter-spacing: 0.1px;
  line-height: 1.2;
}
.brand:hover { text-decoration: none; color: var(--accent-dark); }
.brand-mark {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.brand-text { display: flex; flex-direction: column; }
.brand-sub { font-weight: 400; color: var(--muted); font-size: 12.5px; letter-spacing: 0.2px; }

.tagline {
  font-size: 12px;
  color: var(--muted);
  padding: 0 6px 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  line-height: 1.45;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.navlink {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #333;
  font-size: 13.5px;
  padding: 6px 8px;
  border-radius: 4px;
  border-left: 3px solid transparent;
  text-decoration: none;
  line-height: 1.35;
}
.navlink:hover { background: #ecefe9; text-decoration: none; color: #111; }
.navlink.active {
  background: #e6ece6;
  color: #111;
  font-weight: 600;
  border-left-color: var(--accent);
}
.navlink.top { font-weight: 600; }

.nav-group { margin: 6px 0; }
.nav-group > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  padding: 8px 4px 4px;
  list-style: none;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::before {
  content: "\25B8";
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.15s ease;
  font-size: 10px;
  color: #aaa;
}
.nav-group[open] > summary::before { transform: rotate(90deg); }
.nav-children { display: flex; flex-direction: column; gap: 1px; padding-left: 4px; }

.nav-cta {
  display: inline-block;
  margin: 16px 6px 0;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
}
.nav-cta:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }

.sidebar-foot {
  margin-top: 22px;
  padding: 14px 6px 0;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: #999;
  line-height: 1.5;
}

/* ----- Page wrappers ----- */
.home-page, .content-page { max-width: 1080px; }

/* ----- Hero ----- */
.home-hero {
  margin-bottom: 44px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border-soft);
}
.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 14px;
}
.home-hero h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.12;
  margin: 0 0 16px;
  max-width: 820px;
}
.lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 760px;
  margin: 0 0 14px;
  line-height: 1.55;
}
.muted { color: var(--muted); font-size: 14px; max-width: 760px; }

.hero-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 7px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { background: #fafaf7; text-decoration: none; border-color: #cfd2c9; }

/* ----- Sections ----- */
.home-section { margin-bottom: 50px; }
.section-h {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}
.section-intro { color: var(--muted); font-size: 14.5px; max-width: 720px; margin: 0 0 20px; }

/* ----- Focus-area cards (large, two-up) ----- */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}
.focus-card {
  display: block;
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  padding: 22px 24px 20px;
  background: #fff;
  color: var(--ink);
  transition: box-shadow 0.12s, transform 0.12s;
}
.focus-card:hover {
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 4px 18px rgba(0,0,0,0.07);
  transform: translateY(-2px);
}
.focus-card.pig { border-top-color: var(--pig); }
.focus-card.chicken { border-top-color: var(--chicken); }
.focus-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.focus-ico { font-size: 22px; line-height: 1; }
.focus-card h3 { margin: 0 0 8px; font-size: 21px; font-weight: 700; letter-spacing: -0.2px; }
.focus-card p { margin: 0 0 14px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; }
.focus-more { font-size: 13.5px; font-weight: 600; color: var(--accent); }
.focus-card:hover .focus-more { text-decoration: underline; }

/* ----- Activity / "what we do" cards ----- */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.activity-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  background: #fff;
}
.activity-card h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.activity-num {
  width: 24px; height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.activity-card p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }

/* ----- Callout band ----- */
.callout {
  background: var(--accent-soft);
  border: 1px solid #d3e3d6;
  border-radius: 10px;
  padding: 26px 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.callout-text h3 { margin: 0 0 6px; font-size: 19px; font-weight: 700; }
.callout-text p { margin: 0; color: var(--ink-soft); font-size: 14.5px; max-width: 560px; }

/* ----- Content (long-form) pages ----- */
.content-header {
  padding-top: 6px;
  border-top: 4px solid var(--accent);
  margin-bottom: 30px;
}
.content-header.pig { border-top-color: var(--pig); }
.content-header.chicken { border-top-color: var(--chicken); }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: #c5c5bd; margin: 0 4px; }
.content-header h1 {
  margin: 6px 0 10px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.15;
}
.content-header .standfirst { font-size: 17px; color: var(--ink-soft); max-width: 760px; margin: 0; }

.md-body { max-width: 760px; font-size: 16px; line-height: 1.65; color: var(--ink); }
.md-body > *:first-child { margin-top: 0; }
.md-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 38px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.1px;
}
.md-body h3 { font-size: 17px; font-weight: 700; margin: 26px 0 8px; color: #333; }
.md-body p { margin: 0 0 15px; }
.md-body ul, .md-body ol { margin: 0 0 16px; padding-left: 22px; }
.md-body li { margin-bottom: 7px; }
.md-body strong { font-weight: 700; color: #1a1a1a; }
.md-body blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 18px;
  margin: 18px 0;
  color: var(--ink-soft);
  border-radius: 0 6px 6px 0;
}
.md-body blockquote > *:last-child { margin-bottom: 0; }
.md-body a { border-bottom: 1px solid transparent; }
.md-body a:hover { border-bottom-color: var(--accent); text-decoration: none; }

/* Definition / fact list */
.factbox {
  background: #fafbf8;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 24px 0;
}
.factbox h4 {
  margin: 0 0 12px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-weight: 700;
}
.factbox dl { margin: 0; display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; }
.factbox dt { font-weight: 600; color: var(--ink); font-size: 14px; }
.factbox dd { margin: 0; color: var(--ink-soft); font-size: 14px; }
@media (max-width: 560px) { .factbox dl { grid-template-columns: 1fr; gap: 2px 0; } .factbox dd { margin-bottom: 8px; } }

/* Pull stat row */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 26px 0; }
.stat {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 14px 16px;
}
.stat .num { font-size: 24px; font-weight: 800; color: var(--accent-dark); letter-spacing: -0.5px; }
.stat .lbl { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

/* ----- Footer ----- */
.site-footer {
  margin-top: 60px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--muted);
}
.site-footer a { color: var(--ink-soft); }
.footer-brand { font-weight: 700; color: var(--ink); }
.footer-col h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--muted); margin: 0 0 8px; font-weight: 700;
}
.footer-col a { display: block; padding: 2px 0; }
.footer-legal { width: 100%; padding-top: 16px; border-top: 1px solid var(--border-soft); font-size: 12.5px; color: #999; }

/* Print */
@media print {
  .sidebar, #sidebar-toggle { display: none; }
  .main { margin-left: 0; padding: 0; }
}
