/* ══════════════════════════════════════════
   VISUAL UPGRADE — Shared across all pages
   Matches erfolge.html design system
   ══════════════════════════════════════════ */

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ══ SECTION BACKGROUNDS — Exact match to erfolge.html ══ */

/* Target ds-sections wherever they are: inside .content-wrap OR direct in main */
.content-wrap > .ds-section,
main > .ds-section {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
  border-radius: 0 !important;
  border: none !important;
  position: relative;
}
/* Break out of content-wrap — full viewport width like erfolge */
.content-wrap > .ds-section {
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  padding-left: calc(50vw - 50%) !important;
  padding-right: calc(50vw - 50%) !important;
}

/* Center content inside ALL sections — match erfolge's max-w-5xl (1024px) */
.content-wrap > .ds-section > *,
main > .ds-section > * {
  max-width: 1024px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  position: relative;
  z-index: 1;
}
.content-wrap > .ds-section > .ds-table-wrap,
main > .ds-section > .ds-table-wrap {
  max-width: 1060px;
}
.content-wrap > .ds-section > h2,
.content-wrap > .ds-section > h3,
main > .ds-section > h2,
main > .ds-section > h3 {
  text-align: center;
}

/* Raised sections: use CSS variable for consistency with waves */
.content-wrap > .ds-section.bg-raised,
main > .ds-section.bg-raised {
  background: var(--bg-raised, #f5f8fe) !important;
  border: none !important;
}

/* Default sections: white */
.content-wrap > .ds-section:not(.bg-raised),
main > .ds-section:not(.bg-raised) {
  background: #ffffff !important;
  border: none !important;
}

/* Remove ::after decorations but allow ::before for grain-light texture */
.content-wrap > .ds-section::after,
main > .ds-section::after {
  content: none !important;
}
/* Allow grain-light ::before to render */
.content-wrap > .ds-section.grain-light::before,
main > .ds-section.grain-light::before {
  content: '' !important;
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0;
}
html.dark .ds-section.grain-light::before { opacity: 0.4 !important; }

/* Dark mode */
html.dark .content-wrap > .ds-section.bg-raised,
html.dark main > .ds-section.bg-raised {
  background: var(--bg-raised, #0f2042) !important;
  border: none !important;
}
html.dark .content-wrap > .ds-section:not(.bg-raised),
html.dark main > .ds-section:not(.bg-raised) {
  background: var(--bg-base, #0a1428) !important;
  border: none !important;
}

/* ── Section Header Decoration ── */
.ds-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #1E56B5, #4DAEE5);
  border-radius: 2px;
  margin: 0.8rem auto 0;
}
.ds-section h2 {
  position: relative;
}

/* ── Enhanced ds-box ── */
.ds-box {
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.3s ease,
              background 0.25s ease,
              border-color 0.25s ease !important;
  position: relative;
  z-index: 1;
}
.ds-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(13,27,62,0.06), 0 16px 32px rgba(30,86,181,0.10) !important;
}

/* ── Enhanced ds-highlight-box ── */
.ds-highlight-box {
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.3s ease,
              background 0.25s ease,
              border-color 0.25s ease !important;
  position: relative;
  z-index: 1;
}
.ds-highlight-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(13,27,62,0.06), 0 12px 28px rgba(30,86,181,0.10) !important;
}

/* ── Enhanced FAQ hover ── */
.faq-item {
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s ease !important;
  position: relative;
  z-index: 1;
}
.faq-item:hover {
  border-color: rgba(30,86,181,0.25) !important;
  box-shadow: 0 2px 8px rgba(30,86,181,0.08);
}

/* ── Enhanced table ── */
.ds-table-wrap {
  position: relative;
  z-index: 1;
}
.ds-table tbody tr {
  transition: background 0.15s ease;
}
.ds-table tbody tr:hover {
  background: rgba(30,86,181,0.03);
}
html.dark .ds-table tbody tr:hover {
  background: rgba(77,174,229,0.06);
}

/* ── Stat counter cards ── */
.stat-card {
  background: #fff;
  border: 1px solid rgba(30,86,181,0.10);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease;
  box-shadow: 0 1px 2px rgba(13,27,62,0.05), 0 4px 12px rgba(13,27,62,0.06);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1E56B5, #4DAEE5);
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(13,27,62,0.06), 0 16px 32px rgba(30,86,181,0.10);
}
.stat-value {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #1E56B5, #4DAEE5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--clr-b, #5a6e8c);
  line-height: 1.4;
}
html.dark .stat-card {
  background: var(--bg-card) !important;
  border-color: var(--bdr) !important;
}
html.dark .stat-label {
  color: #8aaac8 !important;
}

/* ── Hero SVG illustration area ── */
.hero-illustration {
  max-width: 400px;
  margin: 0 auto;
  position: relative;
}
@media (min-width: 768px) {
  .hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
  }
  .hero-split .hero-text { text-align: left; }
  .hero-split .hero-text .ds-eyebrow { text-align: left; }
  .hero-split .hero-text .ds-title { text-align: left; }
  .hero-split .hero-text .ds-subtitle { text-align: left; margin-left: 0; }
}
@media (max-width: 767px) {
  .hero-illustration { max-width: 280px; margin-top: 2rem; }
}

/* ── Enhanced ds-step ── */
.ds-step {
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
  position: relative;
  z-index: 1;
}
.ds-step:hover {
  transform: translateX(4px);
}

/* ── TOC styling ── */
.toc {
  position: relative;
  z-index: 1;
}

/* ── TL;DR summary ── */
.tldr-summary {
  position: relative;
  z-index: 1;
}

/* ── Related content links ── */
.content-wrap > .ds-section a {
  position: relative;
  z-index: 1;
}
