/* ZG-051: scoped captions and optional video; retain the site's photo grid. */
.managed-gallery .photogallery-item-a { height: auto; margin-bottom: 16px; }
.managed-gallery .works-gallery-caption {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  height: 48px;
  min-height: 48px;
  box-sizing: border-box;
  padding: 4px 4px 0;
  font-size: 16px;
  line-height: 22px;
  text-align: center;
  color: #333;
}
.managed-gallery a.photogallery-item-a,
.managed-gallery a.photogallery-item-a:hover {
  color: #333;
  text-decoration: none;
}
.managed-gallery a:hover .works-gallery-caption { color: #333; }
.managed-gallery .works-video-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #282a2e;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.managed-gallery .works-video-play {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  padding-left: 4px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #d82727;
  color: #fff;
  font-size: 28px;
}
.works-gallery-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.works-video-link,
.works-video-link:hover { color: #d82727; font-size: 16px; text-decoration: none; }
.relise-objects--managed a:focus-visible { outline: 3px solid #2264af; outline-offset: 3px; }
.works-gallery-player { display: block; width: 100%; max-height: 75vh; background: #111; }
@media (max-width: 767px) {
  .relise-objects--managed .top-title { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
  .works-gallery-actions { gap: 12px; }
  .managed-gallery .works-gallery-caption { font-size: 14px; line-height: 20px; height: 48px; }
}

/* Keep video artwork stable; never inherit the photo magnifier overlay. */
.managed-gallery .works-video-cover:after,
.managed-gallery .works-video-tile:hover .works-video-cover:after { display: none; }
.managed-gallery .works-video-cover:before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.12);
  pointer-events: none;
}
.managed-gallery .works-video-play:after {
  content: '';
  position: absolute;
  inset: -7px;
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 50%;
  animation: works-video-pulse 3.2s ease-out infinite;
  pointer-events: none;
}
@keyframes works-video-pulse {
  0%, 45% { transform: scale(.88); opacity: 0; }
  50% { transform: scale(.88); opacity: .75; }
  85%, 100% { transform: scale(1.25); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .managed-gallery .works-video-play:after { animation: none; opacity: 0; }
}
