@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Noto+Sans+JP:wght@700&display=swap');

body, html {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #f5f5f5;
  color: #4d5974;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  overflow-y: auto; /* Permette lo scrolling verticale */
}

.container {
  margin: 0 auto;
  padding: 4rem;
  width: 100%;
  max-width: 48rem;
  position: relative; /* Per posizionare il bottone "Back" */
}

#back-button {
  position: absolute;
  top: -2rem;
  /*left: 1rem; */
  background-color: #4CAF50; /* Verde cetriolo */
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
}

#back-button i {
  margin-right: 0.5rem; /* Spazio tra l'icona e il testo */
}

#back-button:hover {
  background-color: #388E3C; /* Verde più scuro per l'hover */
}

h2 {
  text-align: center;
  color: #4CAF50; /* Verde cetriolo */
}

.accordion {
  .accordion-item {
    border-bottom: 1px solid #e5e5e5;
    button[aria-expanded='true'] {
      border-bottom: 1px solid #4CAF50;
    }
  }
  button {
    position: relative;
    display: block;
    text-align: left;
    width: 100%;
    padding: 1em 0;
    color: #7288a2;
    font-size: 1.15rem;
    font-weight: 400;
    border: none;
    background: none;
    outline: none;
    &:hover, &:focus {
      cursor: pointer;
      color: #4CAF50;
      &::after {
        cursor: pointer;
        color: #4CAF50;
        border: 1px solid #4CAF50;
      }
    }
    .accordion-title {
      padding: 1em 1.5em 1em 0;
    }
    .icon {
      display: inline-block;
      position: absolute;
      top: 18px;
      right: 0;
      width: 22px;
      height: 22px;
      border: 1px solid;
      border-radius: 22px;
      &::before {
        display: block;
        position: absolute;
        content: '';
        top: 9px;
        left: 5px;
        width: 10px;
        height: 2px;
        background: currentColor;
      }
      &::after {
        display: block;
        position: absolute;
        content: '';
        top: 5px;
        left: 9px;
        width: 2px;
        height: 10px;
        background: currentColor;
      }
    }
  }
  button[aria-expanded='true'] {
    color: #4CAF50;
    .icon {
      &::after {
        width: 0;
      }
    }
    + .accordion-content {
      opacity: 1;
      max-height: 9em;
      transition: all 200ms linear;
      will-change: opacity, max-height;
    }
  }
  .accordion-content {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 200ms linear, max-height 200ms linear;
    will-change: opacity, max-height;
    p {
      font-size: 1rem;
      font-weight: 300;
      margin: 2em 0;
    }
  }
}

/* Media Queries for responsiveness */
@media (max-width: 768px) {
  .container {
    padding: 2rem;
  }
  button {
    font-size: 1rem;
  }
  .accordion-content p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }
  button {
    font-size: 0.9rem;
  }
  .accordion-content p {
    font-size: 0.8rem;
  }
}