
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #000;
  color: white;
}

/* Header */
.header {
  position: relative;
  width: 100%;
  height: 160px;
  padding: 10px;
  text-align: center;

}

.header img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header h1 {
  position: absolute;
  bottom: 20px;
  left: 20px;
  margin: 0;
  font-size: 2.5rem;
  background: rgba(0,0,0,0.5);
  padding: 10px 20px;
}

/* Griglia */
.grid {
  display: grid;
  /*grid-template-columns: repeat(4, 2fr);*/
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 10px;
}

.grid a {
  position: relative;
  display: block;
  height: 250px;
  text-decoration: none;
  color: white;
}

.grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid span {
  position: absolute;
  bottom: 0;
  width: 100%;
  text-align: center;
  background: rgba(0,0,0,0.6);
  padding: 12px;
  font-size: 1.2rem;
}

/* tile */
.tile {
  position: relative;
  height: 250px;
  overflow: hidden;
  text-decoration: none;
  color: white;
  border-radius: 18px;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: contain ;
  transition: transform 0.4s ease;
}

/* Overlay */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  padding: 20px;
}

.overlay h2 {
  margin: 0;
  font-size: 1.6rem;
}

.overlay p {
  margin-top: 10px;
  font-size: 1rem;
  max-width: 90%;
}

/* Hover effects */
.tile:hover img {
  transform: scale(1.05);
}

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


/* Sezione full screen */
.fullscreen-title {
  width: 100h;            /* larghezza = schermo */
  display: flex;
  align-items: center;      /* centra verticalmente */
  justify-content: center;  /* centra orizzontalmente */
  padding: 20px;
}

/* h1 fluido e intimo */
.fullscreen-title h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  line-height: 1.1;
  text-align: center;

  /* Dimensione fluida */
  font-size: clamp(2.5rem, 8vw, 6rem);

  color: #eee;
}


/* Mobile: overlay sempre visibile */
@media (hover: none) {
  .overlay {
	opacity: 1;
  }
}

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

  /* mostra meno immagini: nascondi quelle marcate */
  .hide-mobile {
    display: none;
  }

  .header h1 {
	font-size: 1.8rem;
  }
}

/* Fade-in all'apertura */
.page {
  opacity: 0;
  animation: fadeIn 1.4s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
