/* ---------------------------
   Stile base lista eventi per tutti i contenitori
--------------------------- */
#eventi-teatro,
#eventi-musica,
#eventi-cinema,
.event-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
  overflow-x: hidden; /* previene scroll orizzontale */
}

/* ---------------------------
   Event Item
--------------------------- */
.event-item {
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #1a1a1a, #222);
  border-radius: 12px;
  padding: 20px;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  /* limita la larghezza del container */
  max-width: 500px;
  margin: 0 auto;
}

.event-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.6);
}

/* ---------------------------
   Immagini eventi lista
--------------------------- */
.event-img {
  display: block;
  width: 100%;          
  height: auto;         
  object-fit: contain;  
  border-radius: 10px;
  margin: 10px auto;
}

/* Limite altezza immagini desktop lista */
@media (min-width: 769px) {
  .event-img {
    max-height: 400px;
  }
}

/* Limite altezza immagini mobile lista */
@media (max-width: 768px) {
  .event-img {
    max-height: 200px;
  }
}

/* ---------------------------
   Immagini popup eventi
--------------------------- */
.event-modal-content img {
  width: 90%;
  max-height: 600px;   /* maggiore altezza su desktop */
  object-fit: contain;  
  border-radius: 12px;
  margin: 15px auto;
}

@media (max-width: 768px) {
  .event-modal-content img {
    max-height: 300px; /* maggiore altezza su mobile */
    width: 95%;
  }
}

/* ---------------------------
   Titoli e testi
--------------------------- */
.event-item h3 {
  font-size: 1.8rem;
  color: #fdd835;
  margin-bottom: 8px;
}

.event-item p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 10px;
  color: #e0e0e0;
}

/* ---------------------------
   CTA button
--------------------------- */
.event-item .cta-button,
.event-modal-content .cta-button {
  display: inline-block;
  padding: 8px 16px;
  background-color: #fdd835;
  color: #000;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  font-size: 1rem;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.event-item .cta-button:hover,
.event-modal-content .cta-button:hover {
  background-color: #ffeb3b;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.4);
}

/* ---------------------------
   Mobile
--------------------------- */
@media (max-width: 768px) {
  .event-item {
    max-width: 100%;   /* container si adatta al mobile */
    padding: 15px;
  }

  .event-item h3 {
    font-size: 1.4rem;
  }

  .event-item p {
    font-size: 0.9rem;
  }

  .event-item .cta-button,
  .event-modal-content .cta-button {
    font-size: 0.9rem;
    padding: 6px 12px;
  }
}

/* LOADER: solo cerchio */
#loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid #fdd835; /* colore cerchio */
  border-top: 4px solid transparent; /* effetto rotazione */
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
  z-index: 9999;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---------------------------
   Pulsante WhatsApp
--------------------------- */
.whatsapp-share {
  display: inline-block;
  margin-top: 10px;
  background-color: #25D366;
  color: white;
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
  transition: background-color 0.3s ease;
}

.whatsapp-share i {
  margin-right: 6px;
  font-size: 1.2rem;
}

.whatsapp-share:hover {
  background-color: #20ba5a;
}
