/* Gesamter Wrapper */
.header-wrapper {
  position: fixed;
  top: 0;
  width: 100vw;
  z-index: 1000;
}

body {
  padding-top: var(--header-total-h);
}

/* Mini Header */
.mini-header {
  height: var(--mini-header-h);
  background: var(--brand);
  width: 100%;
  border-bottom: 1px solid var(--line);
  transition: all .5s ease;
  color: #fff;
}

.mini-container {
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4rem;
}

.mini-right {
  justify-content: flex-end;
}

.mini-left,
.mini-right {
  width: 33%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mini-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 33%;
  overflow: hidden;
}

.marquee-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
}

.marquee {
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
}

.marquee__inner {
  display: inline-block;
  will-change: transform;
  white-space: nowrap;
  transform: translateX(0);
}

.marquee.is-scrolling .marquee__inner {
  animation: marquee var(--scroll-duration, 10s) linear infinite;
}

@keyframes marquee {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.info-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  height: 1.1rem;
  width: 1.1rem;
  flex-shrink: 0;
}

.info-btn img {
  width: 100%;
  height: 100%;
  display: block;
}

.mini-left a {
  color: #fff;
  text-decoration: none;
}

/* Main Header */
.main-header {
  width: 100%;
  height: var(--main-header-h);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
  transition: all .5s ease;
}

.main-container {
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4rem;
}

.main-left,
.main-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.main-left {
  justify-content: flex-start;
}

.main-left img {
  width: 10rem;
  transition: transform .5s ease;
}

.main-left img:hover {
  transform: scale(1.05);
}

.main-right {
  justify-content: flex-end;
}

/* Main Header - Center Nav*/
.main-center {
  display: flex;
  justify-content: center;
  position: relative;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  padding: 0;
  margin: 0;
}

.nav-links > li {
  position: static; 
  display: flex;
  align-items: center;
}

.nav-links > li > a {
  text-decoration: none;
  color: var(--text-main);
  padding: 0.5rem 0.5rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all .5s ease;
  cursor: pointer;
}

.nav-links > li.active > a {
  color: var(--brand);
}

/* --- MEGA MENU --- */
.dropdown-menu {
  position: absolute;
  top: 135%;
  left: 50%;
  width: 750px;
  max-width: 90vw;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background: var(--card-bg-active);
  border: 1px solid var(--card-border);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%);
  transition: all .5s ease;
  z-index: 100;
}

/* Menü anzeigen */
.nav-links > li.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  text-decoration: none;
  border-radius: 12px;
  border-left: 3px solid transparent;
  transition: all .5s;
  height: 100%;
  box-sizing: border-box;
}

.menu-item:hover {
  background: var(--card-bg-hover);
  border-left-color: var(--brand);
}

.icon-box {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px; 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--icon-box-shadow);
}

.icon-box img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}

.color-brand {
  background: var(--bg-color-brand);
}

.item-content {
  display: flex;
  flex-direction: column;
}

.item-title {
  font-weight: bold;
  color: var(--text-main);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.item-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-top: 4px;
}

/* Badge (NEW) */
.menu-badge-new {
  background: #fee0e8;
  color: var(--ad-bg);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.menu-badge-dev {
  background: #fee0fe;
  color: var(--brand);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

/* Theme-Switcher */
.switch {
  display: inline-block;
  position: relative;
  width: 3em;
  height: 1.75em;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card-bg);
  transition: .4s;
  border-radius: 30px;
  border: 1px solid var(--card-border);
  transition: all .5s ease;
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.1em;
  width: 1.1em;
  border-radius: 50%;
  left: 0.4em;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(40deg,#ff0080,#ff8c00 70%);
  transition: .4s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider:before {
  left: calc(100% - (1.1em + 0.4em));
  background: transparent;
  box-shadow: inset -2px -2px 0 -1.5px #8983f7, inset -6px -3px 0 0 #a3dafb;
}

/* --- Language Dropdown --- */
.language-dropdown {
  position: relative;
}

.language-btn {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 0 16px;
  height: 44px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all .5s ease;
}

.language-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  background: var(--dropdown-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 8px;
  min-width: 120px;
  box-shadow: var(--glass-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all .5s ease;
  z-index: 101;
}

.language-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-main);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  transition: all .5s;
}

.language-dropdown-item:hover {
  background: var(--dropdown-hover);
}

.language-dropdown-item.active {
  color: var(--brand);
  background: rgba(204, 51, 204, 0.1);
}

/* Navigationspanel */
nav.site-nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: 100%;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.2, 1);
  background: var(--bg);
  padding: 1rem 0;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
}

nav.site-nav.open {
  transform: translateX(0);
}

nav .nav-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1rem;
}

nav a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  color: var(--fg);
  text-decoration: none;
}

nav a:focus,
nav a:hover {
  background: var(--card-bg);
  outline: none;
}

.nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  margin-bottom: 0.25rem;
}

.close-sm {
    display: none;
}

.btn-menu {
    display: none;
}

/*  Hamburger Style */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 1rem;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background: var(--text-main);
  border-radius: 3px;
  transition: all .5s ease;
}

/* AdBar */
.adBar {
  width: 100%;
  height: 50px;
  background: var(--ad-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  transition: background .5s ease;
}

.promo-icon {
  height: 24px;
  width: auto;
  display: block;
}

.adBar p {
  color: #fff;
  font-size: 16px;
  margin-right: 5px;
}

.countdown {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 0.85rem;
  color: #fff;
}

.countdown .time {
  margin: 0 2px;
}

/* Mobile */
@media (max-width: 1024px) {
  .mini-header {
    display: none;
  }
  
  .main-container {
    padding: 0 1rem;
  }

  .main-right > div { gap: 10px !important; }
  .language-btn span { display: none; }

  .hamburger { display: block; z-index: 1001; }
  .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

  .main-left, 
  .main-right {
    position: relative;
    z-index: 1005;
  }

  .main-center {
    position: fixed;
    top: var(--header-total-h);
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: calc(var(--header-total-h) + 2rem);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
    z-index: 1000;
  }
  .main-center.open { transform: translateX(0); }

  .nav-links { flex-direction: column; width: 100%; padding-bottom: 80px; }
  .nav-links > li { display: block; width: 100%; border-bottom: 1px solid var(--card-border); }
  
  .nav-links > li > a.nav-item {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 1.5rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
  }

  /* Dropdowns im Mobile-View in ein Grid umwandeln */
  .dropdown-menu {
    position: static !important;
    opacity: 1 !important; visibility: visible !important;
    transform: none !important; width: 100% !important;
    max-width: 100% !important; box-shadow: none !important;
    border-radius: 0; background: rgba(0,0,0,0.03);
    padding: 1rem !important; display: none !important; 
    grid-template-columns: 1fr !important; gap: 0.5rem;
  }
  .nav-links > li.active .dropdown-menu {
    display: grid !important;
    animation: fadeIn 0.3s ease;
  }
  .dropdown-menu .menu-item { padding: 0.75rem; }
}