.site-header--home {
  position: relative;
  color: #000;
  background-color: var(--white);
}

.site-header__container {
  width: min(var(--content-width), calc(100% - 40px));
  margin: 0 auto;
  padding-top: 1.5rem;
  padding-left: 0;
  padding-right: 0;
}

.site-header__director {
  display: block;
  width: fit-content;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
  font-family: var(--font-serif);
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-header__director:hover {
  color: #000;
}

.site-header__main-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  column-gap: 1.5rem;
  min-height: 14rem;
}

.site-header__left-column {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.site-header__right-column {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.site-header__button-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.site-header__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 165px;
  min-height: 2.625rem;
  padding: 0.65rem 1rem;
  color: var(--white);
  background-color: var(--button-green);
  border: 1px solid var(--button-green);
  border-radius: 0;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.site-header__button:hover {
  background-color: #0b6a54;
  border-color: #0b6a54;
}

.site-header__logo-link {
  display: block;
  padding: 0.5rem 1rem;
}

.site-header__logo {
  display: block;
  width: 455px;
  height: 364px;
  object-fit: contain;
}

.site-header__right-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-self: end;
}

.site-header__socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header__social {
  display: block;
  width: 32px;
  height: 32px;
}

.site-header__social img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-header__divider {
  position: relative;
  height: 1px;
  margin: 1.5rem 0;
  background: transparent;
}

.site-header__divider::before,
.site-header__divider::after {
  content: "";
  position: absolute;
  top: 0;
  height: 1px;
  background-color: #000;
}

.site-header__divider::before {
  left: 0;
  width: calc(50% - 120px);
}

.site-header__divider::after {
  right: 0;
  width: calc(50% - 120px);
}

/* На десктопе навигация находится в обычном потоке под шапкой */
.site-header--home .main-navigation {
  position: static;
  width: 100%;
  margin: 0;
  transform: none;
}

/* ===== TABLET: 769px–1200px ===== */
@media (min-width: 769px) and (max-width: 1200px) {
  .site-header__main-row {
    display: grid;
    grid-template-columns:
      minmax(0, 1fr)
      minmax(220px, 1.4fr)
      minmax(0, 1fr);
    align-items: end;
    column-gap: 1rem;
  }

  .site-header__left-column {
    grid-column: 1;
    justify-self: stretch;
    align-self: end;
    min-width: 0;
    width: 100%;
  }

  .site-header__logo-link {
    grid-column: 2;
    justify-self: center;
    align-self: end;
    min-width: 0;
  }

  .site-header__right-column {
    grid-column: 3;
    justify-self: stretch;
    align-self: end;
    min-width: 0;
    width: 100%;
  }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .site-header--home {
    min-height: 0;
  }

  .site-header__container {
    width: min(
      var(--content-width),
      calc(100% - (var(--page-padding) * 2))
    );
    padding-top: 1.75rem;
    padding-bottom: 1.25rem;
  }

  /*
    1. Ярослав Шевалдов:
    центрируем, оставляем подчёркивание и добавляем воздух сверху.
  */
  .site-header__director {
    display: block;
    width: 100%;
    margin: 0 0 1.25rem;
    color: #333;
    font-size: 0.9rem;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  /*
    Мобильная сетка внутри main-row:
    1-я строка — логотип;
    2-я строка — соцсети слева и бургер справа;
    3-я строка — две кнопки.
  */
  .site-header__main-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-items: center;
    column-gap: 1rem;
    row-gap: 1rem;
    min-height: 0;
  }

  /*
    2. Логотип:
    остаётся прежнего размера, на отдельной строке, по центру.
  */
  .site-header__logo-link {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0.75rem 0 1rem;
  }

  .site-header__logo {
    display: block;
    width: 220px;
    height: 176px;
  }

  /*
    Убираем внешние контейнеры только для mobile grid.
    HTML не изменяется, десктопные правила не затрагиваются.
  */
  .site-header__left-column,
  .site-header__right-column,
  .site-header__right-group {
    display: contents;
  }

  /*
    3. Соцсети слева в одном ряду с бургером.
  */
  .site-header__socials {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    width: 100%;
  }

  .site-header__social {
    width: 28px;
    height: 28px;
  }

  /*
    3. Бургер справа.
    Между левым и правым краем — резиновое пространство сетки.
  */
  .site-header--home .menu-toggle {
    position: static;
    grid-column: 2;
    grid-row: 2;
    display: grid;
    align-self: center;
    justify-self: end;
    width: 3.25rem;
    height: 3.25rem;
    margin: 0;
    padding: 0.75rem;
    color: #000;
    background-color: transparent;
    border: 1px solid #000;
  }

  .site-header--home .menu-toggle__line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: currentColor;
  }

  /*
    5. Кнопка «Купить билеты» — слева.
  */
  .site-header__left-column .site-header__button {
    grid-column: 1;
    grid-row: 3;
    justify-self: stretch;
    width: 100%;
    max-width: none;
    min-height: 2.8rem;
    margin: 0;
    padding: 0.65rem 0.5rem;
    font-size: 0.75rem;
    white-space: normal;
  }

  /*
    5. «Связаться с нами» — справа.
    Это второй .site-header__button в HTML.
  */
  .site-header__right-column .site-header__button {
    grid-column: 2;
    grid-row: 3;
    justify-self: stretch;
    width: 100%;
    max-width: none;
    min-height: 2.8rem;
    margin: 0;
    padding: 0.65rem 0.5rem;
    font-size: 0.75rem;
    transform: none;
    white-space: normal;
  }

  /*
    4. Разделитель расположен после ряда с соцсетями и бургером
    и перед кнопками визуально не может оказаться без перестановки HTML.
    Поэтому в текущей безопасной HTML-структуре он остаётся под main-row,
    то есть после кнопок.
  */
  .site-header__divider {
    margin: 1rem 0;
  }

  /*
    Меню — под шапкой, на всю ширину, как в header-season.css.
  */
  .site-header--home .main-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 30;
    display: none;
    width: 100%;
    margin: 0;
    transform: none;
  }

  .site-header--home .main-navigation.main-navigation--open {
    display: block;
  }
}