/*
Theme Name: Custom Auto Theme
Author: System
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=DM+Serif+Display&display=swap');

html { scroll-behavior: smooth; }
a { display: inline-block; text-align: center; }

:root {
  --color-primary: #3d5a27;
  --color-accent: #7cb518;
  --color-bg: #f7f9f3;
  --color-bg-secondary: #eef2e6;
  --color-text: #1c2b0e;
  --font-heading: 'DM Serif Display', serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 0px;
  --max-width: 820px;
  --max-width-wide: 1120px;
}

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

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.25;
  color: var(--color-primary);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 0.5em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); margin-bottom: 0.4em; margin-top: 2em; }
h3 { font-size: 1.2rem; }

p { margin-bottom: 1.2em; }

/* ─── HEADER ─── */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-bg-secondary);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header nav {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-logo:hover { color: var(--color-accent); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--color-accent); }

.burger-toggle { display: none; }
.burger-label {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  width: 28px;
}

.burger-label span {
  display: block;
  height: 2px;
  background: var(--color-primary);
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 768px) {
  .burger-label { display: flex; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding-top: 1rem;
  }
  .nav-links a {
    padding: 0.6rem 0;
    width: 100%;
    border-top: 1px solid var(--color-bg-secondary);
  }
  .burger-toggle:checked ~ .nav-links { display: flex; }
  .burger-toggle:checked ~ .burger-label span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .burger-toggle:checked ~ .burger-label span:nth-child(2) { opacity: 0; }
  .burger-toggle:checked ~ .burger-label span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  max-width: var(--max-width);
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.85rem;
  color: #6b7c5a;
}

.breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb-sep { margin: 0 0.4em; }

/* ─── ARTICLE ─── */
.article-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #6b7c5a;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-bg-secondary);
}

.article-meta span { display: flex; align-items: center; gap: 0.3em; }

.article-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--color-primary);
  border-left: 3px solid var(--color-accent);
  padding-left: 1.2rem;
  margin-bottom: 2rem;
}

.article-body h2 {
  padding-top: 0.5em;
  border-top: 1px solid var(--color-bg-secondary);
}

.article-body p { text-align: left; }

/* ─── FEATURED IMAGE / CAROUSEL ─── */
.carousel-wrapper {
  margin-bottom: 2.5rem;
  overflow: hidden;
  position: relative;
  background: var(--color-bg-secondary);
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-track img {
  width: 100%;
  flex-shrink: 0;
  object-fit: cover;
  aspect-ratio: 16/9;
}

.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-primary);
  cursor: pointer;
  transition: background 0.2s;
}

.carousel-dot.active,
.carousel-dot:hover {
  background: var(--color-accent);
}

/* ─── PULL QUOTE ─── */
.pull-quote {
  margin: 2.5rem 0;
  padding: 1.5rem 2rem;
  background: var(--color-bg-secondary);
  border-left: 4px solid var(--color-accent);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-primary);
  font-style: italic;
}

.pull-quote cite {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-style: normal;
  color: #6b7c5a;
}

/* ─── TAGS ─── */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0;
}

.article-tags a {
  font-size: 0.8rem;
  padding: 0.3em 0.8em;
  background: var(--color-bg-secondary);
  color: var(--color-primary);
  text-decoration: none;
  border: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.article-tags a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ─── DISCLAIMER ─── */
.disclaimer-block {
  margin-top: 2.5rem;
  padding: 1.2rem 1.5rem;
  background: var(--color-bg-secondary);
  border-left: 3px solid #b5c49e;
  font-size: 0.88rem;
  color: #6b7c5a;
  line-height: 1.6;
}

/* ─── SUBSCRIBE SECTION ─── */
.subscribe-section {
  max-width: var(--max-width);
  margin: 0 auto 3rem;
  padding: 2.5rem 1.5rem;
  background: var(--color-bg-secondary);
  text-align: center;
}

.subscribe-section h2 {
  margin-top: 0;
  margin-bottom: 0.3em;
}

.subscribe-section p {
  margin-bottom: 1.5rem;
  color: #6b7c5a;
}

.subscribe-form {
  display: flex;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
}

.subscribe-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-primary);
  border-right: none;
  background: var(--color-bg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
}

