/* Schrift: Poppins, selbst gehostet (SIL Open Font License, siehe assets/fonts/OFL.txt).
   font-display: block – der Browser wartet kurz auf Poppins, statt erst eine Ersatzschrift
   zu zeigen und dann zu tauschen (sonst „zuckt“ der Text beim Laden). */
@font-face {
  font-family: "Poppins";
  font-weight: 400;
  font-display: block;
  src: url("/assets/fonts/poppins-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-weight: 500;
  font-display: block;
  src: url("/assets/fonts/poppins-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-weight: 700;
  font-display: block;
  src: url("/assets/fonts/poppins-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-weight: 900;
  font-display: block;
  src: url("/assets/fonts/poppins-latin-900-normal.woff2") format("woff2");
}

/* Farben und Schriftgrößen wie im Elementor-Kit des Originals */
:root {
  --primary: #02005f;
  --accent: #ecb63f;
  --white: #ffffff;
  --black: #000000;
  --text: #333333;
  --faq-title: #1f2124;
  --faq-border: #d5d8dc;

  --fs-body: clamp(1rem, 0.9643rem + 0.1786vw, 1.125rem);
  --fs-small: clamp(0.8889rem, 0.8857rem + 0.0159vw, 0.9rem);
  --fs-button: clamp(1.125rem, 1.0893rem + 0.1786vw, 1.25rem);
  --fs-section-title: clamp(1.4238rem, 1.2028rem + 1.1049vw, 2.1973rem);
  --fs-subtitle: clamp(1.125rem, 1.0446rem + 0.4018vw, 1.4063rem);
  --fs-step-title: clamp(1.2656rem, 1.125rem + 0.7031vw, 1.7578rem);

  /* Abstandssystem: ein Wert zwischen den Abschnitten, einer innerhalb */
  --space-section: 64px;
  --space-inner: 32px;
  /* Seitenrand links und rechts: Handy 20px, ab Tablet 32px */
  --gutter: 20px;

  /* Themenliste und Logoband: gemeinsame Breite; Logo-Breite im Band */
  --block-max: 880px;
  --logo-w: 150px;

  --content-max: 1140px;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: "Poppins", sans-serif;
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0 0 0.9rem; }
a { color: var(--accent); text-decoration: none; }

/* Wörter wie „E-Mail“ nicht am Bindestrich umbrechen */
.nowrap { white-space: nowrap; }

/* Keine Fokusrahmen auf der Seite */
:focus { outline: none; }

/* Button (Hero, FAQ, Karten) */
.button {
  display: inline-block;
  padding: 20px 40px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--primary);
  font-size: var(--fs-button);
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

/* Abschnitte: gleicher Abstand nach oben, Inhalt max. 1140px (bis 1024px Bildschirmbreite max. 1024px) */
.section { padding: var(--space-section) var(--gutter) 0; }
.wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-inner);
  width: 100%;
  max-width: min(100%, var(--content-max));
  margin: 0 auto;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 20px;
  /* Nicht ganz bildschirmfüllend, damit der nächste Abschnitt unten hervorschaut */
  min-height: 75vh;
  min-height: 75svh;
  padding: 100px 30px 30px;
  background: var(--primary);
}

/* Hintergrundbild als <img>: der Browser findet es sofort und zeichnet es zusammen mit dem Text */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: opacity 0.4s ease;
}
/* Nur wenn das Bild beim Seitenaufbau noch nicht da ist: weich einblenden statt aufploppen */
.hero-bg.is-loading { opacity: 0; }

/* Handy: Ausschnitt nach rechts, damit die Person im Bild zu sehen ist;
   leichter Verlauf oben hält den Text über dem helleren Bildteil gut lesbar */
@media (max-width: 767px) {
  .hero-bg { object-position: 75% center; }
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, rgb(2 0 95 / 0.5), rgb(2 0 95 / 0.2) 70%, transparent);
  }
}

.hero-kicker {
  margin: 0;
  color: var(--accent);
  /* 16px bei 320px Breite bis 25px ab 1440px – auf dem Handy nicht größer als die Unterzeile */
  font-size: clamp(1rem, 0.8393rem + 0.8036vw, 1.5625rem);
  line-height: 1;
  letter-spacing: 5px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgb(0 0 0 / 0.3);
}

.hero-title {
  color: var(--white);
  font-size: clamp(2.5658rem, 1.383rem + 5.9139vw, 6.7055rem);
  font-weight: 900;
  line-height: clamp(3rem, 2.1429rem + 4.2857vw, 6rem);
  text-shadow: 0 0 10px rgb(0 0 0 / 0.3);
}

.hero-subtitle {
  max-width: 36ch;
  margin: 0;
  color: var(--white);
  font-size: var(--fs-subtitle);
  line-height: 1.4;
}

/* ---------- Überschriften der Abschnitte ---------- */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.section-title {
  color: var(--primary);
  font-size: var(--fs-section-title);
  font-weight: 700;
  line-height: 1;
}

