/* ============================================
   Pool-Ratgeber — Style System
   ============================================ */

:root {
  /* Pool-Farbschema */
  --primary: #0077b6;
  --primary-d: #005f8a;
  --primary-l: #90e0ef;
  --accent: #00b4d8;
  --accent-warm: #f77f00;
  --accent-warm-d: #d66a00;
  --success: #06d6a0;
  --warning: #ffd166;
  --danger: #ef476f;

  /* Hintergründe */
  --bg: #ffffff;
  --bg-light: #f0f7fa;
  --bg-dark: #0a1628;
  --bg-dark-mid: #122240;

  /* Text */
  --text: #1a2332;
  --text-muted: #5a6a7a;
  --text-light: rgba(255, 255, 255, .85);

  /* Borders & Shadows */
  --border: #dce8ef;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, .12);

  /* Spacing */
  --section-pad: 64px;
  --container-width: 1140px;
}

/* ============================================
   Reset & Base
   ============================================ */

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-d); }

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

/* ============================================
   Header & Navigation
   ============================================ */

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

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

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

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: rgba(255, 255, 255, .75);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-dropdown-toggle::after {
  content: '';
  border: 4px solid transparent;
  border-top-color: currentColor;
  margin-top: 2px;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-dark-mid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 8px 0;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  font-size: .88rem;
  border-radius: 0;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav */
.mobile-nav {
  display: none;
  background: var(--bg-dark-mid);
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  color: rgba(255, 255, 255, .8);
  padding: 10px 0;
  font-size: .95rem;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.mobile-nav a:hover { color: var(--accent); }
.mobile-nav-group-title {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-top: 16px;
  margin-bottom: 4px;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  background:
    linear-gradient(135deg, rgba(10, 22, 40, .88) 0%, rgba(18, 34, 64, .82) 40%, rgba(0, 95, 138, .78) 100%),
    url('../img/hero-bg.jpg') center/cover no-repeat;
  color: #fff;
  padding: 72px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary), var(--accent));
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(0, 180, 216, .15);
  color: var(--primary-l);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -.5px;
}

.hero p {
  font-size: 1.1rem;
  opacity: .85;
  max-width: 640px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}
.hero-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  color: rgba(255, 255, 255, .8);
}

/* ============================================
   Breadcrumb
   ============================================ */

.breadcrumb {
  padding: 14px 0;
  font-size: .85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; color: var(--border); }

/* ============================================
   Sections
   ============================================ */

.section { padding: var(--section-pad) 0; }
.section-alt { background: var(--bg-light); }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-label {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 8px;
}
.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}
.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Article Layout (with optional TOC sidebar)
   ============================================ */

.article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 48px;
  align-items: start;
}

.article-content { min-width: 0; }

.article-sidebar {
  position: sticky;
  top: 82px;
}

/* Table of Contents */
.toc {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.toc-title {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 6px; }
.toc-list a {
  font-size: .88rem;
  color: var(--text-muted);
  display: block;
  padding: 4px 0 4px 12px;
  border-left: 2px solid transparent;
  transition: all .15s;
}
.toc-list a:hover,
.toc-list a.active {
  color: var(--primary);
  border-left-color: var(--primary);
}

/* ============================================
   Prose (Article Content)
   ============================================ */

.prose h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 800;
  color: var(--text);
  margin: 48px 0 16px;
  padding-top: 8px;
}
.prose h2:first-child { margin-top: 0; }

.prose h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 10px;
}

.prose p {
  margin-bottom: 16px;
  color: var(--text);
  line-height: 1.75;
}

.prose ul, .prose ol {
  margin: 0 0 20px 22px;
  line-height: 1.75;
}
.prose li { margin-bottom: 6px; }

.prose strong { color: var(--primary-d); }

.prose img {
  border-radius: var(--radius-lg);
  margin: 24px 0;
  box-shadow: var(--shadow);
}

/* ============================================
   Cards
   ============================================ */

.cards-grid {
  display: grid;
  gap: 24px;
}
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.card p {
  font-size: .93rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary);
}
.card-link:hover { gap: 8px; }
.card-link::after { content: '\2192'; }

