/* wildtravel.ro - content image highlight + lightbox
   Scoped to .wt-image / .wt-figure, the classes applied to in-content images. */

/* ---------- the highlight ---------- */
.wt-image,
.wt-figure img {
	border: 1px solid green;
	box-shadow: 0 0 30px -10px rgba(0, 0, 0, 0.25);
	max-width: 100%;
	height: auto;
	cursor: zoom-in;
}

/* floats: the margin goes on whichever element is actually floated */
.wt-image.alignleft,
.wt-figure.alignleft {
	float: left;
	margin: 1em 2em 1em 0;
}

.wt-image.alignright,
.wt-figure.alignright {
	float: right;
	margin: 1em 0 1em 2em;
}

.wt-image.aligncenter,
.wt-figure.aligncenter {
	display: block;
	margin: 1em auto;
}

.wt-image.alignnone,
.wt-figure.alignnone {
	margin: 1em 0;
}

/* a figure must not double up the border on its own box */
.wt-figure {
	border: 0;
	box-shadow: none;
	max-width: 100%;
	margin: 1em 0;
}

.wt-figure figcaption,
.wt-figure .wt-credit {
	font-size: 0.82em;
	line-height: 1.45;
	opacity: 0.75;
	margin-top: 0.45em;
}

/* on phones a floated image at a fixed width breaks the column: let it go full width */
@media (max-width: 600px) {
	.wt-image.alignleft,
	.wt-image.alignright,
	.wt-figure.alignleft,
	.wt-figure.alignright {
		float: none;
		display: block;
		width: auto !important;
		max-width: 100%;
		margin: 1em 0;
	}
}

/* ---------- the lightbox ---------- */
.wtlb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(12, 12, 12, 0.93);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.18s ease;
	-webkit-tap-highlight-color: transparent;
}

.wtlb.is-open {
	opacity: 1;
	visibility: visible;
}

.wtlb__stage {
	position: relative;
	max-width: 94vw;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.6rem;
}

.wtlb__img {
	max-width: 94vw;
	max-height: 80vh;
	width: auto;
	height: auto;
	display: block;
	border: 1px solid green;
	box-shadow: 0 10px 50px -12px rgba(0, 0, 0, 0.8);
	background: #1a1a1a;
	border-radius: 2px;
}

.wtlb__cap {
	color: #e8e8e8;
	font-size: 0.86rem;
	line-height: 1.5;
	text-align: center;
	max-width: 80ch;
	margin: 0;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.wtlb__cap a {
	color: #9fe3b4;
}

/* controls */
.wtlb__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.wtlb__btn:hover,
.wtlb__btn:focus-visible {
	background: rgba(0, 0, 0, 0.75);
	border-color: rgba(159, 227, 180, 0.9);
	outline: none;
}

.wtlb__btn[hidden] {
	display: none;
}

.wtlb__prev { left: -64px; }
.wtlb__next { right: -64px; }

.wtlb__close {
	position: fixed;
	top: 14px;
	right: 16px;
	width: 44px;
	height: 44px;
	transform: none;
}

.wtlb__count {
	position: fixed;
	top: 20px;
	left: 20px;
	color: #cfcfcf;
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums;
}

/* no room for outside arrows on narrow screens - move them inside, bottom corners */
@media (max-width: 820px) {
	.wtlb__prev,
	.wtlb__next {
		top: auto;
		bottom: 8px;
		transform: none;
	}
	.wtlb__prev { left: 10px; }
	.wtlb__next { right: 10px; }
	.wtlb__img { max-height: 70vh; }
}

@media (prefers-reduced-motion: reduce) {
	.wtlb { transition: none; }
}
