/**
 * Pahal Nutrition — Premium Gallery Page
 */

.pnx-gallery-page {
	--pnx-gallery-navy: #0d325d;
	--pnx-gallery-gold: #ffcc00;
	--pnx-gallery-soft: #f4f7fb;
	--pnx-gallery-card-radius: 18px;
	background: var(--pnx-gallery-soft);
}

/* Hero */
.pnx-gallery-hero {
	position: relative;
	padding: 72px 0 56px;
	overflow: hidden;
	color: #fff;
}

.pnx-gallery-hero__bg {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 15% 20%, rgba(255, 204, 0, 0.22), transparent 45%),
		linear-gradient(135deg, #0a2848 0%, var(--pnx-gallery-navy) 48%, #164a7a 100%);
	z-index: 0;
}

.pnx-gallery-hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
	background-size: 48px 48px;
	opacity: 0.35;
}

.pnx-gallery-hero .container {
	position: relative;
	z-index: 1;
}

.pnx-gallery-hero__inner {
	max-width: 760px;
	margin: 0 auto;
	text-align: center;
}

.pnx-gallery-hero__tagline {
	display: inline-block;
	margin: 0 0 14px;
	padding: 6px 16px;
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	background: rgba(255, 204, 0, 0.18);
	color: var(--pnx-gallery-gold);
	border: 1px solid rgba(255, 204, 0, 0.35);
}

.pnx-gallery-hero__title {
	margin: 0 0 16px;
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 800;
	line-height: 1.15;
	color: #fff;
}

.pnx-gallery-hero__text {
	margin: 0 auto 28px;
	max-width: 620px;
	font-size: 1.05rem;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.88);
}

.pnx-gallery-hero__stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
}

.pnx-gallery-hero__stat {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.14);
	font-size: 0.92rem;
	color: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(8px);
}

.pnx-gallery-hero__stat strong {
	font-size: 1.15rem;
	color: var(--pnx-gallery-gold);
}

/* Body */
.pnx-gallery-body {
	padding: 40px 0 80px;
}

/* Filters */
.pnx-gallery-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-bottom: 36px;
}

.pnx-gallery-filter {
	border: 1px solid rgba(13, 50, 93, 0.12);
	background: #fff;
	color: var(--pnx-gallery-navy);
	padding: 10px 20px;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.25s ease;
	box-shadow: 0 4px 14px rgba(13, 50, 93, 0.06);
}

.pnx-gallery-filter:hover,
.pnx-gallery-filter:focus-visible {
	border-color: var(--pnx-gallery-navy);
	outline: none;
	transform: translateY(-1px);
}

.pnx-gallery-filter.is-active {
	background: var(--pnx-gallery-navy);
	border-color: var(--pnx-gallery-navy);
	color: #fff;
	box-shadow: 0 8px 24px rgba(13, 50, 93, 0.22);
}

/* Grid */
.pnx-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

.pnx-gallery-card {
	background: #fff;
	border-radius: var(--pnx-gallery-card-radius);
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(13, 50, 93, 0.08);
	border: 1px solid rgba(13, 50, 93, 0.06);
	transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease;
	animation: pnxGalleryFadeUp 0.6s ease both;
	animation-delay: calc(var(--pnx-delay, 0) * 0.06s);
}

.pnx-gallery-card.is-hidden {
	display: none;
}

.pnx-gallery-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 40px rgba(13, 50, 93, 0.14);
}

.pnx-gallery-card__link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.pnx-gallery-card__media {
	position: relative;
	margin: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #e8eef5;
}

.pnx-gallery-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.pnx-gallery-card:hover .pnx-gallery-card__media img {
	transform: scale(1.06);
}

.pnx-gallery-card__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 35%, rgba(13, 50, 93, 0.55) 100%);
	opacity: 0.75;
	transition: opacity 0.3s ease;
}

.pnx-gallery-card:hover .pnx-gallery-card__overlay {
	opacity: 0.9;
}

.pnx-gallery-card__zoom,
.pnx-gallery-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.9);
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.95);
	color: var(--pnx-gallery-navy);
	font-size: 1rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	opacity: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.pnx-gallery-card__play {
	background: var(--pnx-gallery-gold);
	color: #0d325d;
	padding-left: 4px;
}

.pnx-gallery-card:hover .pnx-gallery-card__zoom,
.pnx-gallery-card:hover .pnx-gallery-card__play {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.pnx-gallery-card__body {
	padding: 16px 18px 20px;
}

.pnx-gallery-card__badge {
	display: inline-block;
	margin-bottom: 8px;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	background: rgba(255, 204, 0, 0.2);
	color: #8a6d00;
}

.pnx-gallery-card__title {
	margin: 0 0 6px;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--pnx-gallery-navy);
	line-height: 1.35;
}

.pnx-gallery-card__caption {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.55;
	color: #5a6b7d;
}

/* Empty state */
.pnx-gallery-empty {
	text-align: center;
	padding: 64px 24px;
	background: #fff;
	border-radius: 20px;
	border: 1px dashed rgba(13, 50, 93, 0.18);
	box-shadow: 0 8px 28px rgba(13, 50, 93, 0.06);
}

.pnx-gallery-empty__icon {
	font-size: 3rem;
	color: var(--pnx-gallery-navy);
	opacity: 0.35;
	margin-bottom: 16px;
}

.pnx-gallery-empty h2 {
	margin: 0 0 10px;
	color: var(--pnx-gallery-navy);
	font-weight: 800;
}

.pnx-gallery-empty p {
	margin: 0 0 20px;
	color: #5a6b7d;
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

.pnx-gallery-empty__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: 10px;
	background: var(--pnx-gallery-navy);
	color: #fff !important;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.25s ease;
}

.pnx-gallery-empty__btn:hover {
	background: #164a7a;
	color: #fff !important;
}

.pnx-gallery-no-results {
	text-align: center;
	margin-top: 24px;
	padding: 20px;
	color: #5a6b7d;
	font-weight: 500;
}

@keyframes pnxGalleryFadeUp {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Magnific overrides on gallery */
body.pnx-gallery-premium .mfp-bg {
	background: rgba(13, 50, 93, 0.92);
}

body.pnx-gallery-premium .mfp-figure::after {
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

@media (max-width: 767px) {
	.pnx-gallery-hero {
		padding: 56px 0 40px;
	}

	.pnx-gallery-body {
		padding: 28px 0 56px;
	}

	.pnx-gallery-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.pnx-gallery-filters {
		justify-content: flex-start;
		overflow-x: auto;
		flex-wrap: nowrap;
		padding-bottom: 8px;
		-webkit-overflow-scrolling: touch;
	}

	.pnx-gallery-filter {
		flex-shrink: 0;
	}
}
