/*
 * BAC dev.66: one gallery for existing Elementor and approved public uploads.
 * Scoped to the public gallery; no new headline, photo captions or section gap.
 * Elementor media selection remains unchanged and editable.
 */
.bac-public-gallery .bac-unified-gallery,
.bac-unified-gallery-fallback .bac-unified-gallery {
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:20px!important;
  align-items:stretch;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  list-style:none;
}
.bac-public-gallery .elementor-widget-gallery,
.bac-public-gallery .elementor-widget-gallery .elementor-widget-container {
  width:100%;max-width:100%;min-width:0;
}
.bac-unified-gallery .bac-unified-tile {
  position:relative;
  isolation:isolate;
  display:block;
  width:100%;
  min-width:0;
  aspect-ratio:3 / 2;
  overflow:hidden;
  border:0;
  border-radius:19px;
  background:#eaf0e6;
  box-shadow:0 2px 12px rgba(13,43,33,.055);
  transition:box-shadow .18s ease,transform .18s ease;
}
.bac-unified-gallery .bac-unified-tile:hover {
  transform:translateY(-2px);
  box-shadow:0 12px 25px rgba(13,43,33,.13);
}
.bac-unified-gallery .bac-unified-photo-link {
  position:absolute;
  inset:0;
  z-index:1;
  display:block!important;
  width:100%!important;
  height:100%!important;
  overflow:hidden;
  border:0;
  text-decoration:none!important;
}
.bac-unified-gallery .bac-unified-photo-link img {
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:100%!important;
  min-height:0!important;
  object-fit:cover!important;
  object-position:center center;
  border:0!important;
  border-radius:0!important;
}
.bac-unified-gallery .bac-unified-photo-link:focus-visible {
  outline:4px solid #c8a258;
  outline-offset:-5px;
}
/* Uploaded catches can expose their optional information without
   printing filename-looking titles or affecting the original images. */
.bac-unified-gallery .bac-unified-tile .bac-catch-overlay {
  position:absolute!important;
  inset:0!important;
  z-index:3;
  display:flex!important;
  flex-direction:column;
  justify-content:space-between;
  gap:9px;
  padding:17px 17px 57px;
  margin:0!important;
  overflow:auto;
  overscroll-behavior:contain;
  background:linear-gradient(180deg,rgba(8,36,26,.97),rgba(11,48,33,.95));
  color:#fffdf7;
  visibility:hidden;
  opacity:0;
  pointer-events:none;
  transition:opacity .17s ease,visibility .17s ease;
}
.bac-unified-gallery .bac-unified-tile.is-catch-open .bac-catch-overlay{
  visibility:visible;opacity:1;pointer-events:auto;
}
@media(hover:hover) and (pointer:fine){
  .bac-unified-gallery .bac-unified-tile--details:hover .bac-catch-overlay{
    visibility:visible;opacity:1;pointer-events:auto;
  }
}
.bac-unified-gallery .bac-catch-facts {
  display:grid;gap:8px;
  margin:0;padding:0;
}
.bac-unified-gallery .bac-catch-row {
  display:grid;
  grid-template-columns:minmax(52px,72px) minmax(0,1fr);
  gap:10px;
  margin:0;
  line-height:1.45;
}
.bac-unified-gallery .bac-catch-row dt {
  color:#efcc86;
  font:700 12px/1.45 "BAC Modern",Inter,Arial,sans-serif;
  margin:0;
}
.bac-unified-gallery .bac-catch-row dd {
  color:#fffdf7;
  font:500 13px/1.45 "BAC Modern",Inter,Arial,sans-serif;
  margin:0;
  overflow-wrap:anywhere;
}
.bac-unified-gallery .bac-catch-full-photo {
  align-self:flex-start;
  color:#fff2cf!important;
  border-bottom:1px solid #d3b269;
  font:700 12px/1.6 "BAC Modern",Inter,Arial,sans-serif;
  text-decoration:none!important;
}
.bac-unified-gallery .bac-catch-full-photo:focus-visible {
  outline:2px solid #fff5da;
  outline-offset:3px;
}
/* A compact, legible chip only for photographs with optional catch facts. */
.bac-unified-gallery .bac-unified-tile .bac-catch-toggle{
  position:absolute!important;
  z-index:4;
  right:12px;
  bottom:11px;
  width:auto!important;
  max-width:calc(100% - 24px);
  min-width:0!important;
  min-height:37px;
  margin:0!important;
  padding:8px 13px!important;
  border:1px solid rgba(255,255,255,.8);
  border-radius:100px;
  background:rgba(13,43,33,.88);
  color:#fff!important;
  font:700 12px/1.35 "BAC Modern",Inter,Arial,sans-serif;
  cursor:pointer;
  text-align:center;
  white-space:normal;
}
.bac-unified-gallery .bac-unified-tile .bac-catch-toggle:hover,
.bac-unified-gallery .bac-unified-tile.is-catch-open .bac-catch-toggle{
  background:#c8a258;
  color:#102e24!important;
  border-color:#c8a258;
}
.bac-unified-gallery .bac-unified-tile .bac-catch-toggle:focus-visible {
  outline:3px solid #fff4d0;
  outline-offset:2px;
}
.bac-unified-gallery-fallback {
  width:100%;
  max-width:1240px;
  margin:0 auto;
  padding:0 28px 30px;
  box-sizing:border-box;
}
@media(max-width:980px){
  .bac-public-gallery .bac-unified-gallery,
  .bac-unified-gallery-fallback .bac-unified-gallery{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:17px!important;
  }
}
@media(max-width:570px){
  .bac-public-gallery .bac-unified-gallery,
  .bac-unified-gallery-fallback .bac-unified-gallery{
    grid-template-columns:minmax(0,1fr)!important;
    gap:14px!important;
  }
  .bac-unified-gallery .bac-unified-tile{border-radius:15px;}
  .bac-unified-gallery-fallback{padding:0 18px 24px;}
  .bac-unified-gallery .bac-unified-tile .bac-catch-overlay{padding:13px 13px 55px}
}
@media(prefers-reduced-motion:reduce){
  .bac-unified-gallery .bac-unified-tile,
  .bac-unified-gallery .bac-catch-overlay{transition:none!important}
}
