/*
Theme Name: CPLC Life
Theme URI: https://californiaprolife.org/
Author: California ProLife Council
Description: Front page and layout for California ProLife Council. Matches the 2026 election guide: Inter, navy, gold, and a scrolling side menu.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: cplc-life
*/

:root {
  --cplc-red: #981030;
  --cplc-red-hover: #7c0d28;
  --cplc-bear: #684028;
  --cplc-bear-hover: #52321f;
  --cplc-green: #008048;
  --cplc-flag: #f8f8f8;
  --cplc-bg: #f8f8f8;
  --cplc-text: #2b211c;
  --cplc-muted: #5c5148;
  --cplc-line: #e4ddd6;
  --cplc-slate: #f3efe9;
  --cplc-sidebar: 280px;
  --cplc-radius: 12px;
  --cplc-shadow: 0 1px 2px rgba(104, 64, 40, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cplc-bg);
  color: var(--cplc-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.cplc-shell {
  min-height: 100vh;
}

.cplc-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: var(--cplc-sidebar);
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--cplc-line);
  display: flex;
  flex-direction: column;
  padding: 0 12px 16px;
}

.cplc-brand {
  display: block;
  margin: 0 -12px 10px;
  padding: 0;
  text-decoration: none;
}

.cplc-brand img {
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

.cplc-nav-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.cplc-nav-scroll::-webkit-scrollbar { width: 8px; }
.cplc-nav-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 99px;
}

.cplc-menu,
.cplc-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cplc-item { margin: 1px 0; }

.cplc-item-row,
.cplc-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--cplc-text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cplc-link {
  gap: 10px;
  padding: 8px 14px;
  width: 100%;
}

.cplc-item-row .cplc-link {
  width: auto;
  flex: 1;
  padding-right: 6px;
}

.cplc-link:hover,
.cplc-item.is-active > .cplc-link,
.cplc-item.is-active > .cplc-item-row .cplc-link,
.cplc-item.is-open > .cplc-item-row .cplc-link {
  background: var(--cplc-slate);
}

.cplc-item.is-current > .cplc-link,
.cplc-item.is-current > .cplc-item-row .cplc-link {
  background: rgba(152, 16, 48, 0.12);
  color: var(--cplc-red);
}

.cplc-toggle {
  width: 36px;
  height: 36px;
  margin-right: 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cplc-toggle:hover { background: #eadfd4; color: var(--cplc-bear); }

.cplc-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  margin-top: -3px;
}

.cplc-item.is-open > .cplc-item-row .cplc-chevron,
.cplc-item.is-open > .cplc-toggle .cplc-chevron {
  transform: rotate(225deg);
  margin-top: 2px;
}

.cplc-submenu {
  display: none;
  margin: 2px 0 6px 14px;
  padding-left: 10px;
  border-left: 1px solid var(--cplc-line);
}

.cplc-item.is-open > .cplc-submenu { display: block; }

.cplc-submenu .cplc-link {
  min-height: 38px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  color: #1e293b;
}

.cplc-submenu .cplc-submenu .cplc-link {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
}

.cplc-side-foot {
  padding-top: 12px;
  border-top: 1px solid var(--cplc-line);
  margin-top: 8px;
}

.cplc-donate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  background: var(--cplc-red);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.cplc-donate:hover { background: var(--cplc-red-hover); }

.cplc-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--cplc-line);
}

.cplc-menu-btn,
.cplc-close {
  border: 1px solid var(--cplc-line);
  background: #fff;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 18px;
}

.cplc-topbar img { height: 40px; width: auto; }

.cplc-main {
  margin-left: var(--cplc-sidebar);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.cplc-content {
  flex: 1;
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.cplc-hero {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  min-height: 460px;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(104, 64, 40, 0.16);
  background: var(--cplc-bear) center/cover no-repeat;
}

.cplc-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(104, 64, 40, 0.82) 0%, rgba(152, 16, 48, 0.38) 52%, rgba(104, 64, 40, 0.12) 100%);
}

.cplc-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: 20px;
}

.cplc-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cplc-hero h1 {
  margin: 16px 0 10px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.cplc-hero p {
  margin: 0 0 22px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 36rem;
}

.cplc-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--cplc-red);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.cplc-hero:hover .cplc-hero-btn { background: var(--cplc-red-hover); }

.cplc-section { margin-top: 28px; }

.cplc-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cplc-green);
}

.cplc-section h2 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--cplc-bear);
}

.cplc-lead {
  margin: 0;
  max-width: 46rem;
  color: var(--cplc-muted);
  font-size: 17px;
}

.cplc-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.cplc-card {
  display: block;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--cplc-line);
  border-radius: 16px;
  text-decoration: none;
  box-shadow: var(--cplc-shadow);
}

.cplc-card:hover { border-color: #cbd5e1; background: #f8fafc; }

.cplc-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  color: var(--cplc-bear);
}

.cplc-card span { color: var(--cplc-muted); font-size: 14px; }

.cplc-posts {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.cplc-post {
  display: block;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--cplc-line);
  border-radius: 16px;
  text-decoration: none;
}

.cplc-post time {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cplc-muted);
}

.cplc-entry,
.cplc-page {
  background: #fff;
  border: 1px solid var(--cplc-line);
  border-radius: 16px;
  padding: 28px 28px 36px;
}

.cplc-entry h1,
.cplc-page h1,
.cplc-archive-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--cplc-bear);
}

.cplc-entry-content a,
.cplc-page a { color: var(--cplc-red); }

.cplc-meta { color: var(--cplc-muted); font-size: 13px; margin-bottom: 16px; }

.cplc-site-footer {
  border-top: 1px solid var(--cplc-line);
  padding: 22px 0 8px;
  color: var(--cplc-muted);
  font-size: 13px;
}

.cplc-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 35;
}

body.nav-open .cplc-backdrop { display: block; }

@media (max-width: 900px) {
  .cplc-sidebar {
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: none;
  }
  body.nav-open .cplc-sidebar {
    transform: none;
    box-shadow: 8px 0 30px rgba(15, 23, 42, 0.18);
  }
  .cplc-topbar { display: flex; }
  .cplc-main { margin-left: 0; }
  .cplc-content { width: min(1080px, calc(100% - 28px)); padding-top: 18px; }
  .cplc-cards { grid-template-columns: 1fr; }
  .cplc-hero { min-height: 380px; }
}
