/* WAAT Gallery Manager — matches the WAAT dark/amber cinematic look */
.waat-gallery-section {
	--waat-accent: #fca311;
	--waat-bg: #0f1012;
	--waat-card: #1b1d20;
	--waat-card-2: #1a1a1a;
	--waat-text: #f1f1f1;
	--waat-muted: #b5b7bb;
	--waat-gallery-cols: 3;
	color: var(--waat-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Top nav (single gallery: all galleries + siblings) ---- */
.waat-gallery-topnav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin: 0 auto 28px;
	padding-bottom: 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.9rem;
}
.waat-gallery-topnav-all {
	color: #fca311;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 1px;
}
.waat-gallery-topnav-all:hover { text-decoration: underline; }
.waat-gallery-topnav-sep { color: #55585d; }
.waat-gallery-topnav-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.waat-gallery-topnav-list a {
	color: #b5b7bb;
	text-decoration: none;
	padding: 4px 12px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.waat-gallery-topnav-list a:hover { color: #fff; border-color: #fca311; }
.waat-gallery-topnav-list a.is-current {
	color: #0f1012;
	background: #fca311;
	border-color: #fca311;
	font-weight: 700;
}

/* ---- Header ---- */
.waat-gallery-header {
	text-align: center;
	max-width: 820px;
	margin: 0 auto 36px;
}

/* ---- Archive (grid of galleries) ---- */
.waat-gallery-archive-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 22px;
}
.waat-gallery-archive-card {
	display: block;
	background: var(--waat-card);
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none;
	color: var(--waat-text);
	border: 1px solid rgba(255, 255, 255, 0.05);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.waat-gallery-archive-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
	border-color: var(--waat-accent);
}
.waat-gallery-archive-media {
	aspect-ratio: 16 / 10;
	background: #000;
	overflow: hidden;
}
.waat-gallery-archive-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}
.waat-gallery-archive-card:hover .waat-gallery-archive-media img { transform: scale(1.05); }
.waat-gallery-archive-body {
	padding: 16px 18px;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}
.waat-gallery-archive-title {
	margin: 0;
	font-size: 1.2rem;
	color: #fff;
}
.waat-gallery-archive-count {
	color: #fca311;
	font-size: 0.82rem;
	font-weight: 700;
	white-space: nowrap;
}
.waat-gallery-header .waat-eyebrow {
	display: inline-block;
	color: var(--waat-accent);
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 0.8rem;
	font-weight: 700;
	margin-bottom: 10px;
}
.waat-gallery-header .waat-section-headline {
	font-size: 2.2rem;
	margin: 0 0 12px;
	color: #fff;
}
.waat-gallery-header .waat-subheadline {
	color: var(--waat-muted);
	font-size: 1.05rem;
	line-height: 1.6;
	margin: 0;
}

/* ---- Grid / Masonry ---- */
.waat-gallery-grid {
	display: grid;
	grid-template-columns: repeat(var(--waat-gallery-cols, 3), 1fr);
	gap: 12px;
}
.waat-gallery-masonry {
	column-count: var(--waat-gallery-cols, 3);
	column-gap: 20px;
}
.waat-gallery-masonry .waat-gallery-card {
	display: inline-block;
	width: 100%;
	margin: 0 0 20px;
	break-inside: avoid;
}

/* ---- Card (image tile that opens the modal) ---- */
.waat-gallery-card {
	position: relative;
	display: block;
	background: var(--waat-card);
	border-radius: 8px;
	overflow: hidden;
	text-decoration: none;
	color: var(--waat-text);
	border: 1px solid rgba(255, 255, 255, 0.05);
	cursor: zoom-in;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.waat-gallery-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
	border-color: var(--waat-accent);
}
.waat-gallery-card-media {
	position: relative;
	overflow: hidden;
	background: #000;
}
.waat-gallery-grid .waat-gallery-card-media {
	aspect-ratio: 1 / 1;
}
.waat-aspect-landscape .waat-gallery-grid .waat-gallery-card-media { aspect-ratio: 4 / 3; }
.waat-aspect-portrait .waat-gallery-grid .waat-gallery-card-media { aspect-ratio: 3 / 4; }
.waat-gallery-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}
.waat-gallery-masonry .waat-gallery-card-media img {
	height: auto;
}
.waat-gallery-card:hover .waat-gallery-card-media img {
	transform: scale(1.06);
}

/* ---- Video play badge ---- */
.waat-gallery-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 58px;
	height: 58px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: rgba(15, 16, 18, 0.7);
	border: 2px solid var(--waat-accent);
}
.waat-gallery-play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 11px 0 11px 18px;
	border-color: transparent transparent transparent var(--waat-accent);
}

/* ---- Footer / links ---- */
.waat-gallery-footer {
	text-align: center;
	margin-top: 32px;
}
.waat-gallery-empty {
	color: var(--waat-muted);
	text-align: center;
	padding: 30px 0;
}

