/* Regole per nascondere categorie-titolo su mobile */
@media (max-width: 1024px) {
  .categorie-titolo,
  .categorie-titolo h3 {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .categories {
    padding-top: 45px !important;
  }
  /* Rimuovi padding laterale dal contenitore delle categorie su tablet */
  .cat {
    gap: 10px !important;
    padding: 20px 10px !important;
    grid-template-columns: repeat(
      2,
      1fr
    ) !important; /* 2 bottoni per riga su tablet */
  }

  /* Rendi i bottoni categoria più alti su tablet */
  .cat .bottone-cat {
    height: 120px !important; /* Altezza aumentata */
    min-height: 120px !important;
  }
}

#quattro {
  max-inline-size: 100%;
  width: 100%;
  height: calc(100% - 65px);
  margin: 65px 0px 0px 0px;
  padding: 0px 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.blocco.numero-due.reparto-container {
  position: fixed;
}

.elenchi-laterali {
  box-sizing: border-box;
  max-height: 50%;
  max-width: 33.3%;
  width: 20%;
  margin: 0;
  margin-right: 40px;
  padding-top: 0px;
  border: #e60000 2px solid;
  border-radius: 5px;
  /*box-shadow: 0px 0px 6px rgba(87, 87, 87, 0.15);*/
  display: flex;
}
.elenco {
  margin: 0px 0px 0px 0px;
  padding: 0px 0px;
}
.elenchi-tit {
  margin: 0px auto;
  padding: 5px 15px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  position: relative;
  background-color: #e60000;
  border-radius: 5px 5px 0px 0px;
  max-width: 100%;
}
.tit {
  display: flex;
  margin: 0px auto 0px 0px;
  font-size: 16px;
  color: #ffffff;
  font-weight: 400;
  text-shadow: 0px 0.5px 1px rgb(0, 0, 0);
}
.icona {
  position: absolute;
  right: 0;
  margin-right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
}
.emoji {
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.emoji i {
  font-size: 16px;
  color: #ffffff;
}

#lista-migliori,
#lista-richiesti,
#lista-evidenza {
  margin: 10px auto 0px auto;
  text-align: left;
  padding: 0px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  max-height: 100%;
  max-width: 100%;
  width: 90%;
  box-sizing: border-box;
  /* altezza minima per le schede quadrate*/
  /*background: radial-gradient(
    circle,
    rgb(231, 231, 231) 0%,
    rgba(211, 221, 229, 0.441) 100%
  );*/
}

.lista li {
  margin: 0;
  list-style-position: inside;
  border: none;
  padding: 0;
  list-style-type: none;
  max-height: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.lista li:hover {
  transform: scale(1.01);
}

/* Il bottone ora prende tutto lo spazio e copia lo stile del li precedente */
.lista button:not(.continua-btn) {
  position: relative;
  display: block;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  font-size: 15px;
  color: #000000;
  background-color: #ffffff;
  border: none;
  border-bottom: rgba(117, 117, 117, 0.324) 1px solid;
  border-radius: 50px;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.05s ease,
    color 0.05s ease;
}

.lista button:not(.continua-btn):hover {
  /* color: #666666;*/
  background-color: #ececec;
}
.lista button:not(.continua-btn):active {
  background-color: #ececec;
}

/* Stili per i mini profili laterali 
.profilo-laterale {
  width: 100%;
  margin-bottom: 10px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease;
  border: 1px solid #e1e4e8;
}

.profilo-laterale:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.profilo-laterale-content {
  display: flex;
  align-items: center;
  padding: 10px;
  gap: 10px;
}

.profilo-foto-laterale {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e1e4e8;
  flex-shrink: 0;
}

.profilo-info-laterale {
  flex: 1;
  min-width: 0;
}

.profilo-info-laterale h4 {
  margin: 0 0 5px 0;
  font-size: 14px;
  font-weight: 500;
  color: #24292e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.categoria-laterale {
  margin: 0 0 5px 0;
  font-size: 12px;
  color: #586069;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profilo-laterale .rating {
  font-size: 12px;
  color: #f1c40f;
}*/

/* Stili per l'elemento laterale nascosto/attivo */
.elemento-laterale {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  will-change: transform, opacity;
}

.elemento-laterale.attivo {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  pointer-events: auto;
  z-index: 2;
}

.elemento-laterale.nascosto {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  z-index: 1;
}

/* Rimuovi le regole duplicate */
.elemento-laterale,
.elemento-laterale.nascosto,
.elemento-laterale.attivo {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
  -webkit-perspective: 1000px;
}

/* Stili per la rotazione degli elementi laterali */
.elemento-laterale {
  transition: all 0.6s ease-in-out;
  opacity: 1;
  transform: translateX(0);
}

.elemento-laterale.nascosto {
  opacity: 0;
  transform: translateX(-10px);
  position: absolute;
  pointer-events: none;
}

.elemento-laterale.attivo {
  opacity: 1;
  transform: translateX(0);
  position: relative;
  pointer-events: auto;
}

/* Stili per le schede laterali */
.scheda-laterale {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;

  background-color: #fcfcfc;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin: 5px 5px 0px 5px;
  border: 0.5px rgb(158, 158, 158) solid;
  box-shadow: 0px 0px 10px rgba(40, 40, 40, 0.15);
  cursor: pointer;
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
}

.scheda-laterale:hover {
  transform: scale(1.03);
  box-shadow: 0 0px 5px rgba(87, 87, 87, 0.25);
}

.numero-scheda {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: #0080f0;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  margin: 5px auto 2px auto;
  padding: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nome-scheda {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  margin: 5px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #333;
}

.tipo-attivita {
  font-size: 12px;
  color: #666;
  text-align: center;
  margin: 0 5px 5px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.foto-scheda {
  flex: 1;
  aspect-ratio: 1/1.2;
  max-width: 33.333%;
  object-fit: cover;
  box-sizing: border-box;
  border: 0.1px solid #ccc;
}

.foto-placeholder {
  flex: 1;
  width: 33.333%;
  background-color: #f0f0f0;
  border: 0.1px solid #ccc;
}

.continua-btn {
  display: block;
  margin: 10px auto 5px auto;
  padding: 8px 16px;
  background: linear-gradient(135deg, #1a8dff, #0080f0);
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(26, 141, 255, 0.3);
}

.continua-btn:hover {
  background: linear-gradient(135deg, #0080f0, #0068d0);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 141, 255, 0.4);
}
/* Header delle classifiche */

.categorie-contenitore {
  position: relative;
  display: none !important; /* Nascosto inizialmente - forzato con !important */
  z-index: 999;
  max-width: 100%;
  min-width: 100%;
  width: 100%;
  min-height: calc(100% - 65px);
  height: calc(100% - 65px);
  max-height: calc(100% - 65px);
  margin: 0px auto;
  /*border: 1px solid red;*/
  box-sizing: border-box;
  padding: 0px 0px 0px 0px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

.categorie-contenitore.visible {
  display: flex !important; /* Visibile quando ha la classe visible - forzato con !important */
}

/* Forza la visibilità di blocco.numero-due in classifiche.html */
.blocco.numero-due {
  display: block !important;
}

/* Permette di nascondere blocco.numero-due quando necessario */
.blocco.numero-due.hidden {
  display: none !important;
}
.categorie-intro {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  height: 100%;
  position: relative;
  margin-top: 0px !important;
  margin-bottom: 0px !important;
}

.categorie-intro .sfondo-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.categorie-intro .sfondo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.classifiche-content {
  margin-top: 0px !important;
  height: 100%;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  background-color: #ffffff;
}
.sezione-categoria {
  height: 100%;
  width: 50%;
  max-width: 50%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin: auto auto auto 0px;
  border-radius: 0px 20px 20px 0px;
  background: rgba(222, 222, 222, 0.412);
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}
#uno {
  margin: auto 0 auto auto;
  max-width: 100%;
  width: 50%;
  max-height: 100%;
  height: 100%;
  display: flex;
  /*border: 1px solid red;*/
  border-radius: 10px;
  /*background-color: #f1f1f1;*/
}

.classifiche-header {
  display: flex;
  position: relative;
  justify-content: space-between;
  align-items: center;
  text-align: left !important;
  width: 70%;
  max-width: 70%;
  box-sizing: border-box;
  margin-top: 5px;
  margin-bottom: 0px;
  margin-left: auto;
  margin-right: 0px;
  padding: 10px 0px 10px 55px !important;
  background-color: #e60000;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.15);
  border-radius: 10px 0px 0px 10px;
  text-shadow: 0px 2px 4px rgba(34, 34, 34, 0.306) !important;
}
.classifiche-header h2 {
  margin-left: 0px !important;
  margin-right: 0px !important;
}
.back-bottone-btn-due {
  position: absolute;
  left: 0%;
  margin-left: 15px;
  top: 0%;
  margin-top: 15px;
  z-index: 3000;
  padding: 2px 5px;
  border-radius: 10px;
  background-color: transparent;
}
.back-bottone-btn-due:hover {
  .back-bottone-btn-due {
    transform: translateX(-5px);
  }
}
.back-bottone-btn-due {
  background-color: transparent;
  color: #ffffff !important;
  text-shadow: 0px 2px 4px rgba(34, 34, 34, 0.15) !important;
  border: none;
  border-radius: 5px;
  padding: 5px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.classifiche-header h2 {
  font-size: 18px;
  color: white;
  font-weight: 600;
  margin: 0px auto;
}

.classifiche-controls {
  display: flex;
  gap: 10px;
}

.classifiche-controls button {
  padding: 8px 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-rankings {
  display: none;
  background-color: #f8f9fa;
  color: #2c3e50;
  border: 1px solid #e9ecef !important;
}

.refresh-rankings:hover {
  background-color: #e9ecef;
}

.view-all-rankings {
  background: linear-gradient(135deg, #1a8dff, #0080f0);
  color: #ffffff;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(26, 141, 255, 0.3);
}

.view-all-rankings:hover {
  background: linear-gradient(135deg, #0080f0, #0068d0);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 141, 255, 0.4);
}

/* Grid delle classifiche */
.classifiche-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 20px;
  height: 100%;
  max-height: 100%;
  min-height: 600px;
}

/* Card delle classifiche - Design elegante e professionale */
.classifica-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.05),
    0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  padding: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(26, 141, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.classifica-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1a8dff, #0080f0, #1a8dff);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.classifica-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.15),
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-color: rgba(26, 141, 255, 0.2);
}

.classifica-header {
  margin-bottom: 15px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(26, 141, 255, 0.1);
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.classifica-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #1a8dff, #0080f0);
  border-radius: 1px;
}

.classifica-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a8dff, #0080f0);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(26, 141, 255, 0.3);
  transition: all 0.3s ease;
}

.classifica-icon i {
  font-size: 18px;
}

.classifica-card:hover .classifica-icon {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(26, 141, 255, 0.4);
}

.classifica-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.classifica-title {
  margin: 0;
  font-size: 18px;
  color: #1a1a1a;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #1a1a1a, #2c3e50);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.classifica-subtitle {
  font-size: 13px;
  color: #6c757d;
  font-weight: 400;
  opacity: 0.8;
  line-height: 1.2;
}

/* Lista profili nella classifica - Design elegante */
.lista-classifica {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  min-height: 80px;
  overflow: visible;
}

.lista-classifica li {
  width: 100%;
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  background: linear-gradient(135deg, #ffffff 0%, #f7f7f7 100%);
  border-radius: 12px;
  border: 1px solid rgba(216, 216, 216, 0.889);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.04),
    0 1px 10px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
}

.lista-classifica li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 141, 255, 0.02) 0%,
    rgba(0, 128, 240, 0.02) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lista-classifica li.active {
  opacity: 1;
  transform: scale(1);
  transform: translateX(0);
}

.lista-classifica li:last-child {
  margin-bottom: 0;
}

.lista-classifica li:hover {
  transform: translateY(0px);
  scale: 1.03;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.1),
    0 4px 8px rgba(0, 0, 0, 0.06);
  border-color: rgba(26, 141, 255, 0.15);
  background: linear-gradient(135deg, #f7f7f7 0%, #f3f3f3 100%);
}

.lista-classifica li:hover::before {
  opacity: 1;
}

/* Stili per i profili nelle liste - Design elegante */
.profilo-laterale {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  position: relative;
  z-index: 2;
}

.profilo-foto-laterale {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
  transition: all 0.3s ease;
  position: relative;
}

.profilo-foto-laterale::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a8dff, #0080f0);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lista-classifica li:hover .profilo-foto-laterale::after {
  opacity: 1;
}

.profilo-info-laterale {
  flex-grow: 1;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.profilo-info-laterale h4 {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.3px;
}

.categoria-laterale {
  font-size: 13px;
  color: #6c757d;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  opacity: 0.8;
}

/* Posizione nella classifica - Design elegante */
.posizione-classifica {
  font-size: 18px;
  font-weight: 800;
  color: #1a8dff;
  margin-left: 10px;
  margin-right: 10px;
  min-width: 20px;
  text-align: center;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 8px;
  padding: 4px 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

/* Top 3 styling con design premium */
.lista-classifica li:nth-child(1) .posizione-classifica {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #8b6914;
  box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.lista-classifica li:nth-child(2) .posizione-classifica {
  background: linear-gradient(135deg, #c0c0c0, #e5e5e5);
  color: #6c757d;
  box-shadow: 0 4px 8px rgba(192, 192, 192, 0.3);
}

.lista-classifica li:nth-child(3) .posizione-classifica {
  background: linear-gradient(135deg, #cd7032, #e6a23c);
  color: #8b4513;
  box-shadow: 0 4px 8px rgba(205, 112, 50, 0.3);
}

.lista-classifica li:hover .posizione-classifica {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Rating stars - Design migliorato */
.rating {
  color: #ffd700;
  font-size: 13px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.rating i {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.lista-classifica li:hover .rating i {
  transform: scale(1.1);
  color: #ffed4e;
}

/* Animazioni per gli elementi che ruotano - Migliorate */
.elemento-laterale {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

.elemento-laterale.attivo {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  pointer-events: auto;
  z-index: 2;
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.elemento-laterale.nascosto {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  z-index: 1;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Effetti aggiuntivi per le card */
.classifica-card {
  position: relative;
}

.classifica-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  border-radius: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.classifica-card:hover::after {
  opacity: 1;
}

/* Effetto di caricamento per le liste */
.lista-classifica li {
  animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95) translateX(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

/* Stili per il pulsante "Consiglia a un amico" */
.consiglia-btn {
  position: absolute;
  top: 15px;
  left: 135px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #000000 !important;
  padding: 8px 16px;
  transition: all 0.2s ease;
  z-index: 1001;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.consiglia-btn i {
  color: #007bff !important;
}

.consiglia-btn:hover {
  background: #f2f2f2;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.consiglia-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.15);
}

/* Stili specifici per la pagina classifiche */

/* === STILI PER CATEGORIE-INTRO === */

/* Sezione sinistra - Impaginazione professionale */
.sezione-sinistra {
  max-width: 50%;
  width: 50%;
  height: 100%;
  max-height: 100%;
  box-sizing: border-box;
  padding: 40px;
  display: flex;
  flex-direction: column;
  /*background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);*/
  background: transparent;
  overflow-y: auto;
  justify-content: center;
  position: relative;
}

/* Bottone scroll verso il basso */
.scroll-down-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);

  background: rgba(230, 0, 0, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.scroll-down-btn:hover {
  background: rgba(255, 255, 255, 0.402);
  transform: translateX(-50%) scale(1.1);
}

.scroll-down-btn:active {
  transform: translateX(-50%) scale(0.95);
}

/* Titolo sezione */
.titolo-sezione {
  margin-bottom: 40px;
  text-align: center;
}

.titolo-sezione h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0px 0px 10px rgba(34, 34, 34, 0.306) !important;
  margin: 0 0 10px 0;
  line-height: 1.2;
}

/* Statistiche */
.statistiche {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.931);
  border-radius: 12px;
  box-shadow: 0 0px 20px rgba(0, 0, 0, 0.132);
}

.statistica-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.statistica-item i {
  font-size: 1.5rem;
  color: #e60000;
  width: 24px;
  text-align: center;
}

.statistica-content {
  display: flex;
  flex-direction: column;
}

.statistica-numero {
  font-size: 1.5rem;
  font-weight: 700;
  color: #212529;
  line-height: 1;
}

.statistica-label {
  font-size: 0.8rem;
  color: #6c757d;
  font-weight: 400;
}

/* Servizi offerti */
.servizi-offerti {
  margin-bottom: 40px;
  width: 100%;
  max-width: 100%;
}

.servizi-offerti h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0px 2px 4px rgba(34, 34, 34, 0.306) !important;
  margin: 0 0 20px 0;
  text-align: center;
}

.servizi-scroll-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 15px;
  padding: 10px 0;
  max-height: 200px;
}

.servizi-scroll-content {
  display: flex;
  gap: 15px;
  min-width: max-content;
  padding: 0 10px;
}

.servizi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.servizio-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
  min-width: 200px;
  max-width: 250px;
  flex-shrink: 0;
}

.servizio-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.servizio-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #212529;
  margin: 0 0 8px 0;
}

.servizio-card p {
  font-size: 0.8rem;
  color: #6c757d;
  margin: 0;
}

/* Recensioni recenti */
.recensioni-recenti {
  width: 100%;
  max-width: 100%;
}

.recensioni-recenti h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0px 2px 4px rgba(34, 34, 34, 0.306) !important;
  margin: 0 0 20px 0;
  text-align: center;
}

.recensioni-scroll-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 15px;
  padding: 10px 0;
  max-height: 300px;
}

.recensioni-scroll-content {
  display: flex;
  gap: 15px;
  min-width: max-content;
  padding: 0 10px;
}

.recensioni-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.recensione-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  min-width: 250px;
  max-width: 300px;
  flex-shrink: 0;
}

.recensione-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.recensione-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e60000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
}

.recensione-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #212529;
  margin: 0;
}

.recensione-rating {
  display: flex;
  gap: 2px;
  margin-top: 2px;
}

.recensione-rating i {
  font-size: 0.7rem;
  color: #ffc107;
}

.recensione-testo {
  font-size: 0.8rem;
  color: #495057;
  line-height: 1.4;
}

/* Sezione destra - Descrizione storica */
.sezione-destra {
  width: 50%;
  min-width: 50%;
  height: 100%;
  max-height: 100%;
  /*background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);*/
  background: rgba(139, 139, 139, 0.28);
  color: white;
  overflow-y: auto;
  border-radius: 20px 0px 0px 20px;
  position: relative;
  transition: transform 0.5s ease;
}

/* Bottone espansione verso destra */
.expand-left-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /*
  background: rgba(230, 0, 0, 0.9);
  */
  background: rgba(238, 238, 238, 0.389);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 15000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  /* Rimuovo tutte le transizioni per evitare spostamenti strani */
  transition: none;
}

.expand-left-btn:hover {
  /*
  background: rgba(230, 0, 0, 1);
  */
  background: rgba(238, 238, 238, 0.614);
}

/* Bottone di ripristino */
.restore-right-btn {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  /*
  background: rgba(230, 0, 0, 0.9);
  */
  background: rgba(238, 238, 238, 0.389);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 15000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.restore-right-btn:hover {
  /*
  background: rgba(230, 0, 0, 1);
  */
  background: rgba(238, 238, 238, 0.614);
  transform: translateY(-50%) scale(1.1);
}

.restore-right-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* Classe per l'animazione di espansione */
.sezione-destra.expanded {
  transform: translateX(100%);
  opacity: 0;
  transition:
    transform 0.5s ease,
    opacity 0.8s ease;
}

.sezione-sinistra.expanded {
  width: 50%;
  transform: translateX(50%);
  transition: transform 0.5s ease;
}

/* Classi per l'animazione di ripristino */
.sezione-destra.restored {
  transform: translateX(0);
  opacity: 1;
  transition:
    transform 0.5s ease,
    opacity 0.8s ease;
}

.sezione-sinistra.restored {
  width: 50%;
  transform: translateX(0);
  transition: transform 0.5s ease;
}

.descrizione-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Contenuto storico */
.contenuto-storico-container {
  flex: 1;
  position: relative;
}

.contenuto-storico {
  flex: 1;
  padding: 60px;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.contenuto-storico::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: -1;
}

/* Timeline storica */
.timeline-storica {
  margin-bottom: 40px;
}

.timeline-item {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  position: relative;
}

.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 30px;
  bottom: -30px;
  width: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.timeline-marker {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: #e60000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 5px;
}

.timeline-marker i {
  font-size: 0.6rem;
  color: white;
}

.timeline-content h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  margin: 0 0 8px 0;
}

.timeline-content p {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  margin: 0;
}

/* Descrizione completa */
.descrizione-completa {
  margin-bottom: 40px;
}

.descrizione-completa h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin: 0 0 20px 0;
}

.descrizione-testo {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  text-align: justify;
}

/* Curiosità storiche */
.curiosita-storiche h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  margin: 0 0 20px 0;
}

.curiosita-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.curiosita-item {
  background: rgba(166, 166, 166, 0.539);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #e60000;
}

.curiosita-item h5 {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin: 0 0 8px 0;
}

.curiosita-item p {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
  margin: 0;
}

/* Responsive design */
@media (max-width: 1024px) {
  /* Nascondi categorie-titolo su tablet */
  .categorie-titolo,
  .categorie-titolo h3 {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .categorie-intro-container {
    flex-direction: column;
    margin: 10px;
  }

  .sezione-sinistra,
  .sezione-destra {
    width: 100%;
    height: 50%;
  }

  .sezione-sinistra {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .statistiche {
    flex-direction: column;
    gap: 15px;
  }

  .azioni-rapide {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  /* Nascondi categorie-titolo su mobile */
  .categorie-titolo,
  .categorie-titolo h3 {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Rimuovi padding laterale dal contenitore delle categorie su mobile */
  .cat {
    padding: 20px 10px !important;
    grid-template-columns: repeat(
      2,
      1fr
    ) !important; /* 2 bottoni per riga su mobile */
    gap: 12px !important; /* Gap leggermente aumentato per mobile */
  }

  /* Rendi i bottoni categoria più alti su mobile */
  .cat .bottone-cat {
    height: 140px !important; /* Altezza ancora più aumentata per mobile */
    min-height: 140px !important;
  }

  .categorie-intro-main {
    height: calc(100vh - 65px);
    margin-top: 65px;
  }

  .sezione-sinistra {
    padding: 20px;
  }

  .sezione-destra {
    padding: 20px;
  }

  .titolo-sezione h1 {
    font-size: 2rem;
  }

  .azioni-rapide {
    flex-direction: column;
  }

  .servizi-grid {
    grid-template-columns: 1fr;
  }

  /* Responsive per le card delle classifiche */
  .classifiche-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .classifica-card {
    padding: 20px;
    border-radius: 12px;
  }

  .classifica-title h3 {
    font-size: 18px;
  }

  .classifica-title i {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .lista-classifica li {
    padding: 14px;
  }

  .profilo-foto-laterale {
    width: 44px;
    height: 44px;
  }

  .profilo-info-laterale h4 {
    font-size: 14px;
  }

  .posizione-classifica {
    font-size: 18px;
    min-width: 20px;
    margin-left: 10px;
    margin-right: 14px;
  }
}
