/*--------------------------------------------------------------
# Galleria arts (arts.php): righe giustificate sopra lo stile di screenshots.css
# Ogni .shot ha --r = larghezza/altezza dell'immagine: crescendo in proporzione a --r,
# le opere della stessa riga finiscono tutte alla stessa altezza senza ritagli.
--------------------------------------------------------------*/
.arts .gallery-intro a {
  color: #fd680e;
  font-weight: 600;
}

.arts-grid {
  --row-h: 260px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  padding: 20px var(--rail-gutter) 0;
}

/* Riempie lo spazio a fine ultima riga, cosi' le ultime opere non si allargano a dismisura */
.arts-grid::after {
  content: "";
  flex-grow: 9999;
}

.arts-grid .shot {
  flex: var(--r) 1 calc(var(--r) * var(--row-h));
  aspect-ratio: var(--r);
  max-width: 100%;
  scroll-snap-align: none;
}

.arts-grid .shot img {
  height: 100%;
  object-position: center;
}

.arts-grid .shot-caption {
  padding: 32px 12px 10px;
  font-size: 15px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.arts-grid .shot-caption small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  color: #ccc;
}

.arts-grid .shot:hover .shot-caption,
.arts-grid .shot:focus-visible .shot-caption {
  opacity: 1;
  transform: none;
}

@media (hover: hover) and (pointer: fine) {
  .arts-grid .shot:hover {
    transform: scale(1.03);
  }
}

/* Sui touch non c'e' hover: didascalia sempre visibile */
@media (hover: none), (pointer: coarse) {
  .arts-grid .shot-caption {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 768px) {
  .arts-grid {
    --row-h: 170px;
    gap: 6px;
  }

  .arts-grid .shot-caption {
    padding: 24px 8px 6px;
    font-size: 13px;
  }
}
