/* -------------------------------------------------------------------------- */
/*                               Photo galleries                              */
/* -------------------------------------------------------------------------- */

/* -------------------------- Square images gallery ------------------------- */

@media screen and (min-width: 768px) {
	.img-gallery.squares {
		width: 90vw;
	}

	/* .img-gallery.squares .item:nth-child(8n+4), .img-gallery.squares .item:nth-child(8n+5) {
		grid-column: span 2;
		aspect-ratio: 2/1;
	} */
}

@media screen and (max-width: 768px) {
	.img-gallery.squares {
		width: 95vw;
	}

	/* .img-gallery.squares .item:nth-child(4n) {
		grid-column: span 2;
		aspect-ratio: 2/1;
	} */

	/* .ytb-gallery .item:nth-child(9) {
		display: none !important;
	} */
}

.img-gallery.squares {
	margin: 3rem auto 0;
	display: grid;
	grid-column-gap: 1vw;
	grid-row-gap: 1vw;
	grid-auto-flow: row dense;
}

.img-gallery.squares .item {
	width: 100%; height: 100%;
	display: block;
	aspect-ratio: 1/1;
	object-fit: cover;
}
.img-gallery.squares .item:hover {
	transform: scale(1.1);
	z-index: 1;
}

/* --------------------------- Tall images gallery -------------------------- */

.img-gallery.tall {
	display: grid;
	grid-auto-flow: row dense;
	gap: 1vw;

    margin: 2rem auto 0;
}

.img-gallery.tall .item {
	display: block;
	aspect-ratio: 4/3;
	width: 100%; height: 100%;
	object-fit: cover;
	object-position: center;
    margin: .5%;
    border-radius: 1rem;
    transition: transform .25s ease-in-out, filter .25s ease-in-out;
}

.img-gallery.tall .item:hover {
    transform: scale(1.05);
    filter: brightness(.9);
	z-index: 2;
}

@media screen and (min-width: 768px) {
    .img-gallery.tall {
        width: 80vw;
		grid-template-columns: repeat(5, 1fr);
		grid-auto-columns: 16vw;
		grid-auto-rows: 12vw;
    }
}

@media screen and (max-width: 768px) {
    .img-gallery.tall {
        width: 95vw;
		grid-template-columns: repeat(3, 1fr);
		grid-auto-columns: 30vw;
		grid-auto-rows: 22.5vw;
    }
}

/* ----------------------------- Classic gallery ---------------------------- */

.img-gallery.classic {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.img-gallery.classic .item {
    max-height: 15rem;
    max-width: 20%;
    margin: .5rem;
	border-radius: 1rem;
	transition: transform .25s ease-in-out, filter .25s ease-in-out;
}
.img-gallery.classic .item:hover {
	transform: scale(1.05);
	filter: brightness(.9);
}

/* -------------------------------------------------------------------------- */
/*                           YouTube videos gallery                           */
/* -------------------------------------------------------------------------- */

@media screen and (min-width: 768px) {
	.ytb-gallery {
		width: 90vw;
		grid-column-gap: 1vw;
		grid-row-gap: 1vw;
	}

	.ytb-gallery.cols-1 {
		grid-template-columns: repeat(1, 1fr);
	}
	.ytb-gallery.cols-2 {
		grid-template-columns: repeat(2, 1fr);
	}
	.ytb-gallery.cols-3 {
		grid-template-columns: repeat(3, 1fr);
	}
	.ytb-gallery.cols-4 {
		grid-template-columns: repeat(4, 1fr);
	}


	.ytb-gallery .item.thumbnail::before {
		position: absolute; top: calc(50% - 1.74rem); left: calc(50% - 1.4rem);
		border-top: 1.74rem solid transparent;
		border-bottom: 1.74rem solid transparent;
		border-left: 3rem solid rgba(255,255,255,.9);
	}
}

@media screen and (max-width: 768px) {
	.ytb-gallery {
		width: 70vw;
		grid-template-columns: repeat(1, 1fr);
		grid-row-gap: 1rem;
	}

    .ytb-gallery .item.thumbnail::before {
        position: absolute; top: calc(50% - 1.16rem); left: calc(50% - 1rem);
        border-top: 1.16rem solid transparent;
        border-bottom: 1.16rem solid transparent;
        border-left: 2rem solid rgba(255,255,255,.9);
    }

    .ytb-gallery .item:nth-child(9) {
        display: none !important;
    }
}

.ytb-gallery {
	margin: 0 auto;
	display: grid;
	grid-auto-flow: row dense;
}

.ytb-gallery .item {
	display: block;
	aspect-ratio: 16/9;
	object-fit: cover;
	border: none;
    border-radius: 1rem;
	width: 100%; height: 100%;
}

.ytb-gallery .item.thumbnail {
	cursor: pointer;
	position: relative;
	display: block;
	margin: 0;
}

.ytb-gallery .item.thumbnail img {
	width: 100%; height: 100%;
	display: block;
	aspect-ratio: 16/9;
	object-fit: cover;
	border: none;
    border-radius: 1rem;
}

.ytb-gallery .item.thumbnail::before {
	content: '';
	display: block;
	pointer-events: none;
	z-index: 2;
}

.ytb-gallery .item figcaption {
	position: absolute; top: 0; left: 0; z-index: 1;
	display: flex; flex-direction: column;
	justify-content: flex-start;
	align-items: center;
	color: #fff;
	font-family: Poppins, Arial, sans-serif;
	font-size: 1.25rem;
	text-align: center;
	text-shadow: 0 0 .1em #000;
}

.ytb-gallery .item .type {
	margin: 0;
	color: #fff;
	text-shadow: 0 0 .1em #000;
	text-transform: uppercase;
}

@media screen and (min-width: 768px) {
	.ytb-gallery .item figcaption {
		padding: 1rem;
		font-size: 1.5rem;
		width: calc(100% - 2rem); height: calc(100% - 2rem);
	}

	.ytb-gallery .item .type {
		position: absolute; bottom: 1rem; left: 1rem; z-index: 1;
		font-size: 1rem;
	}
}

@media screen and (max-width: 768px) {
	.ytb-gallery .item figcaption {
		padding: .5rem;
		font-size: 1rem;
		width: calc(100% - 1rem); height: calc(100% - 1rem);
	}

	.ytb-gallery .item .type {
		position: absolute; bottom: .5rem; left: .5rem; z-index: 1;
		font-size: .8rem;
	}
}