/* Xpose Vision — Проекти (front end) */

.xvp { --xvp-ink: #000; --xvp-muted: rgba(0,0,0,.55); --xvp-gap-x: 28px; --xvp-gap-y: 44px; color: var(--xvp-ink); font-family: inherit; }
.xvp *, .xvp *::before, .xvp *::after { box-sizing: border-box; }

/* Theme buttons (Astra/Elementor) style every <button>; reset ours fully. */
.xvp.xvp button,
.xvp.xvp button:hover,
.xvp.xvp button:focus,
.xvp.xvp button:active {
	background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0;
	color: inherit; font: inherit; line-height: inherit; letter-spacing: normal; text-transform: none;
	text-decoration: none; min-height: 0; width: auto; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.xvp button:focus-visible { outline: 2px solid var(--xvp-ink); outline-offset: 4px; }

/* Controls */
.xvp-controls { display: flex; flex-direction: column; align-items: center; gap: 22px; margin: 0 0 48px; }

.xvp .xvp-seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--xvp-ink); border-radius: 999px; }
.xvp .xvp-seg .xvp-fmt { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 22px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: background-color .2s, color .2s; }
.xvp .xvp-seg .xvp-fmt:hover { background: #f0f0f0; }
.xvp .xvp-seg .xvp-fmt[aria-pressed="true"],
.xvp .xvp-seg .xvp-fmt[aria-pressed="true"]:hover { background: var(--xvp-ink); color: #fff; }

.xvp .xvp-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 36px; }
.xvp .xvp-tabs .xvp-tab { position: relative; min-height: 44px; padding: 12px 2px; font-size: 14px; font-weight: 500; color: var(--xvp-muted); transition: color .2s; }
.xvp .xvp-tabs .xvp-tab:hover { color: var(--xvp-ink); }
.xvp .xvp-tabs .xvp-tab[aria-pressed="true"] { color: var(--xvp-ink); font-weight: 700; }
.xvp .xvp-tabs .xvp-tab[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: var(--xvp-ink); }
.xvp .xvp-tabs .xvp-tab[hidden] { display: none; }

/* Grid */
.xvp-grid { display: grid; grid-template-columns: repeat(var(--xvp-cols, 3), minmax(0, 1fr)); gap: var(--xvp-gap-y) var(--xvp-gap-x); }
.xvp[data-format="v"] .xvp-grid { grid-template-columns: repeat(auto-fit, minmax(0, 260px)); justify-content: center; }

.xvp .xvp-tile { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.xvp .xvp-tile[hidden] { display: none; }

.xvp-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #0b0b0b; }
.xvp-tile.is-v .xvp-frame { aspect-ratio: 9 / 16; }
.xvp-frame .xvp-img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: filter .5s ease, transform .7s ease; }
.xvp-bw .xvp-frame .xvp-img { filter: grayscale(1) contrast(1.05); }
.xvp-tile:hover .xvp-img,
.xvp-tile:focus-visible .xvp-img { filter: grayscale(0) contrast(1); transform: scale(1.035); }

.xvp-play { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; display: flex; align-items: center; justify-content: center; border: 1.5px solid #fff; border-radius: 50%; background: rgba(0,0,0,.25); opacity: 0; transform: scale(.9); transition: opacity .3s, transform .3s; }
.xvp-tile:hover .xvp-play, .xvp-tile:focus-visible .xvp-play { opacity: 1; transform: scale(1); }
@media (hover: none) { .xvp-play { opacity: .9; transform: none; } }

.xvp-title { font-size: 15px; font-weight: 600; line-height: 1.4; }

/* Lightbox */
.xvp-lightbox { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,.94); }
.xvp-lightbox[hidden] { display: none; }
.xvp-lb-inner { width: 100%; max-width: 1100px; display: flex; flex-direction: column; gap: 16px; }
.xvp-lightbox.is-v .xvp-lb-inner { max-width: min(380px, calc((100vh - 160px) * 9 / 16)); }
.xvp-lb-bar { display: flex; justify-content: flex-end; }
.xvp.xvp .xvp-close, .xvp.xvp .xvp-close:hover, .xvp.xvp .xvp-close:focus { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; }
.xvp.xvp .xvp-close:hover { border-color: #fff; }
.xvp.xvp .xvp-close:focus-visible { outline-color: #fff; }
.xvp-lb-media { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.xvp-lightbox.is-v .xvp-lb-media { aspect-ratio: 9 / 16; }
.xvp-lb-media iframe, .xvp-lb-media video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.xvp-lb-title { margin: 0; color: #fff; font-size: 17px; font-weight: 600; }
html.xvp-lock { overflow: hidden; }

/* Responsive */
@media (max-width: 900px) {
	.xvp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.xvp { --xvp-gap-y: 32px; }
	.xvp-grid { grid-template-columns: minmax(0, 1fr); }
	.xvp[data-format="v"] .xvp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
	.xvp[data-format="v"] .xvp-title { font-size: 13px; }
	.xvp .xvp-seg .xvp-fmt { padding: 0 14px; gap: 8px; font-size: 13px; }
	.xvp .xvp-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: 24px; max-width: 100%; scrollbar-width: none; }
	.xvp .xvp-tabs::-webkit-scrollbar { display: none; }
	.xvp .xvp-tabs .xvp-tab { white-space: nowrap; font-size: 13px; }
	.xvp-lightbox { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.xvp-img, .xvp-play { transition: none; }
	.xvp-tile:hover .xvp-img { transform: none; }
}
