/* ============================================
   MODERN NAVBAR - Combined Version
   ============================================ */

:root {
  --nav-bg: #0D3471;
  --nav-text: #ffffff;
  --nav-text-hover: #fbbf24;
  --nav-accent: #fbbf24;
  --navbar-color: #0f172a;
  --accent-color: #f59e0b;
  --text-color: #ffffff;
  --hover-color: #fbbf24;
  --transition-speed: 0.3s;
}

/* ============================================
   BASE NAVBAR
   ============================================ */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  height: 72px;
  background: #0D3471;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar.scrolled {
  background: rgba(13, 52, 113, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  padding: 0 32px;
  height: 64px;
}

/* ============================================
   LOGO
   ============================================ */
.logo {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo img {
  height: 44px;
  width: auto;
  transition: all 0.3s ease;
}

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

.logo-text h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #fbbf24;
  line-height: 1.2;
}

.logo-text p {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* ============================================
   NAVIGATION LINKS
   ============================================ */
.nav-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
  align-items: center;
}

nav li {
  margin: 0;
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
  position: relative;
}

nav li:nth-child(1) { animation-delay: 0.1s; }
nav li:nth-child(2) { animation-delay: 0.2s; }
nav li:nth-child(3) { animation-delay: 0.3s; }
nav li:nth-child(4) { animation-delay: 0.4s; }

nav a {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transition: width var(--transition-speed) ease;
}

nav a:hover {
  color: #fbbf24;
  /* background: rgba(255, 255, 255, 0.1); */
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

nav a.active {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  font-weight: 600;
}

/* ============================================
   DROPDOWN STYLES (from new code)
   ============================================ */
.dropdown {
  position: relative;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 220px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
}

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

.dropdown-content a {
  color: #333;
  padding: 0.75rem 1.25rem;
  display: block;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  border-radius: 0;
}

.dropdown-content a:hover {
  background: #f8fafc;
  padding-left: 1.5rem;
  border-left-color: var(--accent-color);
}

/* ============================================
   PROFILE SECTION
   ============================================ */
.profile-section {
  position: relative;
  margin-left: 16px;
}

.profile-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.profile-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
}

.profile-pic-container {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(229, 231, 235, 0.5);
  transition: all 0.15s ease;
}

.profile-pic-container:hover {
  border-color: var(--nav-accent);
}

.profile-pic-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.default-profile-icon {
  color: #94a3b8;
  font-size: 14px;
}

/* ============================================
   DROPDOWN MENU (profile dropdown)
   ============================================ */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: all 0.15s ease;
  z-index: 1001;
  overflow: hidden;
}

.profile-section.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-menu ul {
  list-style: none;
  padding: 8px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-menu li {
  margin: 0;
  animation: none;
  opacity: 1;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.dropdown-menu a:hover {
  background: #f1f5f9;
  color: var(--nav-accent);
}

.dropdown-menu i {
  width: 18px;
  font-size: 14px;
  color: #94a3b8;
  text-align: center;
}

.dropdown-menu a:hover i {
  color: var(--nav-accent);
}

.dropdown-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}

/* ============================================
   MENU TOGGLE (hamburger)
   ============================================ */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-right: 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
  color: var(--text-color);
  font-size: 1.5rem;
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-color);
  transform: rotate(90deg);
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px 0;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.2s ease;
}

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

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

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .navbar {
    padding: 0 16px;
    height: 64px;
  }

  .navbar.scrolled {
    padding: 0 16px;
  }

  .logo-text {
    display: none;
  }

  .logo img {
    height: 40px;
  }

  .hamburger {
    display: block;
  }

  .nav-container {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    clip-path: circle(0% at 90% -10%);
    transition: clip-path 0.5s ease-in-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav-container.active {
    clip-path: circle(1000px at 90% -10%);
  }

  nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px;
    clip-path: circle(0% at 90% -10%);
    transition: clip-path 0.5s ease-in-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  nav.active {
    clip-path: circle(1000px at 90% -10%);
  }

  nav ul {
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }

  nav li {
    width: 100%;
    text-align: center;
  }

  nav a {
    padding: 12px 16px;
    width: 100%;
    justify-content: center;
  }

  nav a::after {
    display: none;
  }

  .profile-section {
    margin-left: auto;
  }

  .dropdown-content {
    position: static;
    display: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
    border-radius: 0;
    margin-top: 4px;
  }

  .dropdown:hover .dropdown-content {
    display: block;
  }

  .dropdown-menu {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    min-width: 100%;
  }

  .profile-section.active .dropdown-menu {
    transform: translateY(0);
  }
}

/* ============================================
   NON-LOGGED IN NAVBAR
   ============================================ */
.not-logged-in nav {
  margin-left: auto;
}

.not-logged-in nav ul {
  gap: 4px;
}

/* Sign in button special styling */
.not-logged-in nav a[href*="sign-in"] {
  background: #0D3471;
  color: #fff;
  padding: 10px 20px;
}

.not-logged-in nav a[href*="sign-in"]:hover {
  background: #0a2a5e;
}

@media (max-width: 900px) {
  .not-logged-in nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px;
    clip-path: circle(0% at 90% -10%);
    transition: clip-path 0.5s ease-in-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 999;
  }

  .not-logged-in nav.active {
    clip-path: circle(1000px at 90% -10%);
  }

  .not-logged-in nav ul {
    flex-direction: column;
    gap: 4px;
  }
}