/*************************************************
PAG1: INDICE: CON CATEGORIE DI GALLERIE DISPONIBILI 
******************************************************/


.grid {
display: grid;
grid-template-columns: repeat(1, 1fr);
gap: 40px;
margin-top: 40px;
}


@media (min-width: 640px){ .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px){ .grid { grid-template-columns: repeat(3, 1fr); } }


/* Tile */
.tile {
position: relative;
display: block;
border-radius: 14px;
overflow: hidden;
aspect-ratio: 4 / 3;
box-shadow: 0 6px 18px rgba(0,0,0,.08);
background: #ddd;
text-decoration: none;
}


.tile img {
position: absolute; inset: 0;
width: 100%; height: 100%; object-fit: cover;
transform: scale(1);
transition: transform .35s ease;
will-change: transform;
display:block;
}


.tile:hover img { transform: scale(1.06); }


.label {
position: absolute; inset: 0;
display: flex; align-items: center; justify-content: center;
padding: 20px;
text-align: center;
color: #fff;
font-weight: 700;
font-size: 1.6rem; /* clamp(1rem, 2.2vw, 1.6rem); */
text-shadow: 0 0 10px rgba(0,0,0,0.9), 0 2px 4px rgba(0,0,0,0.8);
pointer-events: none;
}


/****************************************************************
PAG2: DETTAGLIO GALLERIA SPECIFICA CON FOTO SU 3 COLONNE E ZOMMABILI
******************************************************************/


.gallery3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 40px;
}
  
  /* Create four equal columns that sits next to each other */
  .gallery3 .column {
/* 	flex: 33%;
	max-width: 33%;
	padding: 0 4px; */
  }
  
  .gallery3 .column img {
	/* margin-top: 8px; */
	vertical-align: middle;
	  width: 100%;
	  max-width: 100%;
	  
	border-radius: 14px;
	cursor: pointer;
	transition: 0.3s;
  margin-bottom: 40px;
  }
  
  .gallery3 .column img:hover {opacity: 0.9;}
  
  /* Responsive layout - makes a two column-layout instead of four columns */
  @media (max-width: 800px) {
	.gallery3 .column {
	  flex: 50%;
	  max-width: 50%;
	}
  }
  
  /* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
  @media (max-width: 600px) {
	.gallery3 .column {
	  flex: 100%;
	  max-width: 100%;
	}
  }

/*******************************/
/* gallery img modal zoom */
/*******************************/

.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top */
  padding-top: 80px; /* Location of the box */
  padding-bottom: 20px;
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.9); /* Black w/ opacity */

  inset: 0;
  justify-content: center;
  align-items: center;
}

/* Modal Content (Image) */
.modal-content {

  margin: auto;
  display: block;
  width: auto;
  /* max-width: 700px; */
  height: auto;
  max-height: 100%;
  object-fit: contain;
  position: relative;
}

/* Add Animation - Zoom in the Modal */
.modal-content, #caption {
  animation-name: zoom;
  animation-duration: 0.6s;
}

@keyframes zoom {
  from {transform:scale(0)}
  to {transform:scale(1)}
}

/* The Close Button */
/* X sopra immagine */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
    cursor: pointer;
  z-index: 10;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px){
  .modal-content {
    width: 100%;
  }
}	

/* prev next */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 36px;
  transition: 0.3s;
  user-select: none;
}

.prev { left: 0; }
.next { right: 0; }

.prev:hover, .next:hover {
  color: #ccc;
}