/* Galerias do Faz Site (grade, mosaico, banner, carrossel, carrossel com miniaturas). Sem o script, cada uma já aparece
   arrumada; galeria.js acrescenta passar sozinho, setas, miniaturas e ampliar a foto ao clicar. */
.bv-gal { position: relative; box-sizing: border-box; --bv-gap: 8px; width: 100%; min-width: 0; }
.bv-gal *, .bv-gal *::before, .bv-gal *::after { box-sizing: border-box; }
.bv-gal-item { margin: 0; position: relative; overflow: hidden; }
.bv-gal-item > img, .bv-gal-item > a > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bv-gal-item > a { display: block; height: 100%; }
.bv-gal-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; background: rgba(27, 34, 48, .72); color: #fff; font-size: 15px; line-height: 1.35; text-align: center; }
.bv-gal-item figcaption:empty { display: none; }
.bv-gal[data-ampliar="1"] .bv-gal-item img { cursor: zoom-in; }

/* grade */
.bv-gal--grade { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--bv-gap); }
.bv-gal--grade .bv-gal-item { aspect-ratio: var(--bv-prop, 3 / 2); }

/* mosaico */
.bv-gal--mosaico { columns: 3; column-gap: var(--bv-gap); }
/* colunas (grade e mosaico) */
.bv-gal.bv-cols-2 { columns: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bv-gal.bv-cols-3 { columns: 3; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bv-gal.bv-cols-4 { columns: 4; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bv-gal.bv-cols-5 { columns: 5; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bv-gal.bv-cols-6 { columns: 6; grid-template-columns: repeat(6, minmax(0, 1fr)); }
/* galeria importada do Site.pro: miniaturas com a largura do original (--bv-min), quantas couberem na linha */
.bv-gal.bv-auto.bv-gal--grade { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--bv-min, 250px)), 1fr)); }
.bv-gal.bv-auto.bv-gal--mosaico { columns: auto; column-width: var(--bv-min, 250px); }
.bv-gal--mosaico .bv-gal-item { break-inside: avoid; margin-bottom: var(--bv-gap); }
.bv-gal--mosaico .bv-gal-item > img, .bv-gal--mosaico .bv-gal-item > a > img { height: auto; }

/* carrossel e carrossel com miniaturas: trilho que rola na horizontal, uma foto por vez */
.bv-gal--carrossel, .bv-gal--miniaturas { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; height: 460px; }
.bv-gal--carrossel::-webkit-scrollbar, .bv-gal--miniaturas::-webkit-scrollbar { display: none; }
.bv-gal--carrossel .bv-gal-item, .bv-gal--miniaturas .bv-gal-item { flex: 0 0 100%; scroll-snap-align: start; }

