/* --- MASTER HEADER.CSS --- */

/* 1. SAFETY RESET */
* {
  box-sizing: border-box;
}

/* 2. VARIABLES */
:root {
  --ukraine-blue: #0057b7;
  --ukraine-yellow: #ffdd00;
  --bg-nav: rgba(255, 255, 255, 0.98);
  --text-main: #1a1a1a;
  --text-body: #4a4a4a;
  --text-muted: #666;
  --border-color: #eee;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --topbar-bg: #e6f2ff;
  --topbar-text: #0057b7;
  --track-bg: #cbdcea;
}

/* 3. TOP BAR */
#ukraine-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--topbar-bg);
  color: var(--topbar-text);
  border-bottom: 2px solid var(--ukraine-yellow);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 40px;
  box-shadow: 0 4px 10px var(--shadow-color);
  font-size: 0.9rem;
  flex-wrap: wrap;
  gap: 20px;
}

.bar-content-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
}
.donation-progress-container {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Arial, sans-serif;
}
.progress-track {
  width: 200px;
  height: 12px;
  background-color: var(--track-bg);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background-color: var(--ukraine-yellow);
  width: 20%;
  border-right: 1px solid #c9ae00;
}
.ukraine-bar-close {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  opacity: 0.7;
}
.ukraine-bar-close:hover {
  opacity: 1;
}

/* 4. NAVIGATION (Main Header) */
nav {
  display: block;
  width: 100%;
  height: auto;
  padding: 15px 0;
  position: sticky;
  top: 0;
  background: var(--bg-nav);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 20px var(--shadow-color);
  transition: top 0.3s ease;
}

nav .container {
  max-width: 1600px !important;
  width: 95%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-text {
  text-decoration: none;
  display: flex;
  align-items: center;
}
.logonav {
  height: 60px;
  width: auto;
  display: block;
}

/* Contact Info (Desktop) */
.nav-contact-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 40px;
  margin-right: auto;
  font-size: 0.85rem;
  border-left: 1px solid var(--border-color);
  padding-left: 25px;
}
.nav-contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-body);
  margin: 2px 0;
  font-weight: 600;
}
.nav-contact-link:hover {
  color: var(--ukraine-blue);
}
.nav-contact-link i {
  color: var(--ukraine-blue);
  width: 15px;
  text-align: center;
}

/* Menu Links */
.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  color: var(--nav-link-color, #2c2c2c);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--ukraine-blue);
}

/* Icons & Buttons */
.nav-icons-group {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 15px;
  border-left: 1px solid var(--border-color);
  padding-left: 25px;
}
.nav-icon {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: 0.3s;
}
.nav-icon:hover {
  color: var(--ukraine-blue);
  transform: scale(1.1);
}
.theme-toggle-btn {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 15px;
}
.btn-yellow {
  background: var(--ukraine-yellow);
  color: #1a1a1a !important;
  padding: 12px 25px;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.3s;
}
.btn-yellow:hover {
  background: #e6c200;
}

/* --- MOBILE MENU BASIC STYLES (ALWAYS LOADED) --- */
/* WICHTIG: Das hier muss VOR den Media Queries stehen oder GLOBAL sein */

.mobile-menu-toggle {
  display: none; /* Desktop: Verstecken */
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-main);
  cursor: pointer;
  margin-left: 15px;
}

.mobile-menu-overlay {
  display: none; /* Desktop: Verstecken */
  position: fixed; /* Fixiert über allem */
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #ffffff;
  z-index: 10000; /* Sehr hoch, damit es über allem liegt */
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
  animation: fadeIn 0.3s ease-in-out;
}

/* Dark Mode für Menü */
body.dark-mode .mobile-menu-overlay {
  background-color: #1a1a1a;
  color: #fff;
}

/* Wenn 'active' Klasse da ist, anzeigen (wird von JS gesteuert) */
.mobile-menu-overlay.active {
  display: flex !important;
}


/* --- RESPONSIVE MEDIA QUERIES --- */

