/* ---------------------------------------------------------------
   Video Hub 2.0 — szablon 2026
   9:16 pion, bento, sticky toolbar, hover-preview, mikrointerakcje.
   Paleta i typografia spójne z resztą serwisu.
   --------------------------------------------------------------- */

:root {
  --vh-bg: #0d0f0c;
  --vh-panel: #151914;
  --vh-line: rgba(232, 238, 219, .1);
  --vh-lime: #b8f36b;
  --vh-text: #f0f1e9;
  --vh-muted: #98a08f;
  --vh-max: 1240px;
}

* { box-sizing: border-box; }

.vh-body {
  margin: 0;
  background:
    radial-gradient(ellipse at 78% -10%, rgba(141, 121, 255, .1), transparent 46rem),
    radial-gradient(ellipse at 8% 12%, rgba(184, 243, 107, .07), transparent 40rem),
    var(--vh-bg);
  color: var(--vh-text);
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
}

.vh-wrap,
.vh-main { width: min(var(--vh-max), calc(100% - 64px)); margin-inline: auto; }
.vh-main { padding: 34px 0 70px; }

/* ---------- Hero ---------- */
.vh-hero { padding: 64px 0 40px; max-width: 900px; }
.vh-kicker {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 16px; color: var(--vh-lime);
  font: 9.5px ui-monospace, monospace; letter-spacing: .22em; text-transform: uppercase;
}
.vh-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--vh-lime); box-shadow: 0 0 0 0 rgba(184,243,107,.5); animation: vh-pulse 2.6s ease-out infinite; }
.vh-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6.4vw, 78px);
  line-height: .98; letter-spacing: -.075em; font-weight: 660;
  text-wrap: balance;
}
.vh-hero h1 em {
  font-family: var(--serif, Georgia, serif); font-style: italic; font-weight: 400;
  color: var(--vh-lime); letter-spacing: -.06em;
}
.vh-lede { margin: 0 0 26px; max-width: 62ch; color: #aab1a2; font-size: 15px; line-height: 1.8; }
.vh-lede code { color: #cfd5c6; font: 12.5px ui-monospace, monospace; background: rgba(184,243,107,.07); border: 1px solid var(--vh-line); border-radius: 5px; padding: 2px 6px; }

.vh-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.vh-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px; border-radius: 99px;
  background: var(--vh-lime); color: #10130d;
  font-size: 13px; font-weight: 620; letter-spacing: -.01em;
  text-decoration: none;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease;
  box-shadow: 0 18px 40px -18px rgba(184, 243, 107, .65);
}
.vh-cta:hover { transform: translateY(-2px); box-shadow: 0 24px 50px -18px rgba(184, 243, 107, .8); }
.vh-ghost {
  padding: 14px 20px; border-radius: 99px;
  border: 1px solid var(--vh-line); color: #c3c8bc;
  font-size: 12px; text-decoration: none;
}
.vh-ghost:hover { border-color: rgba(184,243,107,.45); color: var(--vh-lime); }

.vh-stats { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 26px; }
.vh-stat { display: flex; flex-direction: column; gap: 3px; }
.vh-stat b { font-size: 19px; font-weight: 640; letter-spacing: -.03em; }
.vh-stat span { color: #6f766a; font: 8.5px ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; }

/* ---------- Bento: najnowsze ---------- */
.vh-featured {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 12px;
  margin: 8px 0 44px;
}
.vh-feature {
  position: relative; display: block; overflow: hidden;
  border: 1px solid var(--vh-line); border-radius: 6px 28px 6px 6px;
  min-height: 300px; text-decoration: none; color: inherit;
  background: var(--vh-panel);
  transition: border-color .3s ease, transform .4s cubic-bezier(.2,.8,.2,1);
}
.vh-feature:hover { border-color: rgba(184,243,107,.42); transform: translateY(-4px); }
.vh-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 34%; opacity: .95; filter: brightness(.46) saturate(.85) blur(7px); transform: scale(1.12); }
.vh-feature::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,10,8,.99) 0%, rgba(8,10,8,.92) 26%, rgba(8,10,8,.55) 52%, rgba(8,10,8,.12) 76%, transparent 92%);
}
.vh-feature-body { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 20px; }
.vh-feature-body .vh-kicker { margin-bottom: 8px; }
.vh-feature-body h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.3; letter-spacing: -.03em; font-weight: 600; }
.vh-feature--main .vh-feature-body h3 { font-size: clamp(18px, 2vw, 24px); }
.vh-feature--main { grid-row: span 2; }
.vh-play {
  position: absolute; z-index: 3; left: 18px; top: 18px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(184,243,107,.6); background: rgba(10,14,10,.6);
  display: grid; place-items: center; color: var(--vh-lime);
  backdrop-filter: blur(6px);
}
.vh-play svg { width: 13px; height: 13px; fill: currentColor; margin-left: 2px; }

