/* ============================================================
   kursplattform-vergleich.de – Main Stylesheet
   ============================================================ */

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

:root {
  --primary:   #6c3ae0;
  --primary-d: #5228b5;
  --primary-l: #ede6fc;
  --accent:    #e8640a;
  --text:      #1c1c1c;
  --muted:     #5a6472;
  --bg:        #ffffff;
  --bg-light:  #f7f5fc;
  --bg-dark:   #1a1035;
  --border:    #ddd5ef;
  --green:     #1a9e5f;
  --red:       #d63031;
  --yellow:    #f39c12;
  --radius:    8px;
  --shadow:    0 2px 12px rgba(0,0,0,.08);
  --max-w:     1140px;
  --font:      'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* --- Layout ------------------------------------------------- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* --- Header ------------------------------------------------- */
.site-header {
  background: var(--bg-dark);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

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

.site-logo {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.3px;
}
.site-logo span { color: #b794f6; }

.site-nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.site-nav a {
  color: rgba(255,255,255,.82);
  font-size: .88rem;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background .2s, color .2s;
}
.site-nav a:hover,
.site-nav a.active { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }

/* --- Nav Dropdown ------------------------------------------- */
.nav-dropdown {
  position: relative;
}
.nav-dropdown > .nav-dropdown-toggle {
  cursor: pointer;
  user-select: none;
}
.nav-dropdown > .nav-dropdown-toggle::after {
  content: " \25BE";
  font-size: .7em;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-dark);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 6px 0;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  z-index: 200;
  margin-top: 4px;
}
.nav-dropdown:hover > .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  font-size: .85rem;
  color: rgba(255,255,255,.82);
  border-radius: 0;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  text-decoration: none;
}

/* --- Hero --------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #2d1a5e 50%, #6c3ae0 100%);
  color: #fff;
  padding: 72px 0 64px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px;
  padding: 5px 16px;
  font-size: .82rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  max-width: 640px;
  margin: 0 auto 32px;
}

.hero-badges {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: .86rem;
}

/* --- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
  border: none;
  text-decoration: none !important;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.18); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--primary); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.4); }
.btn-outline:hover { border-color: #fff; }
.btn-outline-dark { background: transparent; color: var(--primary); border: 2px solid var(--border); }
.btn-outline-dark:hover { border-color: var(--primary); }

/* --- Ad Disclosure ----------------------------------------- */
.ad-disclosure {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
}

/* --- Trust Bar --------------------------------------------- */
.trust-bar {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.trust-items {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .86rem;
  color: var(--muted);
  font-weight: 500;
}
.trust-item .check { color: var(--green); font-weight: 700; font-size: 1rem; }

/* --- Section ----------------------------------------------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-light); }

.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}
.section-header p { color: var(--muted); font-size: 1.05rem; max-width: 620px; margin: 0 auto; }

.section-label {
  display: inline-block;
  background: var(--primary-l);
  color: var(--primary);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* --- Cards Grid -------------------------------------------- */
.cards { display: grid; gap: 24px; }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,.1); }

.card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: .93rem; color: var(--muted); }

/* --- Platform Cards ---------------------------------------- */
.platform-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: visible;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.platform-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,.1); }

.platform-card-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  border-radius: 14px 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.platform-card-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
}

