/* ============================================================
   YourCrew — лайтбокс картинок в статьях
   ============================================================ */

.yc-lightbox {
	display: inline-block;
	line-height: 0;
	max-width: 100%;
	cursor: zoom-in;
}

.yc-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 4vmin;
	background: rgba(4, 7, 10, .93);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.yc-lb.is-open {
	display: flex;
}

.yc-lb__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .7rem;
	margin: 0;
	max-width: 92vw;
	max-height: 88vh;
}

.yc-lb__img {
	width: auto;
	height: auto;
	max-width: 92vw;
	max-height: 80vh;
	object-fit: contain;
	background: #000;
	border: 1px solid var(--wp--preset--color--border);
	box-shadow: 0 8px 30px rgba(0, 0, 0, .55);
	transition: opacity .15s ease;
}

.yc-lb.is-loading .yc-lb__img {
	opacity: .3;
}

.yc-lb__caption {
	max-width: 80ch;
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: .78rem;
	letter-spacing: .05em;
	line-height: 1.4;
	color: var(--wp--preset--color--muted);
	text-align: center;
}

.yc-lb__counter {
	position: absolute;
	bottom: 2.5vmin;
	left: 50%;
	transform: translateX(-50%);
	font-family: var(--wp--preset--font-family--mono);
	font-size: .78rem;
	letter-spacing: .08em;
	color: var(--wp--preset--color--muted);
}

.yc-lb__btn {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	color: var(--wp--preset--color--text);
	font-size: 1.6rem;
	line-height: 1;
	background: rgba(18, 24, 33, .85);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 2px;
	cursor: pointer;
	transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.yc-lb__btn:hover,
.yc-lb__btn:focus-visible {
	color: var(--wp--preset--color--accent);
	background: var(--wp--preset--color--surface-2);
	border-color: var(--wp--preset--color--accent);
	outline: none;
}

.yc-lb__close {
	top: 3vmin;
	right: 3vmin;
}

.yc-lb__prev {
	top: 50%;
	left: 2vmin;
	transform: translateY(-50%);
}

.yc-lb__next {
	top: 50%;
	right: 2vmin;
	transform: translateY(-50%);
}

.yc-lb__btn[hidden] {
	display: none;
}

body.yc-lb-open {
	overflow: hidden;
}

@media (max-width: 600px) {
	.yc-lb__prev {
		left: .4vmin;
	}

	.yc-lb__next {
		right: .4vmin;
	}

	.yc-lb__img {
		max-height: 76vh;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.yc-lb.is-open .yc-lb__figure {
		animation: yc-lb-in .18s ease-out;
	}

	@keyframes yc-lb-in {
		from {
			opacity: 0;
			transform: scale(.985);
		}

		to {
			opacity: 1;
			transform: scale(1);
		}
	}
}
