/* Google Drive Gallery — front-end */

.gdg-gallery {
	--gdg-gap: 14px;
	--gdg-radius: 10px;
	--gdg-ink: #171717;
	--gdg-muted: #6b6b6b;
	--gdg-surface: #eceae4;
	--gdg-accent: #1f6f5b;
	--gdg-frame: #ffffff;
	--gdg-shadow: 0 14px 36px rgba(18, 18, 18, 0.12);
	--gdg-embed-height: 520px;
	box-sizing: border-box;
	width: 100%;
	margin: 1.75rem 0;
	color: var(--gdg-ink);
	font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

.gdg-gallery *,
.gdg-gallery *::before,
.gdg-gallery *::after {
	box-sizing: border-box;
}

/* Themes */
.gdg-theme-studio {
	--gdg-ink: #171717;
	--gdg-surface: #eceae4;
	--gdg-accent: #1f6f5b;
	--gdg-frame: #fff;
}

.gdg-theme-editorial {
	--gdg-ink: #121212;
	--gdg-surface: #e4e0d8;
	--gdg-accent: #8a3b12;
	--gdg-radius: 2px;
	--gdg-frame: #f7f4ef;
}

.gdg-theme-minimal {
	--gdg-ink: #222;
	--gdg-surface: #f2f2f2;
	--gdg-accent: #333;
	--gdg-radius: 0;
	--gdg-shadow: none;
	--gdg-frame: transparent;
}

.gdg-theme-darkroom {
	--gdg-ink: #f2f2f2;
	--gdg-muted: #a8a8a8;
	--gdg-surface: #1c1c1c;
	--gdg-accent: #d4a017;
	--gdg-frame: #111;
	--gdg-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
	padding: 1.25rem;
	border-radius: calc(var(--gdg-radius) + 4px);
	background: #0e0e0e;
}

.gdg-gallery-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.gdg-gallery-title {
	margin: 0;
	font-size: clamp(1.35rem, 2.2vw, 1.9rem);
	font-weight: 650;
	letter-spacing: -0.025em;
	line-height: 1.15;
}

.gdg-gallery-meta {
	margin: 0;
	font-size: 0.85rem;
	color: var(--gdg-muted);
	white-space: nowrap;
}

.gdg-gallery.gdg-error,
.gdg-gallery.gdg-empty,
.gdg-gallery.gdg-notice {
	padding: 1rem 1.25rem;
	border-radius: var(--gdg-radius);
	background: var(--gdg-surface);
	color: var(--gdg-muted);
}

.gdg-gallery.gdg-notice {
	margin-bottom: 0.75rem;
	border-left: 3px solid var(--gdg-accent);
	color: var(--gdg-ink);
}

.gdg-grid {
	display: grid;
	gap: var(--gdg-gap);
	grid-template-columns: repeat(var(--gdg-cols, 3), minmax(0, 1fr));
}

.gdg-cols-1 { --gdg-cols: 1; }
.gdg-cols-2 { --gdg-cols: 2; }
.gdg-cols-3 { --gdg-cols: 3; }
.gdg-cols-4 { --gdg-cols: 4; }
.gdg-cols-5 { --gdg-cols: 5; }
.gdg-cols-6 { --gdg-cols: 6; }
.gdg-cols-7 { --gdg-cols: 7; }
.gdg-cols-8 { --gdg-cols: 8; }

.gdg-item {
	position: relative;
	margin: 0;
	overflow: hidden;
	border: 0 !important;
	outline: none !important;
	border-radius: var(--gdg-radius);
	background: var(--gdg-surface);
	isolation: isolate;
	box-shadow: none;
	transition: transform 0.35s ease, box-shadow 0.35s ease;
	animation: gdg-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
	animation-delay: calc(var(--gdg-i, 0) * 40ms);
}

.gdg-item:hover,
.gdg-item:focus,
.gdg-item:focus-within {
	border: 0 !important;
	outline: none !important;
}

.gdg-item:nth-child(1) { --gdg-i: 0; }
.gdg-item:nth-child(2) { --gdg-i: 1; }
.gdg-item:nth-child(3) { --gdg-i: 2; }
.gdg-item:nth-child(4) { --gdg-i: 3; }
.gdg-item:nth-child(5) { --gdg-i: 4; }
.gdg-item:nth-child(6) { --gdg-i: 5; }
.gdg-item:nth-child(7) { --gdg-i: 6; }
.gdg-item:nth-child(8) { --gdg-i: 7; }
.gdg-item:nth-child(9) { --gdg-i: 8; }
.gdg-item:nth-child(10) { --gdg-i: 9; }
.gdg-item:nth-child(n+11) { --gdg-i: 10; }

@keyframes gdg-rise {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.gdg-item-frame {
	position: relative;
	height: 100%;
	overflow: hidden;
	background: var(--gdg-frame);
}

.gdg-item-link {
	display: block;
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 100%;
	padding: 0;
	margin: 0;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	cursor: zoom-in;
	color: inherit;
	text-decoration: none !important;
	appearance: none;
	-webkit-appearance: none;
	z-index: 1;
}

.gdg-item-link:hover,
.gdg-item-link:focus,
.gdg-item-link:focus-visible,
.gdg-item-link:active,
.gdg-item-link:focus-within {
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	text-decoration: none !important;
}

/* Neutral keyboard focus — overrides theme magenta/red focus rings */
.gdg-gallery .gdg-item-link:focus-visible {
	outline: 2px solid rgba(23, 23, 23, 0.35) !important;
	outline-offset: 3px;
}

.gdg-item img,
.gdg-item-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	vertical-align: middle;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Maiyo-style auto / fixed row sizing */
.gdg-auto-rows .gdg-item {
	align-self: stretch;
}

.gdg-auto-rows .gdg-item-image,
.gdg-auto-rows .gdg-item img {
	height: 100%;
	min-height: 100%;
	object-fit: cover;
}

.gdg-fixed-rows .gdg-item-image,
.gdg-fixed-rows .gdg-item img {
	height: auto;
	min-height: 0;
	object-fit: cover;
}

.gdg-item:hover img,
.gdg-item:focus-within img {
	filter: none;
}

/* Shine / zoom-hint removed — kept as no-ops if old markup is cached */
.gdg-item-shine,
.gdg-zoom-hint {
	display: none;
}

.gdg-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 1.9rem 0.9rem 0.75rem;
	font-size: 0.8rem;
	line-height: 1.3;
	color: #fff;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.68));
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Caption overlay only on pointer hover — not sticky focus (avoids dark overlay on first tile) */
.gdg-item:hover .gdg-caption,
.gdg-captions-always .gdg-caption {
	opacity: 1;
	transform: translateY(0);
}

/* Grid */
.gdg-layout-grid .gdg-grid {
	display: grid;
	grid-template-columns: repeat(var(--gdg-cols, 3), minmax(0, 1fr));
	gap: var(--gdg-gap);
}

.gdg-layout-grid .gdg-item {
	aspect-ratio: var(--gdg-grid-aspect, 1 / 1);
}

.gdg-layout-grid .gdg-item-image,
.gdg-layout-grid .gdg-item img {
	aspect-ratio: var(--gdg-grid-aspect, 1 / 1);
	object-fit: cover;
	height: 100%;
}

/* Masonry — multi-column + aspect cycling */
.gdg-layout-masonry .gdg-grid {
	display: block;
	columns: var(--gdg-cols, 3);
	column-gap: var(--gdg-gap);
}

.gdg-layout-masonry .gdg-item {
	break-inside: avoid;
	margin-bottom: var(--gdg-gap);
	aspect-ratio: auto;
	display: inline-block;
	width: 100%;
}

.gdg-layout-masonry .gdg-item-image,
.gdg-layout-masonry .gdg-item img {
	height: auto;
	object-fit: cover;
	aspect-ratio: 4 / 3;
}

.gdg-layout-masonry .gdg-item:nth-child(3n + 1) .gdg-item-image,
.gdg-layout-masonry .gdg-item:nth-child(3n + 1) img {
	aspect-ratio: 3 / 4;
}

.gdg-layout-masonry .gdg-item:nth-child(4n + 2) .gdg-item-image,
.gdg-layout-masonry .gdg-item:nth-child(4n + 2) img {
	aspect-ratio: 1 / 1;
}

.gdg-layout-masonry .gdg-item:nth-child(5n) .gdg-item-image,
.gdg-layout-masonry .gdg-item:nth-child(5n) img {
	aspect-ratio: 16 / 10;
}

/* Justified — flex rows (Maiyo style) */
.gdg-layout-justified .gdg-grid {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gdg-gap);
	grid-template-columns: none;
	grid-auto-rows: auto;
}

.gdg-layout-justified .gdg-item {
	flex: 1 1 calc((100% / var(--gdg-cols, 3)) - var(--gdg-gap));
	min-width: min(220px, 100%);
	grid-row-end: auto;
	aspect-ratio: auto;
	height: auto;
}

.gdg-layout-justified .gdg-item:nth-child(4n + 1) {
	flex-grow: 1.45;
}

.gdg-layout-justified .gdg-item:nth-child(5n + 2) {
	flex-grow: 1.25;
}

.gdg-layout-justified .gdg-item-image,
.gdg-layout-justified .gdg-item img {
	aspect-ratio: 16 / 10;
	min-height: 0;
	height: 100%;
	object-fit: cover;
}

/* Dense span layouts: collage / bento / magazine / panorama */
.gdg-layout-collage .gdg-grid,
.gdg-layout-bento .gdg-grid,
.gdg-layout-magazine .gdg-grid,
.gdg-layout-panorama .gdg-grid,
.gdg-layout-stack .gdg-grid,
.gdg-layout-diamond .gdg-grid {
	display: grid;
	grid-template-columns: repeat(var(--gdg-cols, 4), minmax(0, 1fr));
	gap: var(--gdg-gap);
	grid-auto-flow: dense;
}

.gdg-layout-collage .gdg-item-wide,
.gdg-layout-bento .gdg-item-wide {
	grid-column: span 2;
}

.gdg-layout-collage .gdg-item-tall,
.gdg-layout-bento .gdg-item-tall {
	grid-row: span 2;
}

.gdg-layout-collage.gdg-featured-first .gdg-item:first-child,
.gdg-layout-bento.gdg-featured-first .gdg-item:first-child {
	grid-column: span 2;
	grid-row: span 2;
}

.gdg-layout-collage .gdg-item-tall .gdg-item-image,
.gdg-layout-collage .gdg-item-tall img,
.gdg-layout-collage.gdg-featured-first .gdg-item:first-child .gdg-item-image,
.gdg-layout-collage.gdg-featured-first .gdg-item:first-child img {
	aspect-ratio: 3 / 4;
	height: 100%;
	object-fit: cover;
}

.gdg-layout-collage .gdg-item-wide .gdg-item-image,
.gdg-layout-collage .gdg-item-wide img {
	aspect-ratio: 16 / 9;
	height: 100%;
	object-fit: cover;
}

.gdg-layout-bento .gdg-item {
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.gdg-layout-bento .gdg-item:nth-child(6n + 1) .gdg-item-image,
.gdg-layout-bento .gdg-item:nth-child(6n + 1) img {
	aspect-ratio: 1 / 1;
}

.gdg-layout-bento .gdg-item:nth-child(6n + 2) .gdg-item-image,
.gdg-layout-bento .gdg-item:nth-child(6n + 2) img,
.gdg-layout-bento .gdg-item-wide .gdg-item-image,
.gdg-layout-bento .gdg-item-wide img {
	aspect-ratio: 16 / 10;
}

.gdg-layout-bento .gdg-item-tall .gdg-item-image,
.gdg-layout-bento .gdg-item-tall img,
.gdg-layout-bento.gdg-featured-first .gdg-item:first-child .gdg-item-image,
.gdg-layout-bento.gdg-featured-first .gdg-item:first-child img {
	aspect-ratio: 4 / 5;
	height: 100%;
	object-fit: cover;
}

.gdg-layout-magazine .gdg-item:first-child {
	grid-column: span 3;
	grid-row: span 2;
}

.gdg-layout-magazine .gdg-item:first-child .gdg-item-image,
.gdg-layout-magazine .gdg-item:first-child img {
	aspect-ratio: 16 / 9;
	height: 100%;
	object-fit: cover;
}

.gdg-layout-magazine .gdg-item-wide:not(:first-child) {
	grid-column: span 2;
}

.gdg-layout-magazine .gdg-item-tall:not(:first-child) {
	grid-row: span 2;
}

.gdg-layout-magazine .gdg-item:nth-child(4n + 2) .gdg-item-image,
.gdg-layout-magazine .gdg-item:nth-child(4n + 2) img {
	aspect-ratio: 3 / 4;
}

.gdg-layout-magazine .gdg-item:nth-child(5n) .gdg-item-image,
.gdg-layout-magazine .gdg-item:nth-child(5n) img {
	aspect-ratio: 16 / 11;
}

.gdg-layout-panorama .gdg-item {
	grid-column: span 2;
}

.gdg-layout-panorama .gdg-item:nth-child(3n + 1) {
	grid-column: 1 / -1;
}

.gdg-layout-panorama .gdg-item-image,
.gdg-layout-panorama .gdg-item img {
	aspect-ratio: 21 / 9;
	height: 100%;
	object-fit: cover;
}

.gdg-layout-panorama .gdg-item:nth-child(3n + 2) .gdg-item-image,
.gdg-layout-panorama .gdg-item:nth-child(3n + 2) img {
	aspect-ratio: 16 / 9;
}

/* Stacked cards */
.gdg-layout-stack .gdg-grid {
	padding: clamp(0.5rem, 2vw, 1.5rem);
}

.gdg-layout-stack .gdg-item {
	overflow: visible;
	background: transparent;
	box-shadow: none;
}

.gdg-layout-stack .gdg-item-frame,
.gdg-layout-stack .gdg-item-link {
	border-radius: var(--gdg-radius);
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.24);
	overflow: hidden;
}

.gdg-layout-stack .gdg-item::before,
.gdg-layout-stack .gdg-item::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: var(--gdg-radius);
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
	transform-origin: center;
	z-index: -1;
	pointer-events: none;
}