/* Tablet & Mobile Anpassungen */
@media (max-width: 1050px) {
  .nav-contact-info {
    display: none;
  }
}

/* AB HIER GREIFT DAS MOBILE MENÜ (< 900px) */
@media (max-width: 900px) {

  /* 1. Desktop Elemente verstecken */
  .nav-links {
    display: none !important;
  }
  
  /* 2. Mobile Button anzeigen */
  .mobile-menu-toggle {
    display: block;
  }

  /* 3. Styling im Menü selbst */
  .mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
  }

  .mobile-logo {
    height: 50px;
    width: auto;
  }

  .mobile-menu-close {
    background: transparent;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
  }
  body.dark-mode .mobile-menu-close {
    color: #fff;
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .mobile-nav-links a {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    font-family: 'Manrope', sans-serif;
  }
  body.dark-mode .mobile-nav-links a {
    color: #fff;
  }

  .mobile-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 25px 0;
  }

  .mobile-contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  .mobile-contact-info a {
    color: var(--text-body);
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  body.dark-mode .mobile-contact-info a {
    color: #ccc;
  }
  .mobile-contact-info i {
    color: var(--ukraine-blue);
    width: 20px;
    text-align: center;
  }

  .mobile-icons-group {
    display: flex;
    gap: 25px;
    font-size: 1.5rem;
    justify-content: center;
    margin-bottom: 20px;
  }
  .mobile-icons-group a {
    color: var(--text-main);
  }
  body.dark-mode .mobile-icons-group a {
    color: #fff;
  }
}

@media (max-width: 768px) {
  #ukraine-top-bar {
    flex-direction: column;
    text-align: center;
    padding-bottom: 15px;
  }
  .nav .container {
    padding: 0 20px;
  }
}

/* Animations Definition */
@keyframes fadeIn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}
.nav-links {
  display: flex;
  align-items: center;
  flex: 1; /* WICHTIG: Nimmt den verfügbaren Platz zwischen Kontakt (links) und Rand ein */
  gap: 0; /* Wir regeln Abstände jetzt gezielter */
}

/* 2. Der neue Container für die Links */
.compass {
  display: flex;
  gap: 35px; /* Abstand zwischen Über Uns, Projekte, etc. */
  margin: 0 auto; /* WICHTIG: Das drückt die Links exakt in die Mitte der nav-links */
}

.compass a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

/* 3. Icons Gruppe bleibt rechtsbündig */
.nav-icons-group {
  display: flex;
  align-items: center;
  gap: 20px;
  border-left: 1px solid var(--border-color);
  padding-left: 25px;
  margin-left: 20px; /* Kleiner Abstand zum zentrierten Menü */
}
 .lang-wrapper {
        position: relative;
        display: inline-block;
        margin-left: 10px;
      }
      .lang-toggle {
        background: transparent;
        border: 2px solid var(--border-color);
        border-color: #eee;
        color: inherit;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 0.85rem;
        transition: 0.3s;
        text-transform: uppercase;
      }
      .lang-toggle:hover {
        border-color: #0057b7;
        color: #0057b7;
      }
      .lang-menu {
        display: none; /* Hidden by default */
        position: absolute;
        right: 0;
        top: 50px;
        background-color: #ffffff;
        min-width: 160px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        border-radius: 8px;
        z-index: 2000;
        overflow: hidden;
        border: 1px solid #eee;
      }

      /* THIS IS THE ONLY WAY IT OPENS NOW */
      .lang-menu.show {
        display: block !important;
      }

      body.dark-mode .lang-menu {
        background-color: #252525;
        border-color: #333;
      }
      .lang-menu a {
        color: #333;
        padding: 12px 16px;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.9rem;
        transition: background 0.2s;
      }
      body.dark-mode .lang-menu a {
        color: #f0f0f0;
      }
      .lang-menu a:hover {
        background-color: #0057b7;
        color: #fff;
      }

      .ukraine-bar-text strong {
        font-weight: 800;}
        ;
        