/* Photoblog Italia: cinque righe originali, nove colonne, nessun riordino. */
.photoblog-mosaic {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  grid-auto-rows: 75px;
  row-gap: 18px;
  width: 812px;
  max-width: 100%;
  margin: 0 auto;
  padding: 1px 0;
  box-sizing: content-box;
  list-style: none;
}

.photoblog-cell {
  min-width: 0;
  padding: 0;
}

/* Riprende il margine interno delle piccole tabelle originali. */
.photoblog-cell--inset {
  padding-left: 6px;
}

.photoblog-cell--inset:has(.photoblog-year),
.photoblog-cell--inset:has(.photoblog-caption) {
  padding-left: 6.14px;
}

.photoblog-cell--photo {
  display: flex;
  justify-content: center;
}

.photoblog-year,
.photoblog-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 75px;
  height: 75px;
  background: #ff9966;
  color: #fff;
  text-align: center;
  font: 700 12px/normal Verdana, Arial, sans-serif;
}

.photoblog-year:hover,
.photoblog-year:focus-visible {
  background: #ec854f;
  color: #333;
  text-decoration: underline;
}

.photoblog-cell img {
  display: block;
  width: 75px;
  height: 75px;
}

.photoblog-cell a img {
  transition: opacity .2s;
}

.photoblog-cell a:hover img {
  opacity: .88;
}

/* Mantiene nove colonne e tutte le posizioni anche su schermi stretti.
   I quadrati si riducono insieme, senza scorrimento orizzontale. */
@media (max-width: 900px) {
  .photoblog-mosaic {
    grid-auto-rows: auto;
    gap: clamp(3px, 1.8vw, 18px) clamp(2px, 1vw, 9px);
  }

  .photoblog-mosaic .photoblog-cell {
    padding-left: 0;
  }

  .photoblog-year,
  .photoblog-caption,
  .photoblog-cell img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .photoblog-year {
    font-size: clamp(7px, 1.5vw, 12px);
  }

  .photoblog-caption {
    font-size: clamp(5px, 1.2vw, 12px);
  }
}

/* Standard dei link della pagina, come home_portfolio.htm.
   Le didascalie non cliccabili mantengono il testo bianco. */
.site-shell a:link,
.site-shell a:visited,
.site-shell a:active {
  color: #333;
  text-decoration: none;
}

.site-shell a:hover,
.site-shell a:focus-visible {
  color: #333;
  text-decoration: underline;
  text-decoration-color: #333;
}

.site-shell a.text-link {
  border-bottom: 0;
}
/* Solo Photoblog: tre colonne su smartphone e tablet. */
@media (max-width: 900px) {
  .photoblog-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 75px;
    gap: 18px 6px;
    width: 360px;
    max-width: 100%;
  }

  .photoblog-mosaic .photoblog-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 0;
  }

  .photoblog-mosaic .photoblog-year,
  .photoblog-mosaic .photoblog-caption,
  .photoblog-mosaic .photoblog-cell img,
  .photoblog-mosaic .photoblog-cell > a:not([hidden]) {
    width: 75px;
    height: 75px;
    flex-shrink: 0;
  }

  .photoblog-mosaic .photoblog-year,
  .photoblog-mosaic .photoblog-caption {
    font-size: 12px;
  }
}