/* Header Styles - использует CSS custom properties для темизации */

/* ===== TYPOGRAPHY ===== */
.mooc-logo,
.nav-link,
.btn,
.dropdown-item {
  font-family: var(--font-family-base);
  letter-spacing: -0.01em;
}

/* ===== LOGO ===== */
.navbar-brand:hover {
  transform: scale(1.02);
  transition: transform 0.2s ease;
}

.mooc-logo {
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ===== NAVIGATION LINKS ===== */
.nav-link.active {
  font-weight: 600;
}

/* ===== LANGUAGE SWITCHER ===== */
.language-switcher .btn {
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.language-switcher .btn:hover {
  transform: translateY(-1px);
}

.language-switcher .btn.active {
  font-weight: 600;
}

/* LMS язычной переключатель */
.lang-switcher .lang-toggle {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8) !important;
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.lang-switcher .lang-toggle:hover {
  color: white !important;
  text-decoration: none;
  transform: none;
}

/* ===== THEME TOGGLE ===== */
#theme-toggle {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9) !important;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: white !important;
  transform: translateY(-1px);
}

.theme-icon-container {
  position: relative;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.moon-icon,
.sun-icon {
  position: absolute;
  left: 0;
  top: 0;
  transition: opacity 0.2s ease, transform 0.3s ease, visibility 0.2s ease;
}

.light-theme .moon-icon {
  opacity: 1;
  visibility: visible;
  transform: rotate(0deg) scale(1);
}

.light-theme .sun-icon {
  opacity: 0;
  visibility: hidden;
  transform: rotate(180deg) scale(0);
}

.dark-theme .moon-icon {
  opacity: 0;
  visibility: hidden;
  transform: rotate(-180deg) scale(0);
}

.dark-theme .sun-icon {
  opacity: 1;
  visibility: visible;
  transform: rotate(0deg) scale(1);
}

/* ===== PROFILE & AUTH BUTTONS ===== */
.dropdown-toggle:after {
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
}

.show .dropdown-toggle:after {
  transform: rotate(180deg);
}

.btn-primary {
  background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-600));
  border: none;
  box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--bs-primary-600), var(--bs-primary-700));
  box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.4);
}

/* ===== MOBILE MENU ICON ===== */
.btn-link:hover {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

/* ===== DROPDOWN MENUS ===== */
.dropdown-menu {
  border-radius: 10px;
  border: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(20px);
}

.dropdown-item {
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: linear-gradient(135deg, var(--bs-primary-100), var(--bs-primary-50));
  color: var(--bs-primary);
  transform: translateX(2px);
}

.dropdown-item.active {
  background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-600));
  color: white;
  font-weight: 600;
}

.dropdown-header {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
}

/* ===== MOBILE ACCORDION ===== */
.mobile-accordion {
  max-width: 320px;
}

.accordion-section {
  position: relative;
}

.accordion-toggle {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  color: var(--bs-body-color);
  transition: all 0.2s ease;
}

.accordion-toggle:hover {
  background: linear-gradient(135deg, var(--bs-primary-100), var(--bs-primary-50));
  color: var(--bs-primary);
}

.accordion-icon {
  transition: transform 0.3s ease;
  font-size: 0.85rem;
}

.accordion-toggle.active .accordion-icon {
  transform: rotate(90deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-content.active {
  max-height: 500px;
}

/* ===== DARK THEME ADJUSTMENTS ===== */
[data-bs-theme="dark"] .dropdown-menu {
  background: var(--bs-body-bg);
}

[data-bs-theme="dark"] .dropdown-item:hover {
  background: linear-gradient(135deg, var(--bs-primary-900), var(--bs-primary-800));
  color: var(--bs-primary-300);
}

[data-bs-theme="dark"] .accordion-toggle:hover {
  background: linear-gradient(135deg, var(--bs-primary-900), var(--bs-primary-800));
  color: var(--bs-primary-300);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar-brand img {
    height: 20px !important;
  }
  
  .mooc-logo {
    font-size: 0.9rem !important;
  }
  
  .language-switcher .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
  }
  
  .lang-switcher .lang-toggle {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .navbar-brand img {
    height: 16px !important;
  }
  
  .mooc-logo {
    font-size: 0.8rem !important;
  }
  
  .language-switcher .btn {
    font-size: 0.7rem;
    padding: 0.2rem 0.35rem;
  }
  
  .lang-switcher .lang-toggle {
    font-size: 0.75rem;
  }
}

@media (max-width: 320px) {
  .mooc-logo {
    display: none !important;
  }
}

@media (max-width: 300px) {
  #theme-toggle {
    display: none !important;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .navbar-brand,
  .language-switcher .btn,
  .lang-switcher .lang-toggle,
  #theme-toggle,
  .btn,
  .dropdown-item,
  .accordion-toggle,
  .accordion-icon,
  .accordion-content {
    transition: none !important;
  }
}

/* Focus styles */
.language-switcher .btn:focus,
.lang-switcher .lang-toggle:focus,
#theme-toggle:focus {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.15);
}

