/*  layout.css — шапка, подвал, сетки страниц, навигация, хлебные крошки  */

/*  ========== HEADER  ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

/* Шапка во всю ширину экрана (как слайдер, от края до края).
   Снимаем ограничение .container по max-width, но сохраняем боковые
   отступы: логотип слева, поиск по центру, действия справа. */
.header-inner.container,
.site-nav__list.container {
  max-width: none;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  min-height: var(--header-height);
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  order: 1;
}

.brand__logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--teal), var(--teal-hover));
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(54, 81, 110, 0.2);
}

.brand__logo img { width: 100%; height: 100%; object-fit: contain; }

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.15;
}

.brand__tagline {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/*  ========== NAVIGATION (второй ряд шапки)  ========== */
/* Обёртка ряда меню: тонкая линия-разделитель под верхним рядом (десктоп).
   На мобильных меню превращается в выпадающую панель (см. RESPONSIVE),
   а обёртка схлопывается в 0 высоты, поэтому линию рисуем только с 768px. */
.header-nav-wrap {
  display: block;
}

.site-nav {
  /* Базовое (мобильное) состояние — выпадающая панель под шапкой */
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: none;
  background-color: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  z-index: 90;
}

.site-nav.is-open {
  display: block;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding-top: 12px;
  padding-bottom: 16px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--terracotta);
}

/* Подсветка пункта — линия снизу вместо заливки текста. */
.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--terracotta);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

/*  Иконка пункта меню  */
.nav-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--terracotta);
}

.nav-link__icon svg {
  width: 18px;
  height: 18px;
}

.nav-link__icon--custom {
  font-size: 1rem;
  line-height: 1;
}

/* SVG-иконка пункта меню в выпадающих списках */
.nav-emoji {
  display: inline-flex;
  align-items: center;
  color: var(--terracotta);
}

.nav-emoji svg {
  width: 16px;
  height: 16px;
  vertical-align: -0.15em;
}

.nav-link__label {
  min-width: 0;
}

.nav-group {
  position: relative;
}

.nav-link--dropdown {
  padding-right: 12px;
}

.nav-link__chevron {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  flex-shrink: 0;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 220px;
  max-width: 320px;
  padding: 8px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

/* Невидимая зона между пунктом и выпадающим списком —
   предотвращает случайное закрытие при переходе курсора на подменю. */
.dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
}

.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

.dropdown-menu a:hover {
  background-color: var(--terracotta-soft);
  color: var(--terracotta-hover);
}

/* Показ только непосредственного подменю (child-комбинатор). */
.nav-group:hover > .dropdown-menu,
.nav-group:focus-within > .dropdown-menu,
.nav-group > .dropdown-menu:hover,
.nav-group > .dropdown-menu.is-open {
  display: flex;
}

/* ===== Многоуровневые (вложенные) подменю ===== */
.dropdown-menu .nav-subgroup {
  position: relative;
}

.dropdown-menu .dropdown-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dropdown-parent__caret {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  flex-shrink: 0;
  transition: transform var(--transition, 0.2s ease);
}

/* Вложенное подменю (3-й уровень+) - раскрытие вбок на десктопе. */
.dropdown-submenu {
  top: -9px;
  left: 100%;
  margin-left: 6px;
}

.dropdown-submenu::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 0;
  bottom: 0;
  width: 10px;
}

.nav-subgroup:hover > .dropdown-submenu,
.nav-subgroup:focus-within > .dropdown-submenu,
.nav-subgroup > .dropdown-submenu:hover,
.nav-subgroup > .dropdown-submenu.is-open {
  display: flex;
}

/*  ========== HEADER SEARCH (постоянно видимая строка поиска)  ========== */
.header-search {
  order: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 100%;
  min-width: 0;
  height: 46px;
  padding: 0 18px;
  background-color: var(--surface-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.header-search:focus-within {
  border-color: var(--terracotta);
  background-color: var(--surface);
  box-shadow: var(--focus-ring);
}

.header-search__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted);
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 0.95rem;
  color: var(--text);
}

.header-search input:focus {
  outline: none;
}

.header-search input::placeholder {
  color: var(--muted);
}

/*  ========== HEADER ACTIONS  ========== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  order: 2;
  margin-left: auto;
}

/* «Вход» — текстовая ссылка; «Регистрация» — залитая кнопка */
.header-login {
  display: none;
  align-items: center;
  padding: 0 4px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-heading);
  transition: color var(--transition-fast);
}

.header-login:hover {
  color: var(--terracotta);
}

.header-register {
  display: none;
}

@media (min-width: 768px) {
  .header-login {
    display: inline-flex;
  }

  .header-register {
    display: inline-flex;
  }
}

/*  ========== MOBILE NAV TOGGLE  ========== */
.nav-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background-color: var(--surface);
  color: var(--text);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

