@import url('https://fonts.googleapis.com/css2?family=Amiri+Quran&family=Cairo+Play:wght@200..1000&family=Marhey:wght@300..700&family=Reem+Kufi+Fun:wght@400..700&family=Reem+Kufi:wght@400..700&display=swap');

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
html,
body {
	font-family: "Marhey", sans-serif;
	font-optical-sizing: auto;
	font-weight: 600;
	font-style: normal;
	overscroll-behavior-x: none;
	overscroll-behavior-y: none;
	scroll-behavior: smooth;
	display: flex;
	flex-direction: column;
}
body {
	position: relative;
	color: #222;
	font-family: "Kalam", sans-serif;
	min-height: 100vh;
	overflow-x: hidden;
	background-image: url("https://images.unsplash.com/photo-1531685250784-7569952593d2?crop=entropy&cs=srgb&fm=jpg&ixid=M3wzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2OTMyOTE2OTh8&ixlib=rb-4.0.3&q=100&w=3000");
	background-size: cover;
}
main {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	max-width: 100vw;
	/* min-height: 100vh; */
	overflow-x: hidden;
		flex: 1; 
		margin-top: 100px;

}

img {
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
}
#gallery {
	position: relative;
	left: calc(-1 * var(--adjust-size));
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 20px;
	max-width: 100vw;
	padding: 20px 90px 20px 90px;
	-webkit-perspective: 0;
	perspective: 0;
	margin-bottom: 40px;
}
#gallery figure:nth-child(7n) {
	--duration: 1s;
	--pin-color: crimson;
}
#gallery figure:nth-child(7n + 1) {
	--duration: 1.8s;
	--pin-color: hotpink;
}
#gallery figure:nth-child(7n + 2) {
	--duration: 1.3s;
	--pin-color: magenta;
}
#gallery figure:nth-child(7n + 3) {
	--duration: 1.5s;
	--pin-color: orangered;
}
#gallery figure:nth-child(7n + 4) {
	--duration: 1.1s;
	--pin-color: darkorchid;
}
#gallery figure:nth-child(7n + 5) {
	--duration: 1.6s;
	--pin-color: deeppink;
}
#gallery figure:nth-child(7n + 6) {
	--duration: 1.2s;
	--pin-color: mediumvioletred;
}
#gallery figure:nth-child(3n) {
	--angle: 3deg;
}
#gallery figure:nth-child(3n + 1) {
	--angle: -3.3deg;
}
#gallery figure:nth-child(3n + 2) {
	--angle: 2.4deg;
}
#gallery figure:nth-child(odd) {
	--direction: alternate;
}
#gallery figure:nth-child(even) {
	--direction: alternate-reverse;
}
#gallery figure {
	--angle: 3deg;
	--count: 5;
	--duration: 1s;
	--delay: calc(-0.5 * var(--duration));
	--direction: alternate;
	--pin-color: red;

	position: relative;
	display: inline-block;
	margin: var(--adjust-size);
	padding: 0.5rem;
	border-radius: 5px;
	box-shadow: 0 7px 8px rgba(0, 0, 0, 0.4);
	width: 100%;
	height: auto;
	text-align: center;
	background-color: ghostwhite;
	background-image: url("https://images.unsplash.com/photo-1629968417850-3505f5180761?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2OTMzMjQ3ODJ8&ixlib=rb-4.0.3&q=80&w=500");
	background-size: cover;
	background-position: center;
	background-blend-mode: multiply;

	transform-origin: center 0.22rem;
	will-change: transform;
	break-inside: avoid;
	overflow: hidden;
	outline: 1px solid transparent;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	font-family: "Marhey", sans-serif;

}
#gallery.active figure {
	animation-duration: var(--duration), 1.5s;
	animation-delay: var(--delay),
		calc(var(--delay) + var(--duration) * var(--count));
	animation-timing-function: ease-in-out;
	animation-iteration-count: var(--count), 1;
	animation-direction: var(--direction), normal;
	animation-fill-mode: both;
	animation-name: swing, swingEnd;
}
#gallery figure:after {
	position: absolute;
	top: 0.22rem;
	left: 50%;
	width: 0.7rem;
	height: 0.7rem;
	content: "";
	background: var(--pin-color);
	border-radius: 50%;
	box-shadow: -0.1rem -0.1rem 0.3rem 0.02rem rgba(0, 0, 0, 0.5) inset;
	filter: drop-shadow(0.3rem 0.15rem 0.2rem rgba(0, 0, 0, 0.5));
	transform: translateZ(0);
	z-index: 2;
}
figure img {
	aspect-ratio: 1 /1;
	width: 100%;
	object-fit: cover;
	display: block;
	border-radius: 5px;
	margin-bottom: 10px;
	z-index: 1;
}
figure figcaption {
	font-size: 14px;
	font-weight: 400;
	overflow: hidden;
	/* white-space: nowrap; */
	text-overflow: ellipsis;
	z-index: 1;
	height: 80px;
	color: #222853;
	display: flex;
	align-items: center;

}
figure h2 {
	color: crimson;
	font-size: 22px;
}
figure p {
	font-size: 17px;
}
figure small {
	font-size: 12px;
}
figure > div {
	width: 100%;
	height: 100%;
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
}
@keyframes swing {
	0% {
		transform: rotate3d(0, 0, 1, calc(-1 * var(--angle)));
	}
	100% {
		transform: rotate3d(0, 0, 1, var(--angle));
	}
}
@keyframes swingEnd {
	to {
		transform: rotate3d(0, 0, 1, 0deg);
	}
}
#info {
	position: relative;
	text-align: center;
	z-index: 1;
}
#info a {
	font-size: 1.1rem;
}
/*
@media (orientation: landscape) {
	#gallery {
		grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	}
}
*/

