
    .gallery {
      max-width: 1000px;
      margin: 0 auto;
      padding: var(--gap);
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: var(--gap);
    }

    /* Tablet */
    @media (max-width: 900px) {
      .gallery {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    /* Mobile */
    @media (max-width: 500px) {
      .gallery {
        grid-template-columns: 1fr;
      }
    }

    .item {
      position: relative;
      width: 100%;
      aspect-ratio: 4 / 5; /* rettangolare stile Instagram (4:5) */
      overflow: hidden;
      background: #ddd;
      cursor: pointer;
    }

    .item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.3s ease;
    }

    .item:hover img {
      transform: scale(1.05);
    }

    .overlay {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.35);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: opacity 0.3s ease;
      font-size: 14px;
      letter-spacing: 0.5px;
    }

    .item:hover .overlay {
      opacity: 1;
    }