/*
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 {
  --color-primary: #111827;
  --color-accent: #ff6b35;
  --color-bg: #ffffff;
  --color-bg-secondary: #f9fafb;
  --color-text: #111827;
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', Helvetica, sans-serif;
  --max-width: 1140px;
  --content-width: 720px;
  --radius: 0px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { display: inline-block; text-align: center; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background: 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; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 2.4rem; margin-bottom: 1rem; }
p { margin-bottom: 1.1rem; }

.site-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 100;
  transition: transform 0.3s ease;
}
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-primary);
  text-decoration: none;
}
.site-logo:hover { color: var(--color-accent); }

.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  position: absolute;
  transition: transform 0.3s ease;
}
.nav-toggle-label span { top: 50%; transform: translateY(-50%); }
.nav-toggle-label span::before { content: ''; top: -8px; }
.nav-toggle-label span::after { content: ''; top: 8px; }
.nav-toggle:checked + .nav-toggle-label span { background: transparent; }
.nav-toggle:checked + .nav-toggle-label span::before { top: 0; transform: rotate(45deg); }
.nav-toggle:checked + .nav-toggle-label span::after { top: 0; transform: rotate(-45deg); }

.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--color-accent); }

.breadcrumbs {
  max-width: var(--max-width);
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.82rem;
  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; }

.article-hero {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding: 0 1.5rem;
}
.article-lead { color: #374151; font-size: 1.05rem; margin-top: 1rem; }
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
}
.article-meta__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-accent);
  flex-shrink: 0;
}
.article-meta__info { font-size: 0.85rem; color: #6b7280; line-height: 1.4; }
.article-meta__author { font-weight: 700; color: var(--color-text); }
.article-category {
  display: inline-block;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.article-body {
  max-width: var(--content-width);
  margin: 2.5rem auto 0;
  padding: 0 1.5rem;
}
.article-body p { color: #374151; }
.article-body h2 { border-left: 3px solid var(--color-accent); padding-left: 0.75rem; }

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

.pull-quote {
  margin: 2.5rem 0;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  border-left: 4px solid var(--color-accent);
  background: var(--color-bg-secondary);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-primary);
  position: relative;
}

.article-tags {
  margin: 2.5rem 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.article-tags a {
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid #d1d5db;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s;
}
.article-tags a:hover { border-color: var(--color-accent); color: var(--color-accent); }

.disclaimer-block {
  max-width: var(--content-width);
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.5rem;
  background: var(--color-bg-secondary);
  border-left: 3px solid #d1d5db;
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.6;
}

.subscribe-section {
  max-width: var(--content-width);
  margin: 3rem auto;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}
.subscribe-section h2 { margin-top: 0; margin-bottom: 0.5rem; }
.subscribe-section p { color: #6b7280; margin-bottom: 1.5rem; }
.subscribe-form { display: flex; gap: 0.5rem; max-width: 440px; margin: 0 auto; }
.subscribe-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  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-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.subscribe-form button:hover { background: #e55a28; }

.site-footer {
  border-top: 1px solid #e5e7eb;
  padding: 2.5rem 1.5rem;
  margin-top: 2rem;
  background: var(--color-bg-secondary);
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.site-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-primary);
  text-decoration: none;
}
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a {
  font-size: 0.82rem;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--color-accent); }
.site-footer__copy {
  font-size: 0.8rem;
  color: #9ca3af;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}
.site-footer__disclaimer {
  font-size: 0.78rem;
  color: #9ca3af;
  line-height: 1.5;
  margin-top: 0.5rem;
}

.cookie-banner {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  max-width: 380px;
  background: var(--color-primary);
  color: #e5e7eb;
  padding: 1.25rem 1.5rem;
  z-index: 9999;
  font-size: 0.85rem;
  line-height: 1.5;
}
.cookie-banner a { color: var(--color-accent); text-decoration: underline; }
.cookie-banner__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #fff;
}
.cookie-banner__actions { margin-top: 1rem; display: flex; gap: 0.5rem; }
.cookie-close { display: none; }
.cookie-close:checked ~ .cookie-banner { display: none; }
.cookie-btn {
  padding: 0.45rem 1rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}
.cookie-btn--accept { background: var(--color-accent); color: #fff; }
.cookie-btn--accept:hover { background: #e55a28; }
.cookie-btn--decline { background: transparent; color: #9ca3af; border: 1px solid #4b5563; }
.cookie-btn--decline:hover { border-color: #9ca3af; color: #fff; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.article-hero, .article-body, .subscribe-section { animation: fadeUp 0.5s ease both; }
.article-body { animation-delay: 0.1s; }
.subscribe-section { animation-delay: 0.15s; }

@media (max-width: 768px) {
  .nav-toggle-label { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    gap: 1rem;
    display: none;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .subscribe-form { flex-direction: column; }
  .site-footer__top { flex-direction: column; align-items: flex-start; }
  .cookie-banner { left: 1rem; right: 1rem; max-width: none; bottom: 0.5rem; }
}


/* Legal pages */
.legal-page { padding: 2rem 0; }
.legal-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.legal-content h1 { margin-bottom: 0.5rem; }
.legal-updated { font-size: 0.85rem; color: #6b7280; margin-bottom: 2rem; }
.legal-content h2 { font-size: 1.2rem; margin-top: 2rem; margin-bottom: 0.75rem; }
.legal-content p { color: #374151; margin-bottom: 1rem; }

/* Success page */
.success-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 2rem 1.5rem;
}
.success-content { text-align: center; max-width: 480px; }
.success-icon { margin-bottom: 1.5rem; }
.success-content h1 { margin-bottom: 1rem; }
.success-content p { color: #6b7280; margin-bottom: 2rem; }
.success-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.success-btn:hover { background: #e55a28; }

/* Error page */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 2rem 1.5rem;
}
.error-content { text-align: center; max-width: 480px; }
.error-code {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 10vw, 7rem);
  color: var(--color-accent);
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.25;
}
.error-content h1 { margin-bottom: 1rem; }
.error-content p { color: #6b7280; margin-bottom: 2rem; }
.error-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.error-btn:hover { background: var(--color-accent); }

/* Related articles on home */
.related-articles {
  max-width: var(--max-width);
  margin: 3rem auto 0;
  padding: 0 1.5rem;
}
.related-articles h2 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.related-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  transition: border-color 0.2s;
  text-align: left;
}
.related-card:hover { border-color: var(--color-accent); }
.related-card__cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.related-card__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--color-text);
  line-height: 1.35;
}
