/* ============================================================
   NobleCause — Gallery Page + Single Detail + Lightbox
   ============================================================ */

/* ── Breadcrumb ────────────────────────────────────────────── */
.nc-breadcrumb {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.78rem;
	color: var(--nc-text-dim);
	flex-wrap: wrap;
}

.nc-breadcrumb a {
	color: var(--nc-text-muted);
	text-decoration: none;
	transition: color 0.2s var(--nc-ease);
}

.nc-breadcrumb a:hover { color: var(--nc-gold-1); }

.nc-breadcrumb__sep {
	color: var(--nc-text-dim);
	font-size: 0.7rem;
	opacity: 0.6;
}

.nc-breadcrumb__current {
	color: var(--nc-gold-1);
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 260px;
}

/* ── Shared page header (same pattern as .nc-legal-header) ── */
.nc-gallery-header {
	background: linear-gradient(180deg, #050505 0%, #0c0c0c 70%, var(--nc-bg) 100%);
	padding: 140px 0 40px;
	border-bottom: 1px solid var(--nc-glass-border);
	position: relative;
	overflow: hidden;
	text-align: center;
}

.nc-gallery-header::before {
	content: '';
	position: absolute;
	top: -60px;
	left: 50%;
	transform: translateX(-50%);
	width: 600px;
	height: 280px;
	background: radial-gradient(ellipse at center, rgba(245, 166, 35, 0.07) 0%, transparent 70%);
	pointer-events: none;
}

.nc-gallery-header__inner {
	position: relative;
	z-index: 1;
}

.nc-gallery-header__breadcrumb {
	justify-content: center;
	margin-bottom: 20px;
}

.nc-gallery-header__badge {
	display: inline-block;
	padding: 5px 18px;
	border: 1px solid rgba(245, 166, 35, 0.35);
	border-radius: 50px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--nc-gold-1);
	background: rgba(245, 166, 35, 0.08);
	margin-bottom: 18px;
}

.nc-gallery-header__title {
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 800;
	color: var(--nc-white);
	line-height: 1.15;
	margin: 0 0 12px;
}

.nc-gallery-header__title span {
	background: var(--nc-gradient-gold);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.nc-gallery-header__sub {
	font-size: 0.95rem;
	color: var(--nc-text-muted);
	max-width: 520px;
	margin: 0 auto;
	line-height: 1.6;
}

/* ── Gallery listing body ──────────────────────────────────── */
.nc-gallery-body {
	padding: 60px 0 80px;
	background: var(--nc-bg);
	min-height: 50vh;
}

/* ── Gallery listing grid ──────────────────────────────────── */
.nc-gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

/* ── Gallery listing card ──────────────────────────────────── */
.nc-gal-card {
	display: block;
	text-decoration: none;
	color: inherit;
	background: var(--nc-glass-bg);
	border: 1px solid var(--nc-glass-border);
	border-radius: var(--nc-radius);
	overflow: hidden;
	transition: transform 0.32s var(--nc-ease),
	            box-shadow 0.32s var(--nc-ease),
	            border-color 0.32s var(--nc-ease);
}

.nc-gal-card:hover,
.nc-gal-card:focus-visible {
	transform: translateY(-6px);
	border-color: rgba(245, 166, 35, 0.3);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(245, 166, 35, 0.08);
	color: inherit;
	text-decoration: none;
}

/* Featured image wrapper */
.nc-gal-card__img-wrap {
	position: relative;
	aspect-ratio: 16/9;
	overflow: hidden;
	background: var(--nc-bg-3);
}

.nc-gal-card__img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s var(--nc-ease), filter 0.45s var(--nc-ease);
}

.nc-gal-card:hover .nc-gal-card__img-wrap img {
	transform: scale(1.06);
	filter: brightness(0.85);
}

/* Hover overlay on card image */
.nc-gal-card__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s var(--nc-ease);
}

.nc-gal-card:hover .nc-gal-card__overlay { opacity: 1; }

.nc-gal-card__overlay-icon {
	width: 52px;
	height: 52px;
	background: rgba(245, 166, 35, 0.9);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: scale(0.8);
	transition: transform 0.3s var(--nc-ease-bounce);
}