/* Ruhige Unterzeile: normaler Buchstabenabstand, Fließtextgröße, normale Stärke */
.section-subtitle {
  margin: 0;
  color: var(--primary);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.3;
}

/* ---------- Karussell ---------- */
/* Die Bühne hat über der Karte 60px Luft; 40px davon unter die Überschrift ziehen */
#berater .carousel { margin-top: -40px; }

/* Gleich breit wie Zeitstrahl, Themenliste und Logoband; die Pfeile sitzen an der Kante */
.carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: var(--block-max);
  margin-left: auto;
  margin-right: auto;
}

.carousel-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
  max-width: 800px;
}

.carousel-track {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 600px;
  overflow: hidden;
  touch-action: pan-y;
}

/* Karte nie breiter als der Bildschirm; Höhe wächst mit, falls ein Text länger ist */
.carousel-card {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(320px, calc(100% - 32px));
  min-height: 480px;
  padding: 30px 20px;
  border-radius: 20px;
  background: var(--primary);
  box-shadow: 0 15px 35px rgb(0 0 0 / 0.15);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.6);
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.carousel-card img {
  width: 140px;
  height: 140px;
  margin-bottom: 20px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 5px 15px rgb(0 0 0 / 0.1);
}

.carousel-card h3 {
  margin-bottom: 5px;
  color: var(--accent);
  font-size: var(--fs-body);
  line-height: 1.2;
}

.carousel-card .role {
  margin-bottom: 15px;
  color: var(--white);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 1px;
}

.carousel-card .desc {
  flex-grow: 1;
  margin: -10px 0 20px;
  color: var(--white);
  font-size: var(--fs-small);
}

