/* Galeria do site publico (home e /galeria/) - ver galeria.js */
#galeria.bdg-on > div > :not(.mb-12):not(.bdg) { display: none !important; }

.bdg-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) {
  .bdg-grade { gap: 16px; }
  .bdg-grade-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bdg-grade-pagina { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) { .bdg-grade-pagina { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.bdg-item {
  position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; margin: 0;
  border-radius: 16px; overflow: hidden; background: rgb(7 42 64 / .08); cursor: pointer;
  box-shadow: 0 6px 18px -10px rgb(7 42 64 / .45); -webkit-tap-highlight-color: transparent;
}
.bdg-item img, .bdg-item video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.bdg-item:hover img, .bdg-item:hover video { transform: scale(1.04); }
.bdg-item:focus-visible { outline: 3px solid rgb(14 107 168); outline-offset: 3px; }
@media (max-width: 767px) { .bdg-largo-m { grid-column: 1 / -1; aspect-ratio: 2 / 1; } }
@media (min-width: 768px) { .bdg-largo-d { grid-column: span 2; aspect-ratio: 2 / 1; } }

.bdg-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgb(7 42 64 / .55); backdrop-filter: blur(4px);
  box-shadow: 0 0 0 2px rgb(255 255 255 / .7); padding-left: 3px; pointer-events: none;
}

.bdg-mais img, .bdg-mais video { filter: blur(7px) brightness(.62); transform: scale(1.15); }
.bdg-mais:hover img, .bdg-mais:hover video { transform: scale(1.2); }
.bdg-mais-txt {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: #fff; text-align: center; font-family: var(--font-outfit), Outfit, system-ui, sans-serif; text-decoration: none;
}
.bdg-mais-txt b { font-size: 20px; font-weight: 700; letter-spacing: .01em; }
.bdg-mais-txt small { font-size: 13px; opacity: .9; }
.bdg-mais-txt::after {
  content: ''; width: 34px; height: 34px; margin-top: 6px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .85);
  background: no-repeat center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
}

/* filtros da pagina */
.bdg-filtros { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; margin-bottom: 4px; scrollbar-width: none; }
.bdg-filtros::-webkit-scrollbar { display: none; }
.bdg-filtro {
  flex: 0 0 auto; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid rgb(7 42 64 / .15); background: #fff;
  font: 600 14px/1 var(--font-outfit), Outfit, system-ui, sans-serif; color: rgb(7 42 64 / .75); cursor: pointer;
}
.bdg-filtro span { font-weight: 500; opacity: .6; margin-left: 2px; }
.bdg-filtro.ativo { background: rgb(7 42 64); border-color: rgb(7 42 64); color: #fff; }
.bdg-carregando { text-align: center; padding: 48px 0; color: rgb(7 42 64 / .55); }

/* visualizador */
.bdg-vis {
  position: fixed; inset: 0; z-index: 2147483000; background: rgb(3 14 24 / .97); display: flex; flex-direction: column;
  align-items: center; justify-content: center; animation: bdgEntra .18s ease-out; touch-action: pan-y;
}
@keyframes bdgEntra { from { opacity: 0; } to { opacity: 1; } }
.bdg-vis-topo { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: max(12px, env(safe-area-inset-top)) 12px 8px 18px; color: #fff; z-index: 2; }
.bdg-vis-cont { font: 600 14px/1 var(--font-outfit), Outfit, system-ui, sans-serif; opacity: .85; }
.bdg-vis-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.bdg-vis-palco { width: 100%; flex: 1; display: flex; align-items: center; justify-content: center; padding: 64px 0 56px; min-height: 0; }
.bdg-vis-palco img, .bdg-vis-palco video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
@media (min-width: 768px) { .bdg-vis-palco { padding: 70px 90px 60px; } .bdg-vis-palco img, .bdg-vis-palco video { border-radius: 10px; } }
.bdg-vis-leg { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 16px; right: 16px; text-align: center; color: rgb(255 255 255 / .85); font: 14px/1.4 var(--font-outfit), Outfit, system-ui, sans-serif; margin: 0; }
.bdg-vis-seta { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .12); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.bdg-vis-ant { left: 10px; }
.bdg-vis-prox { right: 10px; }
.bdg-vis-prox svg { transform: rotate(180deg); }
@media (hover: none) { .bdg-vis-seta { background: rgb(255 255 255 / .08); width: 38px; height: 38px; } }
@media (prefers-reduced-motion: reduce) { .bdg-item img, .bdg-item video { transition: none; } .bdg-vis { animation: none; } }

/* computador: quadros 4:3 numa largura confortavel (sem fotos gigantes) */
@media (min-width: 768px) {
  .bdg-grade-home { max-width: 1040px; margin: 0 auto; }
  .bdg-grade-home .bdg-item { aspect-ratio: 4 / 3; }
  .bdg-grade-home .bdg-largo-d { aspect-ratio: 8 / 3; }
}
/* "Ver mais" legivel mesmo se a capa do video ainda nao carregou */
.bdg-mais { background: linear-gradient(135deg, rgb(14 107 168), rgb(7 42 64)); }
