/* ============================================================
   FLIBBR — bootcamp-gallery.css
   Drives /bootcamp-gallery/ (page-bootcamp-gallery.php). Loaded only
   on that template. Self-contained: bundles the filter-pill, video-tile,
   3:2 image-card and both-lightbox styles, because verify.css and
   bootcamp-event-single.css are not enqueued on this page. Property
   values lifted from those source files (verify pill/card/lightbox;
   recap video tile + video lightbox) under gallery-scoped selectors.
   Hero (.page-header), type, container, header/footer come from the
   global chassis (base / typography / page-chassis / header-footer).
   ============================================================ */

/* ----------------------------------------------------------
   FILTER RAIL — sticky beneath site-header (verify pill language)
---------------------------------------------------------- */
.gallery-filters {
	background: var(--paper-warm);
	border-block: 1px solid var(--rule-soft);
	position: sticky;
	top: 56px;
	z-index: 30;
}
.gallery-filters-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2);
	align-items: center;
	padding-block: var(--s-5);
}
.gallery-filter-label {
	font-family: var(--sans);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ink-quiet);
	font-weight: 500;
	margin-right: var(--s-2);
}
.gallery-filter-label:not(:first-child) { margin-left: var(--s-4); }
.gallery-pill {
	/* button-defaults reset (op-learning #10) */
	display: block; width: auto; border: 0; padding: 0; font: inherit;
	padding: var(--s-2) var(--s-4);
	font-family: var(--sans);
	font-size: 13px;
	font-weight: 500;
	color: var(--ink-soft);
	background: var(--paper);
	border: 1px solid var(--rule);
	border-radius: 999px;
	cursor: pointer;
	transition: all var(--motion-duration-ui) var(--motion-ease-ui);
}
.gallery-pill:hover { border-color: var(--ink-quiet); color: var(--ink); }
.gallery-pill.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ----------------------------------------------------------
   SECTIONS
---------------------------------------------------------- */
.gallery-main { padding-block: var(--s-8) var(--s-9); }
.gallery-section { margin-bottom: var(--s-9); }
.gallery-section:last-child { margin-bottom: 0; }
.gallery-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--s-4);
	margin-bottom: var(--s-7);
	padding-bottom: var(--s-5);
	border-bottom: 2px solid var(--ink);
}
.gallery-section-title {
	font-family: var(--serif);
	font-size: clamp(24px, 3.5vw, 36px);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--ink);
	margin: 0;
}
.gallery-section-count {
	font-family: var(--sans);
	font-size: 13px;
	color: var(--ink-quiet);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ----------------------------------------------------------
   VIDEO ROW — recap video-tile pattern (values from
   bootcamp-event-single.css), gallery-scoped.
---------------------------------------------------------- */
.gallery-video-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--s-6) var(--s-7);
}
@media (max-width: 880px) { .gallery-video-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-6); } }
@media (max-width: 540px) { .gallery-video-grid { grid-template-columns: 1fr; } }

.gallery-video { display: flex; flex-direction: column; gap: var(--s-4); }
.gallery-video-frame {
	/* button-defaults reset (op-learning #10) */
	display: block; width: 100%; margin: 0; padding: 0; border: 0;
	aspect-ratio: 16 / 9;
	position: relative; overflow: hidden;
	border-radius: 4px;
	cursor: pointer;
	background-color: var(--paper-warm);
	background-size: cover; background-position: center; background-repeat: no-repeat;
}
.gallery-video-frame .play-glyph {
	position: absolute; top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	width: 56px; height: 56px; border-radius: 50%;
	background: rgba(20,20,19,.85);
	display: flex; align-items: center; justify-content: center;
	transition: background var(--motion-duration-ui) var(--motion-ease-ui),
				transform var(--motion-duration-ui) var(--motion-ease-ui);
}
.gallery-video-frame .play-glyph::after {
	content: ""; width: 0; height: 0;
	border-left: 16px solid var(--paper);
	border-top: 9px solid transparent;
	border-bottom: 9px solid transparent;
	margin-left: 3px;
}
.gallery-video-frame:hover .play-glyph,
.gallery-video-frame:focus-visible .play-glyph {
	background: rgba(20,20,19,1);
	transform: translate(-50%, -50%) scale(1.06);
}
.gallery-video-frame:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.gallery-video-attribution {
	display: flex; flex-direction: column; gap: var(--s-1);
	padding-top: var(--s-3);
	border-top: 1px solid var(--rule-soft);
}
.gallery-video-name { font-family: var(--sans); font-weight: 600; font-size: 13px; line-height: 1.3; color: var(--ink); }
.gallery-video-role { font-family: var(--sans); font-weight: 400; font-size: 11px; line-height: 1.4; letter-spacing: 0.06em; color: var(--ink-quiet); }

