/* ============================================ */

/* NAVBAR - DESKTOP & MOBILE (REVAMPED) */

/* ============================================ */

#mainNavbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 12px var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1030;
  transition: all var(--transition-normal);
}

.navbar-brand {
  font-family: var(--font-family);
  color: var(--text-primary);
  font-weight: 600;
  transition: transform var(--transition-fast);
}

.navbar-brand:hover {
  transform: scale(1.05);
  color: var(--text-primary);
}

.logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.logo-img-drawer {
  height: 35px;
  width: auto;
  object-fit: contain;
}

/* ============================================ */

/* DESKTOP NAV LINKS */

/* ============================================ */

.nav-link {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 1.2rem;
  margin: 0 0.25rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--primary-solid);
  background: var(--accent);
}

.nav-link.active {
  color: var(--primary-solid);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--primary-color);
  border-radius: var(--radius-full);
}

/* Dropdown styling */

.dropdown-menu {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px var(--shadow-hover);
  padding: 0.5rem;
  margin-top: 0.5rem;
  min-width: 200px;
}

.dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  transition: all var(--transition-fast);
  font-weight: 500;
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background: var(--accent);
  color: var(--primary-solid);
}

.dropdown-item i {
  opacity: 0.7;
}

.dropdown-header {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
}

/* ============================================ */

/* ICON BUTTONS */

/* ============================================ */

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--primary-color);
  color: #fff;
  transform: scale(1.1);
}

.icon-btn:active {
  transform: scale(0.95);
}

/* ============================================ */

/* MOBILE USER SECTION */

/* ============================================ */

.mobile-user-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 0.5rem;
}

.user-greeting {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.profile-avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 2px solid var(--primary-solid);
  object-fit: cover;
}

.greeting-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.greeting-time {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-name {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.mobile-actions-logged {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================ */

/* MOBILE TOP ACTIONS (FOR GUESTS) */

/* ============================================ */

.mobile-top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================ */

/* AUTH BUTTONS (DESKTOP) */

/* ============================================ */

.auth-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.auth-buttons .btn {
  font-weight: 600;
  letter-spacing: 0.3px;
  font-size: 0.9rem;
}

/* ============================================ */

/* DESKTOP PROFILE DROPDOWN */

/* ============================================ */

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem 0.4rem 0.4rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.profile-trigger:hover {
  background: var(--card-bg);
  box-shadow: 0 2px 8px var(--shadow-hover);
  transform: translateY(-1px);
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 2px solid var(--primary-solid);
  object-fit: cover;
}

.profile-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.profile-dropdown-menu {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px var(--shadow-hover);
  padding: 0.5rem;
  margin-top: 0.5rem;
  min-width: 280px;
  max-height: 70vh;
  overflow-y: auto;
}

.profile-dropdown-menu .dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  transition: all var(--transition-fast);
  font-weight: 500;
  font-size: 0.9rem;
}

.profile-dropdown-menu .dropdown-item:hover {
  background: var(--accent);
  color: var(--primary-solid);
}

.profile-dropdown-menu .dropdown-item i {
  font-size: 1rem;
  opacity: 0.8;
}

.profile-dropdown-menu .dropdown-item.text-danger:hover {
  background: rgba(229, 57, 53, 0.1);
  color: var(--danger);
}

/* ============================================ */

/* SIDE DRAWER (Mobile Only) */

/* ============================================ */

.side-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

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

.side-drawer {
  position: fixed;
  top: 0;
  right: -380px;
  width: 90%;
  max-width: 320px;
  height: 100vh;
  background: var(--card-bg);
  box-shadow: -4px 0 20px var(--shadow-hover);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  overflow: hidden;
}

.side-drawer.active {
  right: 0;
}

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

.side-drawer-header span {
  font-size: 1rem;
}

/* USER PROFILE IN DRAWER */

.side-drawer-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(27, 94, 32, 0.05), rgba(76, 175, 80, 0.05));
}

.profile-avatar-lg {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-full);
  border: 3px solid var(--primary-solid);
  object-fit: cover;
}

.side-drawer-profile .fw-bold {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.side-drawer-profile small {
  font-size: 0.8rem;
}

/* GUEST SECTION IN DRAWER */

.side-drawer-guest {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--accent);
}

