/* Modern Header & Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@500;600;700&display=swap');

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #8b5cf6;
  --secondary-dark: #7c3aed;
  --accent: #ec4899;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg-light: #f8fafc;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-dark);
}

/* Navbar Styling */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  padding: 1.125rem 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(99, 102, 241, 0.08);
  position: relative;
}

.navbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.navbar:hover::after {
  opacity: 0.3;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  padding: 0.875rem 0;
  background: rgba(255, 255, 255, 0.98);
}

.navbar .container {
  max-width: 1200px;
}

/* Logo Styling */
.navbar-brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
  padding: 0;
}

.navbar-brand:hover {
  transform: translateY(-2px);
  color: var(--text-dark);
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.navbar-brand:hover .logo-icon {
  box-shadow: var(--shadow-md);
  transform: scale(1.05);
}

.brand-text {
  font-weight: 700;
  font-size: 1.3rem;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 70%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

/* Navigation Links */
.navbar-nav {
  gap: 0.25rem;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.625rem 1.125rem !important;
  border-radius: 10px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 10px;
}

.nav-link:hover {
  color: var(--primary);
  transform: translateY(-1px);
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-link.active {
  color: var(--primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* Buttons */
.btn-login {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.7rem 1.75rem;
  border-radius: 12px;
  border: none;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35), inset 0 -2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-login:hover::before {
  left: 100%;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45), inset 0 -2px 8px rgba(0, 0, 0, 0.1);
  color: var(--white);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Dropdown Menu */
.dropdown-menu {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  box-shadow: var(--shadow-xl);
  padding: 0.625rem;
  margin-top: 0.625rem;
  min-width: 220px;
  animation: fadeInDropdown 0.2s ease-out;
}

@keyframes fadeInDropdown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  border-radius: 10px;
  padding: 0.7rem 1.125rem;
  font-size: 0.9375rem;
  transition: var(--transition);
  color: var(--text-muted);
  font-weight: 500;
}

.dropdown-item:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%);
  color: var(--primary);
  transform: translateX(4px);
}

.dropdown-item.text-danger {
  color: #dc2626 !important;
}

.dropdown-item.text-danger:hover {
  background: rgba(229, 62, 62, 0.08);
  color: #c53030 !important;
}

.dropdown-divider {
  margin: 0.5rem 0;
  opacity: 0.1;
}

/* Mobile Toggler */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
  border-radius: 8px;
  transition: var(--transition);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.navbar-toggler-icon {
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(102, 126, 234, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .navbar {
    padding: 0.75rem 0;
  }

  .navbar-collapse {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
  }

  .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0.125rem 0;
  }

  .btn-login {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }

  .dropdown-menu {
    border: none;
    box-shadow: none;
    background: rgba(102, 126, 234, 0.05);
    margin-left: 1rem;
  }
}

@media (max-width: 575.98px) {
  .brand-text {
    font-size: 1.125rem;
  }

  .logo-icon svg {
    width: 36px;
    height: 36px;
  }
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Focus Styles for Accessibility */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar {
  animation: fadeInDown 0.5s ease-out;
}
