:root {
    --primary-color: #012233;
    --font-main: 'Cabin', sans-serif;
  }
  
  body {
    font-family: var(--font-main);
  }
  
  /* Force navbar and all its elements to use Cabin font - high specificity */
  header,
  header .logo,
  header .logo span,
  header nav,
  header nav a,
  header .dropdown,
  header .dropdown-content,
  header .dropdown-content a,
  header .user-dropdown,
  header .user-menu-link,
  header .login-btn {
    font-family: 'Cabin', sans-serif !important;
  }
  
  /* Apply to all elements except FontAwesome icons */
  header *:not([class*="fa"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not(.fat) {
    font-family: 'Cabin', sans-serif !important;
  }
  
  /* Ensure FontAwesome icons use their proper font family */
  header .fa,
  header .fas,
  header .far,
  header .fab,
  header .fal,
  header .fad,
  header .fat,
  header [class*="fa-"] {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'FontAwesome' !important;
  }
  
  header {
    background-color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    border-bottom: 1px solid #ccc;
    position: relative;
    z-index: 1000; /* Higher z-index to ensure navbar dropdowns appear above other content */
  }
  
  .logo {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
.logo img {
  height: 80px;
  max-width: 100%;
  vertical-align: middle;
  display: block;
  transition: all 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}
  
  .logo span {
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.5em;
    font-size: 24px;
  }
  
  nav {
    display: flex;
    align-items: center;
    gap: 25px;
    position: relative;
  }
  
  nav a {
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    text-decoration: none;
    padding: 10px 15px;
    position: relative;
  }
  
  nav a:hover {
    color: #e44993;
  }
  
  .dropdown {
    position: relative;
    display: inline-block;
  }
  
  .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary-color);
    min-width: 180px;
    z-index: 999;
    padding: 10px 0;
  }
  
  .dropdown-content a {
    color: white;
    padding: 10px 20px;
    display: block;
    font-weight: 500;
    text-transform: none;
    font-size: 13px;
  }
  
  .dropdown-content a:hover {
    background-color: #022e44;
  }
  
  .dropdown:hover .dropdown-content {
    display: block;
  }
  
  /* Click-based dropdown for user menu */
  .user-dropdown .dropdown-content {
    display: none;
  }
  
  .user-dropdown.active .dropdown-content {
    display: block;
  }

  .login-btn {
    background-color: #e44993;
    color: white !important;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 5px;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
  }
  
  .login-btn:hover {
    background-color: #c53e7d;
  }
  
html {
    scroll-behavior: smooth;
  }
  
  /* Modern User Dropdown with Ambient Lighting */
  .user-dropdown {
    position: relative;
  }
  
  .user-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    position: relative;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
  }
  
  /* Ambient lighting effect on hover */
  .user-menu-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(102, 126, 234, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  
  .user-menu-link:hover::before {
    opacity: 1;
  }
  
  .user-menu-link:hover {
    transform: translateY(-1px);
    box-shadow: 
      0 4px 20px rgba(102, 126, 234, 0.15),
      0 0 0 1px rgba(102, 126, 234, 0.1);
  }
  
  /* Active state with stronger ambient lighting */
  .user-dropdown.active .user-menu-link {
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.05));
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 
      0 6px 30px rgba(102, 126, 234, 0.25),
      0 0 0 1px rgba(102, 126, 234, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
  }
  
  .user-dropdown.active .user-menu-link::before {
    opacity: 1;
    background: radial-gradient(circle at center, rgba(102, 126, 234, 0.2), transparent 70%);
  }
  
  .user-menu-link i.fa-user-circle {
    font-size: 22px;
    background: linear-gradient(145deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
  }
  
  .user-dropdown.active .user-menu-link i.fa-user-circle {
    filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.4));
  }
  
  .user-menu-link .fa-chevron-down {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #667eea;
  }
  
  .user-dropdown.active .user-menu-link .fa-chevron-down {
    transform: rotate(180deg);
  }
  
  /* Modern Dropdown Menu */
  .user-dropdown .dropdown-content {
    right: 0;
    left: auto;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 
      0 20px 60px rgba(0, 0, 0, 0.12),
      0 8px 25px rgba(0, 0, 0, 0.08),
      0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 12px 0;
    margin-top: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
  }
  
  .user-dropdown.active .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  
  /* Dropdown arrow */
  .user-dropdown .dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 24px;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
    backdrop-filter: blur(20px);
  }
  
  .user-dropdown .dropdown-content a {
    color: #333;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 500;
    text-transform: none;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  }
  
  /* Ambient hover effect for menu items */
  .user-dropdown .dropdown-content a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
      transparent, 
      rgba(102, 126, 234, 0.08), 
      rgba(118, 75, 162, 0.05),
      transparent
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
  }
  
  .user-dropdown .dropdown-content a:hover::before {
    transform: translateX(100%);
  }
  
  .user-dropdown .dropdown-content a:hover {
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.03));
    color: #667eea;
    transform: translateX(4px);
    padding-left: 24px;
  }
  
  .user-dropdown .dropdown-content a i {
    font-size: 16px;
    color: #666;
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
  }
  
  .user-dropdown .dropdown-content a:hover i {
    color: #667eea;
    transform: scale(1.1);
    filter: drop-shadow(0 0 4px rgba(102, 126, 234, 0.3));
  }
  
  /* Special styling for logout link */
  .user-dropdown .dropdown-content a.nav-logout-link {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 8px;
    color: #dc3545;
  }
  
  .user-dropdown .dropdown-content a.nav-logout-link:hover {
    background: linear-gradient(145deg, rgba(220, 53, 69, 0.08), rgba(220, 53, 69, 0.05));
    color: #dc3545;
  }
  
  .user-dropdown .dropdown-content a.nav-logout-link i {
    color: #dc3545;
  }
  
  /* Bookmark navigation link styling */
  .bookmark-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.05));
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  }
  
  .bookmark-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(102, 126, 234, 0.2), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .bookmark-nav-link:hover::before {
    opacity: 1;
  }
  
  .bookmark-nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 
      0 8px 25px rgba(102, 126, 234, 0.25),
      0 0 0 1px rgba(102, 126, 234, 0.2);
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.08));
  }
  
  .bookmark-nav-link i {
    color: #667eea;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
  }
  
  .bookmark-nav-link:hover i {
    color: #5a67d8;
    transform: scale(1.1);
    filter: drop-shadow(0 0 6px rgba(102, 126, 234, 0.4));
  }

