/* Hotel Migny - Photos page: professional gallery layout (2026-11-15, pro2).
   Justified rows: left and right edges aligned, even gutters, no orphan last
   row. Each photo keeps its true ratio except a measured exception for very
   tall portraits (centered crop, at most 15% per side) so a row is not broken
   by a very narrow tile. The lightbox still opens the full, uncropped image.
   --ar is the photo ratio; --tile-w/--tile-h are set by photos-gallery-pro.js.
   Scoped to #main-content .gallery-tiles so nothing else on the site changes. */
#main-content .gallery-tiles {
  --row-h: 250px;
  --gallery-gap: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  align-items: flex-start;
  gap: var(--gallery-gap);
  width: 100%;
  box-sizing: border-box;
  grid-template-columns: none;
}
#main-content .gallery-tiles > a.gallery-tile,
#main-content .gallery-tiles > a.gallery-tile:first-child,
#main-content .gallery-tiles:has(> a.gallery-tile:first-child) > a.gallery-tile {
  --ar: 1.5;
  position: relative;
  display: block;
  overflow: hidden;
  grid-column: auto;
  grid-row: auto;
  aspect-ratio: var(--ar);
  flex: 0 0 auto;
  width: calc(var(--ar) * var(--row-h));
  height: var(--row-h);
  max-width: none;
  border-radius: 8px;
  background: #ece6dd;
  box-sizing: border-box;
}
#main-content .gallery-tiles > a.gallery-tile[data-justified],
#main-content .gallery-tiles > a.gallery-tile:first-child[data-justified],
#main-content .gallery-tiles:has(> a.gallery-tile:first-child) > a.gallery-tile[data-justified] {
  aspect-ratio: auto;
  width: var(--tile-w);
  height: var(--tile-h);
  flex: 0 0 var(--tile-w);
  max-width: none;
}
#main-content .gallery-tiles a.gallery-tile picture { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#main-content .gallery-tiles a.gallery-tile img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transition: transform .5s ease;
}
#main-content .gallery-tiles a.gallery-tile:hover img { transform: scale(1.04); }
#main-content .gallery-cat + .gallery-cat { margin-top: 44px; }

@media (max-width: 900px) {
  #main-content .gallery-tiles { --row-h: 200px; --gallery-gap: 10px; }
}
@media (max-width: 560px) {
  #main-content .gallery-tiles { --row-h: 150px; --gallery-gap: 8px; }
  #main-content .gallery-tiles > a.gallery-tile,
  #main-content .gallery-tiles > a.gallery-tile:first-child,
  #main-content .gallery-tiles:has(> a.gallery-tile:first-child) > a.gallery-tile {
    border-radius: 6px;
  }
}

/* ---- Film: vertical video shown in a 16:9 frame with an ambient (blurred
   poster) background. The video file/element is untouched. ---- */
figure.photos-film.photos-film--stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 1040px;
  aspect-ratio: 16 / 9;
  margin: 0 auto 48px;
  overflow: hidden;
  border-radius: 14px;
  background: #1b1714;
  box-shadow: 0 10px 30px rgba(27, 23, 20, .18);
  isolation: isolate;
}
/* Ambient layer: a muted, blurred copy of the same film (added by
   /js/photos-gallery-pro.js on desktop only; plain dark frame otherwise). */
figure.photos-film.photos-film--stage video.photos-film__ambient {
  position: absolute;
  inset: -60px;
  width: calc(100% + 120px);
  height: calc(100% + 120px);
  max-width: none;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
  filter: blur(40px) saturate(1.2) brightness(.6);
}
figure.photos-film.photos-film--stage video.photos-film__video {
  position: absolute !important;
  top: 0; bottom: 0; left: 50%;
  transform: translateX(-50%);
  display: block !important;
  width: auto !important;
  height: 100% !important;
  max-width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #000;
  box-shadow: 0 0 40px rgba(0, 0, 0, .35);
}
@media (max-width: 700px) {
  figure.photos-film.photos-film--stage { aspect-ratio: 4 / 5; border-radius: 10px; margin-bottom: 32px; }
}
