.btn-switch {
  width: 130px;
  padding: 8px 15px;
  font-weight: 600;
  transition: background-color 0.3s, color 0.3s;
  border: none;
  color: #021b31;
  background-color: #f0f6fc;
  user-select: none;
  cursor: pointer;
  margin-right: 8px;
  min-width: 120px;
  text-align: center;
  box-shadow: none;
  -webkit-transition: .4s;
  transition: .4s;
  
}
.btn-switch:focus {
  box-shadow: 0 0 0 0.25rem rgba(67, 51, 125, 0.5);
  outline: none;
}
.btn-check:checked + .btn-switch {
  background-color: #43337d;
  color: white;
  font-weight: 600;
}
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0); /* Inizia completamente trasparente */
  transition: background-color 0.3s ease; /* Animazione di scurimento */
}

.image-circle:hover .overlay {
  background-color: rgba(0, 0, 0, 0.5); /* Scurisce con opacità 50% */
}

/*********Box relatori **********/
/* Contenitore dei box */
.box-relatori {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  min-height: 300px; /* spazio sufficiente per evitare sfarfallio verticale */
}

/* Box principale */
.box-relatori .box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 260px;
  height: 260px;
  margin-left: -50px;
  border-radius: 999px;
  background: transparent;
  /*transition: width 0.8s ease;*/
  position: relative;
  cursor: pointer;
  z-index: 1;
  box-shadow: 0px 2.79px 4.18px -1.39px #10182899;
  margin-bottom: 30px;
  will-change: width;
}



/* Box espanso */
.box-relatori .box.expanded {
  width: 640px;
  background: white;
  border-radius: 130px;
  padding-right: 30px;
  z-index: 10;
}

/* Cerchio immagine */
.box-relatori .box .image-circle {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #fff;
  border: 5px solid #fff;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

/* Logo */
.box-relatori .box .logo {
  position: absolute;
  top: 190px;
  left: 10px;
  background: #fff;
  padding: 12px;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0px 2.79px 4.18px -1.39px #10182899;
  display: none !important;
}

.box-relatori .box .logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Nome sull’immagine */
.box-relatori .box .image-circle .nome {
  position: absolute;
  color: #fff;
  top: 50%;
  left: 25%;
  width: 160px;
  font-size: 16px;
  text-shadow: 0px 5px 5px #000000;
  font-weight: 600;
  opacity: 0;
  z-index: 99;
}

.box-relatori .box .image-circle:hover .nome {
  opacity: 1;
  transition: opacity 0.8s;
}

/* Box content: contenitore generale */
.box-relatori .box .box-content {
  opacity: 0;
  visibility: hidden;
  transform: translateY(3px);
  padding-left: 10px;
  transition: opacity 0.5s ease, transform 0.5s ease;
  will-change: opacity, transform;
}

/* Box content quando il box è espanso */
.box-relatori .box.expanded .box-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0.5s;
}

/* Animazione riga per riga 
.box-relatori .box.expanded .box-content h4,
.box-relatori .box.expanded .box-content .testo,
.box-relatori .box.expanded .box-content .qualifica,
.box-relatori .box.expanded .box-content .organizzazione {
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  will-change: opacity, transform;
}
*/

/* Delay progressivo per effetto cascata 
.box-relatori .box.expanded .box-content h4 { transition-delay: 0.6s; opacity:1; transform: translateY(0);}
.box-relatori .box.expanded .box-content .testo { transition-delay:0.7s; opacity:1; transform: translateY(0);}
.box-relatori .box.expanded .box-content .qualifica { transition-delay:1.1s; opacity:1; transform: translateY(0);}
.box-relatori .box.expanded .box-content .organizzazione { transition-delay:1.2s; opacity:1; transform: translateY(0);}
*/

/* Testi interni */
.box-relatori .box-content h4 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.box-relatori .box-content .testo { margin:0.5rem 0; font-size:0.95rem; line-height:1.4; }
.qualifica, .organizzazione { font-size:0.85rem; line-height:1.4; color:#686868; }

/* Box ridotto quando un altro è espanso */
.box-relatori .box.shrinked {
  margin-left: -120px;
  z-index: 5;
 /* transition: width 0.8s ease;*/
  will-change: width;
}



/* Responsive */
@media (max-width: 768px) {
  .box-relatori .box {
    flex-direction: column;
    align-items: center;
    width: 100% !important;
    margin-left: 0 !important;
    height: auto;
    box-shadow: none;
    width: 260px !important;
    margin-bottom: 30px;
  }



  .box-relatori .box.expanded {
    flex-direction: column;
    align-items: center;
    border-radius: 150px;
    padding-right: 0;
    min-height: 500px;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding-bottom: 80px;
  }

  .box-relatori .box .box-content {
    max-width: 100%;
    padding: 1rem;
    display: none;

  }

  .box-relatori .box.expanded .box-content {
    padding: 1rem;
    display: block;

  }
}


