/* ==============================================
   VIDEO SPLIDE – video-splide.css
   ============================================== */

/* ── Biến màu & kích thước ── */
.vsp-section {
  --red: #e8251a;
  --white: #ffffff;
  --white-dim: rgba(255, 255, 255, 0.62);
  --bg-sage: #aacf4e42;
  --bg-sage-dark: #aacf4e;
  --radius: 14px;
  --thumb-h: 165px;
  --font-primary: var(--e-global-typography-primary-font-family);
  --font-secondary: var(--e-global-typography-secondary-font-family);
  --padding-l: 3rem;
  --padding-m: 2rem;
  --padding-x: 1rem;
  width: 100%;
  overflow: hidden;
  font-family: 'Be Vietnam Pro', 'Nunito', sans-serif;
}

/* ================================================
   HERO SLIDER
   ================================================ */

/* ẩn arrow & pagination mặc định của Splide */
.vsp-main .splide__arrows,
.vsp-main .splide__pagination {
  display: none !important;
}

.vsp-hero-slide {
  position: relative;
  min-height: clamp(500px, 70vw, 700px);
  display: flex;
  align-items: flex-end;
}

/* ảnh nền */
.vsp-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--bg) center / cover no-repeat;
}

/* lớp tối gradient trái → phải */
.vsp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.45) 55%,
    rgba(0, 0, 0, 0.04) 100%
  );
}

/* nội dung text */
.vsp-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: max(5%, 3rem);
}

.vsp-hero-title {
  font-size: clamp(1.35rem, 3vw, 2.3rem);
  font-family: var(--font-primary);
  font-weight: 400;
  color: var(--white);
  margin: 0;
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

/* #software tags */
.vsp-hero-tags {
  font-family: var(--font-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vsp-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 4px 12px;
}
.vsp-tag img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 2px;
}

/* mô tả */
.vsp-hero-desc {
  font-size: clamp(0.84rem, 1.35vw, 0.94rem);
  line-height: 1.55;
  margin: 0;
  max-width: 460px;
}
.vsp-hero-desc p {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  color: var(--white);
}
/* playlist links */
.vsp-hero-playlists {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vsp-playlist-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--white-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.vsp-playlist-link:hover {
  color: var(--white);
}

/* nút Ghé thăm */
.vsp-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 22px;
  margin-top: 4px;
  background: var(--white);
  color: #111;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  width: fit-content;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.26);
  transition:
    background 0.2s,
    transform 0.15s;
  border: 2px solid var(--bg-sage);
  margin-top: 1.5rem;
}
.vsp-btn:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

/* ================================================
   THUMBNAIL RAIL
   ================================================ */

.vsp-thumbs {
  position: relative;
  margin: 0 auto;
  margin-top: -2rem;
  max-width: 1208px;
  padding-bottom: 4rem;
}
/* ẩn arrow mặc định của Splide */
.vsp-thumbs .splide__arrows {
  display: none !important;
}

.vsp-thumbs .splide__track--slide {
  padding: 4px;
}
/* khoảng cách giữa các card */
.vsp-thumbs .splide__slide {
  margin-right: 14px;
}

/* card */
#vsp-thumbs .vsp-card {
  width: 270px;
  border-radius: var(--radius);
  border: 2px solid #ffffffc9;
  background: var(--bg-sage);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
#vsp-thumbs .vsp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

/* viền đỏ khi đang active */
#vsp-thumbs .splide__slide.is-active {
  background: var(--white);
  border-color: var(--bg-sage);
}

/* ảnh thumbnail */
.vsp-card-img-wrap {
  position: relative;
  display: block;
  width: 100%;
  height: var(--thumb-h);
  overflow: hidden;
  flex-shrink: 0;
}
.vsp-card-img-wrap img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.vsp-card:hover .vsp-card-img-wrap img {
  transform: scale(1.04);
}

/* nút play tròn đỏ */
.vsp-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.2s,
    background 0.2s;
}
.vsp-card-img-wrap:hover .vsp-play-btn {
  transform: translate(-50%, -50%) scale(1.12);
  background: #c0150c;
}

/* progress bar đỏ nhỏ ở đáy ảnh */
.vsp-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 40%;
  background: var(--red);
  border-radius: 0 2px 2px 0;
}

/* tiêu đề card */
.vsp-card-title {
  display: block;
  padding: 11px 14px 14px;
  font-size: 1.15rem;
  font-weight: 400;
  font-family: var(--font-primary);
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.15s;
  flex: 1;
}
.vsp-card-title:hover {
  background-color: var(--white);
}

/* custom prev / next */
.vsp-nav {
  display: flex;
  gap: 0.75rem;
  position: absolute;
  bottom: 4px;
  z-index: 10;
}
.vsp-nav button.vsp-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--white);
  color: var(--bg-sage-dark);
  cursor: pointer;
  box-shadow: none;
  display: flex;
  justify-content: center;
  transition:
    background 0.2s,
    transform 0.15s;
  padding: 0;
  border-width: 2px 2px 2px 2px;
}

.vsp-nav-btn i {
  font-size: 38px;
}
.vsp-nav-btn:hover {
  background: #efefef;
}

/* ================================================
   RESPONSIVE
   ================================================ */
.vsp-hero-content {
  padding-left: 0;
  padding-right: 0;
}
.vsp-thumbs {
  padding-left: 0;
  padding-right: 0;
}
@media (max-width: 1300px) {
  .vsp-hero-content {
    padding-left: var(--padding-m);
    padding-right: var(--padding-m);
  }
  .vsp-thumbs {
    padding-left: var(--padding-m);
  }
  .vsp-card {
    width: 220px;
    --thumb-h: 138px;
  }
}

@media (max-width: 500px) {
  .vsp-hero-content {
    padding-left: var(--padding-x);
    padding-right: var(--padding-x);
  }
  .vsp-thumbs {
    padding-left: var(--padding-x);
  }
}
