/* ============================================================
   Компоненты шапки, подвала, навигации.
   ============================================================ */

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--md-sys-color-surface-container-lowest);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
}

.site-header__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1;
}

.site-header__logo img {
  height: 34px;
  width: auto;
}

.site-header__brand {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--md-sys-color-on-surface);
}

/* Десктоп-меню */
.site-nav {
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-surface);
  font-size: .95rem;
  white-space: nowrap;
}

.site-nav__link:hover {
  background: var(--md-sys-color-surface-container-high);
  text-decoration: none;
}

.site-nav__link[aria-current="page"],
.site-nav__link.is-active {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.site-header__menu-btn {
  margin-left: auto;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--md-sys-shape-corner-full);
  background: transparent;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
}

.site-header__menu-btn:hover {
  background: var(--md-sys-color-surface-container-high);
}

@media (max-width: 1100px) {
  .site-nav { display: none; }
  .site-header__menu-btn { display: inline-flex; }
}

/* ---------- Мобильное меню (drawer) ----------
   Нужно только на мобильных: на десктопе его заменяет горизонтальный бар. */

.site-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.site-drawer[hidden] { display: none; }

.site-drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  animation: drawer-fade .15s ease;
}

.site-drawer__panel {
  position: relative;
  width: min(320px, 85vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--md-sys-color-surface);
  border-radius: 0 var(--md-sys-shape-corner-extra-large)
    var(--md-sys-shape-corner-extra-large) 0;
  box-shadow: var(--md-sys-elevation-3);
  padding: 12px;
  overflow-y: auto;
  animation: drawer-slide .2s ease;
}

@keyframes drawer-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes drawer-slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.site-drawer__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 12px;
}

.site-drawer__head img {
  height: 32px;
  width: auto;
}

.site-drawer__brand {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
}

.site-drawer__close {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: var(--md-sys-shape-corner-full);
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
}

.site-drawer__close:hover {
  background: var(--md-sys-color-surface-container-high);
}

.site-drawer__nav {
  display: flex;
  flex-direction: column;
}

.site-drawer__link {
  padding: 12px 16px;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-surface);
}

.site-drawer__link:hover {
  background: var(--md-sys-color-surface-container-high);
  text-decoration: none;
}

.site-drawer__contacts {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  font-size: .9rem;
}

.site-drawer__contacts a {
  color: var(--md-sys-color-link, var(--md-sys-color-primary));
}

/* ---------- Подвал ---------- */

.site-footer {
  background: var(--md-sys-color-surface-container);
  border-top: 1px solid var(--md-sys-color-outline-variant);
  padding-block: 40px 24px;
  margin-top: 48px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 32px;
}

@media (max-width: 800px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

.site-footer__title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links li { margin-bottom: 6px; }

/* Ссылка на соцсеть с логотипом */
.site-footer__social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-footer__vk {
  width: 24px;
  height: 24px;
  flex: none;
}

.site-footer__bottom {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--md-sys-color-on-surface-variant);
}

/* ---------- Хлебные крошки ---------- */

.breadcrumbs {
  font-size: .85rem;
  margin-bottom: 16px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--md-sys-color-outline);
}