.side-drawer-guest h6 {
  font-size: 0.95rem;
  font-weight: 600;
}

.side-drawer-guest p {
  font-size: 0.8rem;
}

.close-drawer {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--card-bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.close-drawer:hover {
  background: var(--danger);
  color: #fff;
  transform: rotate(90deg);
}

.side-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.drawer-section {
  margin-bottom: 1rem;
}

.drawer-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 1px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  font-weight: 500;
  margin-bottom: 0.25rem;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: 0.85rem;
}

.drawer-item:hover {
  background: var(--accent);
  color: var(--primary-solid);
  transform: translateX(5px);
}

.drawer-item i {
  font-size: 1.1rem;
  opacity: 0.8;
  width: 20px;
}

.side-drawer-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.logout-btn {
  background: rgba(229, 57, 53, 0.1);
  color: var(--danger);
}

.logout-btn:hover {
  background: var(--danger);
  color: #fff;
  transform: translateX(0);
}

.side-drawer-footer small {
  font-size: 0.75rem;
}

/* ============================================ */

/* MOBILE BOTTOM NAVIGATION (FLOATING - FIXED) */

/* ============================================ */

.bottom-nav-floating {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 8px 24px var(--shadow-hover);
  z-index: 1020;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 95%;
  max-width: 420px;
  transition: opacity var(--transition-normal);
}

.bottom-nav-guest, .bottom-nav-logged {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.45rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
  flex: 1;
  max-width: 75px;
}

.bottom-nav-item i {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
  transition: all var(--transition-fast);
}

.bottom-nav-item span {
  font-size: 0.65rem;
  line-height: 1;
}

.bottom-nav-item:hover {
  color: var(--primary-solid);
}

.bottom-nav-item.active {
  color: #fff;
  background: var(--primary-color);
}

.bottom-nav-item.active i {
  transform: scale(1.1);
}

/* ============================================ */

/* MOBILE OPTIMIZATION */

/* ============================================ */

@media (max-width: 991.98px) {
  body {
    padding-bottom: 85px;
  }
}

@media (max-width: 991.98px) {
  #mainNavbar .container-fluid {
    padding: 0.4rem 1rem !important;
  }
}

@media (max-width: 576px) {
  .bottom-nav-item span {
    font-size: 0.6rem;
  }
}

@media (max-width: 576px) {
  .bottom-nav-item i {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .logo-img {
    height: 32px !important;
  }
  .icon-btn {
    width: 36px !important;
    height: 36px !important;
    font-size: 1rem !important;
  }
  .drawer-item {
    font-size: 0.8rem;
  }
}

/* ============================================ */

/* SCROLLBAR FOR DRAWER */

/* ============================================ */

.side-drawer-body::-webkit-scrollbar {
  width: 5px;
}

.side-drawer-body::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: var(--radius-full);
}

.side-drawer-body::-webkit-scrollbar-track {
  background: var(--accent);
}

.profile-dropdown-menu::-webkit-scrollbar {
  width: 5px;
}

.profile-dropdown-menu::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: var(--radius-full);
}

/* ============================================ */

/* ANIMATIONS */

/* ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    bottom: -100px;
    opacity: 0;
  }
  to {
    bottom: 10px;
    opacity: 1;
  }
}

.bottom-nav-floating {
  animation: slideUp 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* ============================================ */

/* DARK MODE ADJUSTMENTS */

/* ============================================ */

[data-bs-theme="dark"] .navbar-brand, .dark-mode .navbar-brand {
  color: var(--text-primary);
}

[data-bs-theme="dark"] #mainNavbar, .dark-mode #mainNavbar {
  background: var(--card-bg);
  border-bottom-color: var(--border-color);
}

[data-bs-theme="dark"] .dropdown-menu, .dark-mode .dropdown-menu, [data-bs-theme="dark"] .profile-dropdown-menu, .dark-mode .profile-dropdown-menu {
  background: var(--card-bg);
  border-color: var(--border-color);
}

[data-bs-theme="dark"] .side-drawer, .dark-mode .side-drawer {
  background: var(--card-bg);
}

[data-bs-theme="dark"] .bottom-nav-floating, .dark-mode .bottom-nav-floating {
  background: var(--card-bg);
  border-color: var(--border-color);
}

