/*
Theme Name: Custom Auto Theme
Author: System
Version: 1.0
*/
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

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

:root {
  --color-primary: #1a1a1a;
  --color-accent: #fbbf24;
  --color-bg: #ffffff;
  --color-bg-secondary: #fffbeb;
  --color-text: #111827;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 8px;
  --shadow: 4px 4px 0 var(--color-accent);
  --shadow-sm: 2px 2px 0 var(--color-accent);
  --max-width: 1200px;
  --content-width: 780px;
}

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

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

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

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

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

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  border-bottom: 3px solid var(--color-accent);
}

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

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.site-logo:hover { opacity: 0.85; }

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

.nav-links a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
  text-align: center;
}

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

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.burger span { display: block; width: 24px; height: 2px; background: #e5e7eb; border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }

@media (max-width: 768px) {
  .burger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 3px solid var(--color-accent);
  }
  .nav-links.open { display: flex; }
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  max-width: var(--content-width);
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.breadcrumbs a {
  color: #6b7280;
  text-decoration: none;
  text-align: left;
}

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

.breadcrumbs .sep { margin: 0 0.4rem; color: #d1d5db; }

/* ===== ARTICLE ===== */
.article-wrapper {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: #6b7280;
}

.meta-tag {
  background: var(--color-accent);
  color: var(--color-primary);
  padding: 0.2rem 0.7rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-title {
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 3px solid var(--color-accent);
}

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

/* TOC */
.toc {
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.toc-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.toc ol {
  list-style: none;
  counter-reset: toc-counter;
  padding: 0;
}

.toc li {
  counter-increment: toc-counter;
  margin-bottom: 0.5rem;
}

.toc li::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-accent);
  margin-right: 0.6rem;
}

.toc a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  text-align: left;
  transition: color 0.2s;
}

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

/* Article content */
.article-content h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #f3f4f6;
  position: relative;
}

.article-content h2::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--color-accent);
}

.article-content p {
  margin-bottom: 1.2rem;
}

.article-content .article-img {
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.article-content .article-img img {
  display: block;
  width: 100%;
  border-radius: 0;
}

/* Pull quote */
.pull-quote {
  background: var(--color-primary);
  color: #fff;
  padding: 2rem 2.5rem;
  margin: 2.5rem 0;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1.5;
  position: relative;
  box-shadow: 6px 6px 0 var(--color-accent);
}

.pull-quote::before {
  content: '\201C';
  font-size: 4rem;
  color: var(--color-accent);
  position: absolute;
  top: -0.2rem;
  left: 1rem;
  line-height: 1;
}

.pull-quote-author {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--color-accent);
  font-style: normal;
}

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

.tag {
  background: var(--color-bg-secondary);
  border: 1px solid #e5e7eb;
  color: var(--color-text);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.tag:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-primary);
}

/* Disclaimer */
.disclaimer {
  background: var(--color-bg-secondary);
  border-left: 4px solid var(--color-accent);
  padding: 1.2rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.6;
}

/* ===== QUIZ ===== */
.quiz-section {
  background: var(--color-primary);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow);
}

.quiz-section h3 {
  color: #fff;
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quiz-option {
  display: block;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.15);
  color: #e5e7eb;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
  font-family: var(--font-body);
}

.quiz-option:hover {
  border-color: var(--color-accent);
  background: rgba(251,191,36,0.1);
  color: #fff;
}

.quiz-option.selected {
  border-color: var(--color-accent);
  background: rgba(251,191,36,0.15);
  color: var(--color-accent);
  font-weight: 600;
}

.quiz-result {
  margin-top: 1rem;
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.95rem;
  display: none;
}

.quiz-result.visible { display: block; }

/* ===== SUBSCRIBE FORM ===== */
.subscribe-section {
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow);
  text-align: center;
}

.subscribe-section h3 {
  margin-bottom: 0.5rem;
}

.subscribe-section p {
  color: #6b7280;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

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

.subscribe-form input[type="email"] {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-body);
  background: #fff;
  transition: border-color 0.2s;
}

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

.subscribe-form button {
  background: var(--color-accent);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.subscribe-form button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--color-primary);
  background: #f59e0b;
}

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

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-primary);
  color: #9ca3af;
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.footer-brand .site-logo {
  margin-bottom: 0.8rem;
  display: inline-block;
}

.footer-brand p {
  font-size: 0.88rem;
  max-width: 320px;
  line-height: 1.6;
}

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

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
  text-align: center;
}

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

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #374151;
  font-size: 0.82rem;
  text-align: center;
}

.footer-disclaimer {
  max-width: var(--max-width);
  margin: 1rem auto 0;
  font-size: 0.78rem;
  text-align: center;
  color: #6b7280;
  line-height: 1.5;
}

/* ===== COOKIE MODAL (CSS-only) ===== */
#cookie-toggle { display: none; }

.cookie-banner {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9999;
  background: var(--color-primary);
  color: #e5e7eb;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  max-width: 380px;
  font-size: 0.88rem;
  line-height: 1.5;
  border: 2px solid var(--color-accent);
  transition: transform 0.3s, opacity 0.3s;
}

#cookie-toggle:checked ~ .cookie-banner {
  transform: translateY(200%);
  opacity: 0;
  pointer-events: none;
}

.cookie-banner p { margin-bottom: 1rem; }

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

.cookie-actions label,
.cookie-actions a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
}

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

.cookie-accept:hover { background: #f59e0b; }

.cookie-decline {
  background: transparent;
  color: #9ca3af;
  border: 1px solid #4b5563;
}

.cookie-decline:hover { border-color: #9ca3af; color: #e5e7eb; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.article-wrapper { animation: fadeInUp 0.6s ease-out; }

.article-content h2 { transition: color 0.2s; }
.article-content h2:hover { color: var(--color-accent); }

/* ===== RELATED ARTICLES ===== */
.related-articles {
  margin: 3rem 0 0;
  padding-top: 2rem;
  border-top: 2px solid #f3f4f6;
}

.related-articles h3 { margin-bottom: 1.2rem; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.related-card {
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.related-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
}

.related-card h4 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.related-card span {
  font-size: 0.82rem;
  color: #6b7280;
}
