/*
 * Portfolio grid and filter bar, matching the GridStack theme
 * (values taken from gridstack/style.css and the live site).
 */

/* Filter bar -- GridStack "ul.filter" */
.glow-filter-nav {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}
.glow-filter-nav li {
	margin: 0;
}
.glow-filter-nav a {
	display: inline-block;
	padding: 8px;
	font-family: Raleway, arial, sans-serif;
	font-size: 12px;
	line-height: 1.2;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-decoration: none;
	color: #999;
	border: 1px solid transparent;
}
.glow-filter-nav a:hover,
.glow-filter-nav a:focus,
.glow-filter-nav .current-cat > a,
.glow-filter-nav .glow-filter-all.is-current > a {
	color: #999;
	border-color: #dcdcdc;
}

/* Grid -- GridStack liquid isotope: 5/4/3/2/1 columns, 4px gutters.
 * The repeated class outranks core's 1-column rule below 600px. */
.glow-portfolio-grid .wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid {
	gap: 4px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 300px) {
	.glow-portfolio-grid .wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
@media (min-width: 601px) {
	.glow-portfolio-grid .wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media (min-width: 901px) {
	.glow-portfolio-grid .wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
@media (min-width: 1201px) {
	.glow-portfolio-grid .wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

/* Tile -- GridStack ".postphoto" */
.glow-portfolio-grid .wp-block-post {
	position: relative;
	overflow: hidden;
	margin: 0;
	background: #222;
}
.glow-portfolio-grid .wp-block-post-featured-image {
	margin: 0;
}
.glow-portfolio-grid .wp-block-post-featured-image a {
	display: block;
	background: #222;
}
.glow-portfolio-grid .wp-block-post-featured-image img {
	display: block;
	transition: all 0.45s ease-in-out;
}

/* Hover overlay -- GridStack "div.overlay" */
.glow-portfolio-grid .wp-block-post-featured-image a::after {
	content: "";
	position: absolute;
	inset: 0;
	background: #333;
	opacity: 0;
	transition: opacity 0.45s ease-in-out;
}
.glow-portfolio-grid .wp-block-post:hover img,
.glow-portfolio-grid .wp-block-post:focus-within img {
	filter: grayscale(100%) opacity(0.5);
}
.glow-portfolio-grid .wp-block-post:hover .wp-block-post-featured-image a::after,
.glow-portfolio-grid .wp-block-post:focus-within .wp-block-post-featured-image a::after {
	opacity: 0.5;
}

/* Title over the image, shown on hover -- GridStack "div.title h2" */
.glow-portfolio-grid .wp-block-post-title {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0 50px;
	text-align: center;
	font-family: Raleway, arial, sans-serif;
	font-size: 20px;
	font-weight: 300;
	line-height: 26px;
	letter-spacing: normal;
	color: #fff;
	opacity: 0;
	transition: opacity 0.45s ease-in-out;
	pointer-events: none;
}
.glow-portfolio-grid .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}
.glow-portfolio-grid .wp-block-post:hover .wp-block-post-title,
.glow-portfolio-grid .wp-block-post:focus-within .wp-block-post-title {
	opacity: 1;
}

/* No featured image -- GridStack ".noimages": title always visible */
.glow-portfolio-grid .wp-block-post:not(.has-post-thumbnail) .wp-block-post-title {
	position: relative;
	padding: 50px 20px;
	opacity: 1;
	pointer-events: auto;
}

/* Slideshow -- [gallery type="slideshow"], styled like GridStack's bxSlider */
.glow-slideshow {
	position: relative;
	margin: 0 0 3rem;
}
.glow-slideshow__slide {
	margin: 0 0 4px;
}
.glow-slideshow__slide img {
	display: block;
	width: 100%;
	height: auto;
}
.glow-slideshow.is-ready .glow-slideshow__track {
	display: grid;
}
.glow-slideshow.is-ready .glow-slideshow__slide {
	grid-area: 1 / 1;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease-in-out, visibility 0s linear 0.6s;
}
.glow-slideshow.is-ready .glow-slideshow__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.6s ease-in-out;
}
.glow-slideshow__arrow,
.glow-slideshow__dots {
	display: none;
}
.glow-slideshow.is-ready:not(.is-single) .glow-slideshow__arrow {
	display: block;
}
.glow-slideshow.is-ready:not(.is-single) .glow-slideshow__dots {
	display: flex;
}
.glow-slideshow__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 50px;
	height: 68px;
	margin-top: -34px;
	padding: 0;
	border: 0;
	background: rgba(0, 0, 0, 0.4);
	cursor: pointer;
	transition: background 0.3s;
}
.glow-slideshow__arrow:hover,
.glow-slideshow__arrow:focus-visible {
	background: rgba(0, 0, 0, 0.7);
}
.glow-slideshow__arrow::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 14px;
	border-top: 2px solid #fff;
	border-left: 2px solid #fff;
}
.glow-slideshow__arrow--prev {
	left: 0;
}
.glow-slideshow__arrow--prev::before {
	transform: translate(-30%, -50%) rotate(-45deg);
}
.glow-slideshow__arrow--next {
	right: 0;
}
.glow-slideshow__arrow--next::before {
	transform: translate(-70%, -50%) rotate(135deg);
}
.glow-slideshow__dots {
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}
.glow-slideshow__dot {
	width: 12px;
	height: 12px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 14px;
	background: rgba(0, 0, 0, 0.25);
	cursor: pointer;
}
.glow-slideshow__dot:hover,
.glow-slideshow__dot[aria-current="true"] {
	background: rgba(0, 0, 0, 0.6);
}
@media (prefers-reduced-motion: reduce) {
	.glow-slideshow.is-ready .glow-slideshow__slide,
	.glow-slideshow.is-ready .glow-slideshow__slide.is-active {
		transition: none;
	}
}

