/* ==========================================================================
   Muditta Gallery Stylesheet
   Dedicated styles for gallery.html: Full-width layout, category carousel,
   5-column responsive image grid, hover zoom effects, and lightbox overrides.
   ========================================================================== */

:root {
	--primary-color: #002378;
	--secondary-color: #FF0438;
}

/* Navigation adjustment to smoothly fit all items */
.header .nav li {
	margin-right: 8px;
}

.header .nav li a {
	padding: 26px 14px;
}

/* Gallery Section */
.gallery-section {
	background: #fbfcfd;
	padding: 70px 0 90px 0;
	width: 100%;
}

/* Full Screen Width Wrapper with 20px Left and Right Margins */
.gallery-fullwidth-wrap {
	width: 100%;
	padding-left: 20px;
	padding-right: 20px;
	box-sizing: border-box;
}

/* Full-width Category Pill Carousel Bar */
.category-carousel-wrapper {
	position: relative;
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	background: #ffffff;
	border-radius: 60px;
	padding: 10px 14px;
	box-shadow: 0 4px 22px rgba(0, 0, 0, 0.06);
	border: 1px solid #edf2f7;
	margin-bottom: 35px;
}

.category-carousel-track-container {
	flex-grow: 1;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	cursor: grab;
	padding: 4px 6px;
}

.category-carousel-track-container::-webkit-scrollbar {
	display: none;
}

.category-carousel-track-container.grabbing {
	cursor: grabbing;
	user-select: none;
}

.category-carousel-track {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	white-space: nowrap;
	min-width: 100%;
}

.carousel-nav-btn {
	width: 44px;
	height: 44px;
	min-width: 44px;
	border-radius: 50%;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	color: #002378;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	cursor: pointer;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
	transition: all 0.25s ease;
	z-index: 5;
	outline: none;
}

.carousel-nav-btn:hover {
	background: #002378;
	color: #ffffff;
	border-color: #002378;
	transform: scale(1.08);
	box-shadow: 0 5px 15px rgba(0, 35, 120, 0.35);
}

.carousel-nav-btn:active {
	transform: scale(0.96);
}

.carousel-nav-btn.disabled {
	opacity: 0.3;
	cursor: not-allowed;
	pointer-events: none;
}

/* Pill Tab Buttons */
.gallery-tab-btn {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	color: #2C2D3F;
	font-family: 'Poppins', sans-serif;
	font-size: 13px;
	font-weight: 500;
	padding: 9px 18px;
	border-radius: 30px;
	cursor: pointer;
	transition: all 0.25s ease;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	outline: none;
	user-select: none;
	white-space: nowrap;
	flex-shrink: 0;
}

.gallery-tab-btn i {
	font-size: 13px;
	color: #002378;
	transition: color 0.25s ease;
}

.gallery-tab-btn .tab-badge {
	background: #e2e8f0;
	color: #475569;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 12px;
	transition: all 0.25s ease;
}

.gallery-tab-btn:hover {
	color: #002378;
	background: #edf7fc;
	border-color: #bee3f8;
}

.gallery-tab-btn.active {
	background: #002378;
	color: #ffffff;
	border-color: #002378;
	box-shadow: 0 4px 14px rgba(0, 35, 120, 0.35);
}

.gallery-tab-btn.active i {
	color: #ffffff;
}

.gallery-tab-btn.active .tab-badge {
	background: rgba(255, 255, 255, 0.28);
	color: #ffffff;
}

/* 5-Column Grid with 5px margin between images */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 5px;
	width: 100%;
	border-radius: 8px;
}

.gallery-item {
	position: relative;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border-radius: 4px;
}

.gallery-img-link {
	position: relative;
	display: block;
	width: 100%;
	height: 270px;
	overflow: hidden;
	background: #111;
	cursor: pointer;
	border-radius: 4px;
}

.gallery-img-link img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.55s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-img-link:hover img {
	transform: scale(1.08);
}

/* Category Tag directly ON the Image */
.gallery-img-tag {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgb(0 0 0 / 40%);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 5px 12px;
	border-radius: 20px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
	pointer-events: none;
	transition: transform 0.3s ease, background 0.3s ease;
}

.gallery-img-link:hover .gallery-img-tag {
	transform: translateY(-2px);
	background: #002378;
}

/* Mouseover Zoom Icon Overlay */
.gallery-overlay {
	position: absolute;
	inset: 0;
	background: rgb(0 0 0 / 40%);
	opacity: 0;
	visibility: hidden;
	transition: all 0.32s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	cursor: pointer;
}

.gallery-img-link:hover .gallery-overlay {
	opacity: 1;
	visibility: visible;
}

.gallery-zoom-circle {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #ffffff;
	color: #002378;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
	transform: scale(0.65);
	transition: transform 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-img-link:hover .gallery-zoom-circle {
	transform: scale(1);
}

/* Hide caption title and description on zoom screen */
.mfp-title,
.mfp-bottom-bar .mfp-title,
.mfp-custom-caption {
	display: none !important;
}

.mfp-counter {
	color: #cbd5e1 !important;
	font-size: 13px !important;
}

.mfp-arrow {
	opacity: 0.85;
}

.mfp-arrow:hover {
	opacity: 1;
}

/* Responsive 5-column breakdown */
@media (max-width: 1400px) {
	.gallery-img-link {
		height: 240px;
	}
}

@media (max-width: 1199px) {
	.gallery-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.gallery-img-link {
		height: 230px;
	}
}

@media (max-width: 991px) {
	.gallery-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.category-carousel-wrapper {
		padding: 8px 10px;
	}

	.gallery-tab-btn {
		font-size: 12px;
		padding: 8px 15px;
	}

	.gallery-img-link {
		height: 220px;
	}
}

@media (max-width: 767px) {
	.gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.gallery-img-link {
		height: 200px;
	}
}

@media (max-width: 575px) {
	.category-carousel-wrapper {
		border-radius: 20px;
	}

	.carousel-nav-btn {
		width: 38px;
		height: 38px;
		min-width: 38px;
		font-size: 12px;
	}

	.gallery-grid {
		grid-template-columns: repeat(1, 1fr);
	}

	.gallery-img-link {
		height: 240px;
	}
}
