/* ==========================================================================
   PREMIUM HEADER DESKTOP DEFAULTS
   ========================================================================== */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  background-color: transparent;
  transition: all 0.4s ease;
}

/* SCROLLED STATE: Premium Navy Blue */
#site-header.scrolled {
  background-color: rgba(10, 25, 47, 0.98); /* var(--color-primary) with opacity */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 0;
  box-shadow: var(--shadow-float);
  /* border-bottom: 1px solid rgba(255, 255, 255, 0.05); */
      border-bottom: 4px solid var(--color-accent);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* --- LOGO STYLING --- */
.logo {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-decoration: none;
}

.logo-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.logo-text-wrapper {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-surface) !important; /* Force white */
  letter-spacing: 0.5px;
  transition: color 0.4s ease;
  white-space: nowrap; /* Prevents wrapping */
}

.logo-subtext {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-surface) !important; /* Force white */
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: color 0.4s ease;
  white-space: nowrap; /* Prevents wrapping */
}

/* Shrink logo slightly on scroll */
#site-header.scrolled .logo-img {
  transform: scale(0.85);
}

/* --- DESKTOP NAVIGATION --- */
.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--color-surface) !important; /* Force white */
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  text-decoration: none;
  white-space: nowrap; /* Prevents wrapping */
  transition: opacity var(--transition-speed) ease, color var(--transition-speed) ease;
}

.nav-list a:hover {
  opacity: 1;
  color: var(--color-surface) !important;
}

.highlight-link {
  color: var(--color-accent) !important; /* Crimson Red */
  font-weight: 800 !important;
  opacity: 1 !important;
}

/* Hover effect on scrolled state */
#site-header.scrolled .nav-list a:not(.highlight-link):hover {
  color: #a0aec0 !important; /* Soft gray-blue on hover when scrolled */
}

/* --- DONATE BUTTON --- */
.btn-donate {
  background-color: var(--color-accent);
  color: var(--color-surface) !important;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap; /* Prevents wrapping */
  display: inline-block;
}

.btn-donate:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
}

/* Hide mobile elements on desktop */
.menu-toggle, .menu-close, .mobile-contact-info, .menu-overlay {
  display: none;
}

/* ==========================================================================
   MOBILE & TABLET MENU ( < 1024px )
   ========================================================================== */
@media (max-width: 1023px) {
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 48px;
    height: 48px;
    background-color: transparent; 
    border-radius: 4px;
    border: none;
    cursor: pointer;
    z-index: 1001;
  }

  .menu-toggle .bar {
    width: 26px;
    height: 3px;
    background-color: var(--color-surface);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .nav-wrapper {
    position: fixed;
    top: 0;
    right: -100%; 
    width: 360px;
    max-width: 90vw;
    height: 100vh;
    background-color: var(--color-primary); 
    flex-direction: column;
    align-items: flex-start;
    padding: 7rem 3rem 3rem 3rem; 
    gap: 2.5rem;
    box-shadow: -10px 0 40px rgba(0,0,0,0.4);
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1002;
    overflow-y: auto;
  }

  .nav-wrapper.active {
    right: 0;
  }

  .menu-close {
    display: block;
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    font-size: 2.5rem;
    background: none;
    border: none;
    color: var(--color-surface);
    cursor: pointer;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.3s ease;
  }
  
  .menu-close:hover {
    opacity: 1;
  }

  .main-nav, .nav-list {
    display: flex !important; 
    width: 100%;
    flex-direction: column;
    gap: 1.5rem;
  }

  .nav-list a {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    text-transform: none;
    letter-spacing: 0;
    white-space: normal; /* Allow wrap inside mobile menu if needed */
  }

  .btn-donate {
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 1rem;
  }

  .mobile-contact-info {
    display: block;
    margin-top: auto; 
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
  }

  .mobile-contact-info h4 {
    color: var(--color-surface);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
    margin-bottom: 1rem;
  }

  .mobile-contact-info p {
    margin-bottom: 0.5rem;
  }

  .mobile-contact-info p a {
    color: var(--color-surface);
    font-size: 1.1rem;
    text-decoration: none;
  }

  .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
  }

  .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: var(--color-surface);
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
  }
  
  .social-links a:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
  }

  .menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(10, 25, 47, 0.85); 
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    z-index: 1001;
    transition: opacity 0.4s ease, visibility 0.4s ease;
  }

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