/* ==================== NAVBAR SECTION ==================== */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: var(--transition);
}

#navbar.hidden {
  transform: translateY(-100%);
}

.nav-wrapper {
  width: 100%;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== TOP NAVIGATION ROW ==================== */
.nav-top {
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
}

.nav-top .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

/* ==================== BRAND/LOGO ==================== */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}

/* Logo Image Styles */
.nav-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition: var(--transition);
}

.nav-logo:hover {
  opacity: 0.8;
}

/* Icon styles - commented out
.nav-brand i {
  font-size: 2rem;
  color: var(--primary-color);
  flex-shrink: 0;
}
*/

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--secondary-color);
  line-height: 1.3;
  font-family: "Poppins", sans-serif;
}


/* ==================== RIGHT SECTION ==================== */
.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

/* ==================== AUTH SECTION ==================== */
.nav-auth {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-login,
.btn-register {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-login {
  background: transparent;
  color: var(--text-dark);
  border: 2px solid var(--border-color);
}

.btn-login:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-register {
  background: var(--primary-color);
  color: var(--white);
}

.btn-register:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ==================== USER DROPDOWN ==================== */
.user-dropdown {
  position: relative;
}

.user-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  background: var(--accent-color);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  color: var(--text-dark);
}

.user-toggle:hover {
  background: var(--primary-color);
  color: var(--white);
}

.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 100;
  border-top: 3px solid var(--primary-color);
}

.user-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-color);
}

.user-menu-item:last-child {
  border-bottom: none;
}

.user-menu-item:hover {
  background: var(--accent-color);
  color: var(--primary-color);
  padding-left: 25px;
}

.user-menu-item i {
  width: 20px;
  text-align: center;
}

/* ==================== MOBILE TOGGLE ==================== */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  flex-shrink: 0;
}

.mobile-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ==================== BOTTOM NAVIGATION ROW ==================== */
.nav-bottom {
  padding: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 20px 18px;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

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

/* ==================== DROPDOWN MENU ==================== */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--white);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  border-top: 3px solid var(--primary-color);
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 12px 20px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav-dropdown a:hover {
  background: var(--accent-color);
  color: var(--primary-color);
  padding-left: 25px;
}

/* ==================== LEVEL BADGES ==================== */
.level-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 0.5rem;
  text-transform: uppercase;
}

.level-badge.level-1 {
  background: #10b981;
  color: white;
}

.level-badge.level-2 {
  background: #3b82f6;
  color: white;
}

.level-badge.level-3 {
  background: #f59e0b;
  color: white;
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 968px) {
  .nav-top {
    padding: 20px 0;
  }

  .nav-container {
    padding: 0 15px;
  }

  .nav-brand {
    flex: 1;
    align-items: flex-start;
  }

  /* Logo responsive sizing */
  .nav-logo {
    height: 40px;
  }

  /* Icon responsive - commented out
  .nav-brand i {
    font-size: 1.5rem;
    margin-top: 3px;
  }
  */

  .brand-text {
    text-align: left;
  }

  .brand-name {
    font-size: 0.80rem;
    line-height: 1.2;
    display: block;
    text-align: left;
  }
 

  .mobile-toggle {
    display: flex;
    z-index: 1001;
    pointer-events: auto;
  }

  .nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1001;
  }

  .nav-auth {
    display: flex;
    gap: 6px;
    z-index: 1001;
  }

  .btn-login,
  .btn-register {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 1001;
  }

  .btn-login i,
  .btn-register i {
    font-size: 1rem;
  }

  .btn-login span,
  .btn-register span {
    display: none;
  }

  .btn-login {
    background: transparent;
    border: 2px solid var(--border-color);
  }

  .btn-register {
    background: var(--primary-color);
  }

  .user-toggle span,
  .user-toggle .fa-chevron-down {
    display: none;
  }

  .user-toggle {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    pointer-events: auto;
    z-index: 1001;
  }

  .nav-bottom {
    position: fixed;
    top: 75px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background: var(--white);
    transition: left 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 998;
    pointer-events: none;
  }

  .nav-bottom.active {
    left: 0;
    pointer-events: auto;
  }

  .nav-menu {
    flex-direction: column;
    padding: 20px 0;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
  }

  .nav-item.has-dropdown .nav-link::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--text-light);
  }

  .nav-item.has-dropdown.active .nav-link::after {
    transform: rotate(180deg);
    color: var(--primary-color);
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-radius: 0;
    border-top: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--accent-color);
    pointer-events: auto;
  }

  .nav-item.active .nav-dropdown {
    max-height: 500px;
  }

  .nav-dropdown a {
    padding: 12px 20px 12px 40px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  /* Mobile break - commented out
  .mobile-break {
    display: inline;
  }
  */

  .nav-brand {
    gap: 10px;
  }

  /* Logo smaller on mobile */
  .nav-logo {
    height: 35px;
  }

  /* Icon smaller - commented out
  .nav-brand i {
    font-size: 1.3rem;
    margin-top: 5px;
  }

  .brand-name {
    font-size: 1.1rem;
    line-height: 1.15;
  }
  */

  .btn-login,
  .btn-register,
  .user-toggle {
    width: 34px;
    height: 34px;
  }

  .btn-login i,
  .btn-register i {
    font-size: 0.95rem;
  }

  .mobile-toggle {
    padding: 4px;
  }

  .mobile-toggle span {
    width: 22px;
    height: 2.5px;
  }
}

@media (max-width: 400px) {
  /* Logo even smaller on very small screens */
  .nav-logo {
    height: 30px;
  }

  /* Brand name - commented out
  .brand-name {
    font-size: 0.8rem;
  }

  .nav-brand i {
    font-size: 1.2rem;
  }
  */

  .btn-login,
  .btn-register,
  .user-toggle {
    width: 32px;
    height: 32px;
  }
}