/* =========================================================
   RESET / BASE
========================================================= */
html, body {
  height: 100%;
  margin: 0;
  top: 0;
  margin-top: 0 !important;
}

/* =========================================================
   PAGE WRAPPER & LAYOUT
========================================================= */
.videos-page {
  min-height: 100vh;
  background: #000;
}

.videos-layout {
  display: flex;
  min-height: 100vh;
}

/* =========================================================
   SIDEBAR (BASE)
========================================================= */
.videos-sidebar {
  background: #0d0d0d;
  padding: 80px 70px;
  width: 420px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Back button */
.back-button {
  color: white;
  font-size: 28px;
  text-decoration: none;
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 10;
}

/* =========================================================
   SIDEBAR STICKY + INTERNAL SCROLL (DESKTOP)
========================================================= */
@media (min-width: 769px) {

  .videos-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
  }

  .sidebar-summary,
  .sidebar-expanded {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .videos-content {
    overflow-y: auto;
    max-height: 100vh;
  }
}

/* =========================================================
   SIDEBAR PANELS (SUMMARY + EXPANDED)
========================================================= */
.sidebar-summary,
.sidebar-expanded {
  position: absolute;
  inset: 0;
  padding-top: 100px;
  padding-left: 10px;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Summary */
.sidebar-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  background: #0d0d0d;
  transform: translateX(0);
  opacity: 1;
  z-index: 2;
}

/* Expanded */
.sidebar-expanded {
  background: #0d0d0d;
  transform: translateX(100%);
  opacity: 0;
  z-index: 3;
  min-height: 100%;
}

/* Active expanded state */
.videos-sidebar.show-expanded .sidebar-summary {
  transform: translateX(-100%);
  opacity: 0;
}

.videos-sidebar.show-expanded .sidebar-expanded {
  transform: translateX(0);
  opacity: 1;
}

/* =========================================================
   SIDEBAR CONTENT
========================================================= */
.sidebar-description {
  font-size: 18px;
  line-height: 1.6;
  color: #fff;
  max-width: 260px;
  font-weight: 300;
  margin: 40px;
}

.sidebar-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 88px;
  font-weight: 300;
  letter-spacing: 2px;
  max-height: 520px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Buttons */
.read-more-btn {
  background: none;
  border: none;
  color: #ff0000;
  margin-top: -8px;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 0.4px;
}

.close-expanded {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  margin-bottom: 20px;
}

/* Expanded content */
.expanded-title {
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 24px;
  color: #fff;
  writing-mode: horizontal-tb;
  transform: none;
}

.expanded-content {
  font-size: 16px;
  line-height: 1.7;
  color: #fff;
  max-width: 320px;
}

/* =========================================================
   MAIN CONTENT AREA
========================================================= */
.videos-content {
  padding: 60px;
  background: #000;
  max-width: 1000px;
  margin-left: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* =========================================================
   TOP BAR (SEARCH + FILTERS)
========================================================= */
.videos-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-bottom: 40px;
}

/* Search */
.video-search input {
  width: 280px;
  background: transparent;
  border: 1px solid #ff0000;
  color: #fff;
  padding: 10px 16px;
  border-radius: 20px !important;
  outline: none;
}

.video-search input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

/* Filters */
.video-filters {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}

.video-filters a {
  border: 1px solid rgba(255, 255, 255, 0.85);
  padding: 8px 16px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.video-filters a:hover,
.video-filters a.active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* =========================================================
   VIDEO GRID
========================================================= */
.video-grid {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
}

/* Single result full width */
.video-grid:has(.video-card:only-child) {
  grid-template-columns: 1fr;
}

.video-grid:has(.video-card:only-child) .video-card {
  grid-column: 1 / -1;
}

/* Loading */
.video-grid.is-loading {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* =========================================================
   VIDEO CARD
========================================================= */
.video-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.video-card.is-active {
  outline: 2px solid #ff0000;
  outline-offset: 4px;
}

/* Play icon */
.play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: red;
  text-decoration: none;
  opacity: 0.85;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.video-card:hover .play-icon {
  transform: scale(1.1);
  opacity: 1;
  animation: playPulse 1.4s infinite;
}

@keyframes playPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* =========================================================
   PAGINATION
========================================================= */
.video-pagination {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.video-pagination a,
.video-pagination span {
  color: white;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-radius: 999px;
  font-size: 13px;
}

.video-pagination .current {
  background: white;
  color: black;
  border-color: white;
}

/* =========================================================
   RELATED VIDEOS
========================================================= */
.related-section {
  display: flex;
  align-items: center;
  background: #000;
  padding: 40px;
  height: 30vh;
  gap: 15px;
}

.related-spacer {
  flex: 1;
}

.related-prev:hover,
.related-prev::after {
  background: #9E1010;
  color: #000;
}

.related-prev:active {
  background-color: #9E1010;
}

.related-prev {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #000;
  font-size: 32px;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 5;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.related-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: calc((260px * 2) + 20px);
}

.related-scroll::-webkit-scrollbar { display: none; }
.related-scroll { scrollbar-width: none; }

.related-card {
  flex: 0 0 260px;
  height: 160px;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid #fff;
}

.related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   VIDEO HERO
========================================================= */
.video-hero {
  background: #a00000;
  height: 70vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Video player */
.video-player {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
}

.video-player iframe,
.video-player video {
  position: absolute !important;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  background: #000;
  border: 0;
}

/* Fix WordPress / YouTube embed collapse */
.video-player .wp-block-embed,
.video-player .wp-block-embed__wrapper {
  width: 100%;
  height: 100%;
}

/* =========================================================
   VIDEO NAV / ACTIONS
========================================================= */
.video-back {
  position: absolute;
  top: 30px;
  left: 30px;
  color: #fff;
  font-size: 32px;
  text-decoration: none;
  z-index: 99;
}

.video-actions {
  position: absolute;
  right: 30px;
  bottom: 30px;
  display: flex;
  gap: 16px;
  z-index: 99;
}

.video-actions button {
  font-size: 24px;
  cursor: pointer;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  background: #fff;
  transition: transform 0.2s;
}

.video-actions button:hover {
  transform: scale(1.05);
}

/* =========================================================
   FULLSCREEN VIDEO MODAL
========================================================= */
.video-modal {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  margin-top: 15px;
  display: none;
  align-items: center;
  justify-content: center;
}

.video-modal.is-open {
  display: flex;
}

.video-modal-content {
  margin-top: 30px;
  position: relative;
  width: 100%;
  height: 100%;
}

.video-modal iframe,
.video-modal video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10000;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
}

/* =========================================================
   MOBILE — BASE LAYOUT
========================================================= */
@media (max-width: 768px) {

  .videos-page {
    overflow-x: hidden;
  }

  .videos-layout {
    flex-direction: column;
    overflow-x: hidden;
  }

  /* ── SIDEBAR ── */
  .videos-sidebar {
    min-height: 520px;
    padding: 50px 20px 30px;
    width: 100%;
  }

  .back-button {
    top: 20px;
    left: 20px;
    font-size: 22px;
  }

  .sidebar-description {
    font-size: 14px;
    max-width: 100%;
    margin: 50px 0 0 0;
    padding: 0 10px;
  }

  /* Outlined vertical title — matches Figma */
  .sidebar-title {
    font-size: 72px;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1.5px #fff;
    text-stroke: 1.5px #fff;
    max-height: 320px;
    letter-spacing: 4px;
  }

  /* ── MAIN CONTENT ── */
  .videos-content {
    max-width: 100%;
    margin-left: 0;
    padding: 20px 14px;
  }

  /* ── TOP BAR ── */
  .videos-topbar {
    position: sticky;
    top: 0;
    background: #000;
    z-index: 20;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-top: 12px;
    padding-bottom: 10px;
    margin-bottom: 0;
  }

  /* ── SEARCH BAR ── */
  .video-search {
    width: 100%;
  }

  .video-search input {
    width: 100%;
    box-sizing: border-box;
    height: 36px;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 999px;
    border-color: #ff0000;
  }

  /* ── FILTER PILLS ── */
  .video-filters {
    position: sticky;
    top: 0;
    background: #000;
    z-index: 20;
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    gap: 10px;
    padding-bottom: 8px;
  }

  .video-filters::-webkit-scrollbar {
    display: none;
  }

  .video-filters a {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 6px 12px;
  }

  /* ── VIDEO GRID ── */
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 16px;
    width: 100%;
  }

  /* ── VIDEO CARD (Shorts-style portrait) ── */
  .video-card {
    aspect-ratio: 10 / 16;
    border-radius: 14px;
    max-height: 72vh;
    overflow: hidden;
  }

  .video-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* ── PLAY ICON ── */
  .play-icon {
    font-size: 36px;
  }

  /* ── VIDEO HERO ── */
  .video-hero {
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .video-player {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 9 / 16;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .video-player iframe,
  .video-player video {
    width: 100%;
    height: auto;
    max-height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 10px;
    background: #000;
  }

  /* ── VIDEO NAV / ACTIONS ── */
  .video-back {
    top: 18px;
    left: 14px;
    font-size: 28px;
  }

  .video-actions {
    right: 14px;
    bottom: 16px;
    flex-direction: column;
    gap: 8px;
  }

  .video-actions button {
    font-size: 20px;
    padding: 6px 10px;
  }

  /* ── RELATED SECTION ── */
  .related-section {
    padding: 18px 14px;
    height: auto;
    gap: 5px;
  }

  .related-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .related-card {
    flex: 0 0 calc(50% - 8px);
    height: 140px;
    border-radius: 14px;
  }

}