.nc-gal-card:hover .nc-gal-card__overlay-icon { transform: scale(1); }

.nc-gal-card__overlay-icon svg { width: 22px; height: 22px; fill: #fff; }

/* Video badge on card image */
.nc-gal-card__video-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	padding: 3px 10px;
	border-radius: 50px;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	backdrop-filter: blur(8px);
}

.nc-gal-card__video-badge--yt {
	background: rgba(255, 0, 0, 0.75);
	color: #fff;
}

.nc-gal-card__video-badge--mp4 {
	background: rgba(39, 174, 96, 0.75);
	color: #fff;
}

/* No-image placeholder */
.nc-gal-card__no-img {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--nc-text-dim);
	font-size: 2rem;
}

/* Card body */
.nc-gal-card__body {
	padding: 16px 20px 20px;
}

.nc-gal-card__title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--nc-white);
	margin: 0 0 8px;
	line-height: 1.35;
	transition: color 0.2s;
}

.nc-gal-card:hover .nc-gal-card__title { color: var(--nc-gold-1); }

.nc-gal-card__meta {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 0.75rem;
	color: var(--nc-text-dim);
}

.nc-gal-card__meta span {
	display: flex;
	align-items: center;
	gap: 4px;
}

.nc-gal-card__meta svg { opacity: 0.6; }

.nc-gal-card__arrow {
	margin-left: auto;
	color: var(--nc-gold-1);
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity 0.25s, transform 0.25s var(--nc-ease);
}

.nc-gal-card:hover .nc-gal-card__arrow {
	opacity: 1;
	transform: translateX(0);
}

/* Empty state */
.nc-gallery-empty {
	text-align: center;
	padding: 80px 20px;
	grid-column: 1 / -1;
}

.nc-gallery-empty__icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; }

/* ── Single Gallery Detail Page ────────────────────────────── */
.nc-gal-single {
	padding: 56px 0 80px;
	background: var(--nc-bg);
}

/* Image grid: 3 columns */
.nc-gal-single__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-bottom: 56px;
}

/* Individual image button */
.nc-gal-single__img-btn {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 4/3;
	overflow: hidden;
	border-radius: 10px;
	border: none;
	padding: 0;
	background: var(--nc-bg-3);
	cursor: zoom-in;
	transition: transform 0.3s var(--nc-ease);
}

.nc-gal-single__img-btn img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s var(--nc-ease), filter 0.4s var(--nc-ease);
}

.nc-gal-single__img-btn:hover img,
.nc-gal-single__img-btn:focus-visible img {
	transform: scale(1.06);
	filter: brightness(0.75);
}

/* Eye icon on hover */
.nc-gal-single__img-hover {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(245, 166, 35, 0.12);
	opacity: 0;
	transition: opacity 0.3s var(--nc-ease);
	pointer-events: none;
}

.nc-gal-single__img-btn:hover .nc-gal-single__img-hover,
.nc-gal-single__img-btn:focus-visible .nc-gal-single__img-hover {
	opacity: 1;
}

.nc-gal-single__eye {
	width: 48px;
	height: 48px;
	background: rgba(0, 0, 0, 0.55);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid rgba(255, 255, 255, 0.7);
	backdrop-filter: blur(4px);
	transform: scale(0.85);
	transition: transform 0.25s var(--nc-ease-bounce);
}

.nc-gal-single__img-btn:hover .nc-gal-single__eye { transform: scale(1); }
.nc-gal-single__eye svg { width: 20px; height: 20px; fill: #fff; }

/* Empty images notice */
.nc-gal-single__no-images {
	text-align: center;
	padding: 60px 20px;
	color: var(--nc-text-dim);
	grid-column: 1 / -1;
}

/* ── Video section (at bottom of single page) ──────────────── */
.nc-gal-single__video-section {
	border-top: 1px solid var(--nc-glass-border);
	padding-top: 48px;
}

.nc-gal-single__video-label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--nc-gold-1);
	margin-bottom: 20px;
}

.nc-gal-single__video-label::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--nc-glass-border);
}

