/* Galeria de eventos — grade de álbuns e página do álbum, no estilo do Flickr. */

/* ---------- Grade de álbuns ---------- */
.aean-albuns { display: grid; grid-template-columns: repeat(var(--aean-colunas, 4), minmax(0, 1fr)); gap: 36px 26px; margin: 18px 0 30px; padding: 0; }
.aean-albuns--1 { --aean-colunas: 1; }
.aean-albuns--2 { --aean-colunas: 2; }
.aean-albuns--3 { --aean-colunas: 3; }
.aean-albuns--4 { --aean-colunas: 4; }
.aean-albuns--5 { --aean-colunas: 5; }
.aean-albuns--6 { --aean-colunas: 6; }

.aean-album { position: relative; display: block; aspect-ratio: 1 / 1; color: #fff; text-decoration: none; }
.aean-album:hover, .aean-album:focus { color: #fff; text-decoration: none; }
/* "pilha" de fotos atrás da capa, como no Flickr */
.aean-album::before,
.aean-album::after { content: ""; position: absolute; height: 5px; border: 1px solid rgba(37, 36, 137, .22); border-bottom: 0; border-radius: 3px 3px 0 0; background: #fff; }
.aean-album::before { top: -6px; left: 4%; right: 4%; }
.aean-album::after { top: -11px; left: 8%; right: 8%; }

.aean-album__capa { position: absolute; inset: 0; overflow: hidden; border-radius: 3px; background: #dfe2ec; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.aean-album__capa img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.aean-album:hover .aean-album__capa img,
.aean-album:focus .aean-album__capa img { transform: scale(1.05); }
/* miniatura do YouTube vem em 4:3 com tarjas pretas: amplia para cortá-las no cartão quadrado */
.aean-album__capa .aean-album__img--video { transform: scale(1.34); }
.aean-album:hover .aean-album__capa .aean-album__img--video,
.aean-album:focus .aean-album__capa .aean-album__img--video { transform: scale(1.4); }

.aean-album__info { position: absolute; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; gap: 6px; padding: 70px 18px 16px; border-radius: 0 0 3px 3px; background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, .45) 55%, rgba(0, 0, 0, 0)); }
.aean-album__titulo { display: -webkit-box; overflow: hidden; color: #fff; font-size: 19px; font-weight: 500; line-height: 1.25; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.aean-album__meta { color: rgba(255, 255, 255, .92); font-size: 13px; font-weight: 600; }
.aean-album:focus-visible { outline: 3px solid #252489; outline-offset: 4px; }

.aean-albuns-paginas { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 30px; }
.aean-albuns-paginas .page-numbers { display: inline-block; min-width: 40px; padding: 8px 14px; border: 1px solid #e1e3ec; border-radius: 6px; color: #252489; font-weight: 500; text-align: center; text-decoration: none; }
.aean-albuns-paginas .page-numbers.current,
.aean-albuns-paginas a.page-numbers:hover { border-color: #252489; background: #252489; color: #fff; }
.aean-albuns-vazio { padding: 16px; border: 1px dashed #c3c4c7; border-radius: 6px; color: #50575e; text-align: center; }

@media (max-width: 1100px) {
	.aean-albuns--4, .aean-albuns--5, .aean-albuns--6 { --aean-colunas: 3; }
}
@media (max-width: 820px) {
	.aean-albuns { gap: 30px 18px; }
	.aean-albuns--3, .aean-albuns--4, .aean-albuns--5, .aean-albuns--6 { --aean-colunas: 2; }
	.aean-album__info { padding: 50px 12px 12px; }
	.aean-album__titulo { font-size: 16px; }
	.aean-album__meta { font-size: 12px; }
}
@media (max-width: 380px) {
	.aean-albuns { --aean-colunas: 1 !important; }
}

/* ---------- Página do álbum ---------- */
.aean-gal-album { padding-top: 50px; }
.aean-gal-resumo { margin: 0 0 10px; color: #6b6b6b; font-size: 15px; font-weight: 500; }
.aean-gal-descricao { max-width: 900px; margin: 0 0 24px; color: #555; font-size: 16px; line-height: 1.7; }
.aean-gal-descricao p:last-child { margin-bottom: 0; }
.aean-gal-voltar { margin: 34px 0 0; }
.aean-gal-voltar a { color: #252489; font-weight: 600; text-decoration: none; }
.aean-gal-voltar a:hover { text-decoration: underline; }
.aean-gal-vazio { color: #666; }

/* grade justificada: cada item cresce na proporção da foto, e todas as fotos de uma linha ficam com a mesma altura */
.aean-gal-grade { --aean-altura: 230px; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.aean-gal-grade::after { content: ""; flex-grow: 999999; }
.aean-gal-item { position: relative; display: block; flex-grow: calc(var(--w) / var(--h) * 100); width: calc(var(--w) / var(--h) * var(--aean-altura)); overflow: hidden; border-radius: 3px; background: #e6e8f0; cursor: zoom-in; }
.aean-gal-item::before { content: ""; display: block; padding-top: calc(var(--h) / var(--w) * 100%); }
.aean-gal-item img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .3s; }
.aean-gal-item:hover img { transform: scale(1.03); filter: brightness(1.06); }
.aean-gal-item:focus-visible { outline: 3px solid #252489; outline-offset: 2px; }

.aean-gal-item--video { cursor: pointer; }
.aean-gal-item--video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 45%); }
.aean-gal-play { position: absolute; top: 50%; left: 50%; z-index: 2; width: 62px; height: 44px; margin: -22px 0 0 -31px; border-radius: 12px; background: rgba(204, 0, 0, .92); box-shadow: 0 3px 12px rgba(0, 0, 0, .35); transition: transform .2s; }
.aean-gal-play::after { content: ""; position: absolute; top: 12px; left: 25px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.aean-gal-item--video:hover .aean-gal-play { transform: scale(1.08); }
.aean-gal-item-titulo { position: absolute; right: 12px; bottom: 10px; left: 12px; z-index: 2; overflow: hidden; color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }

@media (max-width: 1024px) {
	.aean-gal-grade { --aean-altura: 170px; }
}
@media (max-width: 767px) {
	.aean-gal-album { padding-top: 30px; }
	/* altura-base proporcional à tela: 2 a 3 fotos por linha no celular */
	.aean-gal-grade { --aean-altura: clamp(80px, 25vw, 170px); gap: 4px; }
	.aean-gal-play { width: 48px; height: 34px; margin: -17px 0 0 -24px; border-radius: 9px; }
	.aean-gal-play::after { top: 9px; left: 19px; border-width: 8px 0 8px 13px; }
}

/* ---------- Visualização em tela cheia ---------- */
html.aean-lb-aberto { overflow: hidden; }
.aean-lb { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; background: rgba(8, 8, 18, .94); color: #fff; }
.aean-lb[hidden] { display: none; }
.aean-lb__palco { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 64px 84px 70px; box-sizing: border-box; }
.aean-lb__img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .25s; }
.aean-lb__img.carregada { opacity: 1; }
.aean-lb__video { position: relative; width: min(1200px, 100%); max-height: 100%; aspect-ratio: 16 / 9; background: #000; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.aean-lb__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.aean-lb__carregando { position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: aean-gira .8s linear infinite; }
.aean-lb__carregando[hidden] { display: none; }
@keyframes aean-gira { to { transform: rotate(360deg); } }

.aean-lb__topo { position: absolute; top: 0; right: 0; left: 0; display: flex; align-items: center; gap: 18px; height: 56px; padding: 0 12px 0 22px; }
.aean-lb__contador { font-size: 14px; opacity: .85; }
.aean-lb__original { margin-left: auto; color: #fff; font-size: 14px; opacity: .85; text-decoration: none; }
.aean-lb__original:hover { color: #fff; opacity: 1; text-decoration: underline; }
.aean-lb__fechar,
.aean-lb__nav { border: 0; background: transparent; color: #fff; cursor: pointer; opacity: .85; transition: opacity .15s, background .15s; }
.aean-lb__fechar:hover, .aean-lb__nav:hover,
.aean-lb__fechar:focus-visible, .aean-lb__nav:focus-visible { opacity: 1; background: rgba(255, 255, 255, .12); }
.aean-lb__fechar { width: 44px; height: 44px; border-radius: 50%; font-size: 30px; line-height: 44px; }
.aean-lb__nav { position: absolute; top: 50%; width: 60px; height: 80px; margin-top: -40px; border-radius: 6px; font-size: 54px; line-height: 76px; }
.aean-lb__nav--ant { left: 12px; }
.aean-lb__nav--prox { right: 12px; }
.aean-lb__nav[hidden] { display: none; }
.aean-lb__legenda { position: absolute; right: 0; bottom: 0; left: 0; min-height: 22px; padding: 16px 24px 22px; font-size: 15px; text-align: center; opacity: .9; }

@media (max-width: 767px) {
	.aean-lb__palco { padding: 56px 0 64px; }
	.aean-lb__nav { width: 44px; height: 64px; margin-top: -32px; font-size: 40px; line-height: 60px; background: rgba(0, 0, 0, .25); }
	.aean-lb__nav--ant { left: 4px; }
	.aean-lb__nav--prox { right: 4px; }
	.aean-lb__img { border-radius: 0; }
}
