/* Accessible gallery lightbox, scoped to frontend image galleries. */
.g3p-lightbox[hidden], .g3p-lightbox [hidden] { display: none !important; }
.g3p-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 16px;
	background: rgba(14, 10, 16, .94);
	color: #fff;
}
.g3p-lightbox__panel {
	position: relative;
	width: min(100%, 1400px);
	height: min(100%, 1000px);
	display: grid;
	grid-template-columns: minmax(38px, 64px) minmax(0, 1fr) minmax(38px, 64px);
	align-items: center;
}
.g3p-lightbox__figure {
	grid-column: 2;
	grid-row: 1;
	display: flex;
	min-width: 0;
	min-height: 0;
	max-height: 100%;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 0;
}
.g3p-lightbox__image {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: min(78vh, 840px);
	object-fit: contain;
	border-radius: 5px;
	box-shadow: 0 12px 44px rgba(0,0,0,.3);
}
.g3p-lightbox__caption {
	max-width: 100%;
	text-align: center;
	font-size: 14px;
	line-height: 1.5;
	color: #f6f2f5;
}
.g3p-lightbox button {
	display: grid;
	place-items: center;
	padding: 0;
	border: 1px solid rgba(255,255,255,.32);
	border-radius: 50%;
	background: rgba(255,255,255,.12);
	color: #fff;
	cursor: pointer;
	font-family: inherit;
	line-height: 1;
}
.g3p-lightbox button:focus-visible { outline: 3px solid #F2C94C; outline-offset: 3px; }
.g3p-lightbox button:hover { background: rgba(255,255,255,.23); }
/* Quiet, inset close control with a consistent cross on every platform. */
.g3p-lightbox .g3p-lightbox__close {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 3;
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	border: 1px solid rgba(255,255,255,.36);
	border-radius: 50%;
	background: rgba(28,26,32,.78);
	color: transparent;
	font-size: 0;
	line-height: 0;
	box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.g3p-lightbox .g3p-lightbox__close::before,
.g3p-lightbox .g3p-lightbox__close::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 19px;
	height: 2px;
	border-radius: 2px;
	background: #fff;
	pointer-events: none;
}
.g3p-lightbox .g3p-lightbox__close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}
.g3p-lightbox .g3p-lightbox__close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}
.g3p-lightbox .g3p-lightbox__close:focus-visible {
	outline: 2px solid rgba(255,255,255,.94);
	outline-offset: 3px;
}
/* Programmatic modal focus remains accessible, but mouse users don't see a ring on open. */
.g3p-lightbox.g3p-lightbox--pointer-open .g3p-lightbox__close:focus-visible {
	outline: none;
}
.g3p-lightbox__nav {
	position: relative;
	width: 46px;
	height: 46px;
	justify-self: center;
	font-size: 36px;
}
.g3p-lightbox__prev { grid-column: 1; grid-row: 1; }
.g3p-lightbox__next { grid-column: 3; grid-row: 1; }
.g3p-lightbox__counter {
	position: absolute;
	bottom: 6px;
	left: 50%;
	transform: translateX(-50%);
	color: #f6f2f5;
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}
@media (max-width: 600px) {
	.g3p-lightbox { padding: 8px; }
	.g3p-lightbox__panel { grid-template-columns: 44px minmax(0,1fr) 44px; }
	.g3p-lightbox__nav { width: 38px; height: 38px; font-size: 32px; }
	.g3p-lightbox .g3p-lightbox__close { top: 12px; right: 12px; }
	.g3p-lightbox__image { max-height: 73vh; }
}

/* Hide only a leading imported duplicate of the assigned featured image. */
.gym-single-post__content > .g3p-redundant-featured-lead { display: none !important; }

/* Keyboard focus for gallery images and existing image links. */
.g3p-gallery-trigger { cursor: zoom-in; }
.g3p-gallery-trigger:focus-visible,
:is(.wp-block-gallery, .gallery) a:focus-visible { outline: 3px solid var(--gym-focus, #7A1F3D); outline-offset: 3px; }