/* banner: fotos uma sobre a outra, escurecidas, com o texto por cima */
.bv-gal--banner { display: grid; min-height: 420px; overflow: hidden; }
.bv-gal--banner > .bv-gal-item { grid-area: 1 / 1; transition: opacity .8s; min-height: 0; }
.bv-gal--banner > .bv-gal-item > img, .bv-gal--banner > .bv-gal-item > a > img { position: absolute; inset: 0; }
.bv-gal--banner > .bv-gal-item figcaption { display: none; }
.bv-gal--banner > .bv-gal-item:not(:first-of-type) { opacity: 0; }
.bv-gal--banner.bv-js > .bv-gal-item { opacity: 0; }
.bv-gal--banner.bv-js > .bv-gal-item.bv-ativo { opacity: 1; }
.bv-gal--banner::after { content: ""; grid-area: 1 / 1; background: rgba(0, 0, 0, .4); pointer-events: none; z-index: 1; }
.bv-gal--banner.bv-escuro-0::after { background: transparent; } .bv-gal--banner.bv-escuro-20::after { background: rgba(0, 0, 0, .2); }
.bv-gal--banner.bv-escuro-60::after { background: rgba(0, 0, 0, .6); } .bv-gal--banner.bv-escuro-80::after { background: rgba(0, 0, 0, .8); }
.bv-gal-texto { grid-area: 1 / 1; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px 24px; color: #fff; text-align: center; }
.bv-gal-texto > * { margin: 0; }

/* setas, pontos e miniaturas (criados pelo script) */
.bv-gal-moldura { position: relative; width: 100%; min-width: 0; }
.bv-gal-seta { position: absolute; top: 50%; z-index: 3; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: #1B2230; font: 24px/44px system-ui, sans-serif; text-align: center; cursor: pointer; padding: 0; }
.bv-gal-seta:hover { background: #fff; }
.bv-gal-seta--ant { left: 12px; } .bv-gal-seta--prox { right: 12px; }
.bv-gal-pontos { position: absolute; left: 0; right: 0; bottom: 56px; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.bv-gal-pontos button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); cursor: pointer; }
.bv-gal-pontos button.bv-ativo { background: #fff; }
.bv-gal-minis { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; justify-content: center; }
.bv-gal-minis button { flex: 0 0 auto; width: 84px; height: 60px; padding: 0; border: 0; opacity: .6; cursor: pointer; background: #ddd; }
.bv-gal-minis button.bv-ativo { opacity: 1; outline: 3px solid var(--bv-cor, #2450D8); outline-offset: -3px; }
.bv-gal-minis img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* foto ampliada */
.bv-zoom { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; background: rgba(10, 12, 16, .92); }
.bv-zoom img { max-width: 92vw; max-height: 84vh; object-fit: contain; }
.bv-zoom p { position: absolute; left: 0; right: 0; bottom: 16px; margin: 0; color: #fff; text-align: center; font: 15px system-ui, sans-serif; }
.bv-zoom button { position: absolute; border: 0; background: transparent; color: #fff; font: 36px/1 system-ui, sans-serif; cursor: pointer; padding: 12px; }
.bv-zoom .bv-fechar { top: 8px; right: 12px; }
.bv-zoom .bv-ant { left: 8px; top: 50%; margin-top: -30px; } .bv-zoom .bv-prox { right: 8px; top: 50%; margin-top: -30px; }

/* miniaturas com largura fixa e alinhadas (painel Miniaturas) */
.bv-gal.bv-auto.bv-gal--grade.bv-al-esq, .bv-gal.bv-auto.bv-gal--grade.bv-al-centro, .bv-gal.bv-auto.bv-gal--grade.bv-al-dir { grid-template-columns: repeat(auto-fill, min(100%, var(--bv-min, 250px))); }
/* alinhada: em linhas (flex) para que a última linha incompleta também fique à esquerda, no centro ou à direita */
@media (min-width: 768px) {
  .bv-gal.bv-auto.bv-gal--grade.bv-al-esq, .bv-gal.bv-auto.bv-gal--grade.bv-al-centro, .bv-gal.bv-auto.bv-gal--grade.bv-al-dir { display: flex; flex-wrap: wrap; }
  .bv-gal.bv-auto.bv-gal--grade.bv-al-esq > .bv-gal-item, .bv-gal.bv-auto.bv-gal--grade.bv-al-centro > .bv-gal-item, .bv-gal.bv-auto.bv-gal--grade.bv-al-dir > .bv-gal-item { flex: 0 0 min(100%, var(--bv-min, 250px)); }
}
.bv-gal.bv-al-esq { justify-content: start; } .bv-gal.bv-al-centro { justify-content: center; } .bv-gal.bv-al-dir { justify-content: end; }
/* mosaico alinhado: galeria.js limita a largura às colunas que cabem; o bloco fica à esquerda, no centro ou à direita */
/* mosaico arrumado pelo galeria.js: cada foto posicionada na coluna mais baixa */
.bv-gal--mosaico.bv-mos-js { columns: auto !important; position: relative; }
.bv-gal--mosaico.bv-mos-js > .bv-gal-item { position: absolute; width: var(--bv-min, 250px); margin: 0; }
.bv-gal--mosaico.bv-al-centro { margin-left: auto; margin-right: auto; } .bv-gal--mosaico.bv-al-dir { margin-left: auto; }
/* foto inteira, sem cortar */
.bv-gal.bv-inteira .bv-gal-item > img, .bv-gal.bv-inteira .bv-gal-item > a > img { object-fit: contain; }
/* efeitos das miniaturas: padrão (bv-ge-*) e ao passar o mouse (bv-gh-*) */
.bv-gal .bv-gal-item img { transition: transform .3s, filter .3s; }
.bv-gal.bv-ge-pb .bv-gal-item img { filter: grayscale(1); } .bv-gal.bv-ge-sepia .bv-gal-item img { filter: sepia(.85); }
.bv-gal.bv-ge-clarear .bv-gal-item img { filter: brightness(1.18); } .bv-gal.bv-ge-escurecer .bv-gal-item img { filter: brightness(.7); }
.bv-gal.bv-ge-desfocar .bv-gal-item img { filter: blur(2px); }
.bv-gal.bv-gh-normal .bv-gal-item:hover img { filter: none; } .bv-gal.bv-gh-pb .bv-gal-item:hover img { filter: grayscale(1); }
.bv-gal.bv-gh-sepia .bv-gal-item:hover img { filter: sepia(.85); } .bv-gal.bv-gh-clarear .bv-gal-item:hover img { filter: brightness(1.18); }
.bv-gal.bv-gh-escurecer .bv-gal-item:hover img { filter: brightness(.7); } .bv-gal.bv-gh-aumentar .bv-gal-item:hover img { transform: scale(1.08); }

/* legendas: título e descrição; quando mostrar e onde */
.bv-gal-tit { display: block; font-weight: 600; }
.bv-gal-desc { display: none; font-size: .87em; opacity: .92; }
.bv-gal.bv-leg-desc .bv-gal-desc { display: block; }
.bv-gal.bv-leg-nunca .bv-gal-item figcaption { display: none; }
.bv-gal.bv-leg-passar .bv-gal-item figcaption { opacity: 0; transition: opacity .25s; }
.bv-gal.bv-leg-passar .bv-gal-item:hover figcaption, .bv-gal.bv-leg-passar .bv-gal-item:focus-within figcaption { opacity: 1; }
.bv-gal.bv-legv-t .bv-gal-item figcaption { top: 0; bottom: auto; }
.bv-gal.bv-legv-m .bv-gal-item figcaption { top: 50%; bottom: auto; transform: translateY(-50%); }
.bv-gal.bv-legh-l .bv-gal-item figcaption { text-align: left; } .bv-gal.bv-legh-r .bv-gal-item figcaption { text-align: right; }
.bv-zoom .bv-zoom-tit { display: block; font-weight: 600; } .bv-zoom .bv-zoom-desc { display: block; font-size: .9em; opacity: .9; margin-top: 4px; }

/* imagem solta que amplia ao clicar (painel Imagem) */
img.bv-ampliar { cursor: zoom-in; }

@media (max-width: 767px) {
  .bv-gal--grade.bv-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bv-gal--mosaico.bv-gal { columns: 2; }
  .bv-gal--carrossel, .bv-gal--miniaturas { max-height: 70vw; }
}
