/* «Видеоблог» (15.11.2026): сетка роликов Reels / TikTok / Shorts и окно просмотра (public/polish/vlog.js).
   Карточки собирает сервер (src/admin-extra.ts → renderVlog) из раздела панели «Видео». */
.bh-vlog { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
@media (min-width: 640px) { .bh-vlog { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; } }
@media (min-width: 1100px) { .bh-vlog { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; } }
/* один ролик (23.11.2026: пока показываем только последний) — одна карточка шириной с телефон, а не четверть сетки */
.bh-vlog[data-n="1"] { grid-template-columns: minmax(0, 320px); }
.bh-vlog-card { display: flex; flex-direction: column; gap: 12px; color: #222124; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.bh-vlog-pic { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 6px; background: #222124; }
.bh-vlog-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.bh-vlog-pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21, 20, 22, 0) 55%, rgba(21, 20, 22, .55)); pointer-events: none; }
.bh-vlog-pic.is-empty { background: radial-gradient(120% 80% at 30% 20%, #3a3638, #151416); }
.bh-vlog-card:hover .bh-vlog-pic img { transform: scale(1.04); }
.bh-vlog-play { position: absolute; left: 50%; top: 50%; z-index: 1; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(21, 20, 22, .35); border: 1px solid rgba(255, 255, 255, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .3s, background .3s; }
.bh-vlog-play::before { content: ""; position: absolute; left: 22px; top: 18px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff; }
.bh-vlog-src::after { content: attr(data-name); }
.bh-vlog-card:hover .bh-vlog-play { transform: scale(1.08); background: rgba(21, 20, 22, .55); }
.bh-vlog-src { position: absolute; left: 12px; bottom: 12px; z-index: 1; font: 500 11px/1 Geist, sans-serif; letter-spacing: 1.6px; text-transform: uppercase; color: #fff; }
.bh-vlog-t { font: 400 17px/1.35 var(--bh-font-display, serif); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 960px) { .bh-vlog-t { font-size: 19px; } }

/* окно просмотра: ролики лентой — на телефоне листаются вверх-вниз, как в Reels, на компьютере — влево-вправо */
html.bh-vp-lock, html.bh-vp-lock body { overflow: hidden !important; }
.bh-vp { position: fixed; inset: 0; z-index: 2147483002; background: #0d0c0e; display: none; }
.bh-vp.is-open { display: block; animation: bh-vp-in .25s ease both; }
@keyframes bh-vp-in { from { opacity: 0; } }
.bh-vp-track { position: absolute; inset: 0; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.bh-vp-track::-webkit-scrollbar { display: none; }
/* на телефоне над и под роликом — полосы, за которые лента листается всегда (проигрыватель площадки свайп может забрать себе) */
.bh-vp-slide { flex: none; position: relative; box-sizing: border-box; width: 100%; height: 100%; padding: 64px 0 76px; scroll-snap-align: center; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; }
.bh-vp-frame { position: relative; height: 100%; width: auto; max-width: 100%; aspect-ratio: 9 / 16; border-radius: 10px; background: #151416 center / cover no-repeat; overflow: hidden; }
.bh-vp-frame[data-p="instagram"] { aspect-ratio: 400 / 760; }
.bh-vp-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.bh-vp-frame::before { content: ""; position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: bh-vp-spin 1s linear infinite; }
.bh-vp-frame.is-on::before { display: none; }
@keyframes bh-vp-spin { to { transform: rotate(360deg); } }
.bh-vp-src { position: absolute; left: 12px; top: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(21, 20, 22, .62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .2); color: #fff; font: 500 12px/1 Geist, sans-serif; letter-spacing: 1.2px; text-transform: uppercase; text-decoration: none; }
.bh-vp-btn { position: absolute; z-index: 3; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(21, 20, 22, .62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .2); color: #fff; cursor: pointer; padding: 0; transition: background .2s, opacity .2s; }
.bh-vp-btn:hover { background: rgba(255, 255, 255, .16); }
.bh-vp-btn[disabled] { opacity: 0; pointer-events: none; }
.bh-vp-x { right: 12px; top: 12px; }
.bh-vp-prev, .bh-vp-next { bottom: 16px; }
.bh-vp-prev { left: calc(50% - 52px); } .bh-vp-next { left: calc(50% + 8px); }
.bh-vp-prev svg, .bh-vp-next svg { transform: rotate(90deg); }
@media (min-width: 960px) {
  .bh-vp-track { flex-direction: row; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; }
  .bh-vp-slide { padding: 4vh 0; }
  .bh-vp-frame { height: min(92vh, 900px); }
  .bh-vp-src { left: 24px; top: 24px; }
  .bh-vp-x { right: 24px; top: 24px; }
  .bh-vp-prev, .bh-vp-next { top: 50%; bottom: auto; margin-top: -22px; }
  .bh-vp-prev { left: 24px; } .bh-vp-next { left: auto; right: 24px; }
  .bh-vp-prev svg, .bh-vp-next svg { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .bh-vp.is-open { animation: none; } .bh-vlog-pic img { transition: none; } }
