/* ═══════════════════════════════════════════════════
   MotorcycleSlog — video.css
   Covers: Hero video background + Video Gallery page
═══════════════════════════════════════════════════ */

/* ── Hero Video Background ─────────────────────── */
.msl-splash--video {
  background: transparent;
  isolation: isolate;
}

/* Full-bleed video layer sits behind everything */
.splash-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* Gradient fallback */
.splash-gradient-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0a0f1c 0%, #1e293b 50%, #0f172a 100%);
}

/* YouTube iframe wrapper — scale up so iframe fills container */
.splash-yt-wrap {
  position: absolute;
  inset: 0;
  background: #000;
  overflow: hidden;
}
.splash-yt-wrap iframe {
  position: absolute;
  top:  50%; left: 50%;
  /* Aspect ratio trick: 16:9 scaled to cover */
  width:  177.78vh;  /* 100/56.25 * 100 */
  height: 56.25vw;
  min-width:  100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: none;
}

/* Self-hosted video */
.splash-video-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Dark overlay — keeps text readable over any video */
.splash-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(15,23,42,0.75) 0%,
    rgba(15,23,42,0.5) 50%,
    rgba(15,23,42,0.3) 100%
  );
  z-index: 1;
}

/* Content sits above the video */
.msl-splash--video .splash-content,
.msl-splash--video .splash-scroll {
  position: relative;
  z-index: 2;
}

/* Mute / Unmute toggle */
.splash-mute-btn {
  position: absolute;
  bottom: 80px;
  right: 32px;
  z-index: 10;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.splash-mute-btn:hover { 
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

/* Reduced motion: disable video, use gradient */
@media (prefers-reduced-motion: reduce) {
  .splash-video-el,
  .splash-yt-wrap { display: none; }
  .splash-gradient-bg { display: block !important; }
}


/* ═══════════════════════════════════════════════════
   VIDEO GALLERY PAGE
═══════════════════════════════════════════════════ */

/* ── Hero stats mini ── */
.hstat { text-align: left; }
.hstat-n { font-family: 'Rajdhani', sans-serif; font-size: 36px; font-weight: 700; color: #fff; line-height: 1; }
.hstat-n { color: #C0392B; }
.hstat-l { font-size: 11px; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 1px; }

/* ── Filter bar ── */
.vg-filter-bar {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 64px;
  z-index: 100;
  padding: 0 5%;
}
.vg-tabs {
  display: flex;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.vg-tabs::-webkit-scrollbar { display: none; }
.vg-tab {
  padding: 14px 22px;
  border: none;
  background: transparent;
  color: #777;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
  font-family: 'Inter', sans-serif;
}
.vg-tab:hover { color: #111; }
.vg-tab.active {
  color: #ef4444;
  border-bottom-color: #ef4444;
}

/* ── Section ── */
.vg-section { padding: 60px 5% 80px; background: #F4F4F4; }

/* ── Grid ── */
.vg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Card ── */
.vg-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  transition: transform .2s, box-shadow .2s;
}
.vg-card:hover { transform: translateY(-5px); box-shadow: 0 14px 36px rgba(0,0,0,0.1); }
.vg-card.vg-hidden { display: none !important; }

/* ── Thumbnail ── */
.vg-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
  cursor: pointer;
  overflow: hidden;
}
.vg-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s, opacity .3s;
  display: block;
}
.vg-card:hover .vg-thumb img { transform: scale(1.04); opacity: .85; }

/* Play overlay */
.vg-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  transition: background .25s;
}
.vg-thumb:hover .vg-play-overlay { background: rgba(0,0,0,0.35); }
.vg-play-btn {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(239,68,68,0.5);
}
.vg-thumb:hover .vg-play-btn { 
  transform: scale(1.05); 
  opacity: 1;
  box-shadow: 0 12px 48px rgba(239,68,68,0.6);
}

/* Placeholder when no YouTube ID */
.vg-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1C2533, #0d0d0d);
  gap: 12px;
}
.vg-add-note {
  color: rgba(255,255,255,0.45);
  font-size: 12px;
  text-align: center;
  line-height: 1.6;
}
.vg-add-note strong { color: rgba(255,255,255,0.7); }
.vg-play-icon { display: flex; align-items: center; justify-content: center; opacity: .4; }

/* Badges */
.vg-cat-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.vg-duration {
  position: absolute;
  bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 3px;
}

/* ── Card body ── */
.vg-card-body { padding: 18px 20px; }
.vg-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}
.vg-desc {
  font-size: 13px;
  color: #777;
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vg-yt-link {
  font-size: 13px;
  font-weight: 700;
  color: #ef4444;
  text-decoration: none;
  transition: color 0.3s;
}
.vg-yt-link:hover { 
  color: #dc2626;
  text-decoration: underline; 
}

/* ── Empty state ── */
.vg-empty { text-align: center; padding: 48px; color: #999; font-size: 15px; }

/* ── Setup notice ── */
.vg-setup-notice {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 10px;
  padding: 24px 28px;
  margin: 32px auto 0;
  max-width: 700px;
}
.vg-setup-notice h3 { font-family: 'Rajdhani', sans-serif; font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.vg-setup-notice ol { padding-left: 20px; }
.vg-setup-notice ol li { font-size: 14px; color: #555; margin-bottom: 6px; line-height: 1.6; }
.vg-setup-notice p { font-size: 13px; color: #666; margin-top: 10px; }
.vg-setup-notice code { background: #fff; border: 1px solid #ddd; padding: 1px 6px; border-radius: 3px; font-size: 12px; }

/* ── Lightbox ── */
.vg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.vg-lightbox[hidden] { display: none; }
.vg-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.92);
  cursor: pointer;
}
.vg-lightbox-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
}
.vg-close {
  position: absolute;
  top: -44px; right: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s;
}
.vg-close:hover { background: rgba(255,255,255,0.2); }
.vg-iframe-wrap {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}
.vg-iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: none;
}
.vg-lightbox-title {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  text-align: center;
  margin-top: 12px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
}

/* ── CTA ── */
.vg-cta { padding: 80px 5%; background: #111; }
.vg-cta .btn-outline {
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.vg-cta .btn-outline:hover { border-color: rgba(255,255,255,.7); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .vg-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .vg-filter-bar { top: 0; }
  .splash-mute-btn { bottom: 100px; right: 16px; }
}
@media (max-width: 500px) {
  .vg-grid { grid-template-columns: 1fr; }
}
