@import url("https://fonts.googleapis.com/icon?family=Material+Icons");

.toggle-container {
  display: inline-block;
  margin: 30px auto;
  text-align: center;
  padding: 0 10px;
}

.toggle-header {
  background: #e2000f !important;
  color: white !important;
  font-size: 20px !important;
  font-weight: bold !important;
  padding: 10px 20px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 25px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
  font-family: "Poppins", sans-serif;
  white-space: normal !important;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer; /* Para que el header parezca clickeable */
}

.material-icons {
  font-size: 24px;
  color: white;
  user-select: none;
  line-height: 1;
}

.toggle-content {
  display: none; /* Oculto por defecto */
  flex-wrap: wrap; /* conserva la estructura */
  justify-content: center;
  gap: 20px;
  margin: 0 auto;
  width: auto;
  overflow-x: hidden;
  max-width: 880px;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
  overflow: hidden;
  opacity: 0;
  max-height: 0;
}

.toggle-content.active {
  display: flex;
  opacity: 1;
  max-height: 2000px; /* suficiente para mostrar todo */
}

.item-mp3 {
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
  width: 200px;       /* ancho fijo para que entren 4 por fila */
  padding: 10px 12px;
  text-align: center;
  transition: transform 0.2s;
  flex-shrink: 0;
  box-sizing: border-box;
}

.item-mp3:hover {
  transform: translateY(-5px);
}

.item-mp3 img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  margin-bottom: 8px;
  object-fit: cover;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.item-mp3 .titulo-mix {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #e2000f !important;
  margin-bottom: 4px;
}

.item-mp3 .contador-descargas {
  font-size: 13px;
  color: #888;
  font-weight: bold;
}

/* Móviles */
@media screen and (max-width: 768px) {
  .toggle-container {
    width: 100%;
    display: block;
    padding: 0 15px;
  }
  .toggle-header {
    font-size: 16px !important;
    padding: 8px 16px !important;
    white-space: normal !important;
    width: 100% !important;
  }
  .toggle-content {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    max-width: 100%;
  }
  .item-mp3 {
    width: calc(50% - 10px);  /* dos por fila */
  }
}

@media screen and (max-width: 480px) {
  .item-mp3 {
    width: calc(50% - 10px);
  }
  .item-mp3 img {
    width: 50px;
    height: 50px;
  }
  .item-mp3 .titulo-mix {
    font-size: 13px;
  }
  .item-mp3 .contador-descargas {
    font-size: 12px;
  }
}