/* ============================================
   Video page (videos.html)
   ============================================ */

.video-page {
  padding-top: 2rem;
  padding-bottom: 3rem;
  background: var(--bg-dark);
  min-height: calc(100vh - var(--header-h));
}

.video-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.video-column {
  max-width: 958.21px;
  width: 100%;
}

.video-player-wrap {
  width: 100%;
  margin: 0 0 1.25rem 0;
}

/* Video.js player container: let fluid + aspectRatio control size (portrait and landscape) */
.video-player-wrap .video-js {
  width: 100%;
  max-width: 100%;
  display: block;
  background: #0a0a0a;
  border-radius: var(--card-radius, 6px);
}

.video-player-wrap .video-js .vjs-tech {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin-bottom: 0.5rem;
}

.video-meta-competition {
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: 0;
  vertical-align: middle;
  color: #EA0029;
}

.video-meta-sep {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 100%;
  color: var(--text-muted);
}

.video-meta-source {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  line-height: 100%;
  letter-spacing: 0;
  vertical-align: middle;
  color: var(--text-muted);
}

.video-title {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(22px, 0.54vw + 20.3px, 28px);
  line-height: 100%;
  letter-spacing: 0;
  vertical-align: middle;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  padding: 0;
}

.video-duration-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: 0;
  vertical-align: middle;
  color: var(--text-muted);
}

.video-duration-line img {
  flex-shrink: 0;
}

.video-page .article-social-share {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  width: 245px;
  min-height: 48px;
  gap: 6.85px;
  padding: 13.71px 10.28px;
  border-top-right-radius: 3.43px;
  border-bottom-right-radius: 3.43px;
  background: #EA0029;
  box-sizing: border-box;
}

.video-page .article-social-share a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  height: 21px;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  border-radius: 4px;
}

.video-page .article-social-share a:hover {
  transform: scale(1.25);
  opacity: 1;
}

.video-page .article-social-share a:active {
  transform: scale(1.1);
}

.video-page .article-social-share img {
  width: 21px;
  height: 21px;
  display: block;
  pointer-events: none;
}

/* Section titles on video page */
.video-section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(20px, 1.1vw + 16.5px, 32.22px);
  line-height: 48px;
  letter-spacing: 0;
  vertical-align: middle;
  margin: clamp(1.25rem, 3.9vw + 0.47rem, 4rem) 0 clamp(1rem, 1.2vw + 0.6rem, 1.5rem);
  padding: 0;
}

.video-section-title .video-section-title-accent {
  color: #EA0029;
}

.video-section-title .video-section-title-rest {
  color: var(--text-primary);
}

.video-section-title-match {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(20px, 1.1vw + 16.5px, 32.22px);
  line-height: 48px;
  letter-spacing: 0;
  vertical-align: middle;
  color: var(--text-primary);
  margin: clamp(1.25rem, 3.9vw + 0.47rem, 4rem) 0 clamp(1rem, 1.2vw + 0.6rem, 1.5rem);
  padding: 0;
}

/* Video page: cards grid has no extra margin-top (section title handles spacing) */
.video-page .video-cards-grid {
  margin-top: 0;
}

/* Trending section – background/container max 1920px, content max 1440px */
.video-trending-section {
  width: 100%;
  max-width: 1920px;
  margin: 1.5rem auto 0;
  background: #202020;
  padding: clamp(2rem, 4vw, 3.5rem) 1.5rem;
}

.video-trending-section .video-trending-title {
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: clamp(20px, 2.5vw + 18px, 32px);
  line-height: 1.2;
  letter-spacing: 0;
  vertical-align: middle;
  color: #FFFFFF;
  margin: 0 0 1rem;
  padding: 0;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .video-trending-section.trending-carousel .video-trending-title {
    font-size: clamp(16px, 4.5vw + 14px, 20px);
  }
}

.video-trending-section .video-trending-inner {
  max-width: 1440px;
  margin: 0 auto;
}

.video-trending-section .video-trending-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

@media (max-width: 1400px) {
  .video-trending-section .video-trending-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1100px) {
  .video-trending-section .video-trending-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .video-trending-section .video-trending-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .video-trending-section .video-trending-grid {
    grid-template-columns: 1fr;
  }
  .video-trending-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Video page: Trending Soccer Videos – 2 rows, 8 per row */
.video-trending-section.trending-two-rows .video-trending-grid {
  grid-template-columns: repeat(8, 1fr);
}

@media (max-width: 1400px) {
  .video-trending-section.trending-two-rows .video-trending-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .video-trending-section.trending-two-rows .video-trending-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .video-trending-section.trending-two-rows .video-trending-grid {
    grid-template-columns: 1fr;
  }
}

.video-trending-section .video-trending-card {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.25s ease;
}

.video-trending-section .video-trending-card:hover {
  opacity: 0.95;
}

.video-trending-section .video-thumbnail-trending {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 252.84 / 142.21;
  overflow: hidden;
  border-radius: 14.24px;
  border: 1.19px solid rgba(36, 36, 36, 0.06);
  background: #0a0a0a;
}

.video-trending-section .video-thumbnail-trending img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: top;
  border-radius: 12px;
}

