/**
 * Шапка и меню из tmp/main.html (без Tailwind, свои стили).
 */
:root {
  --header-bg: rgba(10, 10, 11, 0.9);
  --header-border: rgba(255, 255, 255, 0.05);
  --header-height: 80px;
  --nav-link: #d1d5db;
  --nav-link-hover: #2dd4bf;
  --dropdown-bg: #121214;
  --dropdown-border: rgba(255, 255, 255, 0.1);
  --dropdown-item-hover: rgba(255, 255, 255, 0.05);
  --brand-400: #2dd4bf;
  --brand-500: #14b8a6;
  --brand-600: #0d9488;
  --dark-700: #1c1c1f;
  --dark-800: #121214;
  --dark-900: #0a0a0b;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-height);
  border-bottom: 1px solid var(--header-border);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s, border-color 0.3s;
}

.site-header__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .site-header__inner { padding: 0 24px; }
}

/* Logo — наш логотип */
.site-header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.site-header__logo:hover {
  transform: scale(1.04);
  filter: drop-shadow(0 0 12px rgba(45, 212, 191, 0.35));
}

.site-header__logo:active {
  transform: scale(0.98);
}

.site-header__logo-img {
  height: 52px;
  width: auto;
  max-width: 260px;
  display: block;
  object-fit: contain;
  transition: height 0.2s ease;
}

@media (min-width: 1024px) {
  .site-header__logo-img {
    height: 56px;
    max-width: 280px;
  }
}


/* Desktop nav */
.site-header__nav {
  display: none;
}

@media (min-width: 1024px) {
  .site-header__nav {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
}

.site-header__nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nav-link);
  text-decoration: none;
  padding: 0.5rem 0.5rem;
  border-radius: 0.375rem;
  transition: color 0.2s, background 0.2s;
}

.site-header__nav a:hover {
  color: var(--nav-link-hover);
  background: rgba(20, 184, 166, 0.1);
}

/* Пункт меню с бейджем (огонёк) */
.site-header__nav a .site-header__badge {
  margin-left: 0.25rem;
  font-size: 0.7em;
  vertical-align: 0.15em;
}
.site-header__nav a .site-header__badge--fire {
  color: #f59e0b;
}
.site-header__nav a:hover .site-header__badge--fire {
  color: #fbbf24;
}
/* Варианты огонька: --fire (оранж), --fire-hot (красный), --fire-glow (золотой) */
.site-header__nav a .site-header__badge--fire-hot {
  color: #dc2626;
}
.site-header__nav a:hover .site-header__badge--fire-hot {
  color: #ef4444;
}
.site-header__nav a .site-header__badge--fire-glow {
  color: #eab308;
}
.site-header__nav a:hover .site-header__badge--fire-glow {
  color: #facc15;
}
.site-header__dropdown {
  position: relative;
}

.site-header__dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nav-link);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem 0.5rem;
  font-family: inherit;
  border-radius: 0.375rem;
  transition: color 0.2s, background 0.2s;
}

.site-header__dropdown-btn:hover {
  color: var(--nav-link-hover);
  background: rgba(20, 184, 166, 0.1);
}

.site-header__dropdown-btn i {
  font-size: 0.75rem;
  margin-left: 0.25rem;
  transition: transform 0.2s;
}

.site-header__dropdown:hover .site-header__dropdown-btn i {
  transform: rotate(180deg);
}

.site-header__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.35rem;
  width: max-content;
  min-width: 12rem;
  padding: 0.35rem 0;
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
}

.site-header__dropdown:hover .site-header__dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.site-header__dropdown-menu a {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  color: var(--nav-link);
  background: transparent;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.site-header__dropdown-menu a:hover {
  color: var(--nav-link-hover);
  background: var(--dropdown-item-hover);
}

.site-header__dropdown-menu a:first-child {
  border-radius: 0.35rem 0.35rem 0 0;
}

.site-header__dropdown-menu a:last-child {
  border-radius: 0 0 0.35rem 0.35rem;
}

/* Right: language + login */
.site-header__actions {
  display: none;
}

.site-header__action-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nav-link);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: color 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.site-header__action-link:hover {
  color: var(--nav-link-hover);
  background: rgba(20, 184, 166, 0.1);
}
/* Выделение пункта «Школа» */
.site-header__school {
  color: var(--brand-400);
  font-weight: 600;
}
.site-header__school:hover {
  color: var(--nav-link-hover);
  background: rgba(20, 184, 166, 0.15);
}
.site-header__action-link .site-header__badge--fire {
  color: #f59e0b;
}
.site-header__action-link:hover .site-header__badge--fire {
  color: #fbbf24;
}
.site-header__action-link .site-header__badge--fire-hot {
  color: #dc2626;
}
.site-header__action-link:hover .site-header__badge--fire-hot {
  color: #ef4444;
}
.site-header__action-link .site-header__badge--fire-glow {
  color: #eab308;
}
.site-header__action-link:hover .site-header__badge--fire-glow {
  color: #facc15;
}

