/* DeutschLernen — Programmatic SEO & Landing Pages Design System
 * Highly optimized, responsive, dark-mode first with light mode support,
 * zero-dependency, ultra-fast Core Web Vitals (LCP/CLS/FID).
 */

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #162032;
  --bg-card-hover: #1e293b;
  --border: #223049;
  --border-focus: #f59e0b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.25);
  --accent-green: #10b981;
  --accent-green-bg: rgba(16, 185, 129, 0.12);
  --accent-red: #ef4444;
  --accent-red-bg: rgba(239, 68, 68, 0.12);
  --accent-blue: #3b82f6;
  --accent-blue-bg: rgba(59, 130, 246, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --container-max: 1100px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: light) {
  :root[data-theme="system"],
  :root:not([data-theme="dark"]) {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  }
}

:root[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

:root[data-theme="dark"] {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #162032;
  --bg-card-hover: #1e293b;
  --border: #223049;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: #fbbf24;
  text-decoration: underline;
}

.seo-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Top Bar */
.seo-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

[data-theme="light"] .seo-header {
  background: rgba(248, 250, 252, 0.92);
}

.seo-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.seo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
}

.seo-brand-logo {
  font-size: 26px;
  line-height: 1;
}

.seo-brand-text {
  display: flex;
  flex-direction: column;
}

.seo-brand-name {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.seo-brand-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.seo-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.seo-nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.seo-nav a:hover,
.seo-nav a.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.seo-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000000 !important;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 10px;
  box-shadow: 0 4px 15px var(--accent-gold-glow);
  transition: transform 0.18s, box-shadow 0.18s;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
}

.seo-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Breadcrumbs */
.seo-breadcrumbs {
  padding: 16px 0 8px 0;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

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

/* Hero Section */
.seo-hero {
  padding: 36px 0 28px 0;
  text-align: left;
}

.seo-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-gold-glow);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.seo-title {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .seo-title {
    font-size: 26px;
  }
}

.seo-lead {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 820px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.seo-meta-badges {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.seo-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Quick Summary / Key Takeaways Box */
.seo-highlight-card {
  background: linear-gradient(135deg, rgba(22, 32, 50, 0.95), rgba(17, 24, 39, 0.9));
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 28px 0;
  box-shadow: var(--shadow-card);
}

.seo-highlight-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.seo-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.seo-stat-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.seo-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.seo-stat-value {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

/* Main Content Blocks */
.seo-section {
  margin: 42px 0;
}

.seo-section-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.seo-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 12px;
}

.seo-prose {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.seo-prose p {
  margin-bottom: 14px;
}

.seo-prose ul, .seo-prose ol {
  margin: 14px 0 18px 24px;
}

.seo-prose li {
  margin-bottom: 6px;
}

/* Sample Letter Card (Musterbrief) */
.seo-letter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 20px 0;
  box-shadow: var(--shadow-card);
  position: relative;
}

.seo-letter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.seo-letter-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
  background: var(--accent-gold-glow);
  padding: 4px 10px;
  border-radius: 6px;
}

.seo-copy-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.seo-copy-btn:hover {
  background: var(--border);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.seo-letter-content {
  background: rgba(10, 14, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 20px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

[data-theme="light"] .seo-letter-content {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.seo-leitpunkt-tag {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
}

/* Redemittel Table */
.seo-table-container {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.seo-table th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.seo-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}

.seo-table tr:last-child td {
  border-bottom: none;
}

.seo-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .seo-table tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

/* State Switcher for LiD */
.seo-state-switcher {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 24px 0 32px 0;
}

.seo-state-switcher-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.seo-state-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seo-state-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none !important;
  transition: all 0.15s;
}

.seo-state-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent-gold);
}

.seo-state-pill.active {
  background: var(--accent-gold);
  color: #000000 !important;
  font-weight: 700;
  border-color: var(--accent-gold);
}

/* LiD Question Card */
.seo-question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s;
}

.seo-question-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.seo-question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.seo-question-num {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-gold);
  background: var(--accent-gold-glow);
  padding: 3px 10px;
  border-radius: 6px;
}

.seo-question-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.seo-question-image {
  margin: 14px 0 18px 0;
  text-align: center;
}

.seo-question-image img {
  max-width: 100%;
  max-height: 280px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 6px;
}

.seo-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.seo-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.seo-option-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
}

.seo-option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--border);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.seo-option-btn.correct {
  background: var(--accent-green-bg) !important;
  border-color: var(--accent-green) !important;
  color: #34d399 !important;
  font-weight: 700;
}

.seo-option-btn.correct .seo-option-letter {
  background: var(--accent-green);
  color: #000000;
}

.seo-option-btn.incorrect {
  background: var(--accent-red-bg) !important;
  border-color: var(--accent-red) !important;
  color: #f87171 !important;
}

.seo-option-btn.incorrect .seo-option-letter {
  background: var(--accent-red);
  color: #ffffff;
}

.seo-answer-reveal {
  margin-top: 14px;
  padding: 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  display: none;
}

.seo-answer-reveal.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.seo-answer-reveal-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 6px;
}

.seo-answer-explain {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.seo-lang-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.seo-lang-tab {
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.seo-lang-tab.active {
  background: var(--accent-gold);
  color: #000000;
  border-color: var(--accent-gold);
}

/* FAQ Accordion */
.seo-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.seo-faq-item:hover {
  border-color: rgba(245, 158, 11, 0.3);
}

.seo-faq-question {
  padding: 16px 20px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.seo-faq-question::-webkit-details-marker {
  display: none;
}

.seo-faq-question::after {
  content: "＋";
  font-size: 18px;
  color: var(--accent-gold);
  transition: transform 0.2s;
}

details[open] .seo-faq-question::after {
  content: "−";
}

.seo-faq-answer {
  padding: 0 20px 18px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Conversion CTA Card */
.seo-banner-cta {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(17, 24, 39, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  margin: 48px 0;
  text-align: center;
  box-shadow: 0 15px 35px -10px rgba(245, 158, 11, 0.2);
}

.seo-banner-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.seo-banner-text {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 22px auto;
  line-height: 1.6;
}

.seo-banner-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Footer */
.seo-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 40px 0 24px 0;
  margin-top: 60px;
  font-size: 13px;
  color: var(--text-muted);
}

.seo-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .seo-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.seo-footer-col h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 14px;
  font-weight: 700;
}

.seo-footer-col ul {
  list-style: none;
}

.seo-footer-col li {
  margin-bottom: 8px;
}

.seo-footer-col a {
  color: var(--text-muted);
  text-decoration: none;
}

.seo-footer-col a:hover {
  color: var(--accent-gold);
}

.seo-footer-disclaimer {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-muted);
}

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