/*-------------------------------------------------------------------------*/
/* Header & Navigation Styles
/*-------------------------------------------------------------------------*/

/* =============================================================================
   HEADER & NAVBAR
   ============================================================================= */

/* Site Header */
.site-header {
  z-index: 1030;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  border-bottom: 0.1rem solid var(--border);
  background-color: var(--bg-darker);
}

/* Navbar scrolled state */
.site-header.navbar-scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  background-color: rgba(14, 16, 22, 0.95);
}

/* Navbar */
.site-header .navbar {
  background-color: transparent;
  padding: 0.75rem 0;
  min-height: 70px;
}

/* Navbar Brand/Logo */
.navbar-brand {
  display: flex;
  align-items: center;
  margin-right: 0;
  padding: 0;
}

.navbar-brand img {
  filter: brightness(1);
  transition: all 0.3s ease;
}

.navbar-brand:hover img {
  filter: brightness(1.2) drop-shadow(0 0 8px rgba(255, 193, 7, 0.3));
}

/* Navigation Links */
.navbar-nav .nav-link {
  position: relative;
  transition: all 0.1s ease;
  margin: 0 0.25rem;
  padding: 0.75rem 1rem !important;
  color: var(--txt-secondary) !important;
  font-weight: 500;
  font-size: 0.95rem;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.navbar-nav .nav-link.active {
  color: var(--txt-primary) !important;
}

.navbar-nav .nav-link i {
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.navbar-dark .navbar-nav .nav-link:hover {
  border-radius: 0.1rem !important;
  background-color: var(--bg-dark) !important;
  color: var(--txt-primary) !important;
}

.nav-pills .nav-link:hover {
  border-radius: 0;
  background-color: var(--bg-darker) !important;
  color: #fff !important;
}

/* Dropdown Menus */
.navbar-nav .dropdown-menu {
  margin-top: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  border: 0.1rem solid var(--border);
  border-radius: 0;
  background-color: var(--bg-dark);
  padding: 0;
  min-width: 200px;
}

.navbar-nav .dropdown-item {
  transition: all 0.3s ease;
  border: none;
  padding: 0.75rem 1.5rem;
  color: var(--txt-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
}

.navbar-nav .dropdown-item:hover {
  background-color: var(--bg-darker);
  color: var(--txt-primary);
}

.navbar-nav .dropdown-item i {
  margin-right: 0.75rem;
  width: 16px;
  text-align: center;
}

.dropdown-divider {
  margin: 0;
}

/* Dropdown Toggle Arrow */
.navbar-nav .dropdown-toggle::after {
  transition: transform 0.3s ease;
  margin-left: 0.5rem;
}

.navbar-nav .dropdown.show .dropdown-toggle::after {
  transform: rotate(180deg);
}

/* Remove focus outline from dropdown toggles */
.navbar-nav .dropdown-toggle:focus {
  outline: none;
  box-shadow: none;
}

/* User Authentication Section */
.navbar-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* User Dropdown Styling - Match navbar dropdown appearance */
.navbar-auth .dropdown-menu {
  margin-top: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  border: 0.1rem solid var(--border);
  border-radius: 0;
  background-color: var(--bg-dark);
  padding: 0;
  min-width: 200px;
}

.navbar-auth .dropdown-item {
  transition: all 0.3s ease;
  border: none;
  padding: 0.75rem 1.5rem;
  color: var(--txt-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
}

.navbar-auth .dropdown-item:hover {
  background-color: var(--bg-darker);
  color: var(--txt-primary);
}

.navbar-auth .dropdown-item i {
  margin-right: 0.75rem;
  width: 16px;
  color: #fff; /* Ensure all icons are white */
  text-align: center;
}

/* Hide dropdown arrow */
.navbar-auth .dropdown-toggle::after {
  display: none;
}

/* =============================================================================
   DESKTOP USER DROPDOWN
   ============================================================================= */
.navbar .user-avatar {
  border: 1px solid var(--bs-warning);
  border-radius: 0;
  aspect-ratio: 1 / 1;
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

.welcome-text {
  margin-bottom: 0.125rem;
  color: var(--txt-muted);
  font-size: 0.75rem;
  line-height: 1;
  font-family: 'Poppins', sans-serif;
}

.username {
  margin-bottom: 0.125rem;
  color: var(--txt-primary);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1;
}

.user-points {
  font-size: 0.75rem;
  line-height: 1;
}

.dp-points {
  color: var(--txt-primary);
  font-weight: 500;
}

.vp-points {
  color: #ccc;
  font-weight: 500;
}

.user-points {
  color: var(--txt-muted);
  font-weight: 400;
  font-size: 0.85rem;
}

.nav-link {
  display: flex;
  padding: 0.5rem 1rem;
  color: #ccc;
  text-transform: uppercase;
}

/* Mobile Menu Toggle */
.navbar-toggler {
  border: 0.1rem solid var(--border);
  border-radius: 0.375rem;
  background-color: var(--bg-dark);
  padding: 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffc107' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  width: 1.5rem;
  height: 1.5rem;
}

.navbar-dark .navbar-toggler {
  color: #ccc;
}

.navbar-dark .navbar-toggler:hover {
  filter: saturate(0);
}

/* =============================================================================
   MOBILE NAVIGATION
   ============================================================================= */

/* Mobile Offcanvas - Full Screen */
.mobile-nav {
  transition: all 0.3s ease-in-out !important;
  border: none;
  background-color: var(--bg-darker);
  width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
}

.mobile-nav .offcanvas-header {
  display: flex;
  position: relative;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
  transition: all 0.3s ease-in-out;
  border-bottom: 0.1rem solid var(--border);
  background-color: var(--bg-dark);
  padding: 1rem;
}

.mobile-nav .offcanvas-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--txt-primary);
  font-weight: 600;
  font-size: 1.2rem;
  font-family: 'Poppins', sans-serif;
}

.mobile-nav .offcanvas-title img {
  width: auto;
  height: 24px;
}

.mobile-nav .offcanvas-body {
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease-in-out;
  background-color: var(--bg-darker);
  padding: 1rem;
  height: calc(100vh - 80px);
  overflow-x: hidden;
  overflow-y: auto;
}

/* Mobile User Section */
.mobile-user-section {
  margin: -1rem -1rem 1rem -1rem;
  border-bottom: 0.1rem solid var(--border);
  background-color: var(--bg-dark);
  padding: 1rem;
}

.mobile-auth-section {
  margin: -1rem -1rem 1rem -1rem;
  border-bottom: 0.1rem solid var(--border);
  background-color: var(--bg-dark);
  padding: 1rem;
}

.mobile-close-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  cursor: pointer;
  margin: 0;
  outline: none;
  border: none;
  background: none;
  padding: 0;
  color: white;
  font-size: 1.5rem;
}

.mobile-close-icon:hover {
  opacity: 1;
}

.mobile-close-icon i {
  color: white;
  font-size: 1.5rem;
}

.nav-pills .nav-link {
  border-radius: 0;
}

/* =============================================================================
   MOBILE USER SECTION
   ============================================================================= */
.mobile-user-avatar {
  border: 1px solid var(--bs-warning);
  border-radius: 0;
  aspect-ratio: 1 / 1;
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
}

/* Mobile User Info - Enhanced Layout */
.mobile-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mobile-avatar {
  flex-shrink: 0;
}

.mobile-user-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.mobile-user-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.mobile-welcome-text {
  color: white;
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1;
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
}

.mobile-username {
  color: var(--txt-primary);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1;
  text-transform: uppercase;
}

.mobile-user-points {
  display: flex;
  gap: 0.5rem;
}

/* Points section with visual separation */
.mobile-dp-points,
.mobile-vp-points {
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  background-color: var(--bg-darker);
  padding: 0.25rem 0.5rem;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.mobile-dp-points {
  color: var(--txt-primary);
}

.mobile-vp-points {
  color: #ccc;
}

/* Mobile Auth Section */
.mobile-auth-section {
  border-bottom: 0.1rem solid var(--border);
  background-color: var(--bg-dark);
  padding: 1rem;
}

/* Mobile Menu */
.mobile-menu {
  flex-grow: 1;
  margin: 0;
  background-color: var(--bg-dark);
  padding: 0;
  overflow: hidden;
  list-style: none;
}

.mobile-menu-item {
  border-bottom: 0.05rem solid var(--border);
}

.mobile-menu-link {
  display: block;
  transition: all 0.3s ease-in-out;
  padding: 0.8rem;
  color: var(--txt-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  text-transform: uppercase;
}

.mobile-menu-link:hover {
  background-color: var(--bg-dark);
  color: var(--txt-primary);
  text-decoration: none;
}

.mobile-menu-link.active {
  background-color: var(--bg-dark);
  color: var(--txt-primary);
}

.mobile-menu-link i {
  margin-right: 0.75rem;
  width: 18px;
  font-size: 0.85rem;
  text-align: center;
}

/* Mobile Dropdown - Real Icon Element */
.mobile-nav .mobile-dropdown .dropdown-toggle {
  display: flex;
  position: relative;
  justify-content: space-between;
  align-items: center;
  padding-right: 2.5rem !important;
}

/* Hide any default Bootstrap dropdown arrows */
.mobile-nav .mobile-dropdown .dropdown-toggle::after,
.mobile-nav .mobile-dropdown .dropdown-toggle::before {
  display: none !important;
}

/* Style the actual chevron icon */
.mobile-dropdown-icon {
  position: absolute !important;
  right: 1rem !important;
  transition: transform 0.3s ease !important;
  color: white !important;
  font-size: 0.8rem !important;
}

.mobile-nav .mobile-dropdown .dropdown-toggle[aria-expanded='true'] .mobile-dropdown-icon {
  transform: rotate(90deg) !important;
}

.mobile-submenu {
  transition: max-height 0.3s ease-in-out;
  margin: 0;
  background-color: var(--bg);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  list-style: none;
}

.mobile-submenu.show {
  max-height: 500px;
}

.mobile-submenu-link {
  display: block;
  transition: all 0.3s ease;
  border-bottom: 0.05rem solid var(--border);
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  color: var(--txt-muted);
  font-weight: 500;
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  text-transform: uppercase;
}

.mobile-submenu-link:last-child {
  border-bottom: none;
}

.mobile-submenu-link:hover {
  background-color: var(--bg-dark);
  color: var(--txt-primary);
  text-decoration: none;
}

/* Mobile Social Section */
.mobile-social-section {
  margin-top: auto;
  border-top: 0.1rem solid var(--border);
  background-color: transparent;
  padding: 1.5rem 0 0 0;
}

.mobile-social-section h6 {
  color: var(--txt-primary);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-align: center;
  text-transform: uppercase;
}

.mobile-social-section .social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.mobile-social-section a {
  transition: color 0.3s ease;
  padding: 0.5rem;
  color: var(--txt-muted);
  font-size: 1.1rem;
}

.mobile-social-section a:hover {
  color: var(--txt-primary);
  text-decoration: none;
}

/* =============================================================================
   RESPONSIVE STYLES
   ============================================================================= */

/* Mobile Responsiveness */
@media (max-width: 991.98px) {
  .site-header .navbar {
    padding: 0.5rem 0;
    min-height: 60px;
  }

  .navbar-brand img {
    height: 35px;
  }

  .navbar-auth {
    gap: 0.5rem;
  }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 991.98px) {
  .navbar-nav .nav-link {
    padding: 0.625rem 0.875rem !important;
    font-size: 0.9rem;
  }
}

/* Desktop Styles */
@media (min-width: 992px) {
  .site-header .navbar {
    padding: 1rem 0;
  }

  .navbar-brand img {
    height: 40px;
  }
}

/* Large Desktop */
@media (min-width: 1200px) {
  .navbar-nav .nav-link {
    padding: 0.75rem 1.25rem !important;
  }
}

/* =============================================================================
   ANIMATION OVERRIDES
   ============================================================================= */

/* Smooth Offcanvas Animation */
.offcanvas {
  transition: all 0.3s ease-in-out !important;
}

.offcanvas.offcanvas-fullscreen {
  top: 0 !important;
  left: 0 !important;
  transform: translateX(-100%) !important;
  width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
}

.offcanvas.offcanvas-fullscreen.show {
  transform: translateX(0) !important;
}

.offcanvas.offcanvas-fullscreen.hiding {
  transform: translateX(-100%) !important;
}

/* Mobile submenu animations */
.mobile-submenu {
  transition: max-height 0.3s ease-in-out;
  max-height: 0;
  overflow: hidden;
}

.mobile-submenu.show {
  max-height: 500px;
}

/* Notification Bar */
.notice-bar {
  z-index: 1040;
  border-bottom: 0.1rem solid var(--border) !important;
  background-color: var(--bg-darker) !important;
}

.notice-bar h6 {
  color: var(--txt-primary);
  font-weight: 500;
  text-transform: none;
}

.notice-bar .close {
  transition: all 0.3s ease;
  color: var(--txt-primary);
  text-decoration: none;
}

.notice-bar .close:hover {
  color: var(--txt-secondary);
}

/* Bootstrap Offcanvas Override for Full Screen Mobile Nav */
.offcanvas.offcanvas-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  visibility: visible !important;
  z-index: 1055 !important;
  border: none !important;
  border-radius: 0 !important;
  width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
  max-height: none !important;
}

/* Enhanced backdrop for full screen overlay */
.offcanvas-backdrop {
  z-index: 1050 !important;
  transition: opacity 0.3s ease-in-out !important;
  background-color: rgba(0, 0, 0, 0.8) !important;
}

/* Ensure all elements within offcanvas animate together */
.mobile-nav * {
  transition: all 0.3s ease-in-out !important;
}

/* Override Bootstrap's default animation timing */
.offcanvas {
  transition: transform 0.3s ease-in-out !important;
}

.offcanvas.show {
  transition: transform 0.3s ease-in-out !important;
}