.video-trending-section .video-trending-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.73);
  backdrop-filter: blur(8.05px);
  -webkit-backdrop-filter: blur(8.05px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.video-trending-section .video-trending-play img {
  width: 25px;
  height: 25px;
  display: block;
}

.video-trending-section .video-trending-card-body {
  display: block;
  padding: 0.75rem 0 0;
  color: #FFFFFF;
}

.video-trending-section .video-trending-card-title {
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-style: normal;
  font-size: clamp(14px, 1.1vw + 13px, 16.66px);
  line-height: 1.2;
  letter-spacing: 0;
  vertical-align: middle;
  color: #FFFFFF;
  margin: 0 0 0.4rem;
  display: block;
  transition: color 0.2s ease;
}

.video-trending-section .video-trending-card:hover .video-trending-card-title {
  color: rgba(255, 255, 255, 0.6);
}

.video-trending-section .video-trending-card-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 100%;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.75);
}

.video-trending-section .video-trending-card-meta img {
  display: block;
  flex-shrink: 0;
}

/* Soccer page only: Trending carousel with arrows underneath */
.video-trending-section.trending-carousel .trending-carousel-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0;
}

.video-trending-section.trending-carousel .trending-carousel-viewport::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.video-trending-section.trending-carousel .trending-carousel-viewport::-webkit-scrollbar-track,
.video-trending-section.trending-carousel .trending-carousel-viewport::-webkit-scrollbar-thumb {
  background: transparent;
  border: none;
}

.video-trending-section.trending-carousel .video-trending-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(1rem, 2vw, 1.5rem);
  width: max-content;
  grid-template-columns: unset;
  padding: 0;
}

.video-trending-section.trending-carousel .video-trending-card {
  flex: 0 0 var(--trending-card-width, 280px);
  width: var(--trending-card-width, 280px);
  scroll-snap-align: start;
  min-width: 0;
}

@media (max-width: 900px) {
  .video-trending-section.trending-carousel .video-trending-card {
    flex: 0 0 var(--trending-card-width, 260px);
    width: var(--trending-card-width, 260px);
  }
}

@media (max-width: 600px) {
  .video-trending-section.trending-carousel .video-trending-card {
    flex: 0 0 var(--trending-card-width, 240px);
    width: var(--trending-card-width, 240px);
  }
}

/* Video page: 2 rows, 8 per row – arrows scroll the whole strip */
.video-trending-section.trending-carousel.trending-two-rows .video-trending-grid {
  display: grid;
  grid-template-columns: repeat(8, var(--trending-card-width, 280px));
  grid-template-rows: repeat(2, auto);
  gap: clamp(1rem, 2vw, 1.5rem);
  width: max-content;
  padding: 0;
}

.video-trending-section.trending-carousel.trending-two-rows .video-trending-card {
  flex: none;
  width: 100%;
  min-width: 0;
}

@media (max-width: 900px) {
  .video-trending-section.trending-carousel.trending-two-rows .video-trending-grid {
    grid-template-columns: repeat(8, var(--trending-card-width, 260px));
  }
}

@media (max-width: 600px) {
  .video-trending-section.trending-carousel.trending-two-rows .video-trending-grid {
    grid-template-columns: repeat(8, var(--trending-card-width, 240px));
  }
}

.video-trending-section.trending-carousel .trending-carousel-arrows {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-bottom: 0.25rem;
}

.video-trending-section.trending-carousel .trending-carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #b80020;
  cursor: pointer;
}

.video-trending-section.trending-carousel .trending-carousel-btn svg {
  width: 32px;
  height: 32px;
}

.video-trending-section.trending-carousel .trending-carousel-btn:active {
  color: #5c0010;
}

.video-trending-section.trending-carousel .trending-carousel-btn:focus {
  outline: none;
}

.video-trending-section.trending-carousel .trending-carousel-btn.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

html.theme-light .video-trending-section.trending-carousel .trending-carousel-btn,
html[data-theme="light"] .video-trending-section.trending-carousel .trending-carousel-btn {
  color: #b80020;
}

html.theme-light .video-trending-section.trending-carousel .trending-carousel-btn:active,
html[data-theme="light"] .video-trending-section.trending-carousel .trending-carousel-btn:active {
  color: #5c0010;
}
