/* ! Bento grid */

.bento-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, 400px);
  gap: 20px;
}

.bento-grid-item {
  position: relative;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border-radius: 10px;
  overflow: hidden;
}

/* Overlay nero */
.bento-grid-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2;
}

/* Il primo blocco (con classe "large") si estende su 2 righe (row 1 e 2) */
.bento-grid-item.large {
  grid-row: 1 / span 2; /* Occupa la prima e la seconda riga */
}

.bento-content {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  text-align: center;
  padding: 1rem;
  z-index: 3;
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 300px); /* 3 blocchi uno sotto l'altro */
  }
  .bento-grid-item.large {
    grid-row: auto; /* toglie span di 2 righe */
  }
}
