.item {
  display: none;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  background: var(--background);
}

.item.active {
  display: block;
}

.item .Title {
  font-size: 12rem;
  color: #ffffff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-weight: bold;
  text-align: center;

  /* Centralizar qualquer coisa */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Responsividade */
@media (max-width: 1200px) {
  .item .Title {
    font-size: 8rem;
  }
}

@media (max-width: 768px) {
  .item .Title {
    font-size: 5rem;
  }
}

@media (max-width: 480px) {
  .item .Title {
    font-size: 3rem;
  }
}

.item .fruit {
  width: 60%;
  top: 0;
  z-index: 3; /* Ficar à frente de todo mundo */

  /* Centralizar qualquer coisa */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Ajuste de tamanho para telas menores */
@media (max-width: 768px) {
  .item .fruit {
    width: 80%;
  }
}

@media (max-width: 480px) {
  .item .fruit {
    width: 90%;
  }
}

.item .refri {
  z-index: 2;
  width: 600px;

  /* Centralizar qualquer coisa */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Ajuste de tamanho para telas menores */
@media (max-width: 1200px) {
  .item .refri {
    width: 500px;
  }
}

@media (max-width: 768px) {
  .item .refri {
    width: 350px;
  }
}

@media (max-width: 480px) {
  .item .refri {
    width: 250px;
  }
}

#prev,
#next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: #eee9;
  border: 1px solid #eee9;
  color: #eee;
  font-size: x-large;
  font-family: monospace;
  cursor: pointer;
  z-index: 4;
  border-radius: 50%;
}

#prev {
  left: 30px;
}

#next {
  right: 30px;
}

/* Ajuste dos botões para telas menores */
@media (max-width: 768px) {
  #prev,
  #next {
    width: 40px;
    height: 40px;
    font-size: large;
  }

  #prev {
    left: 15px;
  }

  #next {
    right: 15px;
  }
}

@media (max-width: 480px) {
  #prev,
  #next {
    width: 35px;
    height: 35px;
    font-size: medium;
  }

  #prev {
    left: 10px;
  }

  #next {
    right: 10px;
  }
}

@keyframes toActive {
  from {
    top: 100%;
    opacity: 0;
  }
}

.item.active img.fruit {
  animation: toActive 0.5s ease-in-out 1;
}

.item.active .Title {
  animation: toActive 0.5s ease-in-out 1;
}
