/* Colors and fonts follow the site's Elementor kit, with fallbacks for pages that don't load it. */
.ylg {
	--ylg-bordeaux: var(--e-global-color-afbc6df, #901d1e);
	--ylg-navy: var(--e-global-color-b09cb16, #000516);
	--ylg-muted: #54595f;
	--ylg-skeleton: #ececec;
	--ylg-gap: 12px;
	--ylg-gutter: 24px;
	--ylg-font: "Simona Pro Regular", "Heebo", sans-serif;
	--ylg-font-display: "Simona Pro Medium", "Heebo", sans-serif;

	color: var(--ylg-navy);
	font-family: var(--ylg-font);
}

.ylg-gallery,
.ylg-index {
	background: #fff;
	padding: 18px var(--ylg-gutter) 64px;
}

.ylg a:focus-visible,
.ylg button:focus-visible {
	outline: 3px solid var(--ylg-bordeaux);
	outline-offset: 2px;
}

/* Heading. Kept short so the photos fill the first screen. */

.ylg-crumbs {
	display: flex;
	gap: 8px;
	font-size: 15px;
	color: var(--ylg-muted);
}

.ylg-crumbs a {
	color: inherit;
}

.ylg-crumbs a:hover {
	color: var(--ylg-bordeaux);
}

.ylg-head {
	margin-block-end: 18px;
}

.ylg-head__row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 24px;
	margin-block-start: 4px;
}

.ylg .ylg-title {
	margin: 0;
	color: var(--ylg-bordeaux);
	font-family: var(--ylg-font-display);
	font-size: clamp(30px, 3.4vw, 50px);
	font-weight: 900;
	line-height: 1.12;
}

.ylg-total {
	margin: 0;
	font-size: 18px;
	color: var(--ylg-muted);
	white-space: nowrap;
}

.ylg-desc {
	max-width: 70ch;
	margin: 6px 0 0;
	font-size: 18px;
	line-height: 1.5;
}

.ylg-empty {
	padding: 64px 0;
	font-size: 20px;
	text-align: center;
}

.ylg-password {
	max-width: 480px;
	margin: 32px auto;
}

/* Masonry. Plain CSS columns until front.js takes over and keeps the photos in order. */

.ylg-grid {
	column-count: 5;
	column-gap: var(--ylg-gap);
}

.ylg-grid.is-laid-out {
	display: flex;
	align-items: flex-start;
	gap: var(--ylg-gap);
	column-count: auto;
}

.ylg-col {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: var(--ylg-gap);
	min-width: 0;
}

.ylg-item {
	display: block;
	overflow: hidden;
	margin-block-end: var(--ylg-gap);
	border-radius: 6px;
	background: var(--ylg-skeleton);
	break-inside: avoid;
	cursor: zoom-in;
}

.ylg-grid.is-laid-out .ylg-item {
	margin-block-end: 0;
}

.ylg-item img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	border-radius: 0;
	object-fit: cover;
	transition: transform 0.5s ease, opacity 0.4s ease;
}

.ylg-item.is-loading img {
	opacity: 0;
}

.ylg-item:hover img,
.ylg-item:focus-visible img {
	transform: scale(1.025);
}

@media (max-width: 1279px) {
	.ylg-grid {
		column-count: 3;
	}
}

@media (max-width: 759px) {
	.ylg {
		--ylg-gap: 8px;
		--ylg-gutter: 12px;
	}

	.ylg-grid {
		column-count: 2;
	}
}

/* Scroll hint. Big and plain, because it has to explain itself to people who don't assume pages scroll. */

.ylg-hint {
	position: fixed;
	inset: auto 0 0;
	z-index: 50;
	display: flex;
	justify-content: center;
	padding: 90px 16px calc(20px + env(safe-area-inset-bottom));
	background: linear-gradient(to top, rgb(255 255 255 / 0.96) 25%, rgb(255 255 255 / 0));
	opacity: 1;
	pointer-events: none;
	transition: opacity 0.35s ease;
}

.ylg-hint[hidden] {
	display: none;
}

.ylg-hint.is-leaving {
	opacity: 0;
}

/* .ylg prefix: Hello Elementor styles [type="button"] with the same specificity. */
.ylg .ylg-hint__button {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ylg-navy);
	font: inherit;
	cursor: pointer;
	pointer-events: auto;
}

.ylg .ylg-hint__button:hover,
.ylg .ylg-hint__button:focus {
	background: none;
	color: var(--ylg-navy);
}

.ylg-hint__label {
	font-family: var(--ylg-font-display);
	padding: 4px 16px;
	border-radius: 5px;
	background: #fff;
	font-size: 20px;
	font-weight: 700;
}

.ylg-hint__arrow {
	display: grid;
	place-items: center;
	width: 66px;
	height: 66px;
	border-radius: 50%;
	background: var(--ylg-bordeaux);
	color: #fff;
	box-shadow: 0 8px 22px rgb(144 29 30 / 0.35);
	animation: ylg-float 1.5s ease-in-out infinite;
}

@keyframes ylg-float {
	0%,
	100% {
		transform: translateY(-7px);
	}

	50% {
		transform: translateY(7px);
	}
}

/* Loading state and end of gallery */

.ylg-sentinel {
	height: 1px;
}

.ylg-status {
	padding-block-start: 24px;
	font-size: 18px;
	text-align: center;
}

.ylg-status:empty {
	padding: 0;
}

