/* Gallery pages + single photo + lightbox + 18+ check. Values measured on the old pages. */

.gallery-page { padding: 10px; }
.gallery-page__inner { max-width: var(--container); margin-inline: auto; }

/* Masonry: 2 columns (8px column gap, 5px row gap), photo i in column i % 2, like the old Portfolio widget.
   Without JS: a plain 2-column grid. With JS (gallery.js): items positioned exactly. */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px 8px; align-items: start; }
.gallery.is-masonry { display: block; position: relative; }
.gallery.is-masonry .gallery__item { position: absolute; }
.gallery__link { position: relative; display: block; }
.gallery__img { width: 100%; height: auto; aspect-ratio: 1 / var(--ratio); border-radius: 10px; }
/* Hover/focus overlay in the accent color at 70% (old Portfolio widget) */
.gallery__link::after {
	content: "";
	position: absolute; inset: 0;
	border-radius: 10px;
	background: rgba(227, 164, 136, .7);
	opacity: 0;
	transition: opacity 1s;
	pointer-events: none;
}
.gallery__link:hover::after,
.gallery__link:focus-visible::after { opacity: 1; transition-duration: .5s; }
.gallery__link:focus-visible { outline: 3px solid var(--c-nav-active); outline-offset: -3px; }
@media (max-width: 767px) {
	.gallery { grid-template-columns: 1fr; }
}

/* 18+ pending: photos hidden until the check is shown (prevents a flash before JS runs) */
.age-pending .gallery-page__inner,
.age-pending .single-photo article { visibility: hidden; }

/* Single photo */
.single-photo { max-width: var(--container); margin-inline: auto; padding: 0 10px; }
.single-photo__img { width: 100%; height: auto; }

/* Lightbox */
.lightbox {
	width: 100vw; height: 100vh; height: 100dvh;
	max-width: none; max-height: none;
	margin: 0; padding: 0;
	border: 0;
	background: rgba(0, 0, 0, .92);
	color: #fff;
	overflow: hidden;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .92); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox__figure { margin: 0; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 60px 70px; touch-action: pan-y pinch-zoom; }
.lightbox__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: opacity .25s; user-select: none; -webkit-user-drag: none; }
.lightbox__img.is-loading { opacity: .3; }
.lightbox__counter { position: absolute; top: 18px; left: 20px; margin: 0; font: 300 14px/1 var(--ff-inter); letter-spacing: .1em; }
.lightbox__btn {
	position: absolute;
	display: flex; align-items: center; justify-content: center;
	width: 48px; height: 48px;
	border-radius: 50%;
	color: #fff;
	background: rgba(0, 0, 0, .35);
	transition: background-color .2s;
}
.lightbox__btn:hover, .lightbox__btn:focus-visible { background: rgba(255, 255, 255, .2); }
.lightbox__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox__btn .icon { width: 26px; height: 26px; }
.lightbox__btn--prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__btn--close { top: 8px; right: 8px; }
@media (max-width: 767px) {
	.lightbox__figure { padding: 56px 0; }
	.lightbox__btn--prev, .lightbox__btn--next { top: auto; bottom: 10px; transform: none; }
}

/* 18+ check (The Plus "age gate", method 1) */
.age-gate {
	width: 100%; max-width: 500px; min-height: 400px;
	margin: auto;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 5px;
	background: #fff;
}
.age-gate::backdrop { background: rgba(0, 0, 0, .705); } /* #00000069 + 50% black layer of the old widget */
.age-gate__box {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	min-height: 396px;
	padding: 50px;
	text-align: center;
}
.age-gate__logo { width: 80px; height: 80px; }
.age-gate__title { margin-top: 15px; font: 400 22px/1.5 var(--ff-inter); color: #000; }
.age-gate__desc { margin-top: 15px; font: 400 14px/1.2 var(--ff-inter); letter-spacing: .8px; color: #000; }
.age-gate__check {
	position: relative;
	display: flex; align-items: center;
	margin-top: 15px;
	font: 400 16px/24px var(--ff-inter);
	color: var(--c-body);
	cursor: pointer;
	user-select: none;
}
.age-gate__check input { position: absolute; z-index: 1; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.age-gate__box-mark { position: relative; pointer-events: none; width: 20px; height: 20px; margin-right: 10px; border-radius: 4px; background: #eee; }
.age-gate__check:hover .age-gate__box-mark,
.age-gate__check input:checked + .age-gate__box-mark { background: #c5c2c2; }
.age-gate__check input:checked + .age-gate__box-mark::after {
	content: "";
	position: absolute; top: 50%; left: 50%;
	width: 5px; height: 10px;
	border: solid #fff; border-width: 0 3px 3px 0;
	transform: translate(-50%, -60%) rotate(45deg);
}
.age-gate__check input:focus-visible + .age-gate__box-mark { outline: 2px solid var(--c-nav-active); outline-offset: 2px; }
.age-gate__btn {
	margin-top: 15px;
	padding: 10px 15px 10px 35px; /* the old button kept 20px room for an icon that never loaded */
	border: 1px solid #6fc784;
	border-radius: 5px;
	background: #6fc784;
	color: #fff;
	font: 400 16px/24px var(--ff-inter);
	letter-spacing: 4px;
}
.age-gate__btn:disabled { opacity: .5; cursor: not-allowed; }
.age-gate__btn:focus-visible { outline: 2px solid var(--c-nav-active); outline-offset: 2px; }
@media (max-width: 767px) {
	.age-gate { max-width: 100%; }
}

/* /vrouwinbeeld had one extra Elementor container (10px padding) and an empty 20px container below the gallery */
.gallery-page--vrouwinbeeld .gallery-page__inner { padding: 10px; }
.gallery-page--vrouwinbeeld { padding-bottom: 30px; }
