/*
==========================================================
  SEO AUTOPILOT - Blog Stylesheet
  Passend zum AutomationAI Solutions Design
==========================================================

SEO-LEKTION: CSS & Ladezeit
────────────────────────────
- Eine CSS-Datei für alle Blog-Seiten = weniger HTTP-Requests
- Minimale Dateigrösse = schnellere Ladezeit
- Mobile-First Design = Google's Mobile-First Indexing
- Klare Typografie = bessere User Experience = bessere Rankings
*/

/* ─── Reset & Base ──────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Farben passend zu eurer Website */
  --primary: #e63946;      /* Rot (Swiss-Accent wie auf eurer Seite) */
  --primary-dark: #c1121f;
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #1a1a25;
  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --text-muted: #55556a;
  --border: #2a2a3a;
  --accent-glow: rgba(230, 57, 70, 0.15);
  
  /* Typografie */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  
  /* Spacing */
  --content-width: 780px;
  --sidebar-width: 300px;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

/* ─── Navigation ────────────────────────────────────── */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary) !important;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-cta {
  background: var(--primary) !important;
  color: white !important;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--primary-dark) !important;
}

/* ─── Blog Post Layout ──────────────────────────────── */
.blog-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 3rem;
}

.blog-post {
  max-width: var(--content-width);
}

/* ─── Breadcrumb ────────────────────────────────────── */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* ─── Blog Header ───────────────────────────────────── */
.blog-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.blog-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.blog-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.blog-excerpt {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Table of Contents ─────────────────────────────── */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
}

.toc h2 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.toc ol {
  padding-left: 1.5rem;
}

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

.toc a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

/* ─── Blog Content ──────────────────────────────────── */
.blog-intro p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.blog-content h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.blog-content h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-content p {
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  line-height: 1.8;
}

.blog-content strong {
  color: var(--primary);
  font-weight: 600;
}

.blog-content ul,
.blog-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.blog-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* ─── FAQ Section ───────────────────────────────────── */
.blog-faq {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.blog-faq h2 {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.faq-item:hover {
  border-color: var(--primary);
}

.faq-question {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  margin-top: 0 !important;
}

.faq-answer {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0 !important;
}

/* ─── CTA Section ───────────────────────────────────── */
.blog-cta {
  margin-top: 3rem;
}

.cta-box {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--primary);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 0 40px var(--accent-glow);
}

.cta-box h2 {
  font-family: var(--font-heading);
  border-top: none;
  margin-top: 0;
  padding-top: 0;
  color: var(--text-primary);
}

.cta-box p {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 1rem auto;
}

.cta-button {
  display: inline-block;
  background: var(--primary);
  color: white !important;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 1rem;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.cta-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(230, 57, 70, 0.4);
}

/* ─── Sidebar ───────────────────────────────────────── */
.blog-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.sidebar-cta {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--bg-card), rgba(230, 57, 70, 0.05));
}

.sidebar-cta p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.sidebar-cta-btn {
  display: block;
  text-align: center;
  background: var(--primary);
  color: white !important;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.sidebar-cta-btn:hover {
  background: var(--primary-dark);
}

/* ─── Blog Index Page ───────────────────────────────── */
.blog-index-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.blog-index-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.blog-index-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.blog-index-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
}

.blog-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.blog-card a {
  color: inherit !important;
  display: block;
}

.blog-card-content {
  padding: 1.5rem;
}

.blog-card time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.blog-card h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.5rem 0;
  line-height: 1.3;
}

.blog-card-keyword {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.read-more {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
}

.blog-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

/* ─── Footer ────────────────────────────────────────── */
.blog-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.footer-links a {
  color: var(--text-muted);
}

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

/* ─── Responsive ────────────────────────────────────── */
/* SEO-LEKTION: Mobile-First ist PFLICHT!
   Google verwendet "Mobile-First Indexing" seit 2021.
   Das heisst: Google bewertet eure Mobile-Version zuerst! */

@media (max-width: 900px) {
  .blog-main {
    grid-template-columns: 1fr;
    padding: 2rem 1.25rem;
  }

  .blog-sidebar {
    position: static;
  }

  .blog-header h1 {
    font-size: 1.6rem;
  }

  .nav-links {
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .blog-nav {
    padding: 0 1rem;
  }

  .blog-main {
    padding: 1.5rem 1rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ─── Print Styles ──────────────────────────────────── */
@media print {
  .blog-nav, .blog-sidebar, .blog-cta, .blog-footer {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}
