/* Guide videos page (views/videos.ejs, public/js/video-hub.js), loaded with promo-video.css (the player
   parts inside the dialog reuse its .promo-* rules). Square posters with rounded corners: 3 per row on
   desktop, 2 on tablets and phones. Nothing plays on the page - a card opens the player dialog. */
.vh { max-width: 1040px; }
.vh .help-guide-intro { max-width: 780px; }
.vh-grid { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.vh-item { margin: 0; min-width: 0; }
.vh-card { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; border-radius: 22px; }
.vh-thumb { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 22px; overflow: hidden; background: #1a1433; box-shadow: var(--shadow); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.vh-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block; }
.vh-card:hover .vh-thumb, .vh-card:focus-visible .vh-thumb { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.vh-card:hover .promo-play, .vh-card:focus-visible .promo-play { background: var(--primary); }
.vh-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.vh-duration { position: absolute; bottom: 10px; inset-inline-end: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(13, 12, 26, 0.78); color: #fff; font-size: 13px; font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.vh-title { margin: 12px 4px 0; font-size: 17px; line-height: 1.4; font-weight: 700; color: var(--ink); }
.vh-more { margin: 36px 0 0; text-align: center; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .vh-thumb { transition: none; } .vh-card:hover .vh-thumb { transform: none; } }
@media (max-width: 900px) { .vh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .vh.container { padding-inline: 16px; }
  .vh-grid { gap: 20px 14px; }
  .vh-thumb, .vh-card { border-radius: 16px; }
  .vh-thumb .promo-play { width: 52px; height: 52px; }
  .vh-thumb .promo-play::after { border-width: 10px 0 10px 17px; }
  .vh-duration { bottom: 7px; inset-inline-end: 7px; font-size: 12px; padding: 2px 7px; }
  .vh-title { font-size: 15px; margin-top: 9px; }
}

/* Player dialog: the video fits the screen height (9:16, or 16:9 for a wide-only guide video). */
.vh-dialog { width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--border); border-radius: 20px; background: var(--card); color: var(--text); box-shadow: var(--shadow-lg); overflow: auto; }
.vh-dialog.vh-wide { width: min(760px, calc(100vw - 24px)); }
.vh-dialog::backdrop { background: rgba(8, 7, 20, 0.72); }
.vh-dialog-inner { padding: 14px 18px 18px; }
.vh-dialog-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.vh-dialog-title { flex: 1; margin: 4px 0 0; font-size: 18px; line-height: 1.35; color: var(--ink); }
.vh-close { flex: none; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%; background: var(--bg); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
.vh-close:hover, .vh-close:focus-visible { border-color: var(--primary); color: var(--primary-text); }
.vh-player-box.promo { margin: 0 auto; max-width: none; width: min(100%, calc((100dvh - 300px) * 9 / 16)); min-width: 220px; }
.vh-wide .vh-player-box.promo { width: 100%; }
.vh-wide .vh-player-box .promo-frame { aspect-ratio: 16 / 9; border-radius: 16px; }
.vh-player-box .promo-poster img { object-fit: cover; }
/* Caption right under the video on a dark rounded strip (owner 16.10); two lines are reserved so the
   sound button never jumps. */
.vh-player-box .vh-caption { display: flex; align-items: center; justify-content: center; min-height: calc(2 * 1.4em + 14px); margin: 10px 0 0; padding: 7px 14px; border-radius: 14px; background: rgba(13, 12, 26, 0.86); color: #fff; font-size: 16px; line-height: 1.4; box-sizing: border-box; }
.vh-transcript { margin-top: 10px; }
.vh-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin-top: 14px; }
.vh-links .vh-guide-link[hidden] { display: none; }
.vh-yt-link { font-size: 14px; font-weight: 700; }
@media (max-width: 640px) {
  .vh-dialog-inner { padding: 12px 14px 14px; }
  .vh-dialog-title { font-size: 16px; }
  .vh-dialog .promo-caption { font-size: 14px; }
}