/* Lightbox -- gallery images (replaces GridStack's Magnific Popup) */
html.glow-lightbox-open {
	overflow: hidden;
}
.glow-lightbox {
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
}
.glow-lightbox::backdrop {
	background: rgba(11, 11, 11, 0.85);
}
.glow-lightbox__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	margin: 0;
	padding: 40px 70px;
	box-sizing: border-box;
}
.glow-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 110px);
	width: auto;
	height: auto;
	box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
}
.glow-lightbox__counter {
	margin-top: 10px;
	font-family: Raleway, arial, sans-serif;
	font-size: 12px;
	line-height: 18px;
	color: #ccc;
}
.glow-lightbox__btn,
.glow-lightbox__close {
	position: absolute;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	opacity: 0.65;
	transition: opacity 0.2s;
}
.glow-lightbox__btn:hover,
.glow-lightbox__btn:focus-visible,
.glow-lightbox__close:hover,
.glow-lightbox__close:focus-visible {
	opacity: 1;
}
.glow-lightbox__btn {
	top: 50%;
	width: 60px;
	height: 110px;
	margin-top: -55px;
}
.glow-lightbox__btn::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	border-top: 2px solid #fff;
	border-left: 2px solid #fff;
}
.glow-lightbox__prev {
	left: 0;
}
.glow-lightbox__prev::before {
	transform: translate(-30%, -50%) rotate(-45deg);
}
.glow-lightbox__next {
	right: 0;
}
.glow-lightbox__next::before {
	transform: translate(-70%, -50%) rotate(135deg);
}
.glow-lightbox.is-single .glow-lightbox__btn {
	display: none;
}
.glow-lightbox__close {
	top: 0;
	right: 0;
	width: 44px;
	height: 44px;
	font-size: 28px;
	line-height: 44px;
	font-family: arial, sans-serif;
}
@media (max-width: 600px) {
	.glow-lightbox__figure {
		padding: 50px 10px;
	}
	.glow-lightbox__btn {
		width: 44px;
	}
}

/* Grid galleries -- [gallery] without a type: a masonry layout of whole images
 * (replaces GridStack's gallery styles). Column count follows the
 * gallery's own setting, capped at 3 so images stay readable. */
.gallery {
	--glow-gallery-cols: 3;
	columns: var(--glow-gallery-cols);
	column-gap: 12px;
	margin: 0 0 var(--glow-space, 48px);
	padding: 0;
}
.wp-block-post-content > .gallery {
	max-width: var(--wp--style--global--wide-size, 960px);
}
.gallery.gallery-columns-1 {
	--glow-gallery-cols: 1;
}
.gallery.gallery-columns-2 {
	--glow-gallery-cols: 2;
}
.gallery .gallery-item {
	display: block;
	float: none !important;
	width: auto !important;
	margin: 0 0 12px;
	break-inside: avoid;
}
.gallery .gallery-icon a {
	display: block;
	cursor: zoom-in;
}
.gallery .gallery-icon img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid #eaeaea;
	transition: opacity 0.3s;
}
.gallery .gallery-icon a:hover img,
.gallery .gallery-icon a:focus-visible img {
	opacity: 0.85;
}
.gallery .gallery-caption {
	margin: 6px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: #999;
}
.gallery br {
	display: none;
}
@media (max-width: 900px) {
	.gallery {
		--glow-gallery-cols: 2;
	}
	.gallery.gallery-columns-1 {
		--glow-gallery-cols: 1;
	}
}
@media (max-width: 480px) {
	.gallery,
	.gallery.gallery-columns-2 {
		--glow-gallery-cols: 1;
	}
}

/* The label right before a gallery ("Promo Card") */
.glow-gallery-label {
	max-width: var(--wp--style--global--wide-size, 960px);
	margin: var(--glow-space, 48px) 0 16px !important;
	padding-bottom: 12px;
	border-bottom: 1px solid #eaeaea;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #000;
}
