/* =========================
   HEADER / NAVIGATION
   ========================= */

.header,
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
    height: 68px;
  background: var(--header-bg, #e6e6e8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

/* =========================
   GLOBAL HEADER → PAGE TRANSITION
   - Put <div class="header-transition"> right AFTER </header>
   - "background" = header color (top)
   - ::before background = next section/page (bottom)
   ========================= */

/* Home page only: make header transition white (EN + DE route) */
body.home .header-transition,
body.page-home .header-transition {
  background: #f5f7fb !important;
}

.header-transition{
  position: relative;
  width: 100%;
    height: 80px;
  background: var(--header-transition-next, #0b0f1a);
  overflow: hidden;
  pointer-events: none;
}

.header-transition::before{
  content: "";
  position: absolute;
  inset: 0;
  background: var(--header-bg, #e6e6e8);
  clip-path: polygon(
    0% 0%,
    100% 0%,
    100% 62%,
    58% 62%,
    44% 100%,
    0% 100%
  );
}


/* inner layout */
.header-inner,
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.logo img {
  display: block;
  height: 65px;
  width: auto;
}

/* Desktop nav */
.site-nav,
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: var(--text-sm);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-lang {
  display: grid;
  grid-template-columns: repeat(var(--lang-count, 2), minmax(44px, 1fr));
  align-items: center;
  gap: 4px;
  margin-inline-start: 4px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(100, 116, 139, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.24));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 6px 18px rgba(15, 23, 42, 0.08);
}

.header-lang__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--color-text-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  transition: color 0.16s ease, background-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.header-lang__item:hover {
  color: var(--color-text-main);
  background: rgba(255, 255, 255, 0.34);
}

.header-lang__item.is-active {
  color: #f8fafc;
  background: linear-gradient(135deg, #0a1846, #071338 58%, #0c3f9a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 18px rgba(15, 23, 42, 0.26);
}

.site-nav a:not(.btn),
.nav a:not(.btn) {
  position: relative;
  color: var(--color-text-soft);
  transition: color 0.18s ease;
}

.site-nav a:not(.btn)::after,
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-navy), var(--color-accent));
  opacity: 0;
  transform: scaleX(0.5);
  transform-origin: center;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.site-nav a:not(.btn):hover,
.nav a:not(.btn):hover {
  color: var(--color-text-main);
}

.site-nav a:not(.btn):hover::after,
.nav a:not(.btn):hover::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Active link helper */
.nav a.is-active::after,
.site-nav a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Header CTA */
.nav-cta,
.btn-header {
  margin-left: 12px;
}

/* Burger button – hidden on desktop */
.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(248, 250, 252, 0.85);
  padding: 0;
  cursor: pointer;
  transition:
    background 0.18s ease,
    transform 0.12s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.mobile-toggle:hover {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.mobile-toggle-bar {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: #0f172a;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.mobile-toggle-bar + .mobile-toggle-bar {
  margin-top: 4px;
}

/* Simple "X" animation when open */
.mobile-toggle.is-open .mobile-toggle-bar:first-child {
  transform: translateY(3px) rotate(45deg);
}

.mobile-toggle.is-open .mobile-toggle-bar:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* Mobile nav container */
.mobile-nav {
  display: none;
  position: relative;
  background: #f3f4f7;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  padding: 10px 20px 16px;
}

.mobile-nav a {
  display: block;
  padding: 6px 0;
  font-size: var(--text-sm);
  color: var(--color-text-main);
}

.mobile-nav .header-lang {
  display: inline-grid;
  margin-top: 12px;
  margin-bottom: 8px;
  width: fit-content;
  grid-template-columns: repeat(var(--lang-count, 2), 56px);
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(148, 163, 184, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 6px 14px rgba(15, 23, 42, 0.08);
}

.mobile-nav .header-lang__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
  height: 34px;
  padding: 0;
  font-size: 12px;
  letter-spacing: 0.09em;
}

.mobile-nav .header-lang__item.is-active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 5px 12px rgba(15, 23, 42, 0.22);
}

.mobile-nav-cta {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(209, 213, 219, 0.7);
  font-weight: 500;
}

/* When JS toggles .is-open */
.mobile-nav.is-open {
  display: block;
}

/* Prevent body from scrolling when menu open (optional) */
.no-scroll {
  overflow: hidden;
}

@media (max-width: 720px) {

  .header,
  .site-header {
    height: 54px;
    min-height: 0;
  }

  .header-transition {
    height: 64px;
  }

  .header-controls {
    display: none;
  }

  .header-lang__item {
    min-width: 34px;
    padding: 0 10px;
    font-size: 11px;
  }

  .header-inner,
  .site-header .container {
    flex-wrap: wrap;
    gap: 10px;
    padding-block: 10px;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .mobile-nav {
    width: 100%;
  }
}