.carousel-card.is-active {
  z-index: 10;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.carousel-card.is-prev,
.carousel-card.is-next {
  z-index: 5;
  opacity: 0.8;
  pointer-events: auto;
  cursor: pointer;
}
.carousel-card.is-prev { transform: translateX(-240px) scale(0.75); }
.carousel-card.is-next { transform: translateX(240px) scale(0.75); }

/* Punkte nah an die Karte holen (die Bühne hat unter der Karte 60px Luft) */
.carousel-dots {
  display: flex;
  justify-content: center;
  margin-top: -36px;
}

/* Punkt sichtbar 12px, Klickfläche 22px */
.carousel-dot {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.carousel-dot::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin: auto;
  border-radius: 50%;
  background: #ccc;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.carousel-dot.is-active::before {
  background: var(--primary);
  transform: scale(1.2);
}

.carousel-arrow {
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.carousel-arrow svg {
  width: 24px;
  height: 24px;
  fill: var(--primary);
}

@media (hover: hover) and (pointer: fine) {
  .carousel-arrow:hover { transform: scale(1.2); }
  .carousel-dot:hover::before { background: var(--accent); transform: scale(1.2); }
}

/* ---------- Schritte als Zeitstrahl ---------- */
/* Handy: Nummer | Text, Bild klein darunter. Ab 600px steht das Bild rechts daneben. */
.timeline {
  --num: 40px;
  width: 100%;
  max-width: var(--block-max);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: var(--num) 1fr;
  gap: 16px;
  padding-bottom: var(--space-inner);
}
.timeline-step:last-child { padding-bottom: 0; }

/* Verbindungslinie von Nummer zu Nummer */
.timeline-step::before {
  content: "";
  position: absolute;
  top: calc(var(--num) + 8px);
  bottom: 8px;
  left: calc(var(--num) / 2 - 1px);
  width: 2px;
  border-radius: 1px;
  background: rgb(2 0 95 / 0.15);
}
.timeline-step:last-child::before { display: none; }

.timeline-num {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--num);
  height: var(--num);
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
}

.timeline-body {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.timeline-body p { margin: 0; }

/* Titel mittig auf Höhe des Nummernkreises */
.timeline-body h3 {
  margin-top: calc((var(--num) - 1em) / 2);
  color: var(--primary);
  font-size: var(--fs-step-title);
  line-height: 1;
}

.timeline-img {
  grid-column: 2;
  width: 160px;
  border-radius: 8px;
}

/* ---------- Dunkles Band (Kompetenzen) ---------- */
.section--dark {
  margin-top: var(--space-section);
  padding-bottom: var(--space-section);
  /* Vignette: Mitte im Markenblau, zu den Rändern hin weich dunkler */
  background: radial-gradient(ellipse 75% 90% at 50% 50%, var(--primary) 45%, #010033 100%);
}
.section--dark .section-title { color: var(--white); }
.section--dark .section-subtitle { color: var(--accent); }

/* Themen als Liste mit goldenem Häkchen: Handy 2 Spalten, ab 600px 3 Spalten */
.skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 24px;
  width: 100%;
  max-width: var(--block-max);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.skills li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: var(--white);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.3;
  hyphens: manual; /* Trennung nur an den Wortfugen (&shy; im HTML) */
}

.skills li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Partnerlogos als Laufband ---------- */

/* Gleich breit wie die Themenliste; an den Rändern weich ausgeblendet */
.logo-band {
  width: 100%;
  max-width: var(--block-max);
  margin: 0 auto;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

/* Die Liste steht zweimal hintereinander; nach der Hälfte beginnt sie nahtlos von vorn */
.logo-track {
  display: flex;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: logo-band 40s linear infinite;
}

.logo-track li {
  flex: none;
  width: var(--logo-w);
  height: calc(var(--logo-w) * 2 / 3);
  margin-right: 16px;
}
.logo-track img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes logo-band {
  to { transform: translateX(-50%); }
}

/* ---------- FAQ ---------- */
.faq-wrap { max-width: none; }
.faq .section-title { text-align: center; }

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 30px 20px;
  border-bottom: 1px groove var(--faq-border);
  color: var(--faq-title);
  cursor: pointer;
  list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion details[open] > summary { color: var(--primary); }

/* Plus / Minus (Font-Awesome-Formen wie im Original, 14px hoch) */
.accordion-icon {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z'/%3E%3C/svg%3E");
  flex: none;
  width: 12px;
  height: 14px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.accordion details[open] .accordion-icon {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z'/%3E%3C/svg%3E");
}

.accordion-body { padding: 20px; }

.faq-cta {
  margin: 0;
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  /* minus 12px Tippfläche der Links, damit der sichtbare Abstand dem Abschnittsabstand entspricht */
  padding: calc(var(--space-section) - 12px) var(--gutter) 40px;
  color: var(--black);
  font-size: var(--fs-small);
}
.site-footer p { margin: 0; }
/* Größere Tippfläche für die kleinen Links */
.site-footer a {
  display: inline-block;
  padding: 12px 8px;
  color: var(--black);
}

/* ---------- Datenschutzerklärung ---------- */
.legal {
  padding: 40px 20px 0;
  font-size: 1rem;
  overflow-wrap: break-word;
  hyphens: auto;
}
/* Zeilenlänge auf gut lesbare ca. 75 Zeichen begrenzen */
.legal-content {
  max-width: 62ch;
  margin: 0 auto;
}
.legal h1, .legal h2, .legal h3, .legal h4 {
  margin: 0.5rem 0 1rem;
  color: var(--primary);
  font-weight: 500;
  line-height: 1.2;
}
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.6rem; }
.legal h3 { font-size: 1.35rem; }
.legal h4 { font-size: 1.15rem; }
.legal ul { margin: 0 0 0.9rem; padding-left: 24px; }

/* ---------- Breakpoints ---------- */

/* Unter 360px reicht der Platz nicht für 2 Themen-Spalten */
@media (max-width: 359px) {
  .skills { grid-template-columns: 1fr; }
}

/* Ab 600px: Themen in 3 Spalten, Logos größer, Schritt-Bild rechts neben dem Text */
@media (min-width: 600px) {
  .timeline-step { grid-template-columns: var(--num) 1fr 180px; }
  .timeline-num { grid-row: 1; }
  .timeline-img { grid-column: 3; grid-row: 1; width: 100%; }

  .skills {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 40px;
  }
  .skills li { font-size: var(--fs-button); }

  :root { --logo-w: 200px; }
}

/* Ab Tablet */
@media (min-width: 768px) {
  :root { --gutter: 32px; }

  .hero {
    justify-content: center;
    min-height: min(85vh, 820px);
    min-height: min(85svh, 820px);
    padding: 96px 10%;
  }

  /* FAQ: Antworten nicht breiter als ca. 70 Zeichen */
  .faq-wrap { max-width: min(60%, 760px); }

  .legal { padding: 100px 50px 0; }
  .legal h1 { font-size: 2.5rem; }
  .legal h2 { font-size: 2rem; }
  .legal h3 { font-size: 1.75rem; }
  .legal h4 { font-size: 1.5rem; }
}

/* Karussell bis 899px: nur die aktive Karte, Wischen und Punkte statt Pfeilen */
@media (max-width: 899px) {
  .carousel-arrow { display: none; }
  /* Wechsel als seitliches Gleiten: alte Karte raus, neue von der anderen Seite rein */
  .carousel-card.is-prev,
  .carousel-card.is-next {
    opacity: 0;
    pointer-events: none;
  }
  .carousel-card.is-prev { transform: translateX(-110%); }
  .carousel-card.is-next { transform: translateX(110%); }
}

/* Ab 900px: größere Abstände, Zeitstrahl mit größeren Nummern und Bildern */
@media (min-width: 900px) {
  :root {
    --space-section: 80px;
    --space-inner: 40px;
  }

  /* Desktop: Pfeile und Nachbarkarten reichen, keine Punkte.
     Die 60px Luft unter der Karte zählen zum Abschnittsabstand. */
  .carousel-dots { display: none; }
  #berater .carousel { margin-bottom: -60px; }

  .timeline { --num: 48px; }
  .timeline-step {
    grid-template-columns: var(--num) 1fr 240px;
    column-gap: 32px;
  }
}

@media (max-width: 1024px) {
  :root { --content-max: 1024px; }
}