.gdg-stack-soft .gdg-item::before { transform: rotate(-2deg) translate(-4px, 5px); }
.gdg-stack-soft .gdg-item::after { transform: rotate(2deg) translate(4px, -4px); }
.gdg-stack-medium .gdg-item::before { transform: rotate(-4deg) translate(-7px, 8px); }
.gdg-stack-medium .gdg-item::after { transform: rotate(3deg) translate(7px, -6px); }
.gdg-stack-bold .gdg-item::before { transform: rotate(-7deg) translate(-10px, 12px); }
.gdg-stack-bold .gdg-item::after { transform: rotate(5deg) translate(10px, -9px); }

.gdg-item-stack-2 { transform: rotate(-1.5deg); }
.gdg-item-stack-3 { transform: rotate(1.2deg); }
.gdg-item-stack-4 { transform: rotate(-0.8deg); }
.gdg-item-stack-5 { transform: rotate(1.8deg); }

.gdg-layout-stack .gdg-item-image,
.gdg-layout-stack .gdg-item img {
	aspect-ratio: 4 / 3;
	height: auto;
	object-fit: cover;
}

/* Diamond tiles */
.gdg-layout-diamond .gdg-grid {
	gap: calc(var(--gdg-gap) * 1.4);
	padding: clamp(1rem, 3vw, 2.5rem);
}

