/*
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');

:root {
  --primary: #3d5a27;
  --accent: #7cb518;
  --bg: #f7f9f3;
  --bg-sec: #eef2e6;
  --text: #1c2b0e;
  --text-light: #4a6634;
  --border: #c8d6b8;
  --radius: 0px;
  --max-w: 760px;
  --max-w-wide: 1140px;
}

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

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'DM Serif Display', serif;
  color: var(--primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0.5em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 2em 0 0.6em; }

p { margin-bottom: 1.2em; }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

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

.header-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  color: var(--primary);
  text-decoration: none;
  text-align: left;
}

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

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

.nav-menu a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  text-align: center;
}

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

.burger-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 768px) {
  .burger-btn { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
  }
  .nav-menu.active { display: flex; }
  .nav-menu a { text-align: left; width: 100%; padding: 0.4rem 0; }
}

/* BREADCRUMBS */
.breadcrumbs {
  max-width: var(--max-w);
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.breadcrumbs a {
  color: var(--text-light);
  text-decoration: none;
  text-align: left;
}

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

.breadcrumbs span { color: var(--border); }

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

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

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

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

.article-img {
  margin: 2rem 0;
}

.article-img img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.article-img figcaption {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  text-align: left;
}

/* PULL QUOTE */
.pull-quote {
  margin: 2.5rem 0;
  padding: 1.5rem 2rem;
  background: var(--bg-sec);
  border-left: 4px solid var(--accent);
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--primary);
}

.pull-quote cite {
  display: block;
  margin-top: 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--text-light);
}

/* EXPERT QUOTE */
.expert-quote {
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--bg-sec);
  border: 1px solid var(--border);
}

.expert-quote p {
  font-size: 1.05rem;
  font-style: italic;
  margin-bottom: 0.75rem;
}

.expert-quote cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--text-light);
  display: block;
}

/* SOURCES */
.sources {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-sec);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.sources h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.sources ol {
  padding-left: 1.2rem;
}

.sources li {
  margin-bottom: 0.4rem;
  color: var(--text-light);
}

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

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

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

/* DISCLAIMER */
.disclaimer {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: #fefef5;
  border: 1px solid #e0daa0;
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* SUBSCRIBE */
.subscribe-section {
  max-width: var(--max-w);
  margin: 0 auto 3rem;
  padding: 2rem 1.5rem;
}

.subscribe-box {
  background: var(--bg-sec);
  border: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
}

.subscribe-box h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.subscribe-box p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

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

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

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

.subscribe-form button {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: var(--radius);
}

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

@media (max-width: 480px) {
  .subscribe-form { flex-direction: column; }
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-sec);
  padding: 2.5rem 1.5rem;
}

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

.footer-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--primary);
  text-decoration: none;
}

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

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-light);
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--text-light);
  max-width: 600px;
  line-height: 1.5;
  opacity: 0.8;
}

/* COOKIE MODAL — CSS ONLY */
#cookie-consent { display: none; }
#cookie-consent:checked ~ .cookie-bar { display: flex; }
#cookie-consent:not(:checked) ~ .cookie-bar { display: none; }

.cookie-bar {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  max-width: 380px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  z-index: 999;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  animation: slideUp 0.4s ease;
}

.cookie-bar p { margin-bottom: 0; color: var(--text); }

.cookie-bar a { color: var(--accent); text-decoration: underline; text-align: left; }

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

.cookie-actions label {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: background 0.2s;
}

.cookie-accept {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary) !important;
}

.cookie-accept:hover { background: var(--accent); border-color: var(--accent) !important; }

.cookie-decline {
  background: var(--bg);
  color: var(--text);
}

.cookie-decline:hover { background: var(--bg-sec); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* HERO for home */
.hero-home {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-home-text h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }

@media (max-width: 768px) {
  .hero-home { grid-template-columns: 1fr; padding: 2rem 1.5rem; }
}

/* ARTICLES GRID on home */
.articles-grid {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.articles-grid h2 {
  margin-bottom: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card-article {
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
}

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

.card-article-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-article-body .cat {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.4rem;
  text-align: left;
}

.card-article-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  flex: 1;
}

.card-article-body h3 a {
  color: var(--primary);
  text-decoration: none;
  text-align: left;
}

.card-article-body h3 a:hover { color: var(--accent); }

.card-article-body .card-meta {
  font-size: 0.82rem;
  color: var(--text-light);
}

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
}

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

.success-wrap h1 { margin-bottom: 0.5rem; }
.success-wrap p { color: var(--text-light); margin-bottom: 2rem; font-size: 1.1rem; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 0.85rem 2rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--accent); }

/* POLICY / TERMS pages */
.legal-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.legal-wrap h1 { margin-bottom: 1.5rem; }
.legal-wrap h2 { font-size: 1.2rem; margin: 2rem 0 0.5rem; }
.legal-wrap p { margin-bottom: 1rem; color: var(--text); }

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

.page-404 .code-404 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(5rem, 15vw, 10rem);
  color: var(--border);
  line-height: 1;
}

.page-404 h1 { margin-bottom: 0.5rem; font-size: 1.5rem; }
.page-404 p { color: var(--text-light); margin-bottom: 2rem; }

/* FOCUS STATES for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* TRANSITIONS */
a, button, input { transition: all 0.2s ease; }