/* ----------------------------------------------------------
   IMAGE GRID — verify card chassis, retuned to 3:2 photos.
---------------------------------------------------------- */
.gallery-img-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--s-7) var(--s-5);
}
@media (max-width: 880px) { .gallery-img-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-6) var(--s-4); } }
@media (max-width: 540px) { .gallery-img-grid { grid-template-columns: 1fr; } }
.gallery-img-card {
	/* button-defaults reset (op-learning #10) */
	display: block; width: 100%; border: 0; padding: 0; font: inherit;
	text-align: left; color: inherit; background: transparent;
	cursor: pointer;
	transition: transform var(--motion-duration-content) var(--motion-ease-content);
}
.gallery-img-card:hover { transform: translateY(-2px); }
.gallery-img-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 2px; }
.gallery-img-thumb {
	aspect-ratio: 3 / 2;
	background: var(--paper-warm);
	border: 1px solid var(--rule);
	overflow: hidden; position: relative;
	transition: border-color var(--motion-duration-content) var(--motion-ease-content),
				box-shadow var(--motion-duration-content) var(--motion-ease-content);
}
.gallery-img-card:hover .gallery-img-thumb {
	border-color: var(--ink-quiet);
	box-shadow: 0 12px 32px rgba(20,20,19,0.10);
}
.gallery-img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* empty state (verify no-results language) */
.gallery-empty { text-align: center; padding-block: var(--s-9); color: var(--ink-quiet); }
.gallery-empty-title { font-family: var(--serif); font-size: 24px; font-style: italic; color: var(--ink-soft); margin: 0 0 var(--s-3); }
.gallery-empty-detail { font-family: var(--sans); font-size: 14px; margin: 0; }

/* hidden by filter */
.is-filtered-out { display: none !important; }

/* ----------------------------------------------------------
   VIDEO LIGHTBOX — recap pattern
---------------------------------------------------------- */
.gallery-video-lightbox {
	position: fixed; inset: 0;
	z-index: 110;
	background: rgba(20, 20, 19, 0.94);
	display: flex; align-items: center; justify-content: center;
	padding: var(--s-5);
	opacity: 0;
	transition: opacity var(--motion-duration-content) var(--motion-ease-content);
}
.gallery-video-lightbox.is-open { opacity: 1; }
.gallery-video-lightbox[hidden] { display: none; }
.gallery-vlb-inner { width: 100%; max-width: 1100px; }
.gallery-vlb-frame { width: 100%; aspect-ratio: 16 / 9; background: #000; position: relative; overflow: hidden; border-radius: 4px; }
.gallery-vlb-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery-vlb-caption { color: rgba(255,255,255,.85); font-family: var(--sans); font-size: 14px; margin-top: var(--s-4); text-align: center; }
.gallery-vlb-caption strong { color: #fff; font-family: var(--serif); font-size: 18px; font-weight: 500; display: block; margin-bottom: 2px; }

/* ----------------------------------------------------------
   IMAGE LIGHTBOX — verify pattern
---------------------------------------------------------- */
.gallery-image-lightbox {
	position: fixed; inset: 0;
	background: rgba(20, 20, 19, 0.92);
	display: none; align-items: center; justify-content: center;
	z-index: 110; padding: var(--s-5);
	cursor: zoom-out;
}
.gallery-image-lightbox.is-open { display: flex; }
.gallery-ilb-content { max-width: 1100px; width: 100%; cursor: default; display: flex; flex-direction: column; align-items: center; gap: var(--s-5); }
.gallery-ilb-image { max-width: 100%; max-height: 80vh; object-fit: contain; background: #fff; box-shadow: 0 16px 48px rgba(0,0,0,0.4); }
.gallery-ilb-caption { text-align: center; color: rgba(255,255,255,.85); font-family: var(--sans); font-size: 14px; }

/* ----------------------------------------------------------
   SHARED LIGHTBOX CONTROLS (close + prev/next)
---------------------------------------------------------- */
.gallery-lightbox-close {
	position: fixed; top: var(--s-5); right: var(--s-5);
	width: 40px; height: 40px; border-radius: 50%;
	background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
	color: #fff; cursor: pointer;
	display: flex; align-items: center; justify-content: center; line-height: 0;
	z-index: 5;
	transition: background var(--motion-duration-ui) var(--motion-ease-ui);
}
.gallery-lightbox-close:hover { background: rgba(255,255,255,.2); }
.gallery-lightbox-close svg { width: 20px; height: 20px; display: block; }
.gallery-lightbox-nav {
	position: fixed; top: 50%; transform: translateY(-50%);
	width: 44px; height: 44px; border-radius: 50%;
	background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
	color: #fff; cursor: pointer;
	display: flex; align-items: center; justify-content: center; z-index: 5;
	transition: background var(--motion-duration-ui) var(--motion-ease-ui);
}
.gallery-lightbox-nav:hover { background: rgba(255,255,255,.2); }
.gallery-lightbox-nav.is-prev { left: var(--s-5); }
.gallery-lightbox-nav.is-next { right: var(--s-5); }
.gallery-lightbox-nav svg { width: 22px; height: 22px; }
.gallery-lightbox-nav[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
	.gallery-video-lightbox,
	.gallery-img-card,
	.gallery-pill,
	.gallery-video-frame .play-glyph { transition: none; }
}