/* For smaller screens (e.g., mobile phones) */
@media only screen and (max-width: 768px) {
    #gallery {
        padding: 20px;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    #gallery figure {
        margin: 10px;
        padding: 0.3rem;
        box-shadow: 0 3px 4px rgba(0, 0, 0, 0.2);
    }
    #gallery figure img {
        aspect-ratio: 1/1;
        width: 100%;
        height: auto;
        border-radius: 5px;
        margin-bottom: 5px;
    }
    figure figcaption {
        font-size: 12px;
		display: flex;
		align-items: center;
    }
    figure h2 {
        font-size: 18px;
    }
    figure p {
        font-size: 14px;
    }
    figure small {
        font-size: 10px;
    }
}

/* For even smaller screens (e.g., very small mobile phones) */
@media only screen and (max-width: 480px) {
    #gallery {
        padding: 10px;
    }
    #gallery figure {
        margin: 5px;
        padding: 0.2rem;
    }
}









@media (min-width: 800px) {
	#gallery {
		grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	}
}
.filter-buttons {
    display: flex;
    justify-content: center;
	margin-top: 150px;

    /* margin-bottom: 20px; Adjust margin as needed */
	
}
/* .filter-buttons:hover{
	cursor: pointer;
} */
.filter-button {
	cursor: pointer !important;
display: inline;
    padding: 10px 20px;
    margin: 0 10px;
    font-size: 16px;
    background-color: #fff; /* Adjust background color */
    border: none;
    border-radius: 5px;
	font-family: "Marhey", sans-serif;
	box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;
}
/* .filter-button:hover {
    cursor: pointer;
} */
.active-filter-button {
    background-color: #fe7d00; /* Change background color for active state */
    color: #fff; /* Change text color for active state */
}
.filter-hide {
    display: none;
}


@media screen and (max-width: 768px) {
    .filter-button {
        padding: 10px 12px; /* Adjust padding for smaller screens */
        margin: 0 5px; /* Adjust margin for smaller screens */
        font-size: 14px; /* Adjust font size for smaller screens */
		margin-top: 130px;
    }
}


#enlarged-image-container {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    text-align: center;
}

#enlarged-image{
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
 figure{
	cursor: pointer;
 }
 figure:hover{
border: 4px solid;
border-color: #222853; 

}
#close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}