/* CSS Document */
.events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto;
  gap: 1.5rem;
  margin-top: 1rem;
}

.event-card {
  position: relative;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.event-card .event-content {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 1rem;
  color: #fff;
  background: rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5rem;
}

.event-card.large {
  grid-column: 1 / -1;
  height: 350px;
}

.event-card.large img {
  height: 100%;
  object-fit: cover;
}

.event-card.large .event-content {
  font-size: 1.2rem;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.event-card:hover img {
  transform: scale(1.05);
}


.event-card .cta {
  background: #d9692b;
  text-align: center;display: block;
  margin: 0.5rem auto 0 auto;
}

.event-card .cta:hover {
  background: #ab4822;
}

@media (max-width: 900px) {
  .event-card {
    display: flex;
    flex-direction: column; /* verticale */
    align-items: center;    /* centro orizzontalmente */
  }

  .event-card .event-content {
    position: static;       /* rimuove overlay assoluto */
    background: transparent; /* facoltativo: overlay sparisce */
    color: #5a3e2b;         /* testo leggibile */
    text-align: center;     /* centro il testo */
    padding: 1rem;
    width: 100%;
  }

  .event-card .cta {
    margin: 1rem auto 0 auto; /* margine superiore e centratura */
    display: inline-block;
  }

  .event-card img {
    width: 100%;
    height: auto;           /* mantiene proporzioni */
  }
}
 /* ====== GRID EVENTI ====== */
.events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.event-card.large {
  grid-column: 1 / -1; /* occupa tutta la larghezza */
  height: 350px;
}

/* ====== RESPONSIVO ====== */
@media (max-width: 900px) {
  .events-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 colonna */
    gap: 1rem;
  }

  .event-card.large {
    height: auto; /* altezza naturale */
  }

  .event-card .event-content {
    position: static;       /* overlay sparisce */
    background: transparent; 
    color: #5a3e2b;
    text-align: center;     
    padding: 1rem;
    width: 100%;
  }

  .event-card .cta {
    margin: 1rem auto 0 auto; /* centrato */
    display: inline-block;
  }
}