/* Mobile menu toggle button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: #012233;
  cursor: pointer;
  padding: 10px;
  transition: color 0.3s ease;
}

.mobile-menu-toggle:hover {
  color: #f13d79;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 20px;
  }

  .header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    gap: 8px;
  }

  .logo img {
    height: 50px;
  }

  .logo span {
    font-size: 18px;
  }

  .mobile-menu-toggle {
    display: block;
  }

  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: white;
    border-top: 1px solid #eee;
    padding-top: 15px;
    gap: 0;
    align-items: flex-start;
  }

  nav.show {
    display: flex;
  }

  nav a {
    font-size: 16px;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
    width: 100%;
    text-align: left;
  }

  /* Enhanced mobile dropdown handling */
  .dropdown {
    width: 100%;
  }

  .dropdown-content {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    background: #f8f9fa;
    margin-left: 20px;
    width: auto;
    min-width: auto;
    padding: 10px 0;
  }

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

  .dropdown-content a {
    padding: 10px 0;
    font-size: 14px;
    color: #012233 !important;
  }

  .dropdown-content a:hover {
    background-color: transparent;
    color: #f13d79 !important;
  }

  /* Enhanced user dropdown mobile adjustments */
  .user-dropdown {
    width: 100%;
    margin-top: 15px;
  }

  .user-menu-link {
    justify-content: space-between;
    width: 100%;
    padding: 15px;
    position: relative;
  }
  
  /* Fix dropdown arrow positioning on mobile */
  .user-menu-link .fa-chevron-down {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  .user-dropdown .dropdown-content {
    position: static;
    margin-top: 10px;
    margin-left: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    min-width: auto;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
  }

  .user-dropdown .dropdown-content::before {
    display: none;
  }

  .user-dropdown .dropdown-content a {
    padding: 12px 15px;
    font-size: 14px;
    color: #333 !important;
  }
  
  .user-dropdown .dropdown-content a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea !important;
  }
  
  /* Prevent page scroll when mobile menu is open */
  nav.show {
    display: flex;
    position: fixed;
    top: 100px; /* Adjust based on header height */
    left: 0;
    width: 100%;
    height: calc(100vh - 100px);
    background: white;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  }

  /* Bookmark link mobile */
  .bookmark-nav-link {
    width: 100%;
    height: 45px;
    justify-content: flex-start;
    padding: 0 15px;
    border-radius: 5px;
  }

  .bookmark-nav-link i {
    margin-right: 10px;
  }

  .bookmark-nav-link::after {
    content: 'Bookmarks';
    color: #667eea;
    font-weight: 500;
  }

  .login-btn {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding: 15px;
  }
}
  
/* Navigation icons styling */
nav a i {
  margin-right: 6px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

nav a:hover i {
  opacity: 1;
}

.dropdown-content a i {
  margin-right: 8px;
  width: 16px;
  text-align: center;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.dropdown-content a:hover i {
  opacity: 1;
}

/* User dropdown icons */
.user-dropdown .dropdown-content a i {
  margin-right: 8px;
  width: 18px;
  text-align: center;
}

/* Mobile menu icons */
@media (max-width: 768px) {
  .mobile-nav a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
  }
}

/* Fix for user dropdown text wrapping and chevron positioning */
.user-menu-link {
  white-space: nowrap;
  min-width: fit-content;
  flex-wrap: nowrap;
}

.user-menu-link .fa-chevron-down {
  flex-shrink: 0;
  margin-left: 8px;
}

/* Only allow wrapping for very long names (10+ characters) */
@media (max-width: 1200px) {
  .user-menu-link {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* For very long names, show full text but ensure proper spacing */
  .user-menu-link[data-long-name="true"] {
    white-space: normal;
    max-width: 200px;
    line-height: 1.2;
    padding: 8px 18px;
  }
  
  .user-menu-link[data-long-name="true"] .fa-chevron-down {
    align-self: flex-start;
    margin-top: 2px;
  }
}

/* Ensure proper spacing between user icon, name, and chevron */
.user-menu-link > * {
  flex-shrink: 0;
}

.user-menu-link > span {
  flex-shrink: 1;
  min-width: 0;
}

/* Additional improvements for user dropdown */
.user-menu-link .user-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Better spacing for the entire nav bar */
header nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
}

/* Ensure nav items don't wrap unnecessarily */
header nav > * {
  flex-shrink: 0;
}

/* Allow user dropdown to be flexible but not too small */
.user-dropdown {
  flex-shrink: 1;
  min-width: 120px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1400px) {
  header nav {
    gap: 15px;
  }
}

@media (max-width: 1200px) {
  .user-menu-link {
    font-size: 14px;
    padding: 10px 15px;
  }
  
  .user-menu-link .user-name {
    max-width: 120px;
  }
}