.platform-badge {
  display: inline-block;
  border-radius: 50px;
  padding: 4px 14px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .3px;
}
.badge-de { background: #dceeff; color: #1a6fb5; }
.badge-int { background: #ffecd2; color: #c35e00; }
.badge-free { background: #d4edda; color: #155724; }
.badge-top { background: var(--primary-l); color: var(--primary); }

.platform-card-body { padding: 24px 28px; }

.platform-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.platform-meta-item { font-size: .88rem; }
.platform-meta-item .label { color: var(--muted); font-size: .78rem; display: block; margin-bottom: 2px; }
.platform-meta-item .value { font-weight: 700; }

.platform-desc { font-size: .93rem; color: var(--muted); margin-bottom: 16px; line-height: 1.7; }

.platform-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.pros h4, .cons h4 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.pros h4 { color: var(--green); }
.cons h4 { color: var(--red); }

.pros ul, .cons ul {
  list-style: none;
  font-size: .88rem;
}
.pros li, .cons li {
  padding: 3px 0;
  padding-left: 18px;
  position: relative;
}
.pros li::before { content: "+"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.cons li::before { content: "-"; position: absolute; left: 2px; color: var(--red); font-weight: 700; }

.platform-card-footer {
  padding: 16px 28px 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Featured platform card */
.platform-card.featured {
  border: 2px solid var(--primary);
  position: relative;
  margin-top: 20px;
}
.platform-card.featured::before {
  content: attr(data-badge);
  position: absolute;
  top: -13px;
  left: 24px;
  background: var(--primary);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 50px;
  white-space: nowrap;
  z-index: 1;
}

/* --- Comparison Table -------------------------------------- */
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  min-width: 1080px;
}
.compare-table th, .compare-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.compare-table td:last-child, .compare-table th:last-child { min-width: 130px; }
.compare-table th {
  background: var(--bg-dark);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}
.compare-table th:first-child { border-radius: 8px 0 0 0; }
.compare-table th:last-child { border-radius: 0 8px 0 0; }

.compare-table tbody tr { transition: background .15s; }
.compare-table tbody tr:hover { background: var(--primary-l); }
.compare-table tbody tr:nth-child(even) { background: var(--bg-light); }
.compare-table tbody tr:nth-child(even):hover { background: var(--primary-l); }

.compare-table td:first-child { font-weight: 700; white-space: nowrap; }

.check-yes { color: var(--green); font-weight: 700; }
.check-no { color: var(--red); }
.check-partial { color: var(--yellow); font-weight: 600; }

.highlight-row td { background: var(--primary-l) !important; }

/* --- Savings / Stats Grid ---------------------------------- */
.stats-grid {
  display: flex;
  gap: 12px;
  margin: 28px auto;
  justify-content: center;
  flex-wrap: wrap;
}
.stat-item { flex: 1 1 0; min-width: 120px; }
.stat-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-item .num { font-size: clamp(1.2rem, 2.5vw, 1.8rem); font-weight: 800; color: var(--primary); }
.stat-item .label { font-size: .82rem; color: var(--muted); margin-top: 4px; }

/* --- Decision Guide ---------------------------------------- */
.decision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.decision-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.decision-card:hover { transform: translateY(-3px); }

.decision-card .persona {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--primary);
  margin-bottom: 8px;
}
.decision-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.decision-card p { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.decision-card .recommendation {
  background: var(--primary-l);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: .88rem;
  font-weight: 600;
}

/* --- FAQ ---------------------------------------------------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  padding: 18px 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff;
  transition: background .15s;
  font-size: .95rem;
}
.faq-question:hover { background: var(--bg-light); }
.faq-question .arrow { color: var(--primary); font-size: 1.2rem; transition: transform .2s; flex-shrink: 0; }
.faq-item.open .faq-question { background: var(--bg-light); }
.faq-item.open .faq-question .arrow { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 20px 18px;
  color: var(--muted);
  font-size: .93rem;
  background: var(--bg-light);
  line-height: 1.75;
}
.faq-item.open .faq-answer { display: block; }

/* --- Info / Warning Boxes ---------------------------------- */
.info-box {
  background: var(--primary-l);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin: 24px 0;
  font-size: .93rem;
}
.info-box strong { color: var(--primary-d); }

.warning-box {
  background: #fff8e1;
  border-left: 4px solid var(--yellow);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin: 24px 0;
  font-size: .93rem;
}

/* --- CTA Banner -------------------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, var(--bg-dark), #3d1f8e);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}
.cta-banner h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 12px; font-weight: 800; }
.cta-banner p { color: rgba(255,255,255,.8); margin-bottom: 28px; max-width: 540px; margin-left: auto; margin-right: auto; }
.cta-banner .small { font-size: .82rem; color: rgba(255,255,255,.5); margin-top: 14px; }

/* --- Breadcrumb -------------------------------------------- */
.breadcrumb {
  padding: 12px 0;
  font-size: .84rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

/* --- Prose ------------------------------------------------- */
.prose { max-width: 820px; }
.prose h2 { font-size: 1.5rem; font-weight: 800; margin: 40px 0 14px; color: var(--text); }
.prose h3 { font-size: 1.15rem; font-weight: 700; margin: 28px 0 10px; }
.prose p { margin-bottom: 16px; color: var(--text); }
.prose ul, .prose ol { margin: 14px 0 18px 22px; }
.prose li { margin-bottom: 6px; }

/* --- TOC (Table of Contents) ------------------------------- */
.toc {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 0 auto;
  max-width: 700px;
}
.toc h3 {
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 12px;
}
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; font-size: .9rem; }
.toc a { color: var(--primary); font-weight: 500; }

/* --- Footer ------------------------------------------------ */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,.6);
  padding: 40px 0 24px;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 { color: rgba(255,255,255,.9); font-size: .95rem; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: rgba(255,255,255,.6); font-size: .88rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px;
  font-size: .82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-disclaimer {
  font-size: .78rem;
  color: rgba(255,255,255,.35);
  margin-top: 12px;
  line-height: 1.5;
}

/* --- Update Badge ------------------------------------------ */
.update-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #d4edda;
  color: #155724;
  border-radius: 50px;
  padding: 4px 14px;
  font-size: .78rem;
  font-weight: 600;
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 44px 0; }
  body { padding-bottom: 0; }
  .compare-table { font-size: .8rem; }
  .compare-table th, .compare-table td { padding: 10px 10px; }
  .platform-pros-cons { grid-template-columns: 1fr; }
  .platform-card-header { flex-direction: column; align-items: flex-start; }
  .platform-meta { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .platform-meta { grid-template-columns: 1fr; }
  .hero-badges { flex-direction: column; align-items: center; }
}

/* --- Article Layout with Sidebar TOC ------------------------- */
.article-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.article-sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  padding-top: 24px;
}

.sidebar-toc {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.sidebar-toc h4 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 12px;
}

.sidebar-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-toc li {
  margin-bottom: 8px;
}

.sidebar-toc a {
  font-size: .85rem;
  color: var(--text);
  text-decoration: none;
  display: block;
  padding: 4px 0;
  line-height: 1.4;
  transition: color .2s;
}

.sidebar-toc a:hover {
  color: var(--primary);
  text-decoration: none;
}

.sidebar-toc a.active {
  color: var(--primary);
  font-weight: 600;
}

.article-content {
  flex: 1;
  min-width: 0;
}
.article-content section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.article-content section:last-child {
  border-bottom: none;
}

@media (max-width: 900px) {
  .article-sidebar { display: none; }
  .article-layout { display: block; }
}
