/* ricerca per nome (mockup v3 pag. 27, 280x59): pillola trasparente con bordo e testo ice-blue */
.cerca-relatore {
  position: relative;
  width: 280px;
  max-width: 100%;
}
.cerca-relatore .bi-search {
  position: absolute;
  left: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ngai-ice-blue);
  pointer-events: none;
}
.cerca-relatore input {
  width: 100%;
  height: 59px;
  padding: 0 1.25rem 0 3.5rem;
  border: 1px solid var(--ngai-ice-blue);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 1.25rem;
}
.cerca-relatore input::placeholder {
  color: var(--ngai-ice-blue);
  opacity: 1;
}
.cerca-relatore input:focus {
  outline: 2px solid var(--ngai-cyan);
  outline-offset: 2px;
}
/* sotto i 768px ordinamento e ricerca occupano tutta la riga */
@media (max-width: 767.98px) {
  .gruppo-ordina,
  .cerca-relatore { width: 100%; }
}
/* sotto i 992px lo switch (701px) non sta accanto all'etichetta: prende tutta la riga */
@media (max-width: 991.98px) {
  .gruppo-ordina,
  .gruppo-ordina .switch-pillola { width: 100%; }
}

.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 chiuso: il testo nascosto non occupa spazio, altrimenti esce a destra dell'ultimo box di ogni riga
   e la pagina scorre in orizzontale */
.box-relatori .box:not(.expanded) .box-content {
  max-width: 0;
  overflow: hidden;
  padding-left: 0;
}

/* 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;

  }
}


