/* ============================================
   CoopKeeper Theme — ChickenCoopGPT
   Visual Identity: Warm barnyard palette
   - Barn Red #B23A1F, Warm Amber #E8A33D
   - Sage Green #5B7553, Cream #FBF6EE
   - Charcoal #2A2017, Muted #8A7960
   Type: Source Serif 4 (headings) + Inter (body)
   ============================================ */

:root {
  --coop-barn: #B23A1F;
  --coop-barn-dark: #8B2E18;
  --coop-amber: #E8A33D;
  --coop-amber-light: #F5C26B;
  --coop-sage: #5B7553;
  --coop-sage-light: #7A9670;
  --coop-cream: #FBF6EE;
  --coop-cream-dark: #F0E6D6;
  --coop-charcoal: #2A2017;
  --coop-muted: #8A7960;
  --coop-border: #E5D9C6;
  --coop-white: #FFFFFF;
  --coop-shadow: 0 2px 8px rgba(42, 32, 23, 0.08);
  --coop-shadow-lg: 0 4px 20px rgba(42, 32, 23, 0.12);
  --coop-radius: 10px;
  --coop-max: 1200px;
  --coop-font-head: 'Source Serif 4', Georgia, serif;
  --coop-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--coop-font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--coop-charcoal);
  background: var(--coop-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--coop-font-head);
  font-weight: 700;
  line-height: 1.25;
  color: var(--coop-charcoal);
}

a { color: var(--coop-barn); text-decoration: none; }
a:hover { color: var(--coop-barn-dark); text-decoration: underline; }

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

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

/* ============================================
   HEADER
   ============================================ */
.coop-header {
  background: var(--coop-white);
  border-bottom: 3px solid var(--coop-barn);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--coop-shadow);
}

.coop-header-inner {
  max-width: var(--coop-max);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.coop-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.coop-logo-mark {
  width: 40px;
  height: 40px;
  background: var(--coop-barn);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--coop-amber);
  font-size: 22px;
  font-weight: 700;
  font-family: var(--coop-font-head);
  flex-shrink: 0;
}

.coop-logo-text {
  font-family: var(--coop-font-head);
  font-size: 24px;
  font-weight: 700;
  color: var(--coop-charcoal);
}

.coop-logo-text span { color: var(--coop-barn); }

.coop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.coop-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--coop-charcoal);
  text-decoration: none;
  padding: 6px 0;
  position: relative;
}

.coop-nav a:hover { color: var(--coop-barn); }
.coop-nav a:hover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--coop-amber);
}

.coop-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--coop-charcoal);
}

@media (max-width: 768px) {
  .coop-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--coop-white);
    padding: 20px;
    border-bottom: 3px solid var(--coop-barn);
    box-shadow: var(--coop-shadow-lg);
    gap: 16px;
  }
  .coop-nav.open { display: flex; }
  .coop-nav-toggle { display: block; }
}

/* ============================================
   HERO (Front Page)
   ============================================ */
.coop-hero {
  background: linear-gradient(135deg, var(--coop-sage) 0%, var(--coop-sage-light) 100%);
  padding: 60px 0 50px;
  position: relative;
  overflow: hidden;
}

.coop-hero::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 300px;
  height: 300px;
  background: rgba(232, 163, 61, 0.15);
  border-radius: 50%;
}

.coop-hero-inner {
  max-width: var(--coop-max);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.coop-hero h1 {
  font-size: 44px;
  line-height: 1.15;
  color: var(--coop-white);
  margin-bottom: 16px;
}

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

.coop-hero p {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 28px;
  line-height: 1.6;
}

.coop-hero-cta {
  display: inline-block;
  background: var(--coop-amber);
  color: var(--coop-charcoal);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 32px;
  border-radius: var(--coop-radius);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.coop-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  color: var(--coop-charcoal);
  text-decoration: none;
}

.coop-hero-search {
  background: var(--coop-white);
  border-radius: var(--coop-radius);
  padding: 24px;
  box-shadow: var(--coop-shadow-lg);
}

.coop-hero-search h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--coop-charcoal);
}

.coop-search-form {
  display: flex;
  gap: 8px;
}

.coop-search-form input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--coop-border);
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--coop-font-body);
  outline: none;
  transition: border-color 0.2s;
}

.coop-search-form input:focus { border-color: var(--coop-amber); }

.coop-search-form button {
  background: var(--coop-barn);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.coop-search-form button:hover { background: var(--coop-barn-dark); }

.coop-hero-trust {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.coop-trust-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.coop-trust-badge svg { width: 20px; height: 20px; flex-shrink: 0; }

@media (max-width: 768px) {
  .coop-hero-inner { grid-template-columns: 1fr; }
  .coop-hero h1 { font-size: 32px; }
}

/* ============================================
   FEATURED CATEGORIES
   ============================================ */
.coop-section {
  padding: 50px 0;
}

.coop-section-title {
  text-align: center;
  margin-bottom: 12px;
  font-size: 32px;
}

.coop-section-sub {
  text-align: center;
  color: var(--coop-muted);
  font-size: 16px;
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.coop-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.coop-cat-card {
  background: var(--coop-white);
  border-radius: var(--coop-radius);
  padding: 28px 20px;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--coop-border);
}

.coop-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--coop-shadow-lg);
  text-decoration: none;
}

