/* центрирование  */

html {
  height: 100vh;
}

body {
  width: 100%;
  height: 100%;
  display: table;
  position: absolute;
  top: 0;
  left: 0;
}

.inner {
  display: table-cell;
  text-align: center;
  vertical-align: middle;
}

/* title */

#title {
  display: flex;
  flex-direction: row;
  gap: 6.4vw;
  margin: 3vw 6.7vw 2vw;
}

h1 {
  font-size: 5.8em;
  font-weight: 700;
}

#title p {
  margin-top: 4vw;
  line-height: 2.5vw;
}

/* cards */

.slider {
  position: relative;
  overflow: hidden;
}

.card-container {
  padding: 0 6.5vw;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  width: 88vw;
  margin-bottom: 2.5vw;
}

.card-container::-webkit-scrollbar {
  display: none;
}

.card,
.card_frog,
.card img,
.card_frog img {
  width: 28vw;
  height: 43.6vw;
}

.card,
.card_frog {
  flex: 0 0 auto;
  margin-right: 1.5vw;
  position: relative;
}

.card_frog {
  margin-right: 1vw;
}

.content {
  position: absolute;
  top: 0;
}

.info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 28vw;
  height: 43.5vw;
  justify-content: space-around;
  gap: 3vw;
}

#mushroom img {
  width: 18vw;
  height: 24vw;
  margin-top: -2vw;
  margin-bottom: -2vw;
}

#insect img {
  width: 16vw;
  height: 20vw;
}

#pot img {
  width: 19vw;
  height: 20vw;
}

#flower img {
  width: 23vw;
  height: 22vw;
  margin-top: -2vw;
  margin-bottom: -0.5vw;
}

#frog img {
  width: 24vw;
  height: 20vw;
  margin-top: -0.4vw;
}

.info p {
  font-size: 0.7em;
  line-height: 2vw;
  text-align: center;
}

.pre-btn,
.nxt-btn {
  border: none;
  width: 6.5vw;
  height: 100%;
  position: absolute;
  top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 8;
  background-color: #6b854f;
}

button:hover {
  color: none;
  background-color: none;
  border: none;
}

.pre-btn img,
.nxt-btn img {
  width: 1.7vw;
  margin-right: 2.5vw;
}

.pre-btn {
  left: 0;
  transform: rotate(180deg);
}

.nxt-btn {
  right: 0;
}

/* анимация */

#insect {
  animation: shake 0.6s;
  animation-iteration-count: infinite;
}

@keyframes shake {
  0% {
    transform: translate(0.1vw, 0.1vw) rotate(0deg);
  }
  10% {
    transform: translate(-0.1vw, -0.2vw) rotate(-1deg);
  }
  20% {
    transform: translate(-0.3vw, 0vw) rotate(1deg);
  }
  30% {
    transform: translate(0.3vw, 0.2vw) rotate(0deg);
  }
  40% {
    transform: translate(0.1vw, -0.1vw) rotate(1deg);
  }
  50% {
    transform: translate(-0.1vw, 0.2vw) rotate(-1deg);
  }
  60% {
    transform: translate(-0.3vw, 0.1vw) rotate(0deg);
  }
  70% {
    transform: translate(0.3vw, 0.1vw) rotate(-1deg);
  }
  80% {
    transform: translate(-0.1vw, -0.1vw) rotate(1deg);
  }
  90% {
    transform: translate(0.1vw, 0.2vw) rotate(0deg);
  }
  100% {
    transform: translate(0.1vw, -0.2vw) rotate(-1deg);
  }
}

@media only screen and (min-width: 360px) and (max-width: 767px) {
  .card,
  .card_frog,
  .card img,
  .card_frog img,
  .info,
  a {
    width: 87vw;
    height: 137vw;
  }

  .card-container {
    width: 87vw;
    gap: 2vw;
  }

  #title {
    flex-direction: column;
    gap: 2vw;
    align-items: center;
  }

  h1 {
    font-size: 8em;
  }

  .info p {
    font-size: 1em;
    line-height: 2vw;
    text-align: center;
  }

  #mushroom + p {
    margin-bottom: 0.3vw;
    font-size: 1em;
    line-height: 4vw;
  }

  #title p,
  span {
    font-size: 5vw;
    line-height: 6vw;
    margin-top: 0;
    margin-bottom: 4vw;
  }

  #title p {
    width: 55vw;
  }

  #mushroom img {
    width: 54vw;
    height: 72vw;
  }

  #insect img {
    width: 48vw;
    height: 60vw;
  }

  #pot img {
    width: 57vw;
    height: 60vw;
  }

  #flower img {
    width: 69vw;
    height: 66vw;
  }

  #frog img {
    width: 72vw;
    height: 60vw;
  }

  .pre-btn,
  .nxt-btn {
    display: none;
  }
}

@media only screen and (min-width: 768px) and (max-width: 1023px) {
  .card,
  .card_frog,
  .card img,
  .card_frog img,
  .info,
  a {
    width: 43vw;
    height: 68vw;
  }

  .card-container {
    width: 87vw;
    gap: 1vw;
  }

  #title {
    flex-direction: column;
    gap: 2vw;
  }

  h1 {
    font-size: 7em;
    margin-top: 2vw;
  }

  .info p {
    font-size: 0.9em;
    line-height: 2vw;
    text-align: center;
  }

  #mushroom + p {
    margin-bottom: 0.3vw;
  }

  #title p,
  span {
    font-size: 3vw;
    line-height: 4vw;
    margin-top: 0;
  }

  #mushroom img {
    width: 27vw;
    height: 36vw;
  }

  #insect img {
    width: 24vw;
    height: 30vw;
  }

  #pot img {
    width: 28.5vw;
    height: 30vw;
  }

  #flower img {
    width: 34.5vw;
    height: 33vw;
  }

  #frog img {
    width: 36vw;
    height: 30vw;
  }

  .pre-btn,
  .nxt-btn {
    width: 6.3vw;
  }
}