/* ---------- Sticky toolbar ---------- */
.vh-toolbar {
  position: sticky; top: 0; z-index: 40;
  padding: 14px 0; margin: 0 0 26px;
  background: linear-gradient(to bottom, rgba(13,15,12,.96) 60%, rgba(13,15,12,.72));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--vh-line);
}
.vh-toolbar-inner { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.vh-search { flex: 1 1 260px; max-width: 380px; }
.vh-search input {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--vh-line); border-radius: 99px;
  background: rgba(20, 24, 20, .8); color: var(--vh-text);
  font: 12.5px var(--sans, system-ui, sans-serif);
}
.vh-search input::placeholder { color: #71786c; }
.vh-search input:focus-visible { outline: 2px solid var(--vh-lime); outline-offset: 2px; }

.vh-tagbar { display: flex; flex-wrap: wrap; gap: 7px; }
.vh-tag {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--vh-line); border-radius: 99px;
  background: transparent; color: #a8afa2;
  font: 11px var(--sans, system-ui, sans-serif);
  padding: 8px 13px; text-decoration: none;
  transition: border-color .25s, color .25s, background .25s;
}
.vh-tag:hover { border-color: rgba(184, 243, 107, .45); color: #dfe6d7; }
.vh-tag--active { border-color: var(--vh-lime); background: rgba(184, 243, 107, .12); color: var(--vh-lime); }
.vh-count { color: #6f766a; font: 9px ui-monospace, monospace; }

/* ---------- Siatka 9:16 ---------- */
.vh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }

.vh-card {
  position: relative; border: 1px solid var(--vh-line);
  border-radius: 6px 24px 6px 6px; overflow: hidden;
  background: var(--vh-panel);
  transition: border-color .3s ease, transform .4s cubic-bezier(.2,.8,.2,1);
}
.vh-card:hover { transform: translateY(-5px); border-color: rgba(184, 243, 107, .42); }
.vh-thumb { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; background: #0f1210; }
.vh-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.vh-card:hover .vh-thumb img { transform: scale(1.04); }

/* Hover-preview: wideo z tego samego pliku, bez pobierania dodatkowych danych */
.vh-preview {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .35s ease;
  pointer-events: none; background: #000;
}
.vh-card.is-previewing .vh-preview { opacity: 1; }

.vh-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(8,10,8,.85) 0%, rgba(8,10,8,.15) 34%, transparent 60%);
}
.vh-duration {
  position: absolute; right: 9px; bottom: 9px; z-index: 2;
  border-radius: 5px; background: rgba(5, 8, 5, .84);
  color: #e7ebdd; font: 9.5px ui-monospace, monospace; padding: 3px 7px;
}
.vh-badge {
  position: absolute; left: 9px; top: 9px; z-index: 2;
  border-radius: 5px; font: 8px ui-monospace, monospace; letter-spacing: .12em; padding: 4px 7px;
}
.vh-badge--mp4 { background: rgba(184, 243, 107, .16); border: 1px solid rgba(184, 243, 107, .5); color: var(--vh-lime); }

.vh-card-body { position: relative; z-index: 2; padding: 13px 14px 15px; }
.vh-card-body h3 { margin: 0 0 9px; font-size: 12.5px; line-height: 1.4; letter-spacing: -.02em; font-weight: 550; }
.vh-card-body h3 a { color: inherit; text-decoration: none; }
.vh-card:hover .vh-card-body h3 a { color: var(--vh-lime); }
.vh-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.vh-tags .vh-tag { padding: 5px 9px; font-size: 9.5px; }

