/* =========================================================
   HEADER – Overlay + Scroll-State + Mobile Nav
   ========================================================= */

/* WRAPPER ------------------------------------------------ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.site-header__inner {
  width: 100%;
  margin: 0;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
}

/* LOGO + LOGO SWITCH ------------------------------------- */

.site-header__logo {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Beide Logo-Versionen übereinander legen */
.site-header__logo-img {
  display: block;
  height: 32px;
  width: auto;
  position: absolute;
  inset: 50% auto auto 0;
  transform: translateY(-50%);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Start: Overlay-Logo sichtbar, Default-Logo versteckt */
.site-header__logo-img--overlay {
  opacity: 1;
  visibility: visible;
}

.site-header__logo-img--default {
  opacity: 0;
  visibility: hidden;
}

/* Nach Scroll: Default-Logo zeigen, Overlay-Logo verstecken */
.site-header.is-scrolled .site-header__logo-img--overlay {
  opacity: 0;
  visibility: hidden;
}

.site-header.is-scrolled .site-header__logo-img--default {
  opacity: 1;
  visibility: visible;
}

/* NAV WRAP BASIS ---------------------------------------- */

.site-header__navwrap {
  display: none; /* Mobile default, Desktop überschreibt */
}

/* Reset für Listen */
.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* PRIMARY NAV (Desktop Mitte) */

.site-nav--primary {
  flex: 1;
}

.site-nav__list--primary {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}

.site-nav__list--primary a {
  text-decoration: none;
  font-size: 1rem;
  color: var(--tc-color-text, #020617);
  font-weight: 400;
}

/* ACTION NAV (Desktop rechts) */

.site-nav__list--actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav__list--actions > li > a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--tc-color-text, #020617);
  font-weight: 400;
}

/* CTA 1 – Primary Button */

.site-nav__list--actions .menu-item.cta1 > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.9rem;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    var(--tc-color-primary, #4f46e5),
    var(--tc-color-primary-soft, #6366f1)
  );
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 18px 40px rgba(79, 70, 229, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.site-nav__list--actions .menu-item.cta1 > a:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* CTA 2 – Outline Button */

.site-nav__list--actions .menu-item.cta2 > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.63rem 1.8rem;
  border-radius: 999px;
  border: 1px solid var(--tc-color-border-subtle, rgba(148, 163, 184, 0.45));
  background: var(--tc-color-bg-surface, #ffffff);
  color: var(--tc-color-text, #020617);
  font-weight: 500;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

/* BURGER / CLOSE TOGGLE -------------------------------- */

.site-header__toggle {
  border: none;
  background: none;
  padding: 0.25rem;
  display: none; /* wird nur auf Mobile angezeigt */
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.site-header__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--tc-color-text, #020617);
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

/* X-State */

.site-header__toggle.is-open span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
.site-header__toggle.is-open span:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

/* =========================================================
   OVERLAY-STATE (Start – über Hero)
   ========================================================= */

.site-header--overlay .site-nav__list--primary a,
.site-header--overlay .site-nav__list--actions > li > a {
  color: #ffffff;
}

.site-header--overlay .site-header__toggle span {
  background: #ffffff;
}

/* CTAs im Overlay leicht angepasst */

.site-header--overlay .site-nav__list--actions .menu-item.cta1 > a {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.55);
}

.site-header--overlay .site-nav__list--actions .menu-item.cta2 > a {
  background: rgba(15, 23, 42, 0.55);
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.5);
}

/* =========================================================
   SCROLLED-STATE (ab 200px – bekommt Klasse .is-scrolled)
   ========================================================= */

.site-header.is-scrolled {
  background: var(--tc-color-bg-page, #ffffff);
  border-bottom: 1px solid var(--tc-color-border-subtle, rgba(15, 23, 42, 0.06));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.site-header.is-scrolled .site-nav__list--primary a,
.site-header.is-scrolled .site-nav__list--actions > li > a {
  color: var(--tc-color-text, #020617);
}

.site-header.is-scrolled .site-header__toggle span {
  background: var(--tc-color-text, #020617);
}

/* CTAs im scrolled State wieder „normal“ */

.site-header.is-scrolled .site-nav__list--actions .menu-item.cta1 > a {
  background: linear-gradient(
    135deg,
    var(--tc-color-primary, #4f46e5),
    var(--tc-color-primary-soft, #6366f1)
  );
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(79, 70, 229, 0.4);
}

.site-header.is-scrolled .site-nav__list--actions .menu-item.cta2 > a {
  background: #ffffff;
  color: var(--tc-color-text, #020617);
  border-color: var(--tc-color-border-subtle, rgba(148, 163, 184, 0.45));
}

/* =========================================================
   DESKTOP LAYOUT (≥ 900px)
   ========================================================= */

@media (min-width: 900px) {
  .site-header__toggle {
    display: none;
  }

  .site-header__navwrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    margin-left: 2.5rem;
    position: static;
    background: transparent;
    border-top: none;
    padding: 0;
  }
}

/* =========================================================
   MOBILE LAYOUT (< 900px)
   ========================================================= */

@media (max-width: 899px) {
  .site-header__toggle {
    display: inline-flex;
  }

  .site-header__navwrap {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: rgba(15, 23, 42, 0.96);
    border-top: 1px solid rgba(15, 23, 42, 0.3);
    padding: 1.25rem 1.25rem 2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    display: none;
    z-index: 9999;
  }

  .site-header__navwrap.is-open {
    display: flex;
  }

  body.nav-open {
    overflow: hidden;
  }

  .site-nav__list--primary {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    width: 100%;
  }

  .site-nav__list--actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
  }

  .site-nav__list--actions .menu-item.cta1 > a,
  .site-nav__list--actions .menu-item.cta2 > a {
    width: 100%;
    justify-content: center;
  }
}

/* Wenn WP-Adminbar aktiv ist, Header darunter schieben */
body.admin-bar .site-header {
  top: 32px; /* Standard-Höhe der Adminbar auf Desktop */
}

/* WP macht die Adminbar auf kleineren Screens höher */
@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

/* Mobile Header Height Fix */
@media (max-width: 899px) {
  .site-header__inner {
    padding: 1rem 1.25rem; /* mehr Luft! */
    min-height: 70px;      /* fixe Mindesthöhe */
  }
}

@media (max-width: 899px) {
  .c-hero {
    padding-top: 120px; /* Platz für den mobilen Header */
  }
}