/**
 * Thẻ video (widget Danh sách video).
 */
.tgwv-video-card {
  --tgwv-video-card-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --tgwv-video-card-duration: 0.3s;
  --tgwv-video-card-badge-bg: var(--tgwv-brand, #000000);
  --tgwv-video-card-badge-color: var(--tgwv-color-light, #ffffff);

  background-color: var(--tgwv-color-light);
  border-radius: 15px;
  position: relative;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 4px 20px rgba(20, 16, 15, 0.06);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.tgwv-video-card__media {
  overflow: hidden;
  border-radius: 15px 15px 0 0;
  position: relative;
}

.tgwv-video-card__open {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.tgwv-video-card__media .tgwv-video-card__open {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  line-height: 0;
  position: relative;
}

.tgwv-video-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  pointer-events: none;
  z-index: 2;
}

.tgwv-video-card__media-link {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  text-decoration: none;
  line-height: 0;
  color: inherit;
}

.tgwv-video-card__media-link:focus-visible {
  outline: 2px solid #374586;
  outline-offset: -2px;
}

.tgwv-video-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(20, 16, 15, 0.4) 0%,
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

.tgwv-video-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.tgwv-video-card__badges {
  position: absolute;
  left: 15px;
  top: 20px;
  right: 15px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}

.tgwv-video-card__badge {
  color: var(--tgwv-video-card-badge-color);
  font-size: 10px;
  font-weight: 500;
  background-color: var(--tgwv-video-card-badge-bg);
  padding: 5px 10px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.3;
  max-width: 100%;
  pointer-events: auto;
  transition:
    transform 0.35s ease,
    filter 0.35s ease;
}

.tgwv-video-card__badge i {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

.tgwv-video-card__badge span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tgwv-video-card__badge:focus-visible {
  outline: 2px solid #374586;
  outline-offset: 2px;
}

.tgwv-video-card__body {
  padding: 20px 15px;
}

.tgwv-video-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--tgwv-color-dark, #000000);
  margin: 0 0 8px;
  transition: color var(--tgwv-video-card-duration) var(--tgwv-video-card-ease);
}

.tgwv-video-card__link {
  color: inherit;
  text-decoration: none;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.tgwv-video-card__link:focus-visible {
  outline: 2px solid #374586;
  outline-offset: 2px;
  border-radius: 2px;
}

.tgwv-video-card__excerpt {
  font-size: 14px;
  margin: 0;
  color: var(--tgwv-color-dark, #000000);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tgwv-video-card__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 12px;
  color: #666;
}

.tgwv-video-card__date i {
  font-size: 12px;
  line-height: 1;
}

.tgwv-video-card__cta-wrap {
  margin: 14px 0 0;
}

.tgwv-video-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 20px;
  border: 1px solid var(--tgwv-brand, #000000);
  color: var(--tgwv-brand, #000000);
  background: transparent;
  text-decoration: none;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.tgwv-video-card__cta i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.tgwv-video-card__cta:focus-visible {
  outline: 2px solid #374586;
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .tgwv-video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(20, 16, 15, 0.12);
  }

  .tgwv-video-card:hover .tgwv-video-card__img {
    transform: scale(1.06);
  }

  .tgwv-video-card:hover .tgwv-video-card__media::after {
    opacity: 1;
  }

  .tgwv-video-card:hover .tgwv-video-card__badge,
  .tgwv-video-card__badge:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    text-decoration: none;
    color: var(--tgwv-video-card-badge-color);
  }

  .tgwv-video-card:hover .tgwv-video-card__title,
  .tgwv-video-card__link:hover {
    color: var(--tgwv-brand);
  }

  .tgwv-video-card:hover .tgwv-video-card__link,
  .tgwv-video-card__link:hover {
    text-decoration: none;
  }

  .tgwv-video-card__cta:hover {
    background-color: var(--tgwv-brand, #000000);
    color: var(--tgwv-color-light, #ffffff);
    text-decoration: none;
  }

  .tgwv-video-card__cta:hover i {
    transform: translateX(3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tgwv-video-card,
  .tgwv-video-card__img,
  .tgwv-video-card__badge,
  .tgwv-video-card__cta,
  .tgwv-video-card__cta i {
    transition: none;
  }

  @media (hover: hover) and (pointer: fine) {
    .tgwv-video-card:hover {
      transform: none;
    }

    .tgwv-video-card:hover .tgwv-video-card__img {
      transform: none;
    }

    .tgwv-video-card:hover .tgwv-video-card__badge,
    .tgwv-video-card__badge:hover {
      transform: none;
    }
  }
}
