/* ===== GLOBAL ===== */
* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  background: linear-gradient(180deg, #0d1b8f 0%, #1a237e 100%);
  color: #fff;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}

/* ===== HEADER ===== */
.animated-header {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

.animated-header h1 {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  padding: 0.3em 0.7em;
  border-radius: 10px;
  background-color: #ffdd00;
  color: #000;
  text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

/* ===== SUBTITLE ===== */
#subtitle {
  font-family: "Inter", sans-serif;
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.4rem);
  margin: 1rem auto;
  max-width: 800px;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  backdrop-filter: blur(4px);
}

/* ===== LINE ===== */
hr {
  border: none;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, #1a237e 0%, #ffdd00 50%, #1a237e 100%);
  box-shadow: 0 0 10px #ffdd00, 0 0 15px #0026ff;
  margin: 40px auto;
  width: 90%;
}

.events-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 0 auto;
  max-width: 1200px;
}

/* ===== EVENT BOX ===== */
.eventbox {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 300px; /* Limite massimo per desktop */
  align-items: center;
  background: linear-gradient(135deg, #2c003e, #3f0071, #6a0dad);
  border-radius: 25px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 0 40px 5px rgba(255, 215, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.eventbox:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 0 80px 15px rgba(255, 215, 0, 0.6);
}

a {
  color: white;
  text-decoration: underline;
}
.eventboximage {
  width: 100%;
  border-radius: 15px;
  margin-bottom: 1rem;
  object-fit: cover;
}

.eventbox h2 {
  font-family: "Montserrat", sans-serif;
  margin: 0.5rem 0;
  font-size: 1.6rem;
  color: #ffdd00;
}

.eventbox h3 {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
}

/* ===== COLLAB LOGO ===== */
.collabspammer {
  display: grid;
  grid-auto-flow: column;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  margin-top: 1rem;
}

.collabspammer img {
  width: min(80px, 25vw);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
  animation: popLogo 2s ease-in-out infinite;
}

.collabspammer img:hover {
  transform: scale(1.15);
  filter: brightness(1.2);
}

@keyframes popLogo {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* ===== BACK HOME ===== */
.back-home {
  display: inline-block;
  font-size: 1.1rem;
  color: #ffdd00;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.6em 1.2em;
  border-radius: 10px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.back-home:hover {
  background: #ffdd00;
  color: #000;
  transform: translateY(-3px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .events-container {
    flex-direction: column;
    gap: 1.5rem;
    width: 90%;
  }

  .eventbox {
    max-width: 90%;
    padding: 1rem;
    margin: 0 auto;
  }

  #subtitle {
    font-size: 1rem;
    padding: 0.9rem 1rem;
  }
}

@media (max-width: 480px) {
  .eventbox {
    max-width: 95%;
    padding: 0.8rem;
  }

  #subtitle {
    font-size: 0.9rem;
    padding: 0.7rem 1rem;
  }
}

@media (max-width: 360px) {
  .eventbox {
    max-width: 100%;
    padding: 0.6rem;
  }

  #subtitle {
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
  }
}
