@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap');

body {
  overflow-x: hidden;
  color: #fff;
  background-color: #141414;
  margin: 0 auto;
}

body * {
  font-family: Arial, sans-serif;
}

body p, body h1, body h2, body h3, body h4, body h5, body h6 {
  margin: 0;
}

body a {
  color: #666;
  text-decoration: none;
}

body ul, body li {
  padding: 0;
  margin: 0;
  list-style-type: none;
}

main {
  padding: 50px 0; /* Añadido para dar espacio */
}

section {
  width: 100%;
  transition: ease all .5s;
}

section.hidden {
  opacity: 0;
  transition: none;
}

section.hidden:nth-child(odd) {
  transform: translateX(-50%);
}

section.hidden:nth-child(even) {
  transform: translateX(50%);
}

.container {
  width: 90%;
  padding: 25px 0;
  margin: 0 auto;
}

.header {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 20px;
}

.itemsSection.top-list {
  position: relative;
  padding-bottom: 60px;
  overflow: visible;
}

.itemsSection.top-list .itemsWrapper .item {
  margin: 0 15px; /* Aumentado para mayor separación */
  cursor: pointer;
  position: relative; /* Necesario para posicionar el número */
}

/* Estilo para el número superpuesto */
.itemsSection.top-list .itemsWrapper .item::before {
  content: counter(top5-counter); /* Muestra el valor del contador */
  counter-increment: top5-counter; /* Incrementa el contador */
  position: absolute;
  top: 5px;
  left: 10px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  font-weight: 700;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
}


.itemsSection.top-list .itemsWrapper .item .thumb {
  width: 180px; /* Aumentado el ancho */
  height: 180px;
}

.itemsSection .itemsWrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  counter-reset: top5-counter; /* Inicia el contador para los números */
}

.itemsSection .itemsWrapper .item {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  align-content: center;
  margin: 0 2px;
  position: relative;
}

.itemsSection .itemsWrapper .item .thumb {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 200px;
  height: 120px;
  border-radius: 15px; /* Bordes redondeados añadidos */
}

#itemModal {
  position: absolute;
  top: 50%;
  left: 0;
  width: 350px;
  border-radius: 5px;
  background-color: transparent;
  transform: translateY(-50%);
  box-shadow: 0 2px 10px 0 #000;
  z-index: 1000;
  transition: ease all .3s;
  overflow: hidden;
}

#itemModal.centered {
  left: 50%;
  transform: translate(-50%, -50%);
}

#itemModal.righted {
  left: 100%;
  transform: translate(-100%, -50%);
}

#itemModal.hidden {
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
}

#itemModal .portada {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 240px;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

#itemModal .info {
  padding: 20px;
  background-color: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#itemModal .info .datos, #itemModal .info .tags {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  align-content: center;
}

#itemModal .info .datos {
  margin: 20px 0;
  font-weight: 600;
}

#itemModal .info .datos .highlight { /* Propiedad genérica */
  color: #46d369;
}

#itemModal .info .datos .category { /* Propiedad genérica */
  margin: 0 10px;
  padding: 4px 8px;
  font-size: 14px;
  border: 1px solid #fff;
}

#itemModal .info .tags {
  flex-wrap: wrap;
  font-weight: 600;
}

#itemModal .info .tags .tag {
  margin: 5px 5px 5px 0;
}

#itemModal .info .tags .tag:not(:first-child):before {
  content: "\2022";
  margin-right: 5px;
  opacity: .5;
}

@media only screen and (max-width: 500px) {
  .itemsSection.top-list .itemsWrapper {
    overflow-x: scroll;
    overflow-y: hidden;
  }
  .itemsSection.top-list .itemsWrapper::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
}