:root {
  --video-case-accent: var(--hl-header-red, #c8192e);
  --video-case-accent-dark: var(--hl-header-red-dark, #a61123);
  --video-case-canvas: #f5f5f5;
  --video-case-ink: #232323;
  --video-case-muted: #8a8a8a;
  --video-case-line: #eee;
  --video-case-max: 1180px;
}

.video-cases-page,
.video-cases-page *,
.video-cases-page *::before,
.video-cases-page *::after { box-sizing: border-box; }

html { background: var(--video-case-canvas); }

body.video-cases-page {
  min-height: 100vh;
  min-height: 100dvh;
  min-width: 320px;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--video-case-canvas);
  color: var(--video-case-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.video-cases-page #header { min-height: 76px; }

.video-cases-skip {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 9px 14px;
  background: #fff;
  color: var(--video-case-accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}

.video-cases-skip:focus { transform: translateY(0); }

.video-cases-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.video-cases-main {
  flex: 1 0 auto;
  min-height: 70vh;
  padding: 10px 0 64px;
  background: var(--video-case-canvas);
}

.video-cases-shell {
  width: min(var(--video-case-max), calc(100% - 40px));
  margin: 0 auto;
}

.video-cases-hero {
  position: relative;
  width: 100%;
  margin: 0 0 10px;
  overflow: hidden;
  aspect-ratio: 8 / 3;
  background: #171717;
}

.video-cases-hero__viewport,
.video-cases-hero__track,
.video-cases-hero__slide,
.video-cases-hero__button { width: 100%; height: 100%; }

.video-cases-hero__viewport { overflow: hidden; touch-action: pan-y; }

.video-cases-hero__track {
  display: flex;
  transition: transform 480ms cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}

.video-cases-hero__slide { flex: 0 0 100%; min-width: 0; }

.video-cases-hero__button {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #171717;
  color: #fff;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.video-cases-hero__button::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .03) 28%, rgba(0, 0, 0, .72) 100%);
  content: "";
}

.video-cases-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .45s ease;
}

.video-cases-hero__button:hover .video-cases-hero__image { transform: scale(1.025); }

.video-cases-hero__category,
.video-case-card__category {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, .52);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.video-cases-hero__title {
  position: absolute;
  z-index: 2;
  right: 30px;
  bottom: 28px;
  left: 30px;
  display: -webkit-box;
  max-width: 900px;
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-cases-hero__play {
  position: absolute;
  z-index: 3;
  top: 20px;
  right: 20px;
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .36);
  place-items: center;
}

.video-cases-hero__play img {
  width: 10px;
  height: 14px;
  margin-left: 2px;
  filter: brightness(0) invert(1);
}

.video-cases-hero__arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .32);
  cursor: pointer;
  opacity: 0;
  place-items: center;
  transform: translateY(-50%);
  transition: opacity .2s ease, background-color .2s ease;
}

.video-cases-hero:hover .video-cases-hero__arrow,
.video-cases-hero__arrow:focus-visible { opacity: .82; }

.video-cases-hero__arrow:hover { background: rgba(0, 0, 0, .58); }

.video-cases-hero__arrow img {
  width: 10px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.video-cases-hero__arrow--prev { left: 12px; }
.video-cases-hero__arrow--next { right: 12px; }

.video-cases-hero__dots {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 10px;
  left: 0;
  display: flex;
  min-height: 5px;
  justify-content: center;
  gap: 7px;
}

.video-cases-hero__dot {
  width: 18px;
  height: 5px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, .72);
  cursor: pointer;
}

.video-cases-hero__dot.is-active { background: var(--video-case-accent); }

.video-cases-hero__skeleton,
.video-case-card--skeleton span,
.video-case-card--skeleton i,
.video-case-card--skeleton small {
  background: linear-gradient(90deg, #e8e8e8 25%, #f2f2f2 40%, #e8e8e8 65%);
  background-size: 400% 100%;
  animation: video-case-loading 1.35s ease infinite;
}

.video-cases-hero__skeleton { width: 100%; height: 100%; }

.video-cases-panel { padding: 20px; background: #fff; }

.video-cases-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  transition: opacity .18s ease;
}

.video-cases-grid.is-loading { opacity: .48; }

.video-case-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--video-case-line);
  background: #fff;
}

.video-case-card__button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #fff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.video-case-card__media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 8 / 5;
  background: #1c1c1c;
}

.video-case-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.video-case-card__button:hover .video-case-card__image,
.video-case-card__button:focus-visible .video-case-card__image { transform: scale(1.025); }

.video-case-card__play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  place-items: center;
  transform: translate(-50%, -50%);
  transition: background-color .2s ease, transform .2s ease;
}

.video-case-card__play img {
  width: 13px;
  height: 18px;
  margin-left: 3px;
  filter: brightness(0) invert(1);
}

.video-case-card__button:hover .video-case-card__play,
.video-case-card__button:focus-visible .video-case-card__play {
  background: var(--video-case-accent);
  transform: translate(-50%, -50%) scale(1.05);
}

.video-case-card__body { display: block; padding: 11px 14px 13px; }

