/* vars */

:root {
	/* set minimum image width using clamp calculator: https://websemantics.uk/tools/responsive-font-calculator */
	/*
	--min-gallery-img-size: clamp(30rem, calc(30rem + ((1vw - 0.32rem) * 4.4643)), 40rem);
	*/
	--min-gallery-img-size: clamp(25rem, calc(25rem + ((1vw - 0.32rem) * 4.4643)), 35rem);
	
	/* set plyr properties: https://github.com/sampotts/plyr */
	/*
	--plyr-color-main: var(--primary);
	*/
}

.photo-gallery__inner,
.video-gallery__inner {
	/*
	aspect-ratio: 3 / 2;
	max-width: 60vw;
	*/
}
.photo-gallery figure,
.video-gallery figure {
	margin: 0;
}

.photo-gallery:not(.ct-section):not(.oxy-easy-posts),
.photo-gallery.oxy-easy-posts .oxy-posts,
.photo-gallery.ct-section .ct-section-inner-wrap,
.video-gallery:not(.ct-section):not(.oxy-easy-posts),
.video-gallery.oxy-easy-posts .oxy-posts,
.video-gallery.ct-section .ct-section-inner-wrap {
	display: grid !important;
	align-items: stretch;
	grid-template-columns: repeat(auto-fill, minmax(min(var(--min-gallery-img-size), 100%) , 1fr));
	grid-column-gap: var(--space-l);
	grid-row-gap: var(--space-l);
}


/* ensure images are responsive */
.photo-gallery__img,
.video-gallery__poster-img,
.lightbox-photo-gallery__img {
	min-width: 100%;
	height: auto;
}
.photo-gallery__img,
.video-gallery__poster-img {
	/*
	overflow: hidden;
	*/
	object-fit: cover;
}
.overlay-icon__bg,
.overlay-icon {
	position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
}
.overlay-icon__bg {
	background-color: var(--primary);
	width: 5rem;
	height: 5rem;
	border-radius: 50%;
	/* border: 2px solid white; */
	z-index: 2;
}
.overlay-icon {
	z-index: 3;
    height: auto;
    line-height: 1rem;
}
.overlay-icon__plus {
    width: 2rem;
}
.overlay-icon__play {
    width: 1.5rem;
    margin-left: 0.1rem;
}
.overlay-icon svg path {
	fill: white;
}
.photo-gallery__img,
.video-gallery__poster-img,
.overlay-icon__bg,
.overlay-icon {
	will-change: transform;
	transition: transform 200ms;
}

/*
.overlay-icon__plus {
    width: 2rem;
    height: 2.85rem;
}
.overlay-icon__play {
    width: 1.5rem;
    height: 3.2rem;
}
*/

.photo-gallery__lightbox-trigger,
.video-gallery__link {
	position: relative;
	/*
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	*/
	overflow: hidden;
	border-radius: var(--radius-m);
}
.photo-gallery__lightbox-trigger:hover,
.video-gallery__link:hover {
	cursor: pointer;
}
.photo-gallery__lightbox-trigger:hover .photo-gallery__img,
.video-gallery__link:hover .video-gallery__poster-img {
	transform: scale(1.05);
	transition: transform 500ms;
}
.photo-gallery__lightbox-trigger:hover .overlay-icon__bg,
.photo-gallery__lightbox-trigger:hover .overlay-icon,
.video-gallery__link:hover .overlay-icon__bg,
.video-gallery__link:hover .overlay-icon {
	transform: scale(1.5) translate(-32.5%, -32.5%);
	transition: transform 200ms;
}



/* OxyExtras lightbox navigation icon customisation */
.oxy-lightbox .fancybox-navigation .fancybox-button {
	padding-top: 1.25rem;
	padding-bottom: 1.25rem;
}

/* GLightbox navigation icon customisation */
.glightbox-clean .gclose {
	top: 2rem;
	right: 2rem;
}
.glightbox-clean .gnext,
.glightbox-clean .gprev {
	margin-right: -1rem;
	margin-left: -1rem;
}
/* push navigation arrows to edge of window at smaller screens – FAIL they don't appear below 768px */
/*
@media (max-width: 767px) {
	.glightbox-clean .gnext,
	.glightbox-clean .gprev {
		margin-right: -3rem;
		margin-left: -3rem;
	}
}
*/