/*  ========== MAIN LAYOUT  ========== */
.main-content {
  min-height: 50vh;
  padding-top: 32px;
  padding-bottom: 48px;
}

.page-layout {
  display: grid;
  gap: 32px;
}

.content-column { min-width: 0; }
.sidebar-column { min-width: 0; }

/*  ========== BREADCRUMBS  ========== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--terracotta);
}

.breadcrumbs span {
  color: var(--text);
  font-weight: 600;
}

/*  ========== PAGE HEAD  ========== */
.page-head {
  margin-bottom: 28px;
}

.page-head h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 10px;
}

.page-head p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 680px;
}

/*  ========== FOOTER  ========== */
.site-footer {
  background: linear-gradient(160deg, #08101c 0%, #132437 50%, #08101c 100%);
  color: rgba(255, 255, 255, 0.72);
  padding-top: 56px;
}

.footer-grid {
  display: grid;
  gap: 36px;
  margin-bottom: 48px;
}

.footer-brand .brand__name {
  color: #fff;
}

.footer-brand .brand__tagline {
  color: rgba(255, 255, 255, 0.55);
}

.footer-desc {
  margin-top: 14px;
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 320px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
}

.footer-col a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-align: center;
  font-weight: 800;
  line-height: 1;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.social-link:hover {
  background-color: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
  transform: translateY(-2px);
}

.social-link--vk:hover { background-color: #0077ff; border-color: #0077ff; }
.social-link--ok:hover { background-color: #ee8208; border-color: #ee8208; }
.social-link--max:hover { background-color: #6c27b3; border-color: #6c27b3; }
.social-link--yandex:hover { background-color: #fc3f1d; border-color: #fc3f1d; }
.social-link--mail:hover { background-color: #005ff9; border-color: #005ff9; }

/* Цветные иконки соцсетей в боковой карточке преподавателя (светлый фон) */
.profile-card .social-link {
  border-color: transparent;
  color: #fff;
}

.profile-card .social-link--vk,
.profile-card .social-link--vk:hover { background-color: #0077ff; }

.profile-card .social-link--ok,
.profile-card .social-link--ok:hover { background-color: #ee8208; }

.profile-card .social-link--max,
.profile-card .social-link--max:hover { background-color: #6c27b3; }

.profile-card .social-link--yandex,
.profile-card .social-link--yandex:hover { background-color: #fc3f1d; }

.profile-card .social-link--mail,
.profile-card .social-link--mail:hover { background-color: #005ff9; }

/* Соцссылки в сайдбаре (профиль + виджет соцсетей): всегда контрастный фон,
   т.к. базовый .social-link рассчитан на тёмный фон (футер). */
.sidebar-card .social-link {
  background-color: var(--terracotta);
  border-color: transparent;
  color: #fff;
}

.sidebar-card .social-link:hover {
  background-color: var(--terracotta-hover, #a04a2c);
  transform: translateY(-2px);
}

.social-link svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
}

/* Буквенные иконки соцсетей (MAX, Яндекс).
   Центрирование через absolute + translate(-50%, -50%) - не зависит ни от
   flex, ни от baseline/line-height, ни от border-box: буква ставится ровно
   в геометрический центр бейджа. */
.social-link {
  position: relative;
}

.social-letter {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0;
  line-height: 1;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 16px;
}

/* Текст карточки преподавателя (единое WYSIWYG-поле) */
.profile-body {
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.92rem;
  text-align: left;
}

.profile-body p {
  margin: 0 0 8px;
}

/* Виджет "Последние комментарии" */
.sidebar-comments {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-comment__link {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--surface-warm);
  color: var(--text);
  transition: background-color var(--transition-fast);
}

.sidebar-comment__link:hover {
  background-color: var(--terracotta-soft);
}

.sidebar-comment__author {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--terracotta);
}

.sidebar-comment__text {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Имя преподавателя (карточка без WYSIWYG-текста) */
.profile-name {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

/* Виджет "Меню сайта" — вертикальный список с вложенностью.
   Собственный класс (не .sidebar-list), чтобы не наследовать flex space-between. */
.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-menu > li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.sidebar-menu > li:last-child {
  border-bottom: 0;
}

.sidebar-menu a {
  display: block;
  color: var(--text);
}

.sidebar-menu a:hover {
  color: var(--terracotta);
}

/* Строка пункта с подменю: ссылка + кнопка-стрелка */
.sidebar-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-menu__link {
  flex: 1;
  min-width: 0;
}

.sidebar-menu__toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  margin: -4px -4px -4px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.sidebar-menu__toggle:hover {
  color: var(--terracotta);
  background: var(--surface-warm);
}

.sidebar-menu__toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

/* Подменю скрыто по умолчанию, раскрывается при .is-open */
.sidebar-menu__sub {
  list-style: none;
  margin: 6px 0 0;
  padding: 0 0 0 14px;
  display: none;
}

.sidebar-menu__item.is-open > .sidebar-menu__sub {
  display: block;
}

.sidebar-menu__item.is-open > .sidebar-menu__head .sidebar-menu__toggle svg {
  transform: rotate(180deg);
}

.sidebar-menu__sub li {
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
}

.sidebar-menu__sub li:last-child {
  border-bottom: 0;
}

.sidebar-menu__sub a {
  font-size: 0.9rem;
  color: var(--muted);
}

.sidebar-menu__sub a:hover {
  color: var(--terracotta);
}

.social-list--footer {
  justify-content: flex-start;
  margin-top: 0;
  margin-bottom: 12px;
}

.social-link--light {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 0;
}

.social-link--light:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}

.footer-subscribe {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-subscribe label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.subscribe-form {
  display: flex;
  gap: 8px;
}

.subscribe-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.9rem;
}

.subscribe-form input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.subscribe-form input:focus {
  border-color: var(--gold);
  background-color: rgba(255, 255, 255, 0.12);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 20px;
  padding-bottom: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.65);
}

.footer-bottom a:hover {
  color: #fff;
}

/*  ========== PROFILE DROPDOWN  ========== */
.profile-menu {
  position: relative;
}

.avatar-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: linear-gradient(135deg, var(--terracotta-light), var(--gold-light));
  color: var(--terracotta);
  cursor: pointer;
  overflow: hidden;
}

.avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-letter {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-weight: 700;
  font-size: 0.95rem;
}

.avatar-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background-color: var(--terracotta);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  flex-direction: column;
  min-width: 240px;
  max-width: 320px;
  padding: 8px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.profile-dropdown.is-open {
  display: flex;
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.profile-dropdown-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-dropdown-name {
  display: block;
  font-weight: 700;
  color: var(--text-heading);
  font-size: 0.95rem;
}

.profile-dropdown-role {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.profile-dropdown-list {
  list-style: none;
  padding: 6px 0;
  margin: 0;
}

.profile-dropdown-list li {
  margin: 0;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background-color: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.profile-dropdown-item:hover {
  background-color: var(--terracotta-soft);
  color: var(--terracotta-hover);
}

.profile-dropdown-item svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.profile-dropdown-item:hover svg {
  color: var(--terracotta);
}

.profile-dropdown-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background-color: var(--terracotta);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.profile-dropdown-divider {
  height: 1px;
  margin: 6px 0;
  background-color: var(--line);
}

.profile-dropdown-logout-form {
  margin: 0;
}

.profile-dropdown-logout {
  color: #b42318;
}

.profile-dropdown-logout:hover {
  background-color: #fef2f2;
  color: #b42318;
}

/*  ========== RESPONSIVE LAYOUT  ========== */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  /* Верхний ряд в одну строку: логотип | строка поиска | вход/регистрация */
  .header-inner {
    flex-wrap: nowrap;
  }

  /* Поиск занимает центральную часть и не растягивается на всю ширину */
  .header-search {
    order: 2;
    flex: 1 1 auto;
    max-width: 560px;
    margin: 0 auto;
  }

  .header-actions {
    order: 3;
  }

  /* Второй ряд: меню во всю ширину с тонкой линией-разделителем сверху */
  .header-nav-wrap {
    border-top: 1px solid var(--line);
  }

  .site-nav {
    position: static;
    display: block;
    background-color: transparent;
    border-top: 0;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }

  .site-nav__list {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    flex-wrap: wrap;
    row-gap: 4px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .page-layout {
    grid-template-columns: 1fr 320px;
  }

  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr;
  }
}

@media (max-width: 767px) {
  /* Мобильное меню — выпадающая панель под шапкой (позиционирование
     задано в базовых стилях .site-nav). Пункты становятся вертикальным списком. */
  .site-nav__list {
    padding-left: 20px;
    padding-right: 20px;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
  }

  .nav-link.is-active {
    background-color: var(--terracotta-soft);
  }

  /* На мобильном — заливка активного пункта, линия снизу не нужна. */
  .nav-link::after {
    display: none;
  }

  .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: 0;
    padding: 4px 0 4px 16px;
    background-color: transparent;
    min-width: auto;
    max-width: 100%;
  }

  .nav-group.is-open > .dropdown-menu,
  .dropdown-menu.is-open {
    display: flex;
  }

  .dropdown-menu a {
    padding: 10px 14px;
    width: 100%;
  }

  /* Вложенные подменю на мобильном - аккордеон с доп. отступом. */
  .dropdown-submenu {
    margin-left: 0;
    padding-left: 14px;
    border-left: 2px solid var(--line);
  }

  .dropdown-parent {
    cursor: pointer;
  }

  .dropdown-parent[aria-expanded="true"] .dropdown-parent__caret {
    transform: rotate(90deg);
  }

  .header-actions {
    gap: 10px;
  }
}