.coop-cat-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--coop-cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
}

.coop-cat-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: var(--coop-charcoal);
}

.coop-cat-card p {
  font-size: 14px;
  color: var(--coop-muted);
}

/* ============================================
   LATEST ARTICLES
   ============================================ */
.coop-articles {
  background: var(--coop-white);
}

.coop-article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.coop-article-card {
  background: var(--coop-cream);
  border-radius: var(--coop-radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--coop-border);
  display: flex;
  flex-direction: column;
}

.coop-article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--coop-shadow-lg);
}

.coop-article-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--coop-cream-dark);
}

.coop-article-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.coop-article-cat {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--coop-barn);
  margin-bottom: 8px;
}

.coop-article-card h3 {
  font-size: 18px;
  line-height: 1.35;
  margin-bottom: 10px;
}

.coop-article-card h3 a {
  color: var(--coop-charcoal);
  text-decoration: none;
}

.coop-article-card h3 a:hover { color: var(--coop-barn); }

.coop-article-excerpt {
  font-size: 14px;
  color: var(--coop-muted);
  margin-bottom: 16px;
  flex: 1;
}

.coop-article-meta {
  font-size: 13px;
  color: var(--coop-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.coop-article-readmore {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--coop-barn);
  text-decoration: none;
}

.coop-article-readmore:hover { text-decoration: underline; }

/* ============================================
   WHY TRUST US
   ============================================ */
.coop-trust-section {
  background: var(--coop-cream-dark);
}

.coop-trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.coop-trust-item {
  text-align: center;
  padding: 24px;
}

.coop-trust-item-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--coop-white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
  box-shadow: var(--coop-shadow);
}

.coop-trust-item h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.coop-trust-item p {
  color: var(--coop-muted);
  font-size: 15px;
}

/* ============================================
   NEWSLETTER
   ============================================ */
.coop-newsletter {
  background: var(--coop-barn);
  padding: 48px 0;
  text-align: center;
}

.coop-newsletter h2 {
  color: var(--coop-white);
  font-size: 28px;
  margin-bottom: 12px;
}

.coop-newsletter p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.coop-newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 450px;
  margin: 0 auto;
}

.coop-newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--coop-font-body);
  outline: none;
}

.coop-newsletter-form button {
  background: var(--coop-amber);
  color: var(--coop-charcoal);
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.coop-newsletter-form button:hover { background: var(--coop-amber-light); }

/* ============================================
   FOOTER
   ============================================ */
.coop-footer {
  background: var(--coop-charcoal);
  color: var(--coop-cream);
  padding: 48px 0 0;
}

.coop-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: var(--coop-max);
  margin: 0 auto;
  padding: 0 20px;
}

.coop-footer-brand h3 {
  color: var(--coop-amber);
  font-size: 22px;
  margin-bottom: 12px;
}

.coop-footer-brand p {
  color: rgba(251, 246, 238, 0.7);
  font-size: 15px;
  line-height: 1.6;
}

.coop-footer-col h4 {
  color: var(--coop-white);
  font-size: 16px;
  margin-bottom: 14px;
  font-family: var(--coop-font-body);
  font-weight: 600;
}

.coop-footer-col ul {
  list-style: none;
  padding: 0;
}

.coop-footer-col li { margin-bottom: 8px; }

.coop-footer-col a {
  color: rgba(251, 246, 238, 0.7);
  font-size: 15px;
  text-decoration: none;
}

.coop-footer-col a:hover { color: var(--coop-amber); }

.coop-footer-disclosure {
  max-width: var(--coop-max);
  margin: 32px auto 0;
  padding: 20px 20px 0;
  border-top: 1px solid rgba(251, 246, 238, 0.1);
}

.coop-footer-disclosure p {
  font-size: 13px;
  color: rgba(251, 246, 238, 0.5);
  line-height: 1.5;
}

.coop-footer-bottom {
  max-width: var(--coop-max);
  margin: 0 auto;
  padding: 20px;
  text-align: center;
  border-top: 1px solid rgba(251, 246, 238, 0.1);
  margin-top: 20px;
}

.coop-footer-bottom p {
  font-size: 14px;
  color: rgba(251, 246, 238, 0.5);
}

@media (max-width: 768px) {
  .coop-footer-grid { grid-template-columns: 1fr 1fr; }
  .coop-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .coop-footer-grid { grid-template-columns: 1fr; }
}

/* ============================================
   SINGLE POST / PAGE
   ============================================ */
.coop-content-wrapper {
  background: var(--coop-white);
  padding: 40px 0;
}

.coop-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.coop-content h1 {
  font-size: 36px;
  margin-bottom: 16px;
  line-height: 1.2;
}

