/*
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 {
  --primary: #1a3a6b;
  --accent: #00a8a8;
  --bg: #f0f4ff;
  --bg-sec: #e8eef8;
  --text: #1a1a2e;
  --text-light: #4a5568;
  --white: #ffffff;
  --radius: 8px;
  --shadow: 4px 4px 0px var(--primary);
  --shadow-sm: 2px 2px 0px var(--accent);
  --shadow-hover: 6px 6px 0px var(--accent);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --max-w: 1200px;
  --content-w: 780px;
}

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

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

h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.25; color: var(--primary); }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 600; margin-top: 2.5rem; margin-bottom: 1rem; }

p { margin-bottom: 1.1rem; }

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

/* === HEADER === */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  position: sticky; top: 0; z-index: 100;
}
.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem; font-weight: 700;
  color: var(--primary); text-decoration: none;
  letter-spacing: -0.5px;
}
.logo:hover { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a {
  color: var(--text); text-decoration: none;
  font-size: 0.95rem; font-weight: 500;
  padding: 0.3rem 0; border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.nav-links a:hover { border-color: var(--accent); color: var(--accent); }
.menu-toggle-input { display: none; }
.burger-btn { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.burger-btn span {
  display: block; width: 26px; height: 3px;
  background: var(--primary); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 768px) {
  .burger-btn { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); flex-direction: column;
    padding: 1rem 1.5rem; border-bottom: 3px solid var(--primary);
    box-shadow: 0 8px 24px rgba(26,58,107,0.12);
  }
  .nav-links a { padding: 0.6rem 0; }
  .menu-toggle-input:checked ~ .nav-links { display: flex; }
  .menu-toggle-input:checked ~ .burger-btn span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
  .menu-toggle-input:checked ~ .burger-btn span:nth-child(2) { opacity: 0; }
  .menu-toggle-input:checked ~ .burger-btn span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }
}

/* === BREADCRUMBS === */
.breadcrumbs {
  max-width: var(--content-w); margin: 1.5rem auto 0;
  padding: 0 1.5rem; font-size: 0.85rem; color: var(--text-light);
}
.breadcrumbs a { color: var(--accent); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.bc-sep { margin: 0 0.4rem; color: var(--text-light); }

/* === ARTICLE === */
.article-page { padding-bottom: 3rem; }
.article-content {
  max-width: var(--content-w); margin: 0 auto;
  padding: 2rem 1.5rem;
}
.article-category {
  display: inline-block;
  background: var(--accent); color: var(--white);
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
  padding: 0.25rem 0.75rem; border-radius: 4px;
  letter-spacing: 0.5px; margin-bottom: 0.8rem;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 1rem;
  font-size: 0.88rem; color: var(--text-light);
  margin: 1rem 0 2rem; padding-bottom: 1.2rem;
  border-bottom: 2px solid var(--bg-sec);
}
.article-lead { font-size: 1.12rem; color: var(--text); line-height: 1.8; margin-bottom: 2rem; }
.article-lead p { font-weight: 500; }
.article-hero-img { margin: 2rem 0; box-shadow: var(--shadow); }

/* Audio player */
.audio-player {
  background: var(--bg-sec); border-radius: var(--radius);
  padding: 1rem 1.2rem; margin-bottom: 2rem;
  border-left: 4px solid var(--accent);
}
.audio-label { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--primary); }
.audio-player audio { width: 100%; }

/* TOC */
.toc {
  background: var(--white); border: 2px solid var(--primary);
  border-radius: var(--radius); padding: 1.5rem;
  margin-bottom: 2rem; box-shadow: var(--shadow-sm);
}
.toc-title { font-family: var(--font-heading); font-weight: 700; color: var(--primary); margin-bottom: 0.8rem; font-size: 1.05rem; }
.toc ol { padding-left: 1.2rem; }
.toc li { margin-bottom: 0.4rem; }
.toc a { color: var(--accent); text-decoration: none; font-size: 0.95rem; text-align: left; }
.toc a:hover { text-decoration: underline; }

/* Reading time widget */
.reading-time-widget {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: var(--white);
  padding: 0.5rem 1rem; border-radius: var(--radius);
  font-size: 0.88rem; margin-bottom: 2rem;
}
.rtw-icon { font-size: 1.1rem; }

/* Pull quote */
.pull-quote {
  border-left: 5px solid var(--accent);
  background: var(--bg-sec); padding: 1.5rem 2rem;
  margin: 2.5rem 0; border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
}
.pull-quote p { font-family: var(--font-heading); font-size: 1.15rem; font-style: italic; color: var(--primary); margin-bottom: 0.5rem; }
.pull-quote cite { font-size: 0.88rem; color: var(--text-light); font-style: normal; }

/* Tags */
.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2rem 0; }
.tag {
  background: var(--bg-sec); color: var(--primary);
  padding: 0.3rem 0.8rem; border-radius: 20px;
  font-size: 0.82rem; font-weight: 500;
  border: 1px solid rgba(26,58,107,0.15);
  transition: background 0.2s;
}
.tag:hover { background: var(--accent); color: var(--white); }

