/* ==========================================================================
   Humble Care - World Class Modern Redesign & Interactive Framework
   ========================================================================== */

:root {
  --primary-color: #820263;
  --primary-hover: #6a0151;
  --primary-active: #540140;
  --primary-light: #F9EBF5;
  --primary-glow: rgba(130, 2, 99, 0.16);
  --primary-gradient: linear-gradient(135deg, #820263 0%, #4a0138 100%);

  --secondary-color: #FB8B24;
  --secondary-hover: #e07414;
  --secondary-light: #FFF4E8;
  --secondary-glow: rgba(251, 139, 36, 0.22);
  --secondary-gradient: linear-gradient(135deg, #FB8B24 0%, #E36414 100%);

  --brand-combo-gradient: linear-gradient(135deg, #820263 0%, #9B0376 50%, #FB8B24 100%);

  --bg-body: #FFFFFF;
  --surface-card: #FFFFFF;
  --surface-alt: #F8FAFC;
  --surface-dark: #0F172A;

  --text-main: #0F172A;
  --text-muted: #475569;
  --text-light: #94A3B8;

  --border-color: #E2E8F0;
  --border-subtle: #F1F5F9;

  --container-max: 1380px;
  --container-wide: 1560px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 28px 64px rgba(15, 23, 42, 0.16);

  --header-height: 78px;
  --transition: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --bg-body: #0B0F19;
  --surface-card: #151D2A;
  --surface-alt: #0F172A;
  --surface-dark: #020617;

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-light: #64748B;

  --border-color: #1E293B;
  --border-subtle: #172033;

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.5);
}

/* Global Selection & Smooth Scrolling */
::selection { background: #F9EBF5; color: #820263; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-body);
  color: var(--text-main);
  transition: background-color var(--transition), color var(--transition);
}

body.nav-locked {
  overflow: hidden !important;
}

/* Container Utilities */
.container-wide {
  width: min(100% - 2.5rem, var(--container-wide));
  margin-inline: auto;
}

/* ==========================================================================
   Header & Glassmorphism Navigation System
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
}

[data-theme="dark"] .site-header {
  background: rgba(11, 15, 25, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.96);
}

[data-theme="dark"] .site-header.is-scrolled {
  background: rgba(11, 15, 25, 0.96);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.25rem;
}

/* Brand Logo */
.site-logo-img {
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  transition: transform var(--transition);
}
.brand-logo:hover .site-logo-img {
  transform: scale(1.03);
}

/* Desktop Navigation Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 1.2vw, 1.5rem);
  list-style: none;
}

.nav-link {
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-pill);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: none;
}

.nav-link:hover {
  color: var(--primary-color);
  background: rgba(130, 2, 99, 0.06);
}

[data-theme="dark"] .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.nav-link.active {
  color: var(--primary-color);
  background: var(--primary-light);
  font-weight: 700;
}

[data-theme="dark"] .nav-link.active {
  background: rgba(130, 2, 99, 0.28);
  color: #FFAAE5;
}

/* Explore Dropdown Menu */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle .nav-dropdown-icon {
  font-size: 0.72rem;
  transition: transform var(--transition);
}

.nav-dropdown.is-open .nav-dropdown-icon {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  width: 320px;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.6rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 220ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 1050;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  text-decoration: none;
  transition: background var(--transition);
}

.nav-dropdown-item i {
  font-size: 1.15rem;
  color: var(--primary-color);
  width: 24px;
  text-align: center;
}

.nav-dropdown-item strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.25;
}

.nav-dropdown-item small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-dropdown-item:hover {
  background: var(--surface-alt);
}

[data-theme="dark"] .nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Right Action Controls */
.nav-actions {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1vw, 1rem);
}

/* Theme Toggle Button */
.btn-theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: var(--surface-card);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-theme-toggle:hover {
  background: var(--surface-alt);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: scale(1.05);
}

.btn-theme-toggle .icon-dark { display: block; }
.btn-theme-toggle .icon-light { display: none; }

[data-theme="dark"] .btn-theme-toggle .icon-dark { display: none; }
[data-theme="dark"] .btn-theme-toggle .icon-light { display: block; color: #FCD34D; }

/* Buttons & Badges */
.btn-donate-nav {
  background: var(--primary-gradient);
  color: #FFFFFF !important;
  font-weight: 700;
  border: none;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 4px 14px rgba(130, 2, 99, 0.28);
  transition: all var(--transition);
}

.btn-donate-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(130, 2, 99, 0.38);
}

.nav-icon-heart {
  color: #FF85C0;
  animation: heartPulse 2s infinite ease-in-out;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22); }
}

/* User Profile Badge */
.user-nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.notif-bell-btn {
  position: relative;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
}

.notif-count-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--secondary-color);
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: var(--radius-pill);
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--surface-card);
}

/* Hamburger Toggle Button */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 1060;
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 250ms ease-in-out;
}

.mobile-toggle.is-active .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.is-active .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.is-active .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Off-Canvas Mobile Navigation Drawer
   ========================================================================== */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(390px, 88vw);
  background: var(--bg-body);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 38px rgba(0, 0, 0, 0.2);
}

.nav-drawer.is-open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--border-color);
}

.drawer-close-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: var(--surface-alt);
  color: var(--text-main);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.drawer-close-btn:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  transform: rotate(90deg);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.drawer-search-box {
  position: relative;
}

.drawer-search-box input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: var(--surface-alt);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition);
}

.drawer-search-box input:focus {
  border-color: var(--primary-color);
}

.drawer-search-box .search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.drawer-user-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.drawer-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  object-fit: cover;
}

.drawer-user-info strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-main);
}

.drawer-user-info small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.drawer-group-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}

.drawer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.drawer-links-list a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.drawer-links-list a i {
  width: 20px;
  text-align: center;
  color: var(--primary-color);
  font-size: 1rem;
}

.drawer-links-list a:hover,
.drawer-links-list a.active {
  background: var(--primary-light);
  color: var(--primary-color);
}

[data-theme="dark"] .drawer-links-list a:hover,
[data-theme="dark"] .drawer-links-list a.active {
  background: rgba(130, 2, 99, 0.28);
  color: #FFAAE5;
}

.drawer-footer {
  padding: 1.15rem 1.35rem;
  border-top: 1px solid var(--border-color);
  background: var(--surface-alt);
}

.drawer-donate-btn {
  width: 100%;
  justify-content: center;
  padding: 0.75rem;
  font-size: 0.98rem;
  font-weight: 700;
}

/* ==========================================================================
   Back To Top Button & Toast Notifications
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 990;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--primary-gradient);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 8px 24px rgba(130, 2, 99, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(130, 2, 99, 0.45);
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 380px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #0F172A;
  color: #FFFFFF;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toastSlideIn 300ms cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--secondary-color);
}

.toast-success { border-left-color: #10B981; }
.toast-error { border-left-color: #EF4444; }
.toast-info { border-left-color: #3B82F6; }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Responsive Media Query Adaptations */
@media (max-width: 992px) {
  .d-desktop-only {
    display: none !important;
  }
  .mobile-toggle {
    display: flex;
  }
}

@media (min-width: 993px) {
  .nav-drawer, .nav-overlay {
    display: none !important;
  }
}