.coop-content h2 {
  font-size: 26px;
  margin-top: 36px;
  margin-bottom: 14px;
}

.coop-content h3 {
  font-size: 21px;
  margin-top: 28px;
  margin-bottom: 10px;
}

.coop-content p {
  margin-bottom: 18px;
  line-height: 1.7;
}

.coop-content ul, .coop-content ol {
  margin-bottom: 18px;
  padding-left: 24px;
}

.coop-content li { margin-bottom: 8px; line-height: 1.65; }

.coop-content img {
  border-radius: var(--coop-radius);
  margin: 20px 0;
}

.coop-content blockquote {
  border-left: 4px solid var(--coop-amber);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--coop-cream);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--coop-muted);
}

.coop-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.coop-content th, .coop-content td {
  padding: 12px 16px;
  border: 1px solid var(--coop-border);
  text-align: left;
}

.coop-content th {
  background: var(--coop-cream-dark);
  font-weight: 600;
}

.coop-content .cegg-gridbox {
  border: 1px solid var(--coop-border) !important;
  border-radius: var(--coop-radius) !important;
  padding: 12px !important;
  background: var(--coop-cream) !important;
}

.coop-content .cegg-btn-grid .btn {
  background: var(--coop-barn) !important;
  border-radius: 6px !important;
  border: none !important;
  font-weight: 600 !important;
  padding: 10px 20px !important;
}

.coop-content .cegg-btn-grid .btn:hover {
  background: var(--coop-barn-dark) !important;
}

/* Article meta bar */
.coop-article-header {
  max-width: 800px;
  margin: 0 auto 20px;
  padding: 0 20px;
}

.coop-article-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--coop-muted);
  padding: 12px 0;
  border-bottom: 1px solid var(--coop-border);
  margin-bottom: 24px;
}

.coop-article-meta-bar .author {
  font-weight: 600;
  color: var(--coop-charcoal);
}

/* FAQ Section */
.coop-faq {
  max-width: 800px;
  margin: 40px auto 0;
  padding: 0 20px;
}

.coop-faq h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.coop-faq-item {
  border: 1px solid var(--coop-border);
  border-radius: var(--coop-radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.coop-faq-question {
  padding: 16px 20px;
  font-family: var(--coop-font-head);
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  background: var(--coop-cream);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.coop-faq-answer {
  padding: 0 20px 16px;
  display: none;
}

.coop-faq-item.open .coop-faq-answer { display: block; }

/* Breadcrumbs */
.coop-breadcrumbs {
  font-size: 13px;
  color: var(--coop-muted);
  margin-bottom: 16px;
}

.coop-breadcrumbs a { color: var(--coop-muted); }
.coop-breadcrumbs a:hover { color: var(--coop-barn); }
.coop-breadcrumbs span { margin: 0 6px; }

/* ============================================
   PAGE LAYOUT (About, Contact, etc.)
   ============================================ */
.coop-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.coop-page h1 {
  font-size: 34px;
  margin-bottom: 24px;
}

/* Contact form */
.coop-contact-form {
  display: grid;
  gap: 16px;
  max-width: 600px;
  margin-top: 24px;
}

.coop-contact-form label {
  font-weight: 600;
  font-size: 15px;
  color: var(--coop-charcoal);
}

.coop-contact-form input,
.coop-contact-form textarea {
  padding: 12px 16px;
  border: 2px solid var(--coop-border);
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--coop-font-body);
  outline: none;
  transition: border-color 0.2s;
}

.coop-contact-form input:focus,
.coop-contact-form textarea:focus { border-color: var(--coop-amber); }

.coop-contact-form button {
  background: var(--coop-barn);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  justify-self: start;
}

.coop-contact-form button:hover { background: var(--coop-barn-dark); }

.coop-contact-info {
  background: var(--coop-cream);
  padding: 24px;
  border-radius: var(--coop-radius);
  margin-top: 24px;
}

.coop-contact-info h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.coop-contact-info p { margin-bottom: 8px; }

/* ============================================
   UTILITIES
   ============================================ */
.coop-cta-btn {
  display: inline-block;
  background: var(--coop-barn);
  color: white;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--coop-radius);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.coop-cta-btn:hover {
  background: var(--coop-barn-dark);
  transform: translateY(-2px);
  color: white;
  text-decoration: none;
}

.coop-eyebrow {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--coop-barn);
  margin-bottom: 8px;
}

.coop-tag {
  display: inline-block;
  background: var(--coop-cream-dark);
  color: var(--coop-muted);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  margin: 2px;
}

/* Ad slot */
.coop-ad-slot {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--coop-cream);
  border: 1px dashed var(--coop-border);
  border-radius: 8px;
  margin: 1.5em 0;
}

/* Responsive */
@media (max-width: 768px) {
  .coop-content h1 { font-size: 28px; }
  .coop-content h2 { font-size: 22px; }
  .coop-section-title { font-size: 26px; }
  .coop-newsletter-form { flex-direction: column; }
}
