/* Massagista single — Galeria: orientation-aware layout.
 * Desktop/tablet: 2-column grid; horizontal (landscape) photos span both
 * columns (full width), vertical (portrait) photos stay single-column so
 * two of them naturally sit side by side.
 * Mobile: always 1 column, 1 photo per row, regardless of orientation. */
.dm2027-lightbox-gallery {
	display: grid;
	grid-template-columns: repeat( 2, 1fr );
	gap: 10px;
	margin-top: 10px; /* colapsa com o margin-bottom do texto "Fotos cedidas..." (10px, ver single-massagista.css .dm2027-ms-photo-credit) — mantém a distância simétrica em cima e em baixo desse texto. */
}

.dm2027-lightbox-gallery .dm2027-gallery-h {
	grid-column: 1 / -1;
}

.dm2027-lightbox-gallery .dm2027-gallery-h img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
	object-fit: cover;
}

/* Duas verticais lado a lado ficam sempre com a MESMA altura (aspect-ratio
 * fixo + object-fit:cover), em vez de cada uma manter a sua própria altura
 * intrínseca — senão a linha fica desalinhada quando os retratos originais
 * têm proporções diferentes. */
.dm2027-lightbox-gallery .dm2027-gallery-v img {
	width: 100%;
	height: 100%;
	aspect-ratio: 3 / 4;
	display: block;
	border-radius: 4px;
	object-fit: cover;
}

/* A lone trailing vertical photo (odd one out, no pair to sit beside) —
 * centred at single-column width instead of stretching or hugging the left. */
.dm2027-lightbox-gallery .dm2027-gallery-v-last {
	grid-column: 1 / -1;
	display: flex;
	justify-content: center;
}

.dm2027-lightbox-gallery .dm2027-gallery-v-last img {
	width: 50%;
}

@media ( max-width: 600px ) {
	.dm2027-lightbox-gallery {
		grid-template-columns: 1fr;
	}

	.dm2027-lightbox-gallery .dm2027-gallery-h,
	.dm2027-lightbox-gallery .dm2027-gallery-v {
		grid-column: auto;
	}

	.dm2027-lightbox-gallery .dm2027-gallery-v img {
		aspect-ratio: auto; /* 1 por linha em mobile — não há par para alinhar, mantém a proporção original. */
		height: auto;
	}

	.dm2027-lightbox-gallery .dm2027-gallery-v-last img {
		width: 100%;
	}
}
