/*
    * Project : 'Filterable Gallery with Lightbox'
    * Built by : 'Gulshan Songara'
*/


.overflow_hide {
    overflow: hidden;
}

/*--====== Gallery Section ======--*/
#gallery {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.gallery-container {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.gallery_wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 4rem;
}
	

@media (max-width: 1024px) {
    .gallery_wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
	
	.column-gallery {
    	float: left;
    	width: 47%;
    	display: none;
	}
}

@media (max-width: 768px) {
    .gallery_wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
	
	.column-gallery {
    	float: left;
    	width: 47%;
    	display: none;
	}
	
	.gallery_item {
   		border-radius: 0px;
    	overflow: hidden;
		margin:4px;
	}
	
}

@media (max-width: 430px) {
    .gallery_wrapper {
        grid-template-columns: repeat(1, 1fr);
        gap: 0.5rem;
    }
	
	.column-gallery {
    	float: left;
    	width: 100%;
    	display: none;
	}
	
	.gallery_item {
   		border-radius: 0px;
    	overflow: hidden;
		margin:4px;
	}
	
}

.gallery_item {
    border-radius: 0px;
    overflow: show;
    margin: 8px;
}

/* when the gallery_item has 'show' class */
.gallery_item.show {
    animation: fadeIn 0.4s ease-in;
}

.gallery_item.show .item_desc {
	color: #fff;
}

h4.item_desc {
	font-size: 24px;
	font-weight: 700;
	line-height: 24px;
	color: #fff;
	margin-bottom: 0px;
	height: auto;
}

p.item_desc {
	font-size: 16px;
	font-weight: 300;
	line-height: 16px;
	height: auto;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* when the gallery_item has 'hide' class */
.gallery_item.hide {
    display: none;
}

.gallery_item img {
    transition: transform 0.3s ease;
	width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
	border: 1px #ccc solid;
}

.gallery_item:hover img {
    transform: scale(1.1);
	cursor: pointer;
}

.gallery_item video {
    transition: transform 0.3s ease;
	width: 100%;
    height: 100%;
    object-fit: scale-down;
    vertical-align: middle;
	border: 1px #ccc solid;
}

.gallery_item:hover video {
    transform: scale(1.1);
	cursor: pointer;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow-x: hidden;
    overflow-y: auto;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s ease, opacity 0.3s ease;
}

/* when the lightbox is open */
.lightbox.open {
    pointer-events: all;
    visibility: visible;
    opacity: 1;
}

.lightbox_wrapper {
    display: grid;
    place-items: center;
    min-height: calc(100% - 3rem);
    margin: 1.5rem;
}

.lightbox_content img{
    box-shadow: var(--box-shadow);
    max-width: 70%;
    width: 70%;
    border-radius: 0px;
    text-align: center;
    overflow: hidden;
    transform: scale(0);
    transition: transform 0.5s ease;
}

/* when Lightbox is open then lightbox-content will... */
.lightbox.open .lightbox_content img{
    transform: scale(1);
}

.lightbox_content video{
    box-shadow: var(--box-shadow);
    max-width: 70%;
    width: 70%;
    border-radius: 0px;
    text-align: center;
    overflow: hidden;
    transform: scale(0);
    transition: transform 0.5s ease;
	object-fit: cover;
}

/* when Lightbox is open then lightbox-content will... */
.lightbox.open .lightbox_content video{
    transform: scale(1);
}

/* lightbox-close-btn */
.lightbox_close {
    position: absolute;
    top: 3vh;
    right: 3vw;
    z-index: 999;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.lightbox_close span {
    width: 100%;
    height: 3px;
    margin-top: -1.5px;
    margin-bottom: -1.5px;
    background-color: #fff;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.lightbox_close:hover span {
    opacity: 1;
}

.lightbox_close span:first-child {
    transform: rotate(45deg);
}

.lightbox_close span:last-child {
    transform: rotate(-45deg);
}

/* MEDIA QUEIRIES */

@media (max-width: 1200px) {
.lightbox_wrapper {
        margin: 0.5rem;
        /*min-height: calc(100% - 1rem);*/
		min-width: calc(100% - 1rem);
    }
	
.lightbox_content img{
    box-shadow: var(--box-shadow);
    max-width: 100%;
    width: 80%;
    border-radius: 0px;
    text-align: center;
    overflow: hidden;
    transform: scale(0);
    transition: transform 0.5s ease;
}
	
.lightbox_content video{
    box-shadow: var(--box-shadow);
    max-width: 100%;
    width: 80%;
    border-radius: 0px;
    text-align: center;
    overflow: hidden;
    transform: scale(0);
    transition: transform 0.5s ease;
}	
}

@media (max-width: 575.98px) {
.lightbox_wrapper {
        margin: 0.5rem;
        /*min-height: calc(100% - 1rem);*/
		min-width: calc(100% - 1rem);
    }
	
.lightbox_content img{
    box-shadow: var(--box-shadow);
    max-width: 100%;
    width: 100%;
    border-radius: 0px;
    text-align: center;
    overflow: hidden;
    transform: scale(0);
    transition: transform 0.5s ease;
}

.lightbox_content video{
    box-shadow: var(--box-shadow);
    max-width: 100%;
    width: 100%;
    border-radius: 0px;
    text-align: center;
    overflow: hidden;
    transform: scale(0);
    transition: transform 0.5s ease;
}	
}


/* VIDEO LIGHTBOX */

/*.vid-main-container {
	position: relative;
	min-height: 100vh;
	background: red;
}*/

.vid-main-container .video-container{
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	justify-content: center;
	padding: 10px;
}

.vid-main-container .video-container .video{
	height: 250px; 
	width: 350px;
	border: 5px solid 二#222;
	border-radius: 5px;
	box-shadow: 0 5px 15px rgba(0,0,0, .7); 
	cursor: pointer; 
	overflow: hidden;
}

.vid-main-container .video-container .video video{
	height: 100%; 
	width: 100%;
	object-fit: cover;
	transition: .2s linear;
}

.vid-main-container .video-container .video:hover video{
	transform: scale(1.0);
}

.popup-video{
	position: fixed; 
	top:0; 
	left:0; z-index: 100;
	background: rgba(0,0,0,.8);
	height: 100%;
	width:100%;
	display: none;
}

.popup-video video{
	position: absolute;
	top: 50%; 
	left: 50%;
	transform: translate(-50%, -50%);
	width: 750px;
	border-radius: 5px;
	border: 3px solid #fff;
	object-fit: cover;
}


.popup-video span{	
	position: absolute;
	top:5px; 
	right: 20px;
	font-size: 50px;
	color: #fff;
	font-weight: bolder;
	z-index: 100;
}

@media (max-width: 768px){
	.vid-main-container .popup-video video{ 
		width: 95%;
	}
}

/*-- Video Light Box ---*/
#lightbox {
    display: none; /* Initially hidden */
    position: fixed;
    z-index: 1000; /* Ensure it's on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
}

#lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 5px;
}

#close-button {
    position: absolute;
	color:rgba rgba(252,252,252,.8)
    top: 10px;
    right: 10px;
    cursor: pointer;
}