/* ==========================================
   UNIFORM HEADER & NAVIGATION STYLES
   WeCare CBO - Engage • Influence • Empower
   ========================================== */

:root {
  --primary-dark: #0f172a;
  --primary: #1e3a8a;
  --primary-light: #2563eb;
  --accent: #e65100;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #475569;
  --bg-soft: #f8fafc;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --transition: all 0.2s ease;
}

/* TOP BAR */
.top-bar {
  background: #1a47b8;
  color: #ffffff;
  font-size: 0.88rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 1010;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.top-bar-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-bar-links a {
  color: #ffffff;
  text-decoration: none;
  transition: var(--transition);
  font-weight: 600;
  font-size: 0.88rem;
  opacity: 0.95;
}

.top-bar-links a:hover {
  color: #ffffff;
  opacity: 1;
  text-decoration: underline;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.top-btn {
  padding: 0.45rem 1.2rem;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.top-btn.report {
  background: #ff9800;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.top-btn.report:hover {
  background: #f57c00;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.35);
}

.top-btn.involved {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}

.top-btn.involved:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.25);
}

.top-btn.donate {
  background: #ffffff;
  color: #1a47b8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.top-btn.donate:hover {
  background: #f8fafc;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.35);
}

.top-btn.staff-portal-btn {
  background: #ffffff;
  color: #1e3a8a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  font-weight: 800;
  margin-left: 0.4rem;
}

.top-btn.staff-portal-btn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.4);
}

/* NAVBAR HEADER */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  background: #ffffff;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand img {
  height: clamp(40px, 5vw, 56px);
  width: auto;
  object-fit: contain;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
}

/* NAVIGATION MENU */
.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  text-decoration: none;
  color: #334155;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.55rem 1.25rem;
  border-radius: 40px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.nav-menu a:hover {
  color: #1e3a8a;
  background: #f1f5f9;
}

.nav-menu a.active,
.nav-menu li.active-parent > a {
  color: #1e3a8a;
  background: #edf2f7;
  font-weight: 800;
}

.nav-arrow {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

/* DROPDOWN MENUS */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 0.5rem;
  list-style: none;
  margin-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.mobile-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown:hover .nav-arrow {
  transform: rotate(180deg);
}

.dropdown-menu li {
  width: 100% !important;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  width: 100% !important;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 8px;
  box-sizing: border-box;
}

.dropdown-menu a:hover {
  color: var(--primary);
  background: rgba(30, 58, 138, 0.08);
}

.dropdown-menu a.active {
  color: var(--primary);
  font-weight: 700;
  background: rgba(30, 58, 138, 0.12);
}

/* MOBILE TOGGLE */
.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1.2rem;
  transition: var(--transition);
}

.mobile-toggle:hover {
  background: var(--bg-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.drawer-header, .drawer-actions, .drawer-section-label {
  display: none;
}
/* RESPONSIVE LAYOUT & SIDE DRAWER HAMBURGER MENU */
@media (max-width: 1024px) {
  /* Fix for position: fixed side drawer being trapped by navbar backdrop-filter */
  .navbar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .top-bar {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex !important;
  }

  /* Backdrop Curtain */
  .mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
  }

  .mobile-backdrop.active {
    opacity: 1;
    visibility: visible;
  }

  /* Mobile Side Drawer (Alfred Wanga Style) */
  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: #ffffff;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.4);
    flex-direction: column;
    align-items: stretch !important;
    padding: 0 0 2rem 0;
    gap: 0;
    transform: translateX(100%);
    opacity: 1;
    visibility: visible;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10001;
    overflow-y: auto;
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  /* Drawer Top Bar Header */
  .drawer-header {
    display: flex !important;
    background: var(--primary); /* Dark Blue */
    color: #ffffff;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1rem;
    border-bottom: none;
  }

  .drawer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .drawer-brand img {
    height: 42px;
    background: #ffffff;
    padding: 4px;
    border-radius: 8px;
    object-fit: contain;
  }

  .drawer-brand-text {
    display: flex;
    flex-direction: column;
  }

  .drawer-brand-text strong {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: 0.5px;
  }

  .drawer-brand-text span {
    font-size: 0.55rem;
    font-weight: 700;
    color: #93c5fd;
    letter-spacing: 0.5px;
    margin-top: 0.15rem;
  }

  .drawer-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1.2rem;
    display: grid;
    place-items: center;
    cursor: pointer;
  }

  /* Section Labels */
  .drawer-section-label {
    display: block !important;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    padding: 1.5rem 1.2rem 0.5rem;
    letter-spacing: 1px;
    opacity: 0.8;
  }

  /* Drawer CTAs and Account Portal */
  .drawer-actions {
    display: flex !important;
    flex-direction: column;
    padding: 0 1.2rem;
    gap: 0.6rem;
  }

  .drawer-section-title {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    margin-top: 0.5rem;
    letter-spacing: 1px;
    opacity: 0.8;
  }

  .drawer-account-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(30, 58, 138, 0.08);
    color: var(--primary);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(30, 58, 138, 0.15);
    margin-bottom: 0.5rem;
  }

  .drawer-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
  }

  .drawer-btn.involved { background: rgba(59, 130, 246, 0.1); color: var(--primary-light); }
  .drawer-btn.report { background: rgba(245, 158, 11, 0.1); color: #d97706; }
  .drawer-btn.donate { background: var(--primary); color: white; }


  /* Navigation Links */
  .nav-menu li {
    width: 100% !important;
  }

  .nav-menu a {
    width: 100% !important;
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    padding: 0.9rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    border-radius: 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    gap: 0.85rem;
    transition: all 0.2s ease;
  }

  .nav-item-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    color: var(--text-muted);
  }

  .nav-menu a:hover {
    background: rgba(30, 58, 138, 0.03);
    color: var(--primary);
  }

  /* Active Menu Item */
  .nav-menu a.active,
  .nav-menu li.active-parent > a {
    background: rgba(30, 58, 138, 0.05);
    color: var(--primary);
    font-weight: 700;
    border-left: 4px solid var(--accent); /* Yellow/Gold left accent */
    padding-left: calc(1.2rem - 4px);
  }

  .nav-menu a.active .nav-item-icon {
    color: var(--primary);
  }

  .nav-dropdown .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid rgba(0,0,0,0.06);
    margin-left: 2rem;
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 0.5rem;
    display: none;
    background: transparent;
    border-radius: 0 !important;
  }

  .nav-dropdown.mobile-open .dropdown-menu {
    display: block;
  }

  .nav-dropdown .dropdown-menu a {
    color: var(--text-muted);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    border-bottom: none;
  }

  .nav-dropdown .dropdown-menu a:hover {
    color: var(--primary);
  }
}

/* Hide mobile-ctas on desktop */
@media (min-width: 1025px) {
  .mobile-only { display: none !important; }
}


/* Hide desktop-only elements on mobile */
@media (max-width: 1024px) {
  .desktop-only { display: none !important; }
}
