/* =========================================
   HEADER NAVIGATION - APPLE STYLE
   Theme: Glassmorphism, Elegant, Minimal
========================================= */

/* ----- Variables ----- */
:root {
  --nav-font-display: 'Outfit', sans-serif;
  --nav-font-body: 'Inter', sans-serif;
  --nav-text: #ffffff;
  --nav-text-muted: rgba(255, 255, 255, 0.6);
  --nav-accent: #ffffff;
  --nav-glass-bg: rgba(10, 10, 15, 0.85);
  --nav-glass-blur: 20px;
  --nav-border: rgba(255, 255, 255, 0.1);
}

/* Base reset */
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ----- Navigation Container ----- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}

/* ----- Hamburger Button ----- */
.hamburger {
  position: fixed;
  left: 24px;
  top: 24px;
  z-index: 9999;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
  transition: transform 0.3s ease;
}

.hamburger:hover {
  transform: scale(1.1);
}

.nav-line {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--nav-text);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

/* X Animation - Precise Center Cross */
.hamburger.active .nav-line:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.hamburger.active .nav-line:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ----- Menu Wrapper (Full Screen Overlay) ----- */
.menu-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--nav-glass-bg);
  backdrop-filter: blur(var(--nav-glass-blur));
  -webkit-backdrop-filter: blur(var(--nav-glass-blur));

  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  padding: 0;

  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-wrapper.active {
  opacity: 1;
  visibility: visible;
}

/* ----- Menu Left (Nav Links) ----- */
.menu-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10%;
}

/* ----- Menu Right (Contact Info) ----- */
.menu-right {
  flex: 0 0 35%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--nav-border);
  padding: 60px;

  /* Animation */
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s,
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.menu-wrapper.active .menu-right {
  opacity: 1;
  transform: translateX(0);
}

.menu-right-content {
  text-align: left;
}

.menu-right-label {
  font-family: var(--nav-font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--nav-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: 0 0 1rem;
}

.menu-right-email {
  font-family: var(--nav-font-display);
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--nav-text);
  text-decoration: none;
  display: block;
  margin-bottom: 2rem;
  transition: color 0.3s ease;
}

.menu-right-email:hover {
  color: var(--nav-text-muted);
}

.menu-social {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nav-text);
  text-decoration: none;
  font-size: 2rem;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.social-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.menu-right-footer {
  font-family: var(--nav-font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--nav-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ----- Navigation Links ----- */
.menu-wrapper ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.menu-wrapper ul li {
  overflow: hidden;
}

.menu-wrapper a {
  display: block;
  font-family: var(--nav-font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 200;
  letter-spacing: -0.02em;
  color: var(--nav-text);
  text-decoration: none;
  padding: 0.5rem 0;
  position: relative;

  /* Animation initial state */
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.3s ease;
}

/* Staggered entrance */
.menu-wrapper.active a {
  opacity: 1;
  transform: translateY(0);
}

.menu-wrapper.active li:nth-child(1) a {
  transition-delay: 0.1s;
}

.menu-wrapper.active li:nth-child(2) a {
  transition-delay: 0.15s;
}

.menu-wrapper.active li:nth-child(3) a {
  transition-delay: 0.2s;
}

.menu-wrapper.active li:nth-child(4) a {
  transition-delay: 0.25s;
}

.menu-wrapper.active li:nth-child(5) a {
  transition-delay: 0.3s;
}

.menu-wrapper.active li:nth-child(6) a {
  transition-delay: 0.35s;
}

/* Hover Effects */
.menu-wrapper a::after {
  content: '';
  position: absolute;
  bottom: 0.4rem;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--nav-accent);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-wrapper a:hover {
  color: var(--nav-text);
}

.menu-wrapper a:hover::after {
  width: 100%;
}

/* ----- Email Container (Left Side) ----- */
.email-container {
  margin-top: 4rem;

  /* Animation */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s,
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

.menu-wrapper.active .email-container {
  opacity: 1;
  transform: translateY(0);
}

.email-copy {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 1px solid var(--nav-border);
  border-radius: 100px;
  padding: 14px 28px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.email-copy:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.email-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.email {
  font-family: var(--nav-font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--nav-text-muted);
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.email-copy:hover .email {
  color: var(--nav-text);
}

.copy-state {
  font-family: var(--nav-font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--nav-text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0;
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.email-copy:hover .copy-state {
  opacity: 0.7;
  top: -30px;
}

.email-copy.copied .email {
  animation: emailPulse 0.6s ease;
}

@keyframes emailPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

/* ----- Mobile Adjustment ----- */
@media (max-width: 768px) {
  .hamburger {
    left: auto;
    right: 20px;
    top: 20px;
  }

  .menu-wrapper {
    flex-direction: column;
    justify-content: flex-start;
    padding: 80px 20px 80px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  .menu-left {
    flex: 0 0 auto;
    padding: 0;
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .menu-left ul {
    width: 100%;
  }

  .menu-right {
    flex: 0 0 auto;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--nav-border);
    padding: 2rem 0 0;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }

  .menu-right-content {
    text-align: center !important;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .menu-right-label,
  .menu-right-email,
  .menu-right-footer {
    text-align: center !important;
  }

  .menu-social {
    justify-content: center;
    width: 100%;
  }

  .menu-wrapper ul {
    align-items: center;
    gap: 0;
  }

  .menu-wrapper a {
    text-align: center;
    font-size: clamp(2rem, 8vw, 3rem);
    padding: 10px 0;
  }

  .menu-left .email-container {
    display: none;
  }

  .menu-right-email {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }
}

/* Hide logo badge when menu open */
body:has(.menu-wrapper.active) .home-logo-badge {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* =========================================
   LANGUAGE SWITCHER
========================================= */
.lang-switcher {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  gap: 0;
  background: rgba(10, 10, 15, 0.7);
  padding: 4px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

/* Sliding indicator */
.lang-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: rgba(138, 43, 226, 0.5);
  border-radius: 16px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* When EN is active, slide right */
.lang-switcher.en .lang-slider {
  transform: translateX(100%);
}

.lang-option {
  font-family: var(--nav-font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: color 0.3s ease;
  position: relative;
  z-index: 1;
  user-select: none;
}

.lang-option:hover {
  color: #ffffff;
}

/* Active language option */
.lang-switcher.de .lang-option[data-lang="de"],
.lang-switcher.en .lang-option[data-lang="en"] {
  color: #ffffff;
}

/* Mobile language switcher in menu */
.lang-switcher-mobile {
  display: none;
  gap: 12px;
  margin-top: 24px;
  justify-content: center;
}

.lang-switcher-mobile .lang-btn {
  font-size: 0.85rem;
  font-weight: 400;
  padding: 10px 20px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-switcher-mobile .lang-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.lang-switcher-mobile .lang-btn.active {
  color: #ffffff;
  border-color: rgba(138, 43, 226, 0.6);
  background: rgba(138, 43, 226, 0.15);
}

/* Hide desktop switcher on mobile, show mobile switcher in menu */
@media (max-width: 768px) {
  .lang-switcher {
    display: none;
  }

  .lang-switcher-mobile {
    display: flex;
  }
}