/* Arch2O Gallery Lightbox */
html.a2gl-lock { overflow: hidden; }
html.a2gl-lock body { padding-right: var(--a2gl-sbw, 0); }

.a2gl {
	--a2gl-bg: #22252b;
	--a2gl-fg: #fff;
	--a2gl-side-bg: #fff;
	--a2gl-side-w: 460px;
	--a2gl-accent: #0b2a8a;
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--a2gl-side-w);
	background: var(--a2gl-bg);
	color: var(--a2gl-fg);
	font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	opacity: 0;
	transition: opacity .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.a2gl[hidden] { display: none; }
.a2gl.is-open { opacity: 1; }
.a2gl--noside { grid-template-columns: minmax(0, 1fr); }
.a2gl *, .a2gl *::before, .a2gl *::after { box-sizing: border-box; }
.a2gl button { font: inherit; color: inherit; cursor: pointer; }
.a2gl a { color: inherit; }
.a2gl:focus { outline: none; }

/* ---- main area ---- */
.a2gl__main { position: relative; overflow: hidden; min-height: 0; height: 100vh; height: 100dvh; }

.a2gl__stage {
	position: absolute;
	inset: 0 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	touch-action: pan-y pinch-zoom;
}
.a2gl__img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
	cursor: zoom-in;
	transition: transform .25s ease, opacity .2s ease;
}
.a2gl.is-loading .a2gl__img { opacity: 0; }
.a2gl.is-zoomed .a2gl__img { transform: scale(2.2); cursor: zoom-out; transition: transform .25s ease; }
.a2gl.is-zoomed .a2gl__stage { touch-action: none; }

.a2gl__spin {
	position: absolute;
	top: 50%; left: 50%;
	width: 36px; height: 36px;
	margin: -18px 0 0 -18px;
	border: 3px solid rgba(255,255,255,.25);
	border-top-color: #fff;
	border-radius: 50%;
	animation: a2gl-spin .8s linear infinite;
	display: none;
	pointer-events: none;
}
.a2gl.is-loading .a2gl__spin { display: block; }
@keyframes a2gl-spin { to { transform: rotate(360deg); } }

/* header overlay */
.a2gl__head, .a2gl__foot {
	position: absolute;
	left: 0; right: 0;
	display: flex;
	gap: 16px;
	padding: 20px 12px;
	pointer-events: none;
	text-shadow: 0 1px 3px rgba(0,0,0,.6);
	transition: opacity .2s;
}
.a2gl__head { top: 0; align-items: flex-start; justify-content: space-between; background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,0)); }
.a2gl--noside .a2gl__head { padding-right: 72px; }
.a2gl__head > *, .a2gl__foot > * { pointer-events: auto; }
.a2gl.is-zoomed .a2gl__head, .a2gl.is-zoomed .a2gl__foot, .a2gl.is-zoomed .a2gl__cta { opacity: 0; pointer-events: none; }
.a2gl.is-zoomed .a2gl__head *, .a2gl.is-zoomed .a2gl__foot * { pointer-events: none; }
.a2gl.is-zoomed .a2gl__tools, .a2gl.is-zoomed .a2gl__tools * { pointer-events: auto; }
.a2gl.is-zoomed .a2gl__foot { opacity: 1; background: none; }
.a2gl.is-zoomed .a2gl__tags { visibility: hidden; }

.a2gl__info { min-width: 0; max-width: 70ch; }
.a2gl__title { margin: 0 0 6px; font-size: 26px; line-height: 1.2; font-weight: 600; color: #fff; letter-spacing: 0; }
.a2gl__credit, .a2gl__counter { font-size: 17px; font-weight: 500; }
.a2gl__credit { margin-bottom: 6px; }
.a2gl__caption { margin-top: 8px; font-size: 14px; opacity: .9; max-width: 60ch; }
.a2gl [hidden] { display: none !important; }

.a2gl__actions { display: flex; gap: 10px; flex-shrink: 0; }
.a2gl__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 14px;
	background: rgba(0,0,0,.15);
	border: 1px solid rgba(255,255,255,.85);
	border-radius: 2px;
	font-size: 15px;
	white-space: nowrap;
	transition: background .15s;
}
.a2gl__btn--icon { width: 42px; padding: 0; justify-content: center; }
.a2gl__btn:hover, .a2gl__btn:focus-visible { background: rgba(255,255,255,.15); }

.a2gl__sharewrap { position: relative; }
.a2gl__sharemenu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 170px;
	padding: 6px 0;
	background: #fff;
	color: #111;
	border-radius: 4px;
	box-shadow: 0 8px 24px rgba(0,0,0,.3);
	text-shadow: none;
	z-index: 3;
}
.a2gl__shareitem { display: block; width: 100%; padding: 9px 16px; background: none; border: 0; text-align: left; color: #111 !important; font-size: 14px; }
.a2gl__shareitem:hover, .a2gl__shareitem:focus-visible { background: #f1f2f4; }

/* arrows */
.a2gl__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 56px;
	height: 96px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	opacity: .8;
	z-index: 2;
	transition: opacity .15s;
}
.a2gl__nav:hover, .a2gl__nav:focus-visible { opacity: 1; }
.a2gl__nav--prev { left: 4px; }
.a2gl__nav--next { right: 4px; }
.a2gl.is-zoomed .a2gl__nav { display: none; }

/* footer overlay */
.a2gl__foot {
	bottom: 0;
	flex-direction: column;
	gap: 12px;
	background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.45));
}
.a2gl__tools { display: flex; align-items: center; gap: 14px; }
.a2gl__tool {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	background: none;
	border: 0;
	font-size: 17px;
	font-weight: 600;
	text-decoration: none;
}
.a2gl__tool:hover, .a2gl__tool:focus-visible { text-decoration: underline; }
.a2gl__sep { width: 1px; height: 20px; background: currentColor; opacity: .8; }
.a2gl__tags { display: flex; flex-wrap: wrap; gap: 10px; }
.a2gl__tags:empty { display: none; }
.a2gl__tag {
	display: inline-block;
	padding: 6px 18px;
	border: 1px solid rgba(255,255,255,.85);
	border-radius: 2px;
	background: rgba(0,0,0,.2);
	font-size: 15px;
	text-decoration: none;
	transition: background .15s;
}
a.a2gl__tag:hover, a.a2gl__tag:focus-visible { background: rgba(255,255,255,.18); }