/* Myths */
.myths-section { margin: 3rem 0; }
.myths-section h2 { text-align: center; margin-bottom: 1.5rem; }
.myths-grid { display: grid; gap: 1.2rem; }
.myth-card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
  border: 1px solid rgba(26,58,107,0.08);
  transition: box-shadow 0.2s, transform 0.2s;
}
.myth-card:hover { box-shadow: var(--shadow-hover); transform: translate(-2px, -2px); }
.myth-label {
  display: inline-block; background: #e74c3c; color: var(--white);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  padding: 0.15rem 0.6rem; border-radius: 3px; margin-bottom: 0.4rem;
  letter-spacing: 0.5px;
}
.reality-label {
  display: inline-block; background: var(--accent); color: var(--white);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  padding: 0.15rem 0.6rem; border-radius: 3px; margin-bottom: 0.4rem;
  margin-top: 0.8rem; letter-spacing: 0.5px;
}
.myth-text, .reality-text { font-size: 0.95rem; line-height: 1.6; margin-bottom: 0; }

/* Read also */
.read-also {
  max-width: var(--content-w); margin: 2rem auto;
  padding: 0 1.5rem;
}
.read-also h2 { text-align: center; margin-bottom: 1.5rem; }
.read-also-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.read-also-card {
  display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--white); border-radius: var(--radius);
  padding: 1.2rem; text-decoration: none; color: var(--text);
  box-shadow: var(--shadow-sm); border: 1px solid rgba(26,58,107,0.08);
  transition: box-shadow 0.2s, transform 0.2s;
  text-align: left;
}
.read-also-card:hover { box-shadow: var(--shadow-hover); transform: translate(-2px, -2px); }
.read-also-tag { font-size: 0.72rem; text-transform: uppercase; color: var(--accent); font-weight: 600; letter-spacing: 0.5px; }
.read-also-title { font-family: var(--font-heading); font-weight: 600; font-size: 1rem; color: var(--primary); line-height: 1.3; }
.read-also-time { font-size: 0.82rem; color: var(--text-light); }

/* Subscribe */
.subscribe-section {
  background: var(--primary); color: var(--white);
  padding: 3rem 1.5rem; text-align: center;
}
.subscribe-inner { max-width: 540px; margin: 0 auto; }
.subscribe-inner h2 { color: var(--white); margin-top: 0; margin-bottom: 0.5rem; }
.subscribe-inner p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; }
.subscribe-form { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }
.subscribe-form input[type="email"] {
  flex: 1; min-width: 220px; padding: 0.8rem 1.2rem;
  border: 2px solid rgba(255,255,255,0.3); border-radius: var(--radius);
  background: rgba(255,255,255,0.1); color: var(--white);
  font-size: 1rem; outline: none; transition: border-color 0.2s;
}
.subscribe-form input[type="email"]::placeholder { color: rgba(255,255,255,0.5); }
.subscribe-form input[type="email"]:focus { border-color: var(--accent); }
.subscribe-form button {
  padding: 0.8rem 2rem; background: var(--accent);
  color: var(--white); border: none; border-radius: var(--radius);
  font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}
.subscribe-form button:hover { background: #009090; box-shadow: 3px 3px 0px rgba(0,0,0,0.3); }

/* Disclaimer */
.article-disclaimer {
  background: var(--bg-sec); border-radius: var(--radius);
  padding: 1.2rem 1.5rem; margin-top: 2.5rem;
  border-left: 4px solid #e74c3c; font-size: 0.9rem;
  color: var(--text-light); line-height: 1.6;
}
.article-disclaimer p { margin-bottom: 0; }

/* === FOOTER === */
.site-footer {
  background: var(--primary); color: rgba(255,255,255,0.85);
  padding: 3rem 1.5rem 2rem;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2rem;
}
.footer-logo {
  font-family: var(--font-heading); font-size: 1.3rem;
  font-weight: 700; color: var(--white); text-decoration: none;
}
.footer-logo:hover { color: var(--accent); }
.footer-copy { font-size: 0.85rem; margin-top: 0.5rem; color: rgba(255,255,255,0.6); }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.9rem; text-align: left; }
.footer-links a:hover { color: var(--accent); }
.footer-disclaimer { font-size: 0.82rem; color: rgba(255,255,255,0.55); line-height: 1.6; }
.footer-disclaimer p { margin-bottom: 0; }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-links a { text-align: center; }
}