/* ---- Buttons (mirror shared waat-elementor styles) ---- */
.waat-gallery-section .waat-btn-primary,
.waat-gallery-item-hero .waat-btn-primary {
	display: inline-block;
	background: var(--waat-accent);
	color: #0f1012;
	font-weight: 700;
	padding: 12px 26px;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.2s ease;
}
.waat-gallery-section .waat-btn-primary:hover { background: #e5940e; }
.waat-gallery-section .waat-btn-secondary,
.waat-gallery-item-hero .waat-btn-secondary {
	display: inline-block;
	border: 1px solid var(--waat-accent);
	color: var(--waat-accent);
	font-weight: 700;
	padding: 11px 26px;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.waat-gallery-section .waat-btn-secondary:hover {
	background: var(--waat-accent);
	color: #0f1012;
}

/* ---- Item hero ---- */
.waat-gallery-item-hero {
	--waat-accent: #fca311;
	color: #f1f1f1;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	max-width: 1100px;
	margin: 0 auto;
}
.waat-gallery-back {
	display: inline-block;
	color: #fca311;
	text-decoration: none;
	font-weight: 600;
	margin-bottom: 18px;
}
.waat-gallery-back:hover { text-decoration: underline; }
.waat-gallery-hero-media {
	background: #000;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.waat-gallery-hero-img,
.waat-gallery-video {
	width: 100%;
	display: block;
	height: auto;
}
.waat-gallery-embed { position: relative; }
.waat-gallery-embed iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	display: block;
	border: 0;
}
.waat-gallery-hero-body {
	padding: 28px 4px 8px;
}
.waat-gallery-hero-title {
	font-size: 2rem;
	color: #fff;
	margin: 0 0 14px;
}
.waat-gallery-hero-desc {
	color: #d7d9dd;
	font-size: 1.05rem;
	line-height: 1.7;
}
.waat-gallery-tags {
	margin-top: 18px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.waat-gallery-tags a {
	display: inline-block;
	background: #1b1d20;
	border: 1px solid rgba(252, 163, 17, 0.4);
	color: #fca311;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 0.8rem;
	text-decoration: none;
}
.waat-gallery-tags a:hover { background: #fca311; color: #0f1012; }

/* ---- Prev/Next ---- */
.waat-gallery-nav {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 34px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.waat-gallery-nav a {
	color: #f1f1f1;
	text-decoration: none;
	font-weight: 600;
	max-width: 45%;
}
.waat-gallery-nav a:hover { color: #fca311; }
.waat-gallery-nav-next { text-align: right; margin-left: auto; }

/* ---- Placeholder ---- */
.waat-gallery-noimg {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	background: repeating-linear-gradient(45deg, #17181b, #17181b 12px, #1b1d20 12px, #1b1d20 24px);
}
.waat-gallery-noimg.large { aspect-ratio: 16 / 9; border-radius: 16px; }

/* ---- Modal (gallery lightbox with title, description, prev/next) ---- */
.waat-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(6, 7, 8, 0.95);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	opacity: 0;
	transition: opacity 0.2s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.waat-modal-overlay.open { opacity: 1; }
body.waat-modal-open { overflow: hidden; }

.waat-modal-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 92vw;
	max-height: 92vh;
	width: auto;
}
.waat-modal-media {
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 92vw;
	max-height: 74vh;
}
.waat-modal-media img,
.waat-modal-media video {
	max-width: 92vw;
	max-height: 74vh;
	width: auto;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
	display: block;
}
.waat-modal-media iframe {
	width: min(88vw, 1100px);
	aspect-ratio: 16 / 9;
	max-height: 74vh;
	border: 0;
	border-radius: 10px;
}

.waat-modal-caption {
	width: 100%;
	max-width: 780px;
	text-align: center;
	color: #f1f1f1;
	padding: 16px 10px 4px;
}
.waat-modal-title {
	margin: 0 0 8px;
	font-size: 1.4rem;
	color: #fff;
}
.waat-modal-desc {
	color: #c9cbcf;
	font-size: 0.98rem;
	line-height: 1.6;
	max-height: 18vh;
	overflow-y: auto;
}
.waat-modal-desc p { margin: 0 0 0.6em; }
.waat-modal-link {
	display: inline-block;
	margin-top: 12px;
	color: #fca311;
	font-weight: 700;
	text-decoration: none;
}
.waat-modal-link:hover { text-decoration: underline; }

.waat-modal-close,
.waat-modal-prev,
.waat-modal-next {
	position: absolute;
	background: rgba(27, 29, 32, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	line-height: 1;
	opacity: 0.85;
	transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
	z-index: 2;
}
.waat-modal-close:hover,
.waat-modal-prev:hover,
.waat-modal-next:hover { opacity: 1; color: #fca311; background: rgba(27, 29, 32, 0.9); }
.waat-modal-close {
	top: 18px;
	right: 22px;
	font-size: 1.6rem;
	width: 44px;
	height: 44px;
	border-radius: 50%;
}
.waat-modal-prev,
.waat-modal-next {
	top: 50%;
	transform: translateY(-50%);
	font-size: 2rem;
	width: 52px;
	height: 52px;
	border-radius: 50%;
}
.waat-modal-prev { left: 18px; }
.waat-modal-next { right: 18px; }
.waat-modal-prev[hidden],
.waat-modal-next[hidden] { display: none; }

@media (max-width: 600px) {
	.waat-modal-prev, .waat-modal-next { width: 42px; height: 42px; font-size: 1.5rem; }
	.waat-modal-prev { left: 8px; }
	.waat-modal-next { right: 8px; }
	.waat-modal-media img, .waat-modal-media video { max-height: 60vh; }
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
	.waat-gallery-grid { grid-template-columns: repeat(3, 1fr); }
	.waat-gallery-masonry { column-count: 3; }
}
@media (max-width: 600px) {
	.waat-gallery-grid { grid-template-columns: repeat(2, 1fr); }
	.waat-gallery-masonry { column-count: 2; }
	.waat-gallery-header .waat-section-headline { font-size: 1.6rem; }
	.waat-gallery-hero-title { font-size: 1.5rem; }
	.waat-gallery-nav { flex-direction: column; }
	.waat-gallery-nav-next { text-align: left; margin-left: 0; }
}
