:root {
  --black-text: #25282b;
  --siniy: #1d6fb6;
  --fon: #f8fcff;
  --seryy: #d0dce7;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 125%;
  color: var(--black-text);
  background-color: var(--fon);
}

.container {
  margin: 0 auto;
  max-width: 1230px;
  padding: 0 15px;
  height: 100%;
}

/* шапка */

.header {
  padding: 30px 0;
}

.header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.nav {
  display: flex;
  align-items: center;
}

.nav__list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  column-gap: 30px;
}

.header__logo {
  display: flex;
  justify-content: center;
}

.social-network {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.social-network__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 30px;
}

/* секция hero */

.hero {
  padding: 120px 0;

  position: relative;
}

.hero__title {
  font-weight: 600;
  font-size: 52px;
  line-height: 150%;
  color: var(--fon);

  display: flex;
  justify-content: center;

  margin-bottom: 30px;
}

.hero__advantage {
  min-width: 255px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__item {
  color: #ffffff;
  font-weight: 400;
  font-size: 24px;
  line-height: 150%;

  transition: 0.7s;

  margin-bottom: 15px;
}

.hero__item:last-child {
  margin-bottom: 40px;
}

.hero__item:hover {
  color: var(--siniy);
}

.hero__item:hover path {
  fill: var(--siniy);
}

.hero__link {
  display: flex;
  justify-content: center;
}

.wrapper-for-video {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  z-index: -1;
}

.wrapper-for-video video {
  height: 100%;
  width: 100%;

  object-fit: cover;
}

.wrapper-for-video::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  background-color: #102e49;
  opacity: 0.8;
}

.button {
  font-weight: 500;
  font-size: 16px;
  text-align: center;

  min-height: 56px;
  min-width: 288px;
  padding: 18px 30px;

  background-color: var(--seryy);
  color: var(--siniy);
  border-radius: 100px;
}

.button {
  transition: 0.8s;
}

.button:hover {
  background: #83add3;
  color: var(--fon);
}

/* ========================== */

.main__wrapper {
  padding: 120px 0;
}

.main__content {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.sidebar {
  border: 2px solid var(--seryy);

  min-width: 282px;
  max-height: fit-content;

  padding: 30px;

  position: sticky;
  top: 9vh;
}

.sidebar__item {
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 20px;
}

.sidebar__item:last-child {
  margin-bottom: 0px;
}

/* ================================ */

.main__body {
  width: 100%;
  max-width: 792px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  grid-auto-flow: dense;
  line-height: 20px;
  font-weight: 500;
  color: var(--fon);

  margin-bottom: 120px;
}

.gallery__img {
  display: block;
  overflow: hidden;
  position: relative;

  padding-bottom: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.gallery__img img {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.gallery__img-large-left {
  grid-column: 1/3;
  grid-row: span 2;
}

.gallery__img-large-right {
  grid-column: 3/5;
  grid-row: span 2;
}

.gallery__img-large-right .gallery__hint,
.gallery__img-large-left .gallery__hint {
  min-height: 103px;
  font-size: 24px;
  line-height: 29px;
}

.gallery__hint {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;

  background-color: #1d6fb6cb;
  height: 53px;

  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;

  transform: translateY(100%);

  transition: all 0.7s;
}

.gallery__img:hover .gallery__hint {
  opacity: 1;
  transform: translateY(0%);
}

/* ================= */

.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.products__item {
  position: relative;
  border: 1px solid var(--seryy);

  min-height: 354px;
  max-width: 384px;
}

.products__link {
  position: absolute;
  bottom: 30px;
  right: 48px;

  display: block;
  width: 289px;
}

.products__item-megahit::after {
  content: "Мегахит";
  position: absolute;
  top: 30px;

  border-radius: 0 100px 100px 0;
  padding: 18px 30px;
  min-width: 33.9%;
  height: 56px;

  background: var(--fon);
  color: var(--siniy);

  animation: megahit-width 1.5s infinite alternate;
}

@keyframes megahit-width {
  0% {
    min-width: 33.9%;
    padding-left: 11.3%;
  }

  60%{
    min-width: 33.9%;
    padding-left: 13.3%;
  }

  100% {
    min-width: 37.9%;
    padding-left: 17.9%;
  }
}

/* ============================= */

.footer{
    padding: 30px 0;
    background-color: #788088;
}

.footer__inner{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.footer__copyright-text{
    font-weight: 400;
    text-align: center;
    color: var(--fon);
}