@media (min-width: 1024px) {
  .site-header__actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }
}

/* Language dropdown */
.site-header__lang {
  position: relative;
}

.site-header__lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--surface-400, #9ca3af);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color 0.2s;
}

.site-header__lang-btn:hover {
  color: #fff;
}

.site-header__lang-btn i {
  font-size: 0.75rem;
}

.site-header__lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.25rem;
  width: max-content;
  min-width: min-content;
  padding: 0;
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
}

.site-header__lang:hover .site-header__lang-menu {
  opacity: 1;
  visibility: visible;
}

.site-header__lang::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.25rem;
}

.site-header__lang-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  color: var(--nav-link);
  background: var(--dropdown-bg);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.site-header__lang-check {
  margin-left: auto;
  padding-left: 0.375rem;
  color: var(--nav-link-hover);
  font-size: 0.75rem;
}

.site-header__lang-menu a.is-current {
  color: var(--nav-link-hover);
}

.site-header__lang-menu a:hover {
  color: var(--nav-link-hover);
  background: var(--dropdown-item-hover);
}

.site-header__lang-menu a:first-child { border-radius: 0.5rem 0.5rem 0 0; }
.site-header__lang-menu a:last-child { border-radius: 0 0 0.5rem 0.5rem; }

/* Login / Panel link — везде кнопка-обводка (teal контур, прозрачный фон) */
.site-header__actions .site-header__login,
.site-header__login {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: var(--brand-400) !important;
  text-decoration: none !important;
  padding: 0.45rem 0.9rem !important;
  border-radius: 0.375rem !important;
  border: 1px solid rgba(45, 212, 191, 0.5) !important;
  background: transparent !important;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.site-header__actions .site-header__login:hover,
.site-header__login:hover {
  color: var(--nav-link-hover) !important;
  border-color: var(--brand-400) !important;
  background: rgba(45, 212, 191, 0.08) !important;
}

.site-header__actions .site-header__login:active,
.site-header__login:active {
  background: rgba(45, 212, 191, 0.12) !important;
}

.site-header__login i,
.site-header__login .site-header__auth-text {
  color: inherit;
}

/* Burger (mobile) */
.site-header__burger {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  margin: -0.5rem;
  color: var(--nav-link);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
}

.site-header__burger:hover {
  color: #fff;
}

@media (min-width: 1024px) {
  .site-header__burger {
    display: none;
  }
}

/* Mobile menu panel */
.site-header__mobile {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(10, 10, 11, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-border);
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
}

.site-header__mobile.open {
  visibility: visible;
  opacity: 1;
}

@media (min-width: 1024px) {
  .site-header__mobile {
    display: none;
  }
}

.site-header__mobile-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 16px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-header__mobile a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--nav-link);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: color 0.2s, background 0.2s;
}

.site-header__mobile a:hover {
  color: var(--nav-link-hover);
  background: var(--dropdown-item-hover);
}
.site-header__mobile a .site-header__badge--fire {
  color: #f59e0b;
  margin-left: 0.25rem;
}
.site-header__mobile a .site-header__badge--fire-hot {
  color: #dc2626;
  margin-left: 0.25rem;
}
.site-header__mobile a .site-header__badge--fire-glow {
  color: #eab308;
  margin-left: 0.25rem;
}
.site-header__mobile a.site-header__school {
  color: var(--brand-400);
  font-weight: 600;
}
.site-header__mobile a.site-header__school:hover {
  color: var(--nav-link-hover);
  background: rgba(20, 184, 166, 0.15);
}

.site-header__mobile-label {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--surface-600, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

.site-header__mobile-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 1rem 0;
}

.site-header__mobile-login {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header__mobile-login a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--brand-400);
  background: transparent;
  border: 1px solid rgba(45, 212, 191, 0.5);
  border-radius: 0.375rem;
  padding: 0.6rem 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.site-header__mobile-login a:hover {
  color: var(--nav-link-hover);
  border-color: var(--brand-400);
  background: rgba(45, 212, 191, 0.08);
}

/* Отступ основного контента под фиксированную шапку */
body.has-site-header .main {
  padding-top: var(--header-height);
}
