/* Navigation styles extracted from inline <style> */

/* Body padding handled by main style.css - removed duplicate */

/* Base nav styling */
.dropdown-menu,
.dropdown-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  background: #fff;
  /* reduced nav bar height */
  padding: 1rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  /* Enhanced styles - removed problematic backdrop-filter and always-on shadow */
  overflow: visible;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.nav-brand {
  flex: 0 0 auto;
  margin: 0 1rem;
}

.brand-title {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: bold;
  margin: 0;
  display: block;
  /* Enhanced styles */
  background: linear-gradient(135deg, #2c3e50, #3498db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.brand-motto {
  font-family: var(--font-sans);
  font-size: 11px;
  color: #555;
  margin-top: 4px;
  display: block;
}

.nav-list {
  flex: 1 1 auto;
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  justify-content: center;
  align-items: center;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 11px;
  text-decoration: none;
  color: #000;
  padding: 0.5rem 1rem;   /* lighter vertical padding */
  white-space: nowrap;
  cursor: pointer;
  /* Enhanced styles - simplified for smooth hover */
  position: relative;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.nav-link:hover {
  background: rgba(52, 152, 219, 0.1);
  color: #2c3e50 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.nav-link:active {
  background: rgba(52, 152, 219, 0.1);
  box-shadow: 0 1px 4px rgba(52, 152, 219, 0.2);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  position: absolute;
  right: 1rem;
  top: 1.5rem;
  cursor: pointer;
  color: #000;
}

/* Enhanced Caret Animation - Fixed to prevent repeated rotation */
.caret {
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.3s ease;
  font-weight: 300;
  transform-origin: center;
}

.dropdown:hover > .nav-link .caret {
  transform: rotate(45deg);
}

/* Profile Avatar Enhancement */
#nav-avatar {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

#nav-profile:hover #nav-avatar {
  transform: scale(1.05);
  border-color: #3498db;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* Pulse animation for sign in - toned down */
#nav-signin .nav-link {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white !important;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
  animation: gentle-pulse 3s ease-in-out infinite;
}

#nav-signin .nav-link:hover {
  background: linear-gradient(135deg, #2980b9, #1f639a);
  box-shadow: 0 6px 16px rgba(52, 152, 219, 0.5);
  transform: translateY(-2px) scale(1.05);
}

/* Sign-in button pulse animation */
@keyframes gentle-pulse {
  0%, 100% { 
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3); 
  }
  50% { 
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.5); 
  }
}



/* Desktop dropdowns (hover) */
@media (min-width: 1150px) {
  .dropdown { 
    position: relative; 
  }
  
  .dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(52, 152, 219, 0.15);
    border-radius: 8px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-8px) scale(0.98);
    transition: all 0.2s ease, visibility 0s linear 0.1s;
    z-index: 1001;
    pointer-events: none;
  }
  
  /* Create invisible bridge to prevent dropdown from closing */
  .dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 14px;
    background: transparent;
    pointer-events: auto;
    z-index: 1000;
  }
  
  .nav-list > li:nth-child(2) .dropdown-menu { min-width: 280px; }
  
  .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px; left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(52, 152, 219, 0.15);
    z-index: 2;
  }
  
  .dropdown-menu::after {
    content: '';
    position: absolute;
    top: -5px; left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(255, 255, 255, 0.98);
    z-index: 3;
  }
  
  .dropdown:hover .dropdown-menu,
  .dropdown-menu:hover { 
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
    transition: all 0.2s ease;
  }
  
  .dropdown-menu li {
    margin: 0;
  }
  
  .dropdown-menu a {
    display: block;
    padding: 10px 18px;
    font-size: 12px;
    color: #2c3e50;
    text-decoration: none;
    text-transform: uppercase;
    text-align: center;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 1px 6px;
    position: relative;
    border: 1px solid transparent;
  }
  
  .dropdown-menu a:hover { 
    background: rgba(52, 152, 219, 0.12);
    color: #2c3e50;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
    border: 1px solid rgba(52, 152, 219, 0.3);
  }

  /* Special styling for members dropdown items - toned down */
  .dropdown-menu a[href*="category=writers"]::after,
  .dropdown-menu a[href*="category=editors"]::after,
  .dropdown-menu a[href*="boardmembers"]::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #3498db;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .dropdown-menu a[href*="category=writers"]:hover::after {
    background: #e74c3c;
    opacity: 1;
  }

  .dropdown-menu a[href*="category=editors"]:hover::after {
    background: #f39c12;
    opacity: 1;
  }

  .dropdown-menu a[href*="boardmembers"]:hover::after {
    background: #9b59b6;
    opacity: 1;
  }

  /* Profile tab tweaks */
  #nav-profile {
    align-self: center;  /* center avatar vertically */
    padding: 0;
  }
  #nav-profile .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.25rem 1rem;  /* very tight vertical padding */
  }
  #nav-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-bottom: 0.25rem;
  }
  #nav-profile .profile-name,
  #nav-profile .profile-role {
    display: block;
    font-size: 11px;
    color: #000;
    margin: 2px 0;
  }
}

/* Mobile menu & nested behavior */
@media (max-width: 1149px) {
  /* Mobile Responsive Enhancements */
  .nav-link:hover {
    transform: none;
    box-shadow: none;
    background: rgba(52, 152, 219, 0.05);
    border: 1px solid transparent;
  }
  
  .dropdown-menu a:hover {
    transform: none;
    background: rgba(52, 152, 219, 0.05);
    border: 1px solid transparent;
  }

  .nav-toggle {
    display: flex;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #000;
    z-index: 1002;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
  }
  .nav-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
  }
  .nav-brand {
    width: calc(100% - 2.5rem);
    text-align: center;
    margin: 0 1rem 0 0;
  }
  .brand-title { font-size: 18px; }
  .brand-motto { font-size: 9px; }

  .nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    margin: 0;
    padding: 0;
    align-items: stretch;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-top: 1px solid #ddd;
  }
  .nav-list.open { display: flex; }
  .nav-link {
    display: block;
    width: 100%;
    padding: 1rem;
    text-transform: uppercase;
    background: #fff;
    border-bottom: 1px solid #ddd;
    text-align: left;
    box-sizing: border-box;
  }
  .dropdown-menu {
    display: none;
    flex-direction: column;
    position: static;
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
  }
  .dropdown.open > .dropdown-menu { display: flex; }
  .dropdown-menu a {
    display: block;
    padding: 1rem 1rem 1rem 2rem;
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
    color: #000;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
  }
}