.video-case-card__title {
  display: -webkit-box;
  min-height: 44.8px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--video-case-ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-wrap: wrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-case-card__date {
  display: block;
  color: var(--video-case-muted);
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

.video-cases-empty {
  grid-column: 1 / -1;
  min-height: 270px;
  display: grid;
  padding: 48px 24px;
  color: var(--video-case-muted);
  text-align: center;
  place-content: center;
}

.video-cases-empty strong { color: #555; font-size: 20px; font-weight: 500; }
.video-cases-empty p { margin: 9px 0 0; font-size: 14px; }

.video-cases-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
}

.video-cases-pagination__status {
  margin: 0;
  color: var(--video-case-muted);
  font-size: 13px;
  line-height: 36px;
  white-space: nowrap;
}

.video-cases-pagination__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.video-cases-pagination__button {
  display: grid;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #dedede;
  background: #fff;
  color: #555;
  cursor: pointer;
  font: 14px/1 Arial, sans-serif;
  place-items: center;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.video-cases-pagination__button:hover:not(:disabled),
.video-cases-pagination__button:focus-visible,
.video-cases-pagination__button.is-current {
  border-color: var(--video-case-accent);
  background: var(--video-case-accent);
  color: #fff;
}

.video-cases-pagination__button.is-current { cursor: default; }

.video-cases-pagination__button:disabled {
  cursor: not-allowed;
  opacity: .38;
}

.video-cases-pagination__button--arrow { padding: 0; }

.video-cases-pagination__button--arrow img {
  width: 8px;
  height: 13px;
  opacity: .72;
}

.video-cases-pagination__button--arrow:hover:not(:disabled) img,
.video-cases-pagination__button--arrow:focus-visible img { filter: brightness(0) invert(1); opacity: 1; }

.video-cases-pagination__ellipsis {
  min-width: 20px;
  color: var(--video-case-muted);
  text-align: center;
}

.video-case-card--skeleton { min-height: 260px; padding: 0 0 14px; }

.video-case-card--skeleton span {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 5;
}

.video-case-card--skeleton i,
.video-case-card--skeleton small {
  display: block;
  height: 12px;
  margin: 14px 14px 0;
}

.video-case-card--skeleton i { width: 72%; }
.video-case-card--skeleton small { width: 35%; }

.video-cases-dialog {
  width: min(900px, calc(100% - 28px));
  max-width: 900px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #141414;
  color: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

.video-cases-dialog::backdrop {
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(4px);
}

.video-cases-dialog__frame { position: relative; }

.video-cases-dialog__close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(0, 0, 0, .62);
  cursor: pointer;
  place-items: center;
}

.video-cases-dialog__close img {
  width: 14px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.video-cases-dialog video {
  display: block;
  width: 100%;
  max-height: 70vh;
  background: #000;
}

.video-cases-dialog__copy { padding: 18px 22px 21px; }
.video-cases-dialog__copy > span { color: #f4b8bf; font-size: 12px; }

.video-cases-dialog__copy h2 {
  margin: 6px 0 8px;
  color: #fff;
  font-size: 22px;
  line-height: 1.45;
}

.video-cases-dialog__copy p {
  margin: 0;
  color: rgba(255, 255, 255, .65);
  font-size: 13px;
}

.video-cases-page button:focus-visible,
.video-cases-page a:focus-visible {
  outline: 3px solid rgba(200, 25, 46, .34);
  outline-offset: 3px;
}

@keyframes video-case-loading {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@media (max-width: 991px) {
  .video-cases-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .video-cases-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  html,
  body.video-cases-page,
  .video-cases-main { background: #fff; }

  .video-cases-page #header { min-height: 50px; }
  .video-cases-main { padding: 10px 0 36px; }
  .video-cases-shell { width: 100%; padding: 0 15px; }
  .video-cases-hero { margin-bottom: 20px; aspect-ratio: 8 / 3; }

  .video-cases-hero__title {
    right: 12px;
    bottom: 12px;
    left: 12px;
    font-size: 18px;
    line-height: 1.4;
  }

  .video-cases-hero__category { top: 10px; left: 10px; }

  .video-cases-hero__play {
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
  }

  .video-cases-hero__arrow { width: 32px; height: 32px; opacity: .72; }
  .video-cases-hero__arrow--prev { left: 8px; }
  .video-cases-hero__arrow--next { right: 8px; }
  .video-cases-hero__dots { bottom: 7px; gap: 5px; }
  .video-cases-hero__dot { width: 14px; height: 4px; }
  .video-cases-panel { padding: 0; }
  .video-cases-grid { gap: 10px; }

  .video-case-card__category {
    top: 8px;
    left: 8px;
    padding: 2px 6px;
    font-size: 11px;
  }

  .video-case-card__play { width: 38px; height: 38px; }
  .video-case-card__play img { width: 11px; height: 16px; }
  .video-case-card__body { padding: 8px 9px 6px; }

  .video-case-card__title {
    min-height: 42px;
    margin-bottom: 6px;
    font-size: 15px;
    line-height: 1.4;
  }

  .video-case-card__date { font-size: 12px; }
  .video-case-card--skeleton { min-height: 190px; }
  .video-cases-pagination { display: block; padding-top: 22px; }
  .video-cases-pagination__status { line-height: 1.5; text-align: center; }
  .video-cases-pagination__controls { margin-top: 12px; justify-content: center; gap: 5px; }
  .video-cases-pagination__button { min-width: 34px; height: 34px; padding: 0 8px; }
  .video-cases-pagination__button--arrow { padding: 0; }
  .video-cases-dialog { width: calc(100% - 20px); }
  .video-cases-dialog__copy { padding: 14px 16px 17px; }
  .video-cases-dialog__copy h2 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .video-cases-hero__track,
  .video-cases-hero__image,
  .video-cases-grid,
  .video-case-card__image,
  .video-case-card__play { transition: none; }

  .video-cases-hero__skeleton,
  .video-case-card--skeleton span,
  .video-case-card--skeleton i,
  .video-case-card--skeleton small { animation: none; }
}