/* === QUIZ === */
.quiz-section {
  background: var(--bg-sec); border-radius: var(--radius);
  padding: 2rem; margin: 2.5rem 0; border: 2px solid var(--primary);
}
.quiz-section h2 { margin-top: 0; }
.quiz-question { margin-bottom: 1.5rem; }
.quiz-q-text { font-weight: 600; margin-bottom: 0.6rem; }
.quiz-options { display: flex; flex-direction: column; gap: 0.4rem; }
.quiz-option {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.8rem; background: var(--white);
  border-radius: var(--radius); cursor: pointer;
  transition: background 0.2s; text-align: left; font-size: 0.95rem;
}
.quiz-option:hover { background: rgba(0,168,168,0.1); }
.quiz-option input { accent-color: var(--accent); }
.quiz-note { font-size: 0.85rem; color: var(--text-light); font-style: italic; margin-bottom: 0; }

/* What you learn */
.what-you-learn { background: var(--bg-sec); border-radius: var(--radius); padding: 2rem; margin: 2.5rem 0; }
.what-you-learn h2 { margin-top: 0; }
.learn-grid { display: grid; gap: 0.8rem; }
.learn-item {
  display: flex; align-items: flex-start; gap: 0.7rem;
  background: var(--white); padding: 0.8rem 1rem;
  border-radius: var(--radius); font-size: 0.95rem;
}
.learn-icon { color: var(--accent); font-weight: 700; flex-shrink: 0; font-size: 1.1rem; }

/* Author badge */
.author-badge-section {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem; padding-bottom: 1.2rem;
  border-bottom: 2px solid var(--bg-sec);
}
.author-photo {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
}
.author-badge-info { display: flex; flex-direction: column; gap: 0.2rem; }
.author-badge-name { font-family: var(--font-heading); font-weight: 600; font-size: 1.05rem; }
.author-badge {
  display: inline-block; background: var(--primary); color: var(--white);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  padding: 0.15rem 0.6rem; border-radius: 3px;
  width: fit-content; letter-spacing: 0.5px;
}

/* === POLICY / LEGAL PAGES === */
.legal-page { max-width: var(--content-w); margin: 0 auto; padding: 3rem 1.5rem; }
.legal-page h1 { margin-bottom: 1.5rem; }
.legal-page h2 { margin-top: 2rem; margin-bottom: 0.8rem; font-size: 1.3rem; }
.legal-page p { color: var(--text-light); font-size: 0.95rem; }

/* === SUCCESS PAGE === */
.success-page {
  min-height: 70vh; display: flex; align-items: center;
  justify-content: center; text-align: center; padding: 3rem 1.5rem;
}
.success-inner { max-width: 500px; }
.success-icon { font-size: 4rem; margin-bottom: 1rem; display: block; }
.success-inner h1 { margin-bottom: 1rem; }
.success-inner p { color: var(--text-light); margin-bottom: 2rem; }
.btn-home {
  display: inline-block; background: var(--primary); color: var(--white);
  padding: 0.8rem 2.5rem; border-radius: var(--radius);
  text-decoration: none; font-weight: 600; font-size: 1rem;
  box-shadow: var(--shadow-sm); transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.btn-home:hover { background: var(--accent); box-shadow: var(--shadow-hover); transform: translate(-2px, -2px); }

/* === 404 PAGE === */
.page-404 {
  min-height: 70vh; display: flex; align-items: center;
  justify-content: center; text-align: center; padding: 3rem 1.5rem;
}
.page-404-inner { max-width: 500px; }
.glitch-num { font-family: var(--font-heading); font-size: 8rem; font-weight: 700; color: var(--primary); line-height: 1; position: relative; }
.glitch-num::after {
  content: '404'; position: absolute; top: 4px; left: 4px;
  color: var(--accent); z-index: -1;
}
.page-404-inner h1 { font-size: 1.6rem; margin: 1rem 0 0.5rem; }
.page-404-inner p { color: var(--text-light); margin-bottom: 2rem; }

/* === COOKIE BANNER (no JS) === */
.cookie-banner-toggle { display: none; }
.cookie-banner {
  position: fixed; bottom: 1rem; right: 1rem; z-index: 999;
  background: var(--white); border: 2px solid var(--primary);
  border-radius: var(--radius); padding: 1.2rem 1.5rem;
  max-width: 380px; box-shadow: 6px 6px 0px var(--primary);
  font-size: 0.88rem; line-height: 1.5;
  transition: opacity 0.3s, transform 0.3s;
}
.cookie-banner p { margin-bottom: 0.8rem; color: var(--text-light); }
.cookie-banner-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-btn {
  padding: 0.5rem 1.2rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.85rem; cursor: pointer;
  border: none; transition: background 0.2s;
  text-decoration: none;
}
.cookie-accept { background: var(--accent); color: var(--white); }
.cookie-accept:hover { background: #009090; }
.cookie-decline { background: var(--bg-sec); color: var(--text); }
.cookie-decline:hover { background: #d8e0f0; }
.cookie-banner-toggle:checked ~ .cookie-banner { display: none; }

@media (max-width: 480px) {
  .cookie-banner { left: 0.5rem; right: 0.5rem; max-width: none; bottom: 0.5rem; }
}