/* notice / CTA */
.a2gl__cta {
	position: absolute;
	bottom: 84px;
	left: 50%;
	transform: translateX(-30%);
	display: flex;
	align-items: center;
	gap: 22px;
	max-width: calc(100% - 40px);
	padding: 12px 14px 12px 22px;
	background: #fff;
	color: #222;
	box-shadow: 0 4px 18px rgba(0,0,0,.25);
	z-index: 2;
	transition: transform .2s, opacity .2s;
}
.a2gl__cta-text { font-size: 15px; }
.a2gl__cta-btn {
	display: inline-block;
	padding: 8px 18px;
	background: var(--a2gl-accent);
	color: #fff !important;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.a2gl__cta-toggle { background: none; border: 0; padding: 4px; color: var(--a2gl-accent) !important; display: flex; transition: transform .2s; }
.a2gl__cta.is-collapsed { padding: 6px; gap: 0; }
.a2gl__cta.is-collapsed .a2gl__cta-text, .a2gl__cta.is-collapsed .a2gl__cta-btn { display: none; }
.a2gl__cta.is-collapsed .a2gl__cta-toggle { transform: rotate(180deg); }

/* ---- side panel ---- */
.a2gl__side {
	position: relative;
	background: var(--a2gl-side-bg);
	color: #222;
	padding: 24px 24px 32px;
	overflow-y: auto;
	overscroll-behavior: contain;
	height: 100vh;
	height: 100dvh;
}
.a2gl__side-title {
	margin: 4px 48px 18px 0;
	font-size: 20px;
	font-weight: 600;
	color: #222;
	line-height: 1.3;
}
.a2gl__brands { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.a2gl__brand {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1.05;
	overflow: hidden;
	background: #e9e9e9;
	text-decoration: none;
}
.a2gl__brand-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
a.a2gl__brand:hover .a2gl__brand-img { transform: scale(1.04); }
.a2gl__brand-label {
	position: absolute;
	left: 0;
	bottom: 15%;
	width: 75%;
	min-height: 32%;
	display: flex;
	align-items: center;
	padding: 8px 12px;
	background: #fff;
	color: #111;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.1;
	overflow: hidden;
}
.a2gl__brand-logo { max-width: 100%; max-height: 48px; width: auto; height: auto; display: block; }
.a2gl__ad { margin-top: 22px; min-height: 250px; display: flex; justify-content: center; align-items: flex-start; overflow: hidden; }
.a2gl__ad > * { max-width: 100%; }

.a2gl__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	color: #9a9a9a !important;
	z-index: 5;
	transition: color .15s;
}
.a2gl__close:hover, .a2gl__close:focus-visible { color: #222 !important; }
.a2gl--noside .a2gl__close { color: #fff !important; }

.a2gl button:focus-visible, .a2gl a:focus-visible { outline: 2px solid #6aa0ff; outline-offset: 2px; }

/* ---- responsive ---- */
@media (max-width: 1280px) { .a2gl { --a2gl-side-w: 360px; } .a2gl__brand-label { font-size: 18px; } }

@media (max-width: 900px) {
	.a2gl { grid-template-columns: minmax(0, 1fr); }
	.a2gl__side { display: none; }
	.a2gl__close { color: #fff !important; }
	.a2gl__head { padding-right: 64px; }
	.a2gl__stage { inset: 0; }
	.a2gl__nav { width: 44px; height: 72px; background: rgba(0,0,0,.25); }
	.a2gl__nav svg { width: 16px; height: 32px; }
	.a2gl__title { font-size: 19px; }
	.a2gl__credit, .a2gl__counter, .a2gl__tool { font-size: 14px; }
	.a2gl__btn { height: 36px; padding: 0 10px; font-size: 13px; }
	.a2gl__btn--icon { width: 38px; padding: 0; }
	.a2gl__btn span { display: none; }
	.a2gl__btn svg + span { display: none; }
	.a2gl__tag { padding: 4px 12px; font-size: 13px; }
	.a2gl__cta { left: 12px; right: 12px; transform: none; bottom: 120px; max-width: none; gap: 12px; padding: 10px 10px 10px 14px; }
	.a2gl__cta-text { font-size: 13px; flex: 1; }
	.a2gl__cta.is-collapsed { left: auto; }

	/* Optional: side panel stacked under the image */
	.a2gl--side-mobile { overflow-y: auto; display: block; }
	.a2gl--side-mobile .a2gl__main { height: 88vh; height: 88dvh; }
	.a2gl--side-mobile .a2gl__side { display: block; height: auto; }
	.a2gl--side-mobile .a2gl__close { position: fixed; }
}

@media (prefers-reduced-motion: reduce) {
	.a2gl, .a2gl__img, .a2gl__brand-img { transition: none; }
}