.nc-gal-single__video-title {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--nc-white);
	margin-bottom: 24px;
}

.nc-gal-single__video-embed {
	position: relative;
	aspect-ratio: 16/9;
	border-radius: var(--nc-radius);
	overflow: hidden;
	background: #000;
	max-width: 860px;
}

.nc-gal-single__video-embed iframe,
.nc-gal-single__video-embed video {
	width: 100%;
	height: 100%;
	display: block;
	border: none;
}

/* Back link */
.nc-gal-single__back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--nc-text-muted);
	text-decoration: none;
	transition: color 0.2s, gap 0.2s;
	margin-top: 52px;
}

.nc-gal-single__back:hover { color: var(--nc-gold-1); gap: 12px; }
.nc-gal-single__back svg { width: 16px; height: 16px; }

/* ── Lightbox Overlay ──────────────────────────────────────── */
.nc-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.94);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.28s var(--nc-ease), visibility 0.28s var(--nc-ease);
	backdrop-filter: blur(8px);
}

.nc-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.nc-lightbox__close {
	position: absolute;
	top: 16px;
	right: 18px;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
	z-index: 2;
}

.nc-lightbox__close:hover { background: rgba(245, 166, 35, 0.25); transform: scale(1.1); }

.nc-lightbox__counter {
	position: absolute;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 0.8rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.5);
	letter-spacing: 0.08em;
	pointer-events: none;
}

.nc-lightbox__stage {
	position: relative;
	max-width: min(92vw, 1100px);
	max-height: 88vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nc-lightbox__img {
	max-width: 100%;
	max-height: 88vh;
	object-fit: contain;
	border-radius: 8px;
	display: block;
	box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
	transition: opacity 0.22s var(--nc-ease);
}

.nc-lightbox__img.is-loading { opacity: 0; }

.nc-lightbox__video-wrap {
	width: min(88vw, 960px);
	aspect-ratio: 16/9;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
	background: #000;
}

.nc-lightbox__video-wrap iframe,
.nc-lightbox__video-wrap video {
	width: 100%;
	height: 100%;
	display: block;
	border: none;
}

.nc-lightbox__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
	z-index: 2;
}

.nc-lightbox__arrow:hover { background: rgba(245, 166, 35, 0.3); }
.nc-lightbox__arrow--prev { left: -68px; }
.nc-lightbox__arrow--next { right: -68px; }
.nc-lightbox__arrow svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.nc-lightbox__arrow[hidden] { display: none; }

.nc-lightbox__spinner {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.nc-lightbox__spinner.is-active { display: flex; }

.nc-lightbox__spinner::after {
	content: '';
	width: 36px;
	height: 36px;
	border: 3px solid rgba(255, 255, 255, 0.15);
	border-top-color: var(--nc-gold-1);
	border-radius: 50%;
	animation: nc-spin 0.7s linear infinite;
}

@keyframes nc-spin { to { transform: rotate(360deg); } }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 992px) {
	.nc-gallery-grid { grid-template-columns: repeat(2, 1fr); }
	.nc-gal-single__grid { grid-template-columns: repeat(2, 1fr); }
	.nc-lightbox__arrow--prev { left: -52px; }
	.nc-lightbox__arrow--next { right: -52px; }
}

@media (max-width: 680px) {
	.nc-gallery-grid { grid-template-columns: 1fr; gap: 16px; }
	.nc-gal-single__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
	.nc-gallery-header { padding: 120px 0 32px; }

	.nc-lightbox__stage { max-width: 96vw; }
	.nc-lightbox__arrow { width: 38px; height: 38px; }
	.nc-lightbox__arrow--prev { left: 6px; }
	.nc-lightbox__arrow--next { right: 6px; }
}

@media (max-width: 480px) {
	.nc-gal-single__grid { grid-template-columns: 1fr; }
	.nc-lightbox__arrow--prev,
	.nc-lightbox__arrow--next { top: auto; transform: none; bottom: 14px; }
	.nc-lightbox__arrow--prev { left: calc(50% - 50px); }
	.nc-lightbox__arrow--next { right: calc(50% - 50px); }
}
