/**
 * Shared Navigation Bar Styles
 */

#main-header {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  color: white;
  padding: 20px 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.header-logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
}

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

.header-content h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.header-content p {
  margin: 5px 0 0 0;
  font-size: 14px;
  opacity: 0.9;
}

#main-header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

#main-header nav ul li {
  margin: 0;
}

#main-header nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.2s;
  display: block;
}

#main-header nav ul li a:hover {
  background: rgba(255, 255, 255, 0.15);
}

#main-header nav ul li a.active {
  background: rgba(255, 255, 255, 0.25);
  font-weight: 600;
}

.login-btn {
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.login-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
}

/* Dropdown Menu Styles */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
}

/* Prevent Bootstrap from adding its own caret */
.dropdown-toggle::after {
  display: none !important;
}

.dropdown-menu {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 200px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  padding: 8px 0;
  margin-top: 8px;
  z-index: 1000;
  list-style: none;
}

.dropdown-menu li a {
  color: #333 !important;
  padding: 10px 20px !important;
  display: block;
  transition: background 0.2s;
  border-radius: 0 !important;
}

.dropdown-menu li a:hover {
  background: #f5f5f5 !important;
}

.dropdown:hover .dropdown-menu {
  display: block !important;
}

.dropdown-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 8px 0;
  list-style: none;
}

/* Toast animation */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  #main-header {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }

  .header-content {
    text-align: center;
  }

  .header-logo-container {
    flex-direction: column;
    gap: 10px;
  }

  .header-logo {
    height: 40px;
  }

  .header-text {
    text-align: center;
  }

  .header-content h1 {
    font-size: 24px;
  }

  #main-header nav ul {
    justify-content: center;
    gap: 10px;
  }

  #main-header nav ul li a {
    padding: 6px 10px;
    font-size: 14px;
  }

  /* Mobile dropdown - click to toggle, not hover */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 0;
    display: none;
  }

  .dropdown-menu li a {
    color: white !important;
    font-size: 13px !important;
    padding: 8px 15px !important;
  }

  .dropdown-menu li a:hover {
    background: rgba(255, 255, 255, 0.15) !important;
  }

  /* On mobile, prevent hover and use click instead */
  .dropdown:hover .dropdown-menu {
    display: none !important;
  }

  .dropdown.active .dropdown-menu {
    display: block !important;
  }
}