.vh-empty { color: var(--vh-muted); font-size: 12.5px; }
.vh-more {
  display: block; margin: 30px auto 0; padding: 13px 24px;
  border: 1px solid rgba(184, 243, 107, .4); border-radius: 99px;
  background: transparent; color: var(--vh-lime);
  font: 11.5px var(--sans, system-ui, sans-serif); cursor: pointer;
}
.vh-more:hover { background: var(--vh-lime); color: #10130d; }

/* ---------- Pojedynczy film ---------- */
.vh-single { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 44px; align-items: start; padding-top: 12px; }
.vh-player video {
  width: 100%; max-height: 76vh; display: block;
  border-radius: 6px 28px 6px 6px; border: 1px solid var(--vh-line); background: #000;
}
.vh-player-note { margin: 10px 0 0; color: #6f766a; font-size: 10px; word-break: break-word; }
.vh-player-note code { color: #9aa191; font: 9.5px ui-monospace, monospace; }

.vh-single-body h1 { margin: 0 0 16px; font-size: clamp(26px, 3.6vw, 42px); line-height: 1.08; letter-spacing: -.045em; }
.vh-single-body .vh-tags { margin-bottom: 20px; }
.vh-actions { display: flex; gap: 16px; align-items: center; margin: 22px 0 30px; }
.vh-back { color: #9aa191; font-size: 11.5px; text-decoration: none; }
.vh-back:hover { color: var(--vh-lime); }

.vh-related-title { margin: 0 0 14px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #7f8879; }
.vh-related { display: grid; gap: 9px; }
.vh-related-item {
  display: flex; gap: 12px; align-items: center; padding: 9px;
  border: 1px solid var(--vh-line); border-radius: 6px; color: inherit; text-decoration: none;
}
.vh-related-item:hover { border-color: rgba(184, 243, 107, .4); }
.vh-related-item img { width: 46px; height: 82px; object-fit: cover; border-radius: 4px; }
.vh-related-item strong { display: block; font-size: 12px; font-weight: 550; margin-bottom: 4px; }
.vh-related-item em { color: var(--vh-lime); font-size: 9.5px; font-style: normal; }

/* ---------- Stopka ---------- */
.vh-footer {
  width: min(var(--vh-max), calc(100% - 64px)); margin: 60px auto 40px;
  border-top: 1px solid var(--vh-line); padding-top: 20px;
  color: #6f766a; font-size: 10.5px; line-height: 1.7;
}
.vh-footer a { color: #9aa191; }
.vh-footer code { color: #8a9184; font: 10px ui-monospace, monospace; }

/* ---------- Ruch ---------- */
@keyframes vh-pulse {
  0% { box-shadow: 0 0 0 0 rgba(184, 243, 107, .5); }
  70% { box-shadow: 0 0 0 9px rgba(184, 243, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 243, 107, 0); }
}

/* ---------- Responsywność ---------- */
@media (max-width: 1000px) {
  .vh-featured { grid-template-columns: 1fr 1fr; }
  .vh-feature--main { grid-row: auto; grid-column: 1 / -1; min-height: 340px; }
}
@media (max-width: 820px) {
  .vh-wrap, .vh-main { width: calc(100% - 36px); }
  .vh-hero { padding: 40px 0 28px; }
  .vh-single { grid-template-columns: 1fr; gap: 24px; }
  .vh-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 11px; }
  .vh-toolbar { position: static; }
  .vh-featured { grid-template-columns: 1fr; }
  .vh-feature { min-height: 260px; }
  .vh-tiktok small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vh-card, .vh-feature, .vh-thumb img, .vh-cta, .vh-tiktok { transition: none; }
  .vh-card:hover, .vh-feature:hover, .vh-cta:hover { transform: none; }
  .vh-card:hover .vh-thumb img { transform: none; }
  .vh-dot { animation: none; }
  .vh-preview { display: none; }
}

/* Dostępność */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Odtwarzacz w formacie pionowym ---------- */
.vh-screen { position: relative; line-height: 0; }
.vh-player video {
  width: 100%; aspect-ratio: 9 / 16; max-height: 82vh; object-fit: contain;
  background: #000; border-radius: 6px 28px 6px 6px; border: 1px solid var(--vh-line);
}
.vh-fs {
  position: absolute; right: 12px; top: 12px; z-index: 3;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid rgba(232, 238, 219, .25); background: rgba(8, 10, 8, .62);
  color: #e7ebdd; font-size: 15px; line-height: 1; cursor: pointer;
  backdrop-filter: blur(6px);
}
.vh-fs:hover { border-color: var(--vh-lime); color: var(--vh-lime); }
.vh-player:fullscreen, .vh-screen:fullscreen { background: #000; display: grid; place-items: center; }
.vh-screen:fullscreen video { max-height: 100vh; border: 0; border-radius: 0; }

/* ---------- Ścieżka i nawigacja między filmami ---------- */
.vh-crumbs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 26px 0 22px; color: #7f8979; font-size: 11px;
}
.vh-crumbs a { color: #a8afa2; text-decoration: none; }
.vh-crumbs a:hover { color: var(--vh-lime); }
.vh-crumbs span[aria-current] { color: #6f766a; }

.vh-pager {
  display: flex; justify-content: space-between; gap: 12px;
  margin: 26px 0 10px; padding-top: 18px; border-top: 1px solid var(--vh-line);
}
.vh-pager-link {
  display: inline-flex; align-items: center; gap: 8px; max-width: 48%;
  padding: 10px 14px; border: 1px solid var(--vh-line); border-radius: 99px;
  color: #c3c8bc; text-decoration: none; font-size: 11.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vh-pager-link:hover { border-color: rgba(184,243,107,.45); color: var(--vh-lime); }
.vh-pager-link--next { margin-left: auto; }
.vh-hint { margin: 12px 0 30px; color: #6f766a; font-size: 10.5px; }
.vh-hint a { color: #9aa191; }

@media (max-width: 820px) {
  .vh-player video { max-height: 70vh; }
  .vh-pager-link { max-width: 100%; }
  .vh-pager { flex-direction: column; }
}

/* ---------- Oznaczenie treści wygenerowanej przez AI ---------- */
.vh-badge--ai {
  left: auto; right: 9px; top: 9px;
  border: 1px solid rgba(200, 190, 255, .55);
  background: rgba(24, 20, 34, .82);
  color: #cfc6ff;
  font-weight: 700;
  letter-spacing: .1em;
}

.vh-ai-note {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 14px; padding: 6px 12px 6px 7px;
  border: 1px solid rgba(200, 190, 255, .28);
  border-radius: 99px;
  background: rgba(30, 26, 42, .55);
  color: #b9b1d6; font-size: 10.5px; letter-spacing: .01em;
}
.vh-ai-chip {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 18px; padding: 0 5px;
  border-radius: 5px; background: rgba(200, 190, 255, .16);
  color: #d7cfff; font: 700 9px/1 ui-monospace, monospace; letter-spacing: .08em;
}