/* Category Card (for Hub page) */
.category-card {
  border-top: 3px solid var(--primary);
}
.category-card.cat-technik { border-top-color: var(--accent); }
.category-card.cat-pflege { border-top-color: var(--success); }
.category-card.cat-zubehoer { border-top-color: var(--accent-warm); }
.category-card.cat-saison { border-top-color: var(--warning); }
.category-card.cat-spezial { border-top-color: var(--danger); }

/* ============================================
   Info-Boxen (Tipps, Warnungen, Experten-Wissen)
   ============================================ */

.info-box {
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 24px 0;
  border-left: 4px solid;
  font-size: .95rem;
  line-height: 1.7;
}
.info-box-title {
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-box.tip {
  background: #ecfdf5;
  border-color: var(--success);
}
.info-box.tip .info-box-title { color: #065f46; }

.info-box.warning {
  background: #fffbeb;
  border-color: var(--warning);
}
.info-box.warning .info-box-title { color: #92400e; }

.info-box.expert {
  background: #eff6ff;
  border-color: var(--primary);
}
.info-box.expert .info-box-title { color: var(--primary-d); }

.info-box.danger {
  background: #fef2f2;
  border-color: var(--danger);
}
.info-box.danger .info-box-title { color: #991b1b; }

/* ============================================
   Tables
   ============================================ */

.table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
}
.compare-table th {
  background: var(--bg-dark);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.compare-table tr:nth-child(even) { background: var(--bg-light); }
.compare-table tr:hover { background: #e0f2fe; }

.highlight-row td {
  background: #dbeafe !important;
  font-weight: 600;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--accent-warm);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-warm-d);
  color: #fff;
}

.btn-secondary {
  background: var(--primary);
  color: #fff;
}
.btn-secondary:hover {
  background: var(--primary-d);
  color: #fff;
}

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

/* ============================================
   FAQ Accordion
   ============================================ */

.faq-section {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.faq-item:hover { box-shadow: var(--shadow); }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  background: var(--bg);
  border: none;
  width: 100%;
  text-align: left;
  color: var(--text);
  gap: 12px;
}
.faq-question:hover { background: var(--bg-light); }

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--primary);
  transition: transform .2s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  display: none;
  padding: 0 24px 18px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: .95rem;
}
.faq-item.open .faq-answer { display: block; }

/* ============================================
   Weiterlesen Cards (Related Articles)
   ============================================ */

.related-articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.related-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
  color: var(--text);
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.related-card-body {
  padding: 20px;
}
.related-card-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 6px;
}
.related-card-body h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.related-card-body p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, .6);
  padding: 48px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  color: #fff;
  font-size: .95rem;
  margin-bottom: 14px;
}
.footer-col p {
  font-size: .88rem;
  line-height: 1.6;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-col a {
  color: rgba(255, 255, 255, .6);
  font-size: .88rem;
  transition: color .15s;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-disclaimer {
  margin-top: 16px;
  font-size: .8rem;
  color: rgba(255, 255, 255, .4);
  line-height: 1.5;
}

/* ============================================
   Utilities
   ============================================ */

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.check-list { list-style: none; margin-left: 0 !important; }
.check-list li { padding-left: 28px; position: relative; }
.check-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
    order: -1;
  }
  .toc {
    margin-bottom: 24px;
  }
}

@media (max-width: 768px) {
  :root { --section-pad: 44px; }

  .site-nav { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 1.7rem; }

  .header-inner { height: 56px; }

  .cards-3, .cards-4 { grid-template-columns: 1fr; }
  .cards-2 { grid-template-columns: 1fr; }

  .related-articles { grid-template-columns: 1fr; }

  .compare-table { font-size: .82rem; }
  .compare-table th, .compare-table td { padding: 10px 12px; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .info-box { padding: 16px 18px; }

  .prose h2 { margin-top: 36px; }
}

@media (max-width: 480px) {
  .hero-badges { flex-direction: column; align-items: center; }
  .btn { padding: 12px 22px; font-size: .9rem; }
}
