.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 100px;

  & > * {
    min-width: 0;
  }
}

.hero__slider {
  border-radius: 20px;
  overflow: hidden;
}

.hero .card {
  min-height: 200px;
}

.hero .home-section {
  border-radius: 20px;
  position: relative;
  background: #77ddbe;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 300px;
  overflow: hidden;

  .home-section__title {
    font-family: "Loos Wide", serif;
    font-size: 36px;
    line-height: 1;
    color: #004077;
    z-index: 1;
  }

  .home-section__linkedit {
    z-index: 1000;
    color: #fff;
    padding: 4px 12px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;

    div {
      width: 100%;
    }
  }

  .home-section__icon {
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 1;
    height: 90px;

    img {
      height: 100%;
    }
  }

  a.home-section__link {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
  }

  &.home-section--dark {
    background: #004077;

    .home-section__title {
      color: #77ddbe;
    }
  }
}

@media screen and (max-width: 768px) {
  .hero .home-section {
    min-height: 200px;

    .home-section__title {
      font-size: 28px;
    }

    .home-section__icon {
      height: 60px;
    }
  }
}

@media screen and (min-width: 768px) {
  .hero {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__slider {
    max-height: 450px;
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .hero__stat--brands {
    grid-column: 1;
    grid-row: 2;
  }

  .hero__card--career {
    grid-column: 2;
    grid-row: 2;
  }

  .hero__card--products {
    grid-column: 1;
    grid-row: 3;
  }

  .hero__card--safety {
    grid-column: 2;
    grid-row: 3;
  }
}

@media screen and (min-width: 1200px) {
  .hero {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
  }
  .hero__slider {
    grid-column: 1 / 3;
    grid-row: 1;
  }
  .hero__stat--brands {
    grid-column: 3;
    grid-row: 1;
  }
  .hero__card--career {
    grid-column: 3;
    grid-row: 2;
  }
  .hero__card--products {
    grid-column: 2;
    grid-row: 2;
  }
  .hero__card--safety {
    grid-column: 1;
    grid-row: 2;
  }
}

@media screen and (min-width: 2000px) {
  .hero__slider {
    max-height: 450px;
  }
}

/* Анимации */
.hero .card {
  transition:
          opacity 0.5s ease-in,
          scale 0.5s ease,
          transform 0.5s ease,
          box-shadow 0.5s ease;

  &:nth-child(3) {
    transition:
      opacity 0.5s ease-in 0.2s,
      scale 0.5s ease 0.2s;
  }

  &:nth-child(4) {
    transition:
      opacity 0.5s ease-in 0.3s,
      scale 0.5s ease 0.3s;
  }

  &:nth-child(5) {
    transition:
      opacity 0.5s ease-in 0.4s,
      scale 0.5s ease 0.4s;
  }

  &:nth-child(6) {
    transition:
      opacity 0.5s ease-in 0.5s,
      scale 0.5s ease 0.5s;
  }

  .hero:not(._animated) & {
    scale: 0.8;
    opacity: 0;
  }
}


.hero__stat--brands.card:hover {
  transform: scale(1.01);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  background: #E5F0F7;
}
.hero__stat--brands.card:hover .card__title-big,
.hero__stat--brands.card:hover .card__description {
  color: #004077;
}

.hero__slider {
  transition:
    opacity 0.5s ease-in,
    scale 0.5s ease;

  .hero:not(._animated) & {
    scale: 0.8;
    opacity: 0;
  }
}

.hero .home-section {
  --default-animation: transform 0.5s, box-shadow 0.5s, background 0.5s;

  &:hover {
    transform: scale(1.01);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    background: #86f5d3;

    .home-section__background img {
      scale: 1.05;
    }
  }

  &.home-section--dark:hover {
    background: #015095;
  }

  transition:
    opacity 0.5s ease-in,
    scale 0.5s ease,
    var(--default-animation);

  &:nth-child(3) {
    transition:
      opacity 0.5s ease-in 0.2s,
      scale 0.5s ease 0.2s,
      var(--default-animation);
  }
  &:nth-child(4) {
    transition:
      opacity 0.5s ease-in 0.3s,
      scale 0.5s ease 0.3s,
      var(--default-animation);
  }
  &:nth-child(5) {
    transition:
      opacity 0.5s ease-in 0.4s,
      scale 0.5s ease 0.4s,
      var(--default-animation);
  }
  &:nth-child(6) {
    transition:
      opacity 0.5s ease-in 0.5s,
      scale 0.5s ease 0.5s,
      var(--default-animation);
  }

  .hero:not(._animated) & {
    scale: 0.8;
    opacity: 0;
  }
}