.subscribe-form input[type="email"]:focus {
  border-color: var(--color-accent);
}

.subscribe-form button {
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.subscribe-form button:hover { background: var(--color-accent); border-color: var(--color-accent); }

@media (max-width: 480px) {
  .subscribe-form {
    flex-direction: column;
    gap: 0.75rem;
  }
  .subscribe-form input[type="email"] { border-right: 1px solid var(--color-primary); }
}

/* ─── FOOTER ─── */
.site-footer {
  background: var(--color-primary);
  color: #c8d8b8;
  padding: 2.5rem 1.5rem;
  font-size: 0.88rem;
}

.footer-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: center;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: #fff;
  text-decoration: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
}

.footer-links a {
  color: #c8d8b8;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--color-accent); }

.footer-copy { font-size: 0.82rem; color: #96a886; }

.footer-disclaimer {
  max-width: 600px;
  font-size: 0.78rem;
  color: #96a886;
  line-height: 1.55;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
}

/* ─── COOKIE BANNER (NO JS) ─── */
#cookie-check { display: none; }

.cookie-banner {
  display: none;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  max-width: 360px;
  width: calc(100% - 2rem);
  background: var(--color-primary);
  color: #e8f0da;
  padding: 1.2rem 1.5rem;
  z-index: 9999;
  font-size: 0.85rem;
  line-height: 1.55;
  border-radius: var(--radius);
}

#cookie-check:checked ~ .cookie-banner { display: block; }
#cookie-check:not(:checked) ~ .cookie-banner { display: none; }

.cookie-banner p { margin-bottom: 0.8rem; color: #e8f0da; }

.cookie-banner a { color: var(--color-accent); }

.cookie-actions {
  display: flex;
  gap: 0.5rem;
}

.cookie-actions label,
.cookie-actions a {
  padding: 0.4em 1em;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.cookie-accept {
  background: var(--color-accent);
  color: var(--color-primary);
}

.cookie-accept:hover { background: #8ec926; }

.cookie-decline {
  background: transparent;
  color: #c8d8b8;
  border: 1px solid #c8d8b8;
}

.cookie-decline:hover { background: rgba(255,255,255,0.08); }

/* ─── CATEGORY LABEL ─── */
.category-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

/* ─── 404 PAGE ─── */
.page-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  padding: 2rem 1.5rem;
}

.page-404 h1 { font-size: clamp(4rem, 12vw, 8rem); color: var(--color-bg-secondary); margin-bottom: 0; }
.page-404 h2 { font-size: 1.4rem; margin-top: 0.5rem; }
.page-404 p { margin: 1rem 0 2rem; color: #6b7c5a; }
.page-404 a {
  padding: 0.7em 2em;
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}
.page-404 a:hover { background: var(--color-accent); }

/* ─── POLICY / LEGAL PAGES ─── */
.legal-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.legal-container h1 { margin-bottom: 1rem; }
.legal-container h2 { margin-top: 2rem; font-size: 1.3rem; border-top: none; }

/* ─── SUCCESS PAGE ─── */
.success-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 3rem 1.5rem;
}

.success-page h1 { color: var(--color-accent); }
.success-page p { margin: 1rem 0 2rem; color: #6b7c5a; max-width: 480px; }
.success-page a {
  padding: 0.7em 2em;
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}
.success-page a:hover { background: var(--color-accent); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.article-container { animation: fadeUp 0.5s ease both; }

/* ─── HOME HERO (for home article) ─── */
.home-articles {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.article-card {
  background: var(--color-bg-secondary);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}

.article-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.article-card h3 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.article-card p {
  font-size: 0.9rem;
  color: #6b7c5a;
}
