/* ====== Top Navigation Bar ====== */
.navbar-top {
  background-color: #1a4b8c; /* Slightly different shade from primary */
  color: #fff;
  font-size: 12px;
  height: 40px;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1002;
  display: flex;
  align-items: center;
  overflow: hidden;
  line-height: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

.navbar-top .container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navtop-inner {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.topbar-left {
  flex: 1;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bordermarquee {
  padding: 0;
  margin: 0;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 40px;
}

.bordermarquee marquee {
  height: 100%;
  display: flex;
  align-items: center;
  line-height: normal;
  padding: 0 10px;
}

.bordermarquee p {
  margin: 0;
  padding: 0;
  color: #ffffff;
  display: flex;
  align-items: center;
  height: 100%;
}

.bordermarquee marquee {
  margin: 0;
  padding: 0;
  line-height: normal;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.topbutton {
  display: flex;
  align-items: center;
  margin-left: 20px;
}

.topbutton a {
  color: #fff;
  text-decoration: none;
  padding: 0 10px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.topbutton a:hover {
  color: var(--accent);
}

topbutton a:first-child {
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

/* ====== Desktop Navbar Styles ====== */
.navbar {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem !important;
  height: 80px !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: 100%;
  z-index: 1001;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  top: 40px; /* Position below the top bar (40px height) */
  left: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  transition: top 0.3s ease-in-out;
  will-change: top;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
}

.logo-image {
  max-height: 60px;
  width: auto;
  object-fit: contain;
}

.charity-id {
  color: white;
  font-size: 0.8rem;
  display: inline-block;
  white-space: nowrap;
}

/* Navigation Links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 1rem;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1000;
  align-items: center;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  display: block;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a.active {
  background: rgba(0, 191, 165, 0.2);
  color: var(--accent);
}

/* Donate Button */
.cta-button {
  background-color: #e74c3c;
  color: white !important;
  padding: 6px 16px;
  border-radius: 18px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  text-align: center;
  display: inline-block;
  min-width: 80px;
  margin-left: 6px;
  font-size: 0.83rem;
  line-height: 1.2;
}

.cta-button:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Dropdown Menu (Desktop Only) */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
  color: white;
  padding: 0.5rem 0.8rem;
  display: flex;
  align-items: center;
}

.dropdown-icon {
  margin-left: 6px;
  font-size: 0.7rem;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #003366;
  border-radius: 6px;
  min-width: 200px;
  padding: 0.5rem 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  padding: 0.5rem 1rem;
  display: block;
  color: white;
}

.dropdown-menu li a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
}

/* Show/Hide for Desktop & Mobile */
.desktop-only {
  display: flex;
}
.mobile-only {
  display: none;
  list-style: none; /* Remove list markers */
}

/* Remove list markers from mobile navigation items */
.nav-links li.mobile-only {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

/* Hide dropdown icon on mobile and remove Bootstrap's dropdown arrow */
.dropdown-toggle::after {
  display: none !important;
}

@media (max-width: 768px) {
  .dropdown .dropdown-icon {
    display: none;
  }
  
  .mobile-only {
    display: block;
  }
  
  .desktop-only {
    display: none;
  }
}

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  transition: opacity 0.3s ease;
}

/* ===== Hamburger Menu (Mobile) ===== */
.hamburger {
  display: none;
}

@media (max-width: 768px) {
  .navbar {
    position: relative;
    padding: 0.3rem 1rem;
    height: auto;
    flex-wrap: wrap;
  }

  .logo-container {
    width: 100%;
    justify-content: space-between;
  }

  .charity-id {
    display: none;
  }

  .hamburger {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 20px;
    z-index: 1001;
    cursor: pointer;
  }

  .hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    margin: 4px 0;
    transition: all 0.3s ease;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--primary);
    align-items: center;
    justify-content: flex-start;
    padding: 4rem 1rem 2rem;
    text-align: center;
    z-index: 999;
    transition: right 0.3s ease;
    gap: 0.5rem;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    width: 90%;
    margin: 0.1rem auto;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    display: block;
    text-align: center;
    font-size: 0.95rem;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .cta-button {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 88% !important;
    margin: 0.3rem auto !important;
    text-align: center !important;
    background-color: #e74c3c !important;
    color: white !important;
    padding: 9px 14px !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    line-height: 1.2;
    font-size: 0.95rem;
  }

  .cta-button:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  }

  .dropdown {
    display: none;
  }

  .mobile-only {
    display: block !important;
  }

  .desktop-only {
    display: none !important;
  }

  .overlay.active {
    display: block;
  }
}
