/* ===== krankenkassen-vergleich24.ch — Main Stylesheet ===== */

:root {
  --primary: #1a6bb5;
  --primary-dark: #135a8a;
  --primary-light: #e6f0fa;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --text: #1a1a1a;
  --text-light: #555;
  --bg: #fff;
  --bg-alt: #f8fafb;
  --bg-dark: #0c1a2e;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
  --max-w: 1200px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
ul, ol { padding-left: 1.5em; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; color: var(--text); }
h1 { font-size: 2.5rem; font-weight: 800; }
h2 { font-size: 2rem; font-weight: 700; margin-bottom: .75rem; }
h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: .5rem; }
p { margin-bottom: 1rem; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.highlight { color: var(--primary); }

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .75rem 0;
  transition: box-shadow .3s;
}
.navbar.scrolled { box-shadow: var(--shadow); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
}
.nav-logo span { color: var(--primary); }
.nav-links { display: flex; gap: 1.75rem; list-style: none; padding: 0; margin: 0; align-items: center; }
.nav-links a { color: var(--text); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform .3s, opacity .3s;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
  line-height: 1.4;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: #d97706; border-color: #d97706; color: #fff; }
.btn-lg { padding: 1rem 2.25rem; font-size: 1.1rem; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: 2.75rem; margin-bottom: 1.25rem; color: #fff; }
.hero p { font-size: 1.2rem; opacity: .92; margin-bottom: 1.75rem; }
.hero-badges { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-badge {
  background: rgba(255,255,255,.15);
  padding: .5rem 1rem;
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}
.hero-img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* ===== Sections ===== */
.section { padding: 5rem 0; }
.section-alt { padding: 5rem 0; background: var(--bg-alt); }
.section-dark { padding: 5rem 0; background: var(--bg-dark); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 3rem; }
.section-header p { color: var(--text-light); font-size: 1.1rem; }

/* ===== Grids ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }

/* ===== Cards ===== */
.card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--text-light); margin-bottom: 0; }

/* ===== Stats ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; padding: 3rem 0; }
.stat {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s, transform .6s;
}
.stat.visible { opacity: 1; transform: translateY(0); }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--primary); display: block; }
.stat-label { font-size: .95rem; color: var(--text-light); }
.section-dark .stat-number { color: var(--accent); }
.section-dark .stat-label { color: rgba(255,255,255,.7); }

/* ===== Table ===== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin: 2rem 0;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}
.table-wrap th,
.table-wrap td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table-wrap th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
}
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:nth-child(even) { background: var(--bg-alt); }
.table-wrap tr:hover { background: var(--primary-light); }

/* ===== FAQ Accordion ===== */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: var(--bg);
  border: none;
  padding: 1.25rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font);
  color: var(--text);
  transition: background .2s;
}
.faq-question:hover { background: var(--bg-alt); }
.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform .3s;
}
.faq-item.active .faq-question::after { content: '\2212'; transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s;
}
.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.25rem;
}
.faq-answer p { color: var(--text-light); margin-bottom: .5rem; }

/* ===== Blog Cards & Grid ===== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.blog-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform .3s, box-shadow .3s;
  opacity: 0;
  transform: translateY(20px);
}
.blog-card.visible { opacity: 1; transform: translateY(0); }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card img { width: 100%; height: 200px; object-fit: cover; }
.blog-card-body { padding: 1.5rem; }
.blog-card-body h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.blog-card-body h3 a { color: var(--text); }
.blog-card-body h3 a:hover { color: var(--primary); }
.blog-card-body p { color: var(--text-light); font-size: .95rem; margin-bottom: .75rem; }

/* ===== CTA Banner ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  padding: 3.5rem;
  text-align: center;
  color: #fff;
  margin: 3rem 0;
}
.cta-banner h2 { color: #fff; margin-bottom: .75rem; }
.cta-banner p { opacity: .92; font-size: 1.1rem; margin-bottom: 1.5rem; }

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  padding: 1rem 0;
  font-size: .9rem;
  color: var(--text-light);
}
.breadcrumbs a { color: var(--primary); }
.breadcrumbs span { margin: 0 .5rem; }

/* ===== Article ===== */
.article {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}
.article h1 { font-size: 2.2rem; margin-bottom: 1rem; }
.article h2 { font-size: 1.6rem; margin-top: 2.5rem; margin-bottom: 1rem; }
.article h3 { font-size: 1.25rem; margin-top: 2rem; }
.article p { color: var(--text); line-height: 1.8; }
.article ul, .article ol { margin-bottom: 1.5rem; }
.article li { margin-bottom: .5rem; line-height: 1.7; }
.article img { border-radius: var(--radius); margin: 2rem 0; }

/* ===== Meta & Tags ===== */
.meta {
  display: flex;
  gap: 1rem;
  font-size: .9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.tag {
  display: inline-block;
  padding: .25rem .75rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
}

/* ===== TOC ===== */
.toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}
.toc h4 {
  font-size: 1rem;
  margin-bottom: .75rem;
  color: var(--text);
}
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: .4rem; }
.toc a {
  color: var(--primary);
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.toc a:hover { color: var(--primary-dark); text-decoration: underline; }

/* ===== Badge ===== */
.badge {
  display: inline-block;
  padding: .3rem .85rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-accent { background: var(--accent-light); color: #92400e; }

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,.7);
  padding: 4rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.footer h4 { color: #fff; margin-bottom: 1rem; font-size: 1rem; }
.footer p { font-size: .9rem; margin-bottom: .75rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .5rem; }
.footer a { color: rgba(255,255,255,.7); font-size: .9rem; transition: color .2s; }
.footer a:hover { color: #fff; }
.footer-brand { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: .75rem; }
.footer-brand span { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.5rem 0;
  text-align: center;
  font-size: .85rem;
}

/* ===== Animations ===== */
.card, .blog-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease, box-shadow .3s;
}
.card.visible, .blog-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.card.visible:hover { transform: translateY(-4px); }
.blog-card.visible:hover { transform: translateY(-4px); }

/* ===== Responsive 1024px ===== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-img { max-width: 500px; margin: 0 auto; }
  .hero-badges { justify-content: center; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Responsive 768px ===== */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .hero { padding: 3.5rem 0 3rem; }
  .hero h1 { font-size: 2rem; }
  .section, .section-alt, .section-dark { padding: 3.5rem 0; }
  .grid-2, .grid-3, .blog-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.active { display: flex; }
  .nav-toggle { display: block; }
  .cta-banner { padding: 2.5rem 1.5rem; }
  .article h1 { font-size: 1.75rem; }
}

/* ===== Responsive 480px ===== */
@media (max-width: 480px) {
  body { font-size: 15px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
  .hero h1 { font-size: 1.7rem; }
  .hero-badges { flex-direction: column; align-items: center; }
  .stats { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .stat-number { font-size: 2rem; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-lg { padding: .85rem 1.5rem; font-size: 1rem; }
  .container { padding: 0 1rem; }
}