.gdg-layout-diamond .gdg-item {
	aspect-ratio: 1 / 1;
	transform: rotate(45deg) scale(0.78);
	box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.gdg-layout-diamond .gdg-item-frame,
.gdg-layout-diamond .gdg-item-link {
	position: absolute;
	inset: -22%;
	transform: rotate(-45deg);
	height: auto;
	width: auto;
}

.gdg-layout-diamond .gdg-item-image,
.gdg-layout-diamond .gdg-item img {
	aspect-ratio: 1 / 1;
	transform: scale(1.18);
	height: 100%;
	object-fit: cover;
}

.gdg-layout-diamond .gdg-caption {
	bottom: 12%;
	left: 12%;
	right: 12%;
}

.gdg-layout-diamond.gdg-hover-lift .gdg-item:hover,
.gdg-layout-diamond.gdg-hover-lift .gdg-item:focus-within {
	transform: rotate(45deg) scale(0.82) translateY(-5px);
	border: 0 !important;
	outline: none !important;
}

/* Hover modes */
.gdg-hover-lift .gdg-item {
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gdg-hover-lift .gdg-item:hover,
.gdg-hover-lift .gdg-item:focus-within {
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
	transform: translateY(-4px);
	border: 0 !important;
	outline: none !important;
	z-index: 2;
}

.gdg-layout-stack.gdg-hover-lift .gdg-item-stack-2:hover,
.gdg-layout-stack.gdg-hover-lift .gdg-item-stack-2:focus-within { transform: rotate(-1.5deg) translateY(-5px); }
.gdg-layout-stack.gdg-hover-lift .gdg-item-stack-3:hover,
.gdg-layout-stack.gdg-hover-lift .gdg-item-stack-3:focus-within { transform: rotate(1.2deg) translateY(-5px); }
.gdg-layout-stack.gdg-hover-lift .gdg-item-stack-4:hover,
.gdg-layout-stack.gdg-hover-lift .gdg-item-stack-4:focus-within { transform: rotate(-0.8deg) translateY(-5px); }
.gdg-layout-stack.gdg-hover-lift .gdg-item-stack-5:hover,
.gdg-layout-stack.gdg-hover-lift .gdg-item-stack-5:focus-within { transform: rotate(1.8deg) translateY(-5px); }

.gdg-hover-zoom .gdg-item-frame,
.gdg-hover-zoom .gdg-item-link {
	overflow: hidden;
}

.gdg-hover-zoom .gdg-item-image,
.gdg-hover-zoom .gdg-item img {
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.gdg-hover-zoom .gdg-item:hover .gdg-item-image,
.gdg-hover-zoom .gdg-item:hover img,
.gdg-hover-zoom .gdg-item:focus-within .gdg-item-image,
.gdg-hover-zoom .gdg-item:focus-within img {
	transform: scale(1.08);
}

.gdg-hover-none .gdg-item:hover,
.gdg-hover-none .gdg-item:focus-within {
	transform: none;
	box-shadow: none;
}

.gdg-hover-none .gdg-item:hover img,
.gdg-hover-none .gdg-item:focus-within img,
.gdg-hover-none .gdg-item:hover .gdg-item-image,
.gdg-hover-none .gdg-item:focus-within .gdg-item-image {
	transform: none;
	filter: none;
}

.gdg-hover-reveal .gdg-caption {
	opacity: 0;
	transform: translateY(12px);
}

.gdg-hover-reveal .gdg-item:hover .gdg-caption,
.gdg-hover-reveal .gdg-item:focus-within .gdg-caption,
.gdg-hover-reveal.gdg-captions-always .gdg-caption {
	opacity: 1;
	transform: translateY(0);
}

/* Carousel */
.gdg-carousel {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.gdg-carousel-track {
	display: flex;
	gap: var(--gdg-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 0.35rem 0.15rem 0.85rem;
	flex: 1 1 calc(100% - 6rem);
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.gdg-carousel-track .gdg-item {
	flex: 0 0 min(78%, var(--gdg-carousel-width, 440px));
	scroll-snap-align: center;
	aspect-ratio: var(--gdg-carousel-aspect, 4 / 3);
}

.gdg-carousel-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.6rem;
	height: 2.6rem;
	border: 0;
	border-radius: 999px;
	background: var(--gdg-ink);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.gdg-carousel-btn:hover,
.gdg-carousel-btn:focus-visible {
	background: var(--gdg-accent);
	outline: none;
	transform: scale(1.05);
}

.gdg-carousel-dots {
	display: flex;
	justify-content: center;
	gap: 0.35rem;
	width: 100%;
}

.gdg-carousel-dots button {
	width: 0.45rem;
	height: 0.45rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.22);
	cursor: pointer;
}

.gdg-theme-darkroom .gdg-carousel-dots button {
	background: rgba(255, 255, 255, 0.28);
}

.gdg-carousel-dots button.is-active {
	width: 1.1rem;
	background: var(--gdg-accent);
}

/* Embed shell */
.gdg-embed-shell {
	position: relative;
	width: 100%;
	height: var(--gdg-embed-height);
	overflow: hidden;
	border-radius: calc(var(--gdg-radius) + 2px);
	box-shadow: var(--gdg-shadow);
	background: var(--gdg-surface);
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.gdg-embed-frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #fff;
}

/* Hide captions / filenames */
.gdg-hide-captions .gdg-caption {
	display: none !important;
}

/* Protection overlays */
.gdg-protected {
	-webkit-user-select: none;
	user-select: none;
}

.gdg-protected img {
	-webkit-user-drag: none;
	user-select: none;
	pointer-events: none;
}

.gdg-protected .gdg-item-link {
	pointer-events: auto;
}

.gdg-protect-shield {
	position: absolute;
	inset: 0;
	z-index: 2;
	background: transparent;
	cursor: zoom-in;
	pointer-events: none;
}

.gdg-lightbox-shield {
	cursor: default;
}

/* Watermarks */
.gdg-watermark {
	position: absolute;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	opacity: var(--gdg-wm-opacity, 0.35);
	max-width: var(--gdg-wm-scale, 28%);
	user-select: none;
}

.gdg-watermark-img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 40%;
	object-fit: contain;
	-webkit-user-drag: none;
}

.gdg-watermark-text {
	display: block;
	color: var(--gdg-wm-color, #fff);
	font-size: clamp(0.65rem, 2.2vw, 1.15rem);
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.15;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
	white-space: nowrap;
}

.gdg-wm-pos-center {
	inset: 0;
	margin: auto;
	width: var(--gdg-wm-scale, 28%);
}

.gdg-wm-pos-bottom-right {
	right: 0.65rem;
	bottom: 0.65rem;
}

.gdg-wm-pos-bottom-left {
	left: 0.65rem;
	bottom: 0.65rem;
}

.gdg-wm-pos-top-right {
	right: 0.65rem;
	top: 0.65rem;
}

.gdg-wm-pos-top-left {
	left: 0.65rem;
	top: 0.65rem;
}

.gdg-wm-pos-diagonal {
	inset: 0;
	margin: auto;
	width: 70%;
	max-width: none;
	transform: rotate(-28deg);
}

.gdg-wm-pos-diagonal .gdg-watermark-text {
	font-size: clamp(0.9rem, 3.5vw, 1.8rem);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.95;
}

.gdg-lightbox-frame .gdg-watermark {
	z-index: 4;
}

.gdg-lightbox-frame .gdg-wm-pos-diagonal .gdg-watermark-text {
	font-size: clamp(1.2rem, 4vw, 2.4rem);
}

/* Custom popup frames */
.gdg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	background: rgba(8, 10, 12, 0.94);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gdg-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.gdg-lightbox-stage {
	position: relative;
	max-width: min(96vw, 1180px);
	max-height: 92vh;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gdg-lightbox-mat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
	max-width: 100%;
	max-height: 92vh;
}

.gdg-lightbox-frame {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
}

.gdg-lightbox-frame img,
.gdg-lightbox-image {
	display: block;
	max-width: min(92vw, 1100px);
	max-height: 78vh;
	object-fit: contain;
	border-radius: 0.25rem;
	transform: scale(0.97);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
	-webkit-user-drag: none;
	user-select: none;
}

.gdg-lightbox.is-open .gdg-lightbox-frame img,
.gdg-lightbox.is-open .gdg-lightbox-image {
	transform: scale(1);
}

.gdg-popup-framed .gdg-lightbox-frame {
	padding: 1rem;
	background: #f4f1ea;
	border-radius: 0.35rem;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.gdg-popup-framed .gdg-lightbox-frame img {
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.gdg-popup-film .gdg-lightbox-frame {
	padding: 1.35rem 1rem 1.6rem;
	background: #111;
	border-radius: 0.2rem;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.gdg-popup-film .gdg-lightbox-frame::before,
.gdg-popup-film .gdg-lightbox-frame::after {
	content: "";
	position: absolute;
	left: 0.35rem;
	right: 0.35rem;
	height: 0.45rem;
	background: repeating-linear-gradient(
		90deg,
		#2a2a2a 0 0.55rem,
		transparent 0.55rem 0.95rem
	);
	opacity: 0.9;
}

.gdg-popup-film .gdg-lightbox-frame::before { top: 0.35rem; }
.gdg-popup-film .gdg-lightbox-frame::after { bottom: 0.45rem; }

.gdg-popup-classic .gdg-lightbox-frame img {
	border-radius: 0.15rem;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.gdg-popup-minimal .gdg-lightbox-frame img {
	border-radius: 0;
	box-shadow: none;
}

.gdg-lightbox-meta {
	text-align: center;
	color: rgba(255, 255, 255, 0.88);
}

.gdg-lightbox-meta.is-empty .gdg-lightbox-caption {
	display: none;
}

.gdg-lightbox-caption {
	margin: 0;
	font-size: 0.95rem;
}

.gdg-lightbox-counter {
	display: block;
	margin-top: 0.25rem;
	color: rgba(255, 255, 255, 0.55);
	font-size: 0.8rem;
}

.gdg-lightbox-close,
.gdg-lightbox-nav {
	position: absolute;
	border: 0;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	border-radius: 999px;
	backdrop-filter: blur(6px);
	transition: background 0.2s ease;
	z-index: 3;
}

.gdg-lightbox-close:hover,
.gdg-lightbox-nav:hover,
.gdg-lightbox-close:focus-visible,
.gdg-lightbox-nav:focus-visible {
	background: rgba(255, 255, 255, 0.24);
	outline: none;
}

.gdg-lightbox-close {
	top: 1rem;
	right: 1rem;
	width: 2.75rem;
	height: 2.75rem;
	font-size: 1.4rem;
}

.gdg-lightbox-nav {
	top: 50%;
	transform: translateY(-50%);
	width: 2.75rem;
	height: 2.75rem;
	font-size: 1.6rem;
	line-height: 1;
}

.gdg-lightbox-prev { left: 1rem; }
.gdg-lightbox-next { right: 1rem; }

body.gdg-lightbox-open {
	overflow: hidden;
}

@media (max-width: 1024px) {
	.gdg-gallery:not(.gdg-cols-locked).gdg-cols-4,
	.gdg-gallery:not(.gdg-cols-locked).gdg-cols-5,
	.gdg-gallery:not(.gdg-cols-locked).gdg-cols-6,
	.gdg-gallery:not(.gdg-cols-locked).gdg-cols-7,
	.gdg-gallery:not(.gdg-cols-locked).gdg-cols-8 {
		--gdg-cols: 3;
	}
}

@media (max-width: 767px) {
	.gdg-gallery:not(.gdg-cols-locked).gdg-cols-2,
	.gdg-gallery:not(.gdg-cols-locked).gdg-cols-3,
	.gdg-gallery:not(.gdg-cols-locked).gdg-cols-4,
	.gdg-gallery:not(.gdg-cols-locked).gdg-cols-5,
	.gdg-gallery:not(.gdg-cols-locked).gdg-cols-6,
	.gdg-gallery:not(.gdg-cols-locked).gdg-cols-7,
	.gdg-gallery:not(.gdg-cols-locked).gdg-cols-8 {
		--gdg-cols: 2;
	}

	.gdg-gallery:not(.gdg-cols-locked).gdg-layout-masonry .gdg-grid {
		columns: 2;
	}

	.gdg-layout-collage .gdg-item-wide,
	.gdg-layout-collage .gdg-item-tall,
	.gdg-layout-collage.gdg-featured-first .gdg-item:first-child,
	.gdg-layout-bento .gdg-item-wide,
	.gdg-layout-bento .gdg-item-tall,
	.gdg-layout-bento.gdg-featured-first .gdg-item:first-child,
	.gdg-layout-magazine .gdg-item:first-child,
	.gdg-layout-magazine .gdg-item-wide,
	.gdg-layout-magazine .gdg-item-tall,
	.gdg-layout-panorama .gdg-item,
	.gdg-layout-panorama .gdg-item:nth-child(3n + 1) {
		grid-column: auto;
		grid-row: auto;
	}

	.gdg-layout-diamond .gdg-grid {
		gap: var(--gdg-gap);
		padding: 0;
	}

	.gdg-layout-diamond .gdg-item,
	.gdg-layout-diamond.gdg-hover-lift .gdg-item:hover,
	.gdg-layout-diamond.gdg-hover-lift .gdg-item:focus-within {
		transform: none;
	}

	.gdg-layout-diamond .gdg-item-frame,
	.gdg-layout-diamond .gdg-item-link {
		inset: auto;
		position: relative;
		transform: none;
		height: 100%;
		width: 100%;
	}

	.gdg-layout-diamond .gdg-item-image,
	.gdg-layout-diamond .gdg-item img {
		transform: none;
	}

	.gdg-carousel-btn {
		display: none;
	}

	.gdg-carousel-track {
		flex-basis: 100%;
	}

	.gdg-carousel-track .gdg-item {
		flex-basis: min(85%, var(--gdg-carousel-width, 440px));
	}

	.gdg-lightbox-nav {
		display: none;
	}

	.gdg-gallery-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 480px) {
	.gdg-gallery:not(.gdg-cols-locked) {
		--gdg-cols: 1;
	}

	.gdg-gallery:not(.gdg-cols-locked).gdg-layout-masonry .gdg-grid {
		columns: 1;
	}
}

/* Elementor: respect editor-driven CSS variables */
.elementor-widget-gdg_gallery .gdg-gallery {
	margin-top: 0;
	margin-bottom: 0;
}

.gdg-el-layout-help {
	margin: 0.35rem 0 0;
	padding-left: 1.1rem;
	font-size: 11px;
	line-height: 1.45;
	opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
	.gdg-item,
	.gdg-item img,
	.gdg-caption,
	.gdg-item-shine,
	.gdg-lightbox,
	.gdg-lightbox-inner img,
	.gdg-carousel-track {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto;
	}

	.gdg-item:hover img {
		transform: none;
	}
}
