.sgal-galeria-wrap {
	--sgal-gap: 18px;
	width: 100%;
	margin: 1.5rem 0;
}

.sgal-titulo {
	margin: 0 0 1rem;
}

.sgal-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-flow: dense;
	grid-auto-rows: 8px;
	column-gap: var(--sgal-gap);
	row-gap: 8px;
}

.sgal-item {
	width: 100%;
	aspect-ratio: var(--sgal-aspect-ratio, 4 / 3);
	align-self: start;
	margin: 0;
	overflow: hidden;
	border: 0;
	border-radius: 0;
	background: #eee;
	box-shadow: none;
}

.sgal-abrir {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0 !important;
	border-radius: 0;
	background: transparent;
	box-shadow: none !important;
	cursor: zoom-in;
}

.sgal-imagem {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	border: 0 !important;
	border-radius: 0;
	object-fit: contain;
	box-shadow: none !important;
	transition: transform 240ms ease, filter 240ms ease;
}

.sgal-abrir:hover .sgal-imagem,
.sgal-abrir:focus-visible .sgal-imagem {
	transform: scale(1.12);
	filter: brightness(.72);
}

.sgal-abrir:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: -3px;
}

.sgal-lightbox {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 28px;
	border: 0;
	background: rgba(0, 0, 0, .9);
}

.sgal-lightbox[hidden] {
	display: none;
}

.sgal-lightbox__conteudo {
	position: relative;
	max-width: min(1100px, 94vw);
	max-height: 90vh;
	margin: 0;
	text-align: center;
}

.sgal-lightbox__imagem {
	display: block;
	max-width: 100%;
	max-height: 82vh;
	margin: auto;
	object-fit: contain;
}

.sgal-lightbox__legenda {
	margin: 10px 0 0;
	color: #fff;
	font-size: 15px;
}

.sgal-lightbox__fechar {
	position: fixed;
	top: 15px;
	right: 18px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .65);
	border-radius: 50%;
	background: rgba(0, 0, 0, .35);
	color: #fff;
	font: 32px/1 sans-serif;
	cursor: pointer;
}

.sgal-lightbox__fechar:hover,
.sgal-lightbox__fechar:focus-visible {
	background: #fff;
	color: #111;
}

.sgal-aviso {
	padding: 12px 14px;
	border-left: 4px solid #dba617;
	background: #fff8df;
}

body.sgal-sem-scroll {
	overflow: hidden;
}

.sgal-galeria-wrap .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 780px) {
	.sgal-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.sgal-grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sgal-imagem {
		transition: none;
	}
}
