:root {
  --template-accent: #c4b5fd;
  --template-surface: #111525;
  --template-surface-raised: #171b2d;
  --template-line: rgba(198, 203, 221, .14);
  --template-muted: #9299ae;
}
.video-template-catalog-page { min-height: 100%; overflow-x: hidden; background: #070a12; color: #f7f8fc; }
.video-template-catalog { width: min(100%, var(--vz-content)); margin: 0 auto; padding: 16px 32px 90px; }
.video-template-catalog__intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 30px; margin-bottom: 22px; }
.video-template-catalog__intro > div { min-width: 0; }
.video-template-catalog__intro > p { flex: 0 0 auto; max-width: 100%; margin: 0 0 1px auto; color: var(--template-muted); line-height: 1.55; white-space: nowrap; }
.video-template-catalog__eyebrow { margin: 0; color: var(--template-accent); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }

.video-template-heroes { display: grid; grid-template-columns: minmax(0, 1fr) 128px 128px; gap: 10px; min-height: 420px; }
.video-template-hero { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--template-line); border-radius: 18px; background: linear-gradient(180deg, rgba(6, 8, 16, .2), rgba(6, 8, 16, .95)), var(--template-hero-image, linear-gradient(135deg, #26203e, #0b1020)); background-position: center; background-size: cover; transition: grid-column .25s ease, border-color .2s ease; }
.video-template-hero--story::before { position: absolute; z-index: 0; inset: -12px; background: var(--template-hero-image, linear-gradient(135deg, #26203e, #0b1020)); background-position: center; background-size: cover; filter: blur(7px); transform: scale(1.04); content: ''; }
.video-template-hero--story { background: linear-gradient(180deg, rgba(6, 8, 16, .2), rgba(6, 8, 16, .95)); }
.video-template-hero--story::after { position: absolute; z-index: 0; inset: 0; background: linear-gradient(180deg, rgba(6, 8, 16, .25), rgba(6, 8, 16, .96)); content: ''; }
.video-template-hero--story .video-template-hero__select,
.video-template-hero--story .video-template-hero__actions { z-index: 1; }
.video-template-hero:not(.is-selected) { filter: saturate(.7); }
.video-template-hero.is-selected { border-color: rgba(196, 181, 253, .48); box-shadow: inset 0 0 0 1px rgba(196, 181, 253, .1); }
.video-template-hero__select { position: absolute; inset: 0; width: 100%; padding: 36px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.video-template-hero__icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(196, 181, 253, .45); border-radius: 50%; color: var(--template-accent); background: rgba(9, 11, 21, .65); }
.video-template-hero__copy { position: absolute; left: 36px; right: 36px; bottom: 88px; display: grid; gap: 8px; }
.video-template-hero__copy strong { font-size: clamp(38px, 5vw, 72px); line-height: .96; letter-spacing: -.055em; }
.video-template-hero__copy span { max-width: 540px; color: #c7cada; font-size: 15px; }
.video-template-hero__vertical { display: none; }
.video-template-hero__actions { position: absolute; z-index: 2; bottom: 28px; left: 36px; display: flex; gap: 9px; }
.video-template-hero__watch,
.video-template-hero__use { min-height: 42px; }
.video-template-hero__actions .video-template-hero__watch,
.video-template-hero__actions .video-template-hero__use { display: inline-flex; align-items: center; justify-content: center; min-width: 108px; }
.video-template-hero:not(.is-selected) .video-template-hero__copy,
.video-template-hero:not(.is-selected) .video-template-hero__actions,
.video-template-hero:not(.is-selected) .video-template-hero__icon { display: none; }
.video-template-hero:not(.is-selected) .video-template-hero__vertical { position: absolute; right: 0; bottom: 28px; left: 0; display: block; font-size: 18px; font-weight: 750; text-align: center; writing-mode: vertical-rl; transform: rotate(180deg); }

.video-template-browser { padding-top: 52px; }
.video-template-browser__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.video-template-browser__head h2 { margin: 4px 0 0; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.04em; }
.video-template-browser__head > p { margin: 0; color: var(--template-muted); font-size: 13px; }
.video-template-filter-modes { display: inline-flex; padding: 4px; border: 1px solid var(--template-line); border-radius: 11px; background: #0d101b; }
.video-template-filter-modes button,
.video-template-filter-chips button { border: 0; color: var(--template-muted); font: inherit; font-weight: 700; cursor: pointer; }
.video-template-filter-modes button { padding: 10px 20px; border-radius: 8px; background: transparent; }
.video-template-filter-modes button.is-selected { background: #f4f2fb; color: #151524; }
.video-template-filter-controls { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.video-template-search { position: relative; display: flex; align-items: center; width: min(520px, 100%); margin-left: auto; color: var(--template-muted); }
.video-template-search > i { position: absolute; left: 15px; pointer-events: none; }
.video-template-search input { width: 100%; min-height: 42px; padding: 10px 15px 10px 42px; border: 1px solid var(--template-line); border-radius: 11px; outline: 0; background: #0d101b; color: #f7f8fc; font: inherit; }
.video-template-search input::placeholder { color: var(--template-muted); opacity: 1; }
.video-template-search input:focus { border-color: rgba(196, 181, 253, .65); box-shadow: 0 0 0 3px rgba(124, 92, 191, .18); }
.video-template-filter-chips.popup-text-tabs { display: flex; margin: 16px 0 24px; overflow-x: auto; scrollbar-width: none; }
.video-template-filter-chips::-webkit-scrollbar { display: none; }
.video-template-filter-chips.popup-text-tabs .segment-btn { flex: 1 0 auto; padding-inline: 16px; font-family: inherit; }

.video-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.video-template-card { min-width: 0; overflow: hidden; border: 1px solid var(--template-line); border-radius: 15px; background: var(--template-surface); color: inherit; text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
.video-template-card:hover { transform: translateY(-3px); border-color: rgba(196, 181, 253, .4); }
.video-template-card[hidden] { display: none; }
.video-template-card__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #211b38, #0d1322); }
.video-template-card__media::after { position: absolute; z-index: 2; inset: 45% 0 0; background: linear-gradient(transparent, rgba(5, 7, 14, .7)); content: ''; }
.video-template-card__backdrop { position: absolute; inset: -14px; background-position: center; background-size: cover; filter: blur(14px) brightness(.62); transform: scale(1.08); }
.video-template-card__poster { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease; }
.video-template-card__poster[hidden] { display: none; }
.video-template-card--story .video-template-card__poster { filter: blur(4px); transform: scale(1.04); }
.video-template-card:hover .video-template-card__poster { transform: scale(1.035); }
.video-template-card__play { position: absolute; z-index: 2; top: 50%; left: 50%; display: grid; place-items: center; width: 44px; height: 44px; transform: translate(-50%, -50%); border: 1px solid rgba(255,255,255,.38); border-radius: 50%; background: rgba(5,7,14,.62); }
.video-template-card__duration { position: absolute; z-index: 2; right: 10px; bottom: 9px; padding: 4px 7px; border-radius: 7px; background: rgba(5,7,14,.8); font-size: 10px; font-weight: 800; }
.video-template-card__body { display: grid; gap: 7px; padding: 15px; }
.video-template-card__meta { display: flex; gap: 7px; overflow: hidden; }
.video-template-card__meta small { overflow: hidden; color: var(--template-accent); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.video-template-card__meta small + small::before { margin-right: 7px; color: #555d70; content: '•'; }
.video-template-card__people i { margin-left: 2px; font-size: 8px; }
.video-template-card__body > strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.video-template-card__body > span:last-child { color: var(--template-muted); font-size: 11px; }
.video-template-empty { display: grid; place-items: center; min-height: 260px; padding: 35px; border: 1px dashed var(--template-line); border-radius: 18px; color: var(--template-muted); text-align: center; }
.video-template-empty[hidden] { display: none; }
.video-template-empty i { color: var(--template-accent); font-size: 30px; }
.video-template-empty h3 { margin: 12px 0 0; color: #f7f8fc; }
.video-template-empty p { margin: 6px 0 0; }

@media (min-width: 1050px) {
  .video-template-heroes:has(.video-template-hero:nth-child(2).is-selected) { grid-template-columns: 128px minmax(0, 1fr) 128px; }
  .video-template-heroes:has(.video-template-hero:nth-child(3).is-selected) { grid-template-columns: 128px 128px minmax(0, 1fr); }
}
@media (max-width: 1049px) {
  .video-template-heroes { display: flex; min-height: 350px; }
  .video-template-hero { flex: 0 0 92px; }
  .video-template-hero.is-selected { flex: 1 1 auto; }
  .video-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 699px) {
  .video-template-catalog { width: auto; margin: 0; padding: 12px 14px 64px; }
  .video-template-catalog__intro { align-items: center; flex-direction: row; gap: 12px; }
  .video-template-catalog__intro > div,
  .video-template-catalog__intro > p { width: 100%; min-width: 0; overflow-wrap: anywhere; white-space: normal; }

  .video-template-heroes { display: flex; min-height: 0; margin-right: -14px; padding-right: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .video-template-heroes::-webkit-scrollbar { display: none; }
  .video-template-hero,
  .video-template-hero.is-selected { display: block; flex: 0 0 min(84vw, 410px); min-height: 330px; scroll-snap-align: start; }
  .video-template-hero__select { padding: 24px; }
  .video-template-hero__copy { right: 24px; bottom: 80px; left: 24px; }
  .video-template-hero__copy strong { font-size: 42px; }
  .video-template-hero__actions { bottom: 22px; left: 24px; }
  .video-template-hero:not(.is-selected) .video-template-hero__copy,
  .video-template-hero:not(.is-selected) .video-template-hero__actions,
  .video-template-hero:not(.is-selected) .video-template-hero__icon { display: initial; }
  .video-template-hero:not(.is-selected) .video-template-hero__copy { display: grid; }
  .video-template-hero:not(.is-selected) .video-template-hero__icon { display: grid; }
  .video-template-hero:not(.is-selected) .video-template-hero__vertical { display: none; }
  .video-template-browser { padding-top: 42px; }
  .video-template-browser,
  .video-template-browser__head,
  .video-template-filter-modes,
  .video-template-search { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; }
  .video-template-filter-controls { flex-direction: column; align-items: stretch; gap: 12px; }
  .video-template-search { margin-left: 0; }
  .video-template-browser__head { align-items: start; }
  .video-template-browser__head h2 { font-size: 29px; }
  .video-template-browser__head > p { padding-top: 19px; }
  .video-template-filter-modes { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .video-template-filter-modes button { min-width: 0; padding-right: 10px; padding-left: 10px; }
  .video-template-grid { grid-template-columns: 1fr; gap: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .video-template-hero,
  .video-template-card,
  .video-template-card__poster { transition: none; }
}
