/**
 * @section Category gallery pages
 *
 * The template styles every `.section-fullpage` as a 100vh fullpage.js slide and
 * clips `.page` with `overflow: hidden`. That works on index.html, where
 * fullpage.js drives the scrolling, but on the standalone category pages it
 * traps a tall gallery grid inside one viewport with no way to scroll.
 * These rules opt the category pages out of that behaviour.
 */
.gallery-page {
	overflow: visible;
}

.gallery-page .section-fullpage:not(.fp-section) {
	display: block;
	height: auto;
	min-height: 100vh;
	padding-top: 100px;
	padding-bottom: 60px;
}

.gallery-page .section-fullpage-title {
	position: static;
	margin-bottom: 40px;
}

.gallery-page .section-fullpage-title + * {
	margin-top: 0;
}

@media (min-width: 768px) {
	.gallery-page .section-fullpage:not(.fp-section) {
		padding-top: 140px;
		padding-bottom: 90px;
	}

	.gallery-page .section-fullpage-title {
		margin-bottom: 50px;
	}
}

@media (min-width: 1200px) {
	.gallery-page .section-fullpage:not(.fp-section) {
		padding-top: 150px;
		padding-bottom: 110px;
	}
}

/**
 * @section Gallery close button
 *
 * Mirrors the navbar toggle on the opposite corner so a visitor can leave a
 * category without opening the menu first.
 */
.gallery-close {
	position: fixed;
	top: 5px;
	left: 5px;
	z-index: 1080;
	display: block;
	width: 48px;
	height: 48px;
	color: #333;
	background: rgba(243, 243, 245, 0.45);
	transition: color 0.3s ease-in-out, background 0.3s ease-in-out;
}

.gallery-close:hover, .gallery-close:focus, .gallery-close:active {
	color: #000;
	background: rgba(243, 243, 245, 0.9);
}

.gallery-close::before, .gallery-close::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 22px;
	height: 2px;
	margin: -1px 0 0 -11px;
	background: currentColor;
	transition: transform 0.3s ease-in-out;
}

.gallery-close::before {
	transform: rotate(45deg);
}

.gallery-close::after {
	transform: rotate(-45deg);
}

.gallery-close:hover::before {
	transform: rotate(135deg);
}

.gallery-close:hover::after {
	transform: rotate(45deg);
}

@media (min-width: 768px) {
	.gallery-close {
		top: 40px;
		left: 40px;
	}
}

@media (min-width: 1200px) {
	.gallery-close {
		top: 50px;
	}
}

/**
 * @section Gallery lightbox
 *
 * Images now carry real `alt` text for screen readers and search engines, but
 * lightGallery echoes it as a caption that collides with the thumbnail toggle.
 * Keep the alt attribute, drop the caption overlay.
 */
.lg-sub-html {
	display: none;
}

/**
 * @section Masonry gallery
 *
 * For categories whose artworks mix portrait and landscape orientations, a
 * fixed-ratio tile would either crop the work or letterbox it heavily. Columns
 * let every piece keep its true proportions.
 */
.gallery-masonry {
	column-count: 2;
	column-gap: 10px;
}

.gallery-masonry .tilter {
	width: 100%;
	margin-bottom: 10px;
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
}

.gallery-masonry .figure-classic img {
	width: 100%;
	height: auto;
}

@media (min-width: 768px) {
	.gallery-masonry {
		column-count: 3;
		column-gap: 30px;
	}

	.gallery-masonry .tilter {
		margin-bottom: 30px;
	}
}
