/* Header Component Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  transition: all 0.3s ease;
}

.header--scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

/* Logo */
.header__logo {
  flex-shrink: 0;
}

.header__logo-link {
  text-decoration: none;
  color: inherit;
}

.header__logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3b82f6;
  transition: color 0.2s ease;
}

.header__logo-link:hover .header__logo-text {
  color: #2563eb;
}

/* Desktop Navigation */
.header__nav--desktop {
  display: none;
}

.header__nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__nav-link {
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.2s ease;
}

.header__nav-link:hover {
  color: #3b82f6;
}

.header__nav-link--active {
  color: #3b82f6;
}

.header__nav-link--active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #3b82f6;
  border-radius: 1px;
}

/* Language Switcher */
.header__language {
  display: none;
}

.header__language-select {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: white;
  color: #374151;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.header__language-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Auth Section */
.header__auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header__auth-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
}

.header__spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.header__auth-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header__dashboard-link {
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.header__dashboard-link:hover {
  color: #3b82f6;
  background-color: #f3f4f6;
}

.header__auth-guest {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Mobile Menu Button */
.header__mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.header__hamburger {
  position: relative;
  width: 1.5rem;
  height: 1.125rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.header__hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #374151;
  border-radius: 1px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.header__hamburger--open span:nth-child(1) {
  transform: rotate(45deg) translate(0.375rem, 0.375rem);
}

.header__hamburger--open span:nth-child(2) {
  opacity: 0;
}

.header__hamburger--open span:nth-child(3) {
  transform: rotate(-45deg) translate(0.375rem, -0.375rem);
}

/* Mobile Menu */
.header__mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border-bottom: 1px solid #e5e7eb;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.header__mobile-menu--open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.header__mobile-nav {
  padding: 1rem;
}

.header__mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.header__mobile-nav-item {
  margin-bottom: 0.5rem;
}

.header__mobile-nav-link {
  display: block;
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.header__mobile-nav-link:hover,
.header__mobile-nav-link--active {
  color: #3b82f6;
  background-color: #eff6ff;
}

.header__mobile-auth {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.header__mobile-dashboard-link {
  display: block;
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  text-align: center;
  border: 1px solid #d1d5db;
  transition: all 0.2s ease;
}

.header__mobile-dashboard-link:hover {
  color: #3b82f6;
  border-color: #3b82f6;
  background-color: #eff6ff;
}

/* Overlay */
.header__overlay {
  position: fixed;
  top: 4rem;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

/* Desktop Styles */
@media (min-width: 768px) {
  .header__container {
    padding: 0 2rem;
  }

  .header__nav--desktop {
    display: block;
    flex: 1;
    margin-left: 3rem;
  }

  .header__language {
    display: block;
    margin-right: 1rem;
  }

  .header__mobile-toggle {
    display: none;
  }

  .header__mobile-menu {
    display: none;
  }
}

@media (min-width: 1024px) {
  .header__nav-list {
    gap: 2.5rem;
  }

  .header__auth-guest {
    gap: 0.75rem;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
