/* Глобальные компоненты сайта: шапка, футер, cookie-тост, skip-link.
   Подключается на КАЖДОЙ странице после entersight-tokens.css.
   По умолчанию шапка непрозрачная (белый фон, тёмный текст) — это
   безопасный вариант для любой страницы. Отдельные страницы (например,
   главная — см. home.css) могут переопределить её на прозрачную поверх
   тёмного хиро через класс body.has-transparent-header. */

/* --------------------------------------------------------------------------
   Пропуск к контенту (a11y)
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--es-space-4);
  z-index: 1000;
  background: var(--es-bg);
  color: var(--es-text);
  padding: var(--es-space-3) var(--es-space-5);
  border-radius: var(--es-radius-md);
  box-shadow: var(--es-shadow-md);
  transition: top 160ms ease-out;
}
.skip-link:focus {
  top: var(--es-space-4);
}

/* --------------------------------------------------------------------------
   Шапка — на живом сайте она БЕЗ тени, флэт-граница с контентом ниже
   -------------------------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 40;
  min-height: 80px;
  background: var(--es-bg);
  box-shadow: 0px 1px 3px rgba(0,0,0,.1);
}
.site-header__inner {
  min-height: 80px;
  padding-block: var(--es-space-3);
  display: flex;
  align-items: center;
  gap: var(--es-space-7);
}
.site-header__logo {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.site-header__logo img { height: 35px; width: auto; }
.site-header__tagline {
  font-size: 12px;
  line-height: 16px;
  color: var(--es-text-secondary);
  padding-left: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--es-space-7);
  flex: 1 1 auto;
  justify-content: center;
}
.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--es-space-1);
  font-family: var(--es-font);
  font-size: var(--es-body-size);
  font-weight: var(--es-fw-medium);
  color: var(--es-text);
  background: none;
  border: 0;
  padding: var(--es-space-2) 0;
  cursor: pointer;
  transition: color var(--es-transition);
}
.site-nav__link:hover { color: var(--es-accent); }
.site-nav__link.is-current {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.site-nav__chevron {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 160ms ease-out;
}
[data-open] .site-nav__chevron { transform: rotate(180deg); }

.site-nav__item { position: relative; }
.site-nav__menu {
  position: absolute;
  top: calc(100% + var(--es-space-3));
  left: 50%;
  transform: translateX(-50%) scale(0.96);
  transform-origin: top center;
  display: flex;
  gap: var(--es-space-9);
  padding: var(--es-space-6);
  background: var(--es-bg);
  border-radius: var(--es-radius-lg);
  box-shadow: 0 0 8px rgba(0,0,0,.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease-out, transform 160ms ease-out;
  white-space: nowrap;
}
.site-nav__item[data-open] .site-nav__menu {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}
.site-nav__menu-col { display: flex; flex-direction: column; gap: var(--es-space-3); }
.site-nav__menu-title {
  font-size: var(--es-caption-size);
  line-height: var(--es-caption-lh);
  font-weight: var(--es-fw-medium);
  letter-spacing: var(--es-ls-wide);
  text-transform: uppercase;
  color: var(--es-text-secondary);
  margin-bottom: var(--es-space-1);
}
.site-nav__menu a {
  font-size: var(--es-body-size);
  color: var(--es-text);
}
.site-nav__menu a:hover { color: var(--es-accent); }

.site-header__actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--es-space-3);
}
.site-header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  cursor: pointer;
}
.site-header__burger span {
  display: block;
  height: 2px;
  background: var(--es-text);
  border-radius: 1px;
}

@media (max-width: 1023px) {
  .site-nav { display: none; }
  .site-header__actions .es-btn { display: none; }
  .site-header__burger { display: flex; }
}

/* --------------------------------------------------------------------------
   Футер
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--es-bg-muted);
  border-top: 1px solid var(--es-border);
  padding-block: var(--es-space-12);
}
.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--es-space-7);
  padding-bottom: var(--es-space-11);
  border-bottom: 1px solid var(--es-border);
}
.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--es-space-3);
  font-size: var(--es-body-sm-size);
  line-height: var(--es-body-sm-lh);
}
.site-footer__col a { color: var(--es-text-secondary); }
.site-footer__col a:hover { color: var(--es-accent); }
.site-footer__col-title {
  font-size: var(--es-body-size);
  line-height: var(--es-body-lh);
  font-weight: var(--es-fw-medium);
  color: var(--es-text);
  margin-bottom: var(--es-space-1);
}
.site-footer__col-group { display: flex; flex-direction: column; gap: var(--es-space-2); margin-top: var(--es-space-2); }
.site-footer__group-title {
  font-size: var(--es-caption-size);
  line-height: var(--es-caption-lh);
  font-weight: var(--es-fw-medium);
  letter-spacing: var(--es-ls-wide);
  text-transform: uppercase;
  color: var(--es-text-placeholder);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--es-space-7);
  padding-top: var(--es-space-9);
}
.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--es-space-4);
}
.site-footer__logo { height: 24px; width: auto; }
.site-footer__legal {
  display: flex;
  flex-direction: column;
  gap: var(--es-space-1);
  font-size: var(--es-caption-size);
  line-height: var(--es-caption-lh);
  color: var(--es-text-secondary);
}
.site-footer__contacts {
  display: flex;
  flex-direction: column;
  gap: var(--es-space-2);
  font-size: var(--es-body-size);
  font-weight: var(--es-fw-medium);
}
.site-footer__legal-links {
  display: flex;
  flex-direction: column;
  gap: var(--es-space-2);
  font-size: var(--es-body-sm-size);
  color: var(--es-text-secondary);
}
.site-footer__legal-links a { color: var(--es-text-secondary); }
.site-footer__legal-links a:hover { color: var(--es-accent); }

@media (max-width: 1023px) {
  .site-footer__cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .site-footer__cols { grid-template-columns: 1fr; }
  .site-footer__bottom { flex-direction: column; }
}

/* --------------------------------------------------------------------------
   Cookie-тост — плавающая карточка, не полноширинный бар
   -------------------------------------------------------------------------- */
.cookie-toast {
  position: fixed;
  right: var(--es-space-5);
  bottom: var(--es-space-5);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: var(--es-space-4);
  max-width: 420px;
  padding: var(--es-space-4) var(--es-space-5);
  background: rgba(30,30,30,.92);
  color: #fff;
  border-radius: var(--es-radius-lg);
  box-shadow: var(--es-shadow-lg);
  font-size: var(--es-body-sm-size);
  line-height: var(--es-body-sm-lh);
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}
.cookie-toast[hidden] { display: flex; opacity: 0; transform: translateY(8px) scale(0.98); pointer-events: none; }
.cookie-toast a { color: var(--es-accent); }
.cookie-toast__ok {
  flex: none;
  height: 36px;
  padding: 0 var(--es-space-4);
  border-radius: var(--es-radius-sm);
  border: 0;
  background: var(--es-accent);
  color: #fff;
  font-weight: var(--es-fw-medium);
  cursor: pointer;
  transition: background var(--es-transition), transform 100ms ease-out;
}
.cookie-toast__ok:hover { background: var(--es-accent-hover); }
.cookie-toast__ok:active { transform: scale(0.97); }

@media (max-width: 767px) {
  .cookie-toast { left: var(--es-space-4); right: var(--es-space-4); max-width: none; }
}