.ylg-spinner {
	display: inline-block;
	width: 34px;
	height: 34px;
	border: 3px solid var(--ylg-skeleton);
	border-top-color: var(--ylg-bordeaux);
	border-radius: 50%;
	animation: ylg-spin 0.9s linear infinite;
}

@keyframes ylg-spin {
	to {
		transform: rotate(360deg);
	}
}

.ylg-end {
	margin: 40px 0 0;
	text-align: center;
}

.ylg-end[hidden] {
	display: none;
}

.ylg .ylg-button,
.ylg .ylg-status button {
	display: inline-block;
	margin-inline-start: 8px;
	padding: 12px 28px;
	border: 0;
	border-radius: 5px;
	background: var(--ylg-bordeaux);
	color: #fff;
	font: inherit;
	font-size: 18px;
	cursor: pointer;
}

.ylg .ylg-button:hover,
.ylg .ylg-status button:hover {
	background: var(--e-global-color-86241e8, #b32323);
	color: #fff;
}

/* Lightbox */

.ylg-lb {
	width: 100vw;
	max-width: none;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--e-global-color-b09cb16, #000516);
	color: #fff;
	font-family: "Simona Pro Regular", "Heebo", sans-serif;
}

.ylg-lb[open] {
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
}

.ylg-lb::backdrop {
	background: var(--e-global-color-b09cb16, #000516);
}

.ylg-lb__stage {
	display: grid;
	place-items: center;
	min-height: 0;
	padding: 16px clamp(12px, 7vw, 100px);
}

.ylg-lb__image {
	max-width: 100%;
	max-height: calc(100dvh - 110px);
	width: auto;
	height: auto;
	border-radius: 4px;
	transition: opacity 0.2s ease;
}

.ylg-lb__image.is-loading {
	opacity: 0.25;
}

.ylg-lb__footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 2px 20px;
	padding: 4px 16px 18px;
	font-size: 18px;
	text-align: center;
}

.ylg-lb__counter {
	color: rgb(255 255 255 / 0.75);
}

.ylg-lb .ylg-lb__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / 0.14);
	color: #fff;
	cursor: pointer;
}

.ylg-lb .ylg-lb__btn:hover,
.ylg-lb .ylg-lb__btn:focus {
	background: rgb(255 255 255 / 0.28);
	color: #fff;
}

.ylg-lb .ylg-lb__btn:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

.ylg-lb .ylg-lb__btn[disabled] {
	visibility: hidden;
}

.ylg-lb__close {
	inset-block-start: 14px;
	inset-inline-end: 14px;
}

.ylg-lb__prev,
.ylg-lb__next {
	inset-block-start: calc(50% - 44px);
}

.ylg-lb__prev {
	inset-inline-start: 14px;
}

.ylg-lb__next {
	inset-inline-end: 14px;
}

html[dir="rtl"] .ylg-lb__prev svg,
html[dir="rtl"] .ylg-lb__next svg {
	transform: scaleX(-1);
}

.ylg-lock {
	overflow: hidden;
}

@media (max-width: 759px) {
	.ylg-lb .ylg-lb__prev,
	.ylg-lb .ylg-lb__next {
		inset-block-start: auto;
		inset-block-end: 60px;
		width: 48px;
		height: 48px;
	}
}

/* Index tiles */

.ylg-index__head {
	margin-block-end: 28px;
	text-align: center;
}

.ylg-index__head .ylg-crumbs {
	justify-content: center;
}

.ylg .ylg-title--index {
	font-size: clamp(44px, 6vw, 80px);
}

.ylg-tiles {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px 20px;
	max-width: 1500px;
	margin-inline: auto;
}

.ylg-card {
	display: block;
	color: var(--ylg-navy);
}

.ylg-card:hover,
.ylg-card:focus {
	color: var(--ylg-navy);
}

.ylg-card__image {
	display: block;
	overflow: hidden;
	aspect-ratio: 1;
	margin-block-end: 12px;
	border-radius: 6px;
	background: var(--ylg-skeleton);
}

.ylg-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	border-radius: 0;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.ylg-card:hover .ylg-card__image img,
.ylg-card:focus-visible .ylg-card__image img {
	transform: scale(1.03);
}

.ylg-card__title {
	display: block;
	font-family: var(--ylg-font-display);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.25;
}

.ylg-card:hover .ylg-card__title {
	color: var(--ylg-bordeaux);
}

.ylg-card__count {
	display: block;
	margin-block-start: 2px;
	font-size: 16px;
	color: var(--ylg-muted);
}

.ylg-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-block-start: 40px;
	font-size: 18px;
}

.ylg-pagination .page-numbers {
	min-width: 44px;
	padding: 9px 12px;
	border-radius: 5px;
	color: var(--ylg-navy);
	text-align: center;
}

.ylg-pagination a.page-numbers:hover {
	background: var(--ylg-skeleton);
}

.ylg-pagination .current {
	background: var(--ylg-bordeaux);
	color: #fff;
}

@media (max-width: 1099px) {
	.ylg-tiles {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 699px) {
	.ylg-tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 22px 12px;
	}

	.ylg-card__title {
		font-size: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ylg-hint__arrow {
		animation: none;
	}

	.ylg-item img,
	.ylg-card__image img,
	.ylg-hint {
		transition: none;
	}

	.ylg-item:hover img,
	.ylg-card:hover .ylg-card__image img {
		transform: none;
	}
}
