.the-instagram-icon{
	width: 100%;
	z-index: 30;
	position: absolute;
	top: 50%;
	left: 50%;
	translate: -50% 0%;
}
a.instagram-link{
	display: inline-flex;
	justify-content: center;
	align-items: center;
	padding: 20px 20px;
	text-decoration: none;
	transition: all ease-in-out 0.4s;
	background: var(--default-colour2);
	border-radius: 50%;
	max-width: 110px;
	min-width: 90px;
	width: 100%;
	position: absolute;
	top: 50%;
	left: 50%;
	translate: -50% -50%;
	z-index: 30;
	aspect-ratio: 1/1; 
	pointer-events: none;
}
a.instagram-link:hover{
	background: var(--default-colour1);
}
a.instagram-link svg{
	max-height: 50px;
	width: 100%;
	transition: all ease-in-out 0.4s;
	width: auto;
	fill: var(--default-colour1);
	transition: all ease-in-out 0.4s;
}
a.instagram-link:hover svg{
	fill: var(--default-colour2);
}



aside.image-gallery.aligncenter{
	position: relative;    
	margin: 0 auto 0;
    max-width: var(--wp--style--global--wide-size);
    padding: 0 calc(40px + 4vw);
}
aside.image-gallery.alignwide,
aside.image-gallery.alignfull{
	position: relative;    
	margin: 0 auto 0;
	width: 100%;
}
aside.image-gallery .inner{
	position: relative;
}
aside.image-gallery p{
	margin: 0;
}
ul.image-gallery-holder {
	width: 100%;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(var(--cols, 5), 1fr);
	grid-template-rows: repeat(var(--rows, 2), auto);
	gap: 1px;
	padding: 0;
	margin: 0 0 30px;
	background: var(--default-grey);
	position: relative;
	z-index: 2;
}

ul.image-gallery-holder li {
	width: 100%;
	aspect-ratio: 1/1; 
	overflow: hidden;
	position: relative;
}

ul.image-gallery-holder li a {
	width: 100%;
	display: block;
	aspect-ratio: 1/1;
	overflow: hidden;
	position: relative;
}

ul.image-gallery-holder li img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	position: absolute;
	left: 50%;
	top: 50%;
	filter: grayscale(100%) contrast(150%);
	transform: translate(-50%, -50%);
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  -ms-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
}

ul.image-gallery-holder li img:hover {
	filter: grayscale(0%) contrast(100%);
}


.image-gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex; 
	justify-content: center;
	align-items: center;
	background-color: var(--overlay-color, rgba(0, 0, 0, 0.8));
}

.image-gallery-lightbox:target {
	display: flex;
}

.image-lightbox-overlay {
    background-color: var(--overlay-color, rgba(0, 0, 0, 0.8));
    position: fixed;
    inset: 0;
    z-index: 999999999;
    display: none;
    justify-content: center;
    align-items: center;
}

.close-lightbox {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--close-color, #fff);
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.close-lightbox:hover {
    color: var(--close-hover-color, #deec3a);
}

.image-gallery-lightbox.hidden {
	display: none;
}
.no-image-gallery-images{
	width: 100%;
	padding: 40px;
}
.no-image-gallery-images p{
	width: 100%;
	border: 1px solid #dedede;
	text-align: center;
	display: block;
	padding: 20px;
}

@media screen and (max-width: 850px) {
	ul.image-gallery-holder {
		grid-template-columns: repeat(3, 1fr);
		grid-template-rows: repeat(3, auto);
	}

	ul.image-gallery-holder[style*="--total-count: 8"], 
	ul.image-gallery-holder[style*="--total-count: 7"], 
	ul.image-gallery-holder[style*="--total-count: 6"] {
		grid-template-columns: repeat(3, 1fr);
		grid-template-rows: repeat(2, auto);
	}
	ul.image-gallery-holder[style*="--total-count: 8"] li:nth-child(7), 
	ul.image-gallery-holder[style*="--total-count: 8"] li:nth-child(8), 
	ul.image-gallery-holder[style*="--total-count: 7"] li:nth-child(7){
		display: none;
	}

}


@media screen and (max-width: 650px) {
	ul.image-gallery-holder[style*="--total-count: 8"], 
	ul.image-gallery-holder[style*="--total-count: 7"], 
	ul.image-gallery-holder[style*="--total-count: 6"]  {
		/* 2x3 grid for all cases */
		grid-template-columns: repeat(2, 1fr);
		grid-template-rows: repeat(3, auto);
	}
}
@media screen and (max-width: 400px) {
	ul.image-gallery-holder[style*="--total-count: 8"], 
	ul.image-gallery-holder[style*="--total-count: 7"], 
	ul.image-gallery-holder[style*="--total-count: 6"]  {
		/* 2x3 grid for all cases */
		grid-template-columns: repeat(2, 1fr);
		grid-template-rows: repeat(4, auto);
	}
	ul.image-gallery-holder[style*="--total-count: 8"] li:nth-child(7), 
	ul.image-gallery-holder[style*="--total-count: 8"] li:nth-child(8), 
	ul.image-gallery-holder[style*="--total-count: 7"] li:nth-child(7){
		display: block;
	}
}