/*==============================================================
  VIDEO SECTION — scoped styles
  Safe to drop into BootstrapMade / UpConstruction template.

  All rules are prefixed with  #video  or  .vs-*  so they
  NEVER touch Bootstrap, navmenu, footer, or any other section.
==============================================================*/

/* ════════════════════════════════
   SECTION WRAPPER
   Drop-in replacement for the
   template's normal <section> block.
════════════════════════════════ */
#video {
  /* inherits padding: 60px 0 from template's "section" rule — no override needed */
}

#video .vs-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

/* Small eyebrow label above the title */
#video .vs-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--default-color), transparent 50%);
  margin-bottom: 0.5rem;
}

/* Uses template's --heading-color + --heading-font automatically */
#video .vs-title {
  font-family: var(--heading-font);
  font-size: 32px;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

/* Accent lines matching template's .section-title h2 style */
#video .vs-title::before,
#video .vs-title::after {
  content: "";
  width: 50px;
  height: 2px;
  background: var(--accent-color);
  display: inline-block;
  vertical-align: middle;
}

#video .vs-title::before { margin: 0 15px 4px 0; }
#video .vs-title::after  { margin: 0 0 4px 15px; }

#video .vs-desc {
  font-size: 14px;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ════════════════════════════════
   LAYOUT
   Vertical player centred, thumbs
   stacked on the right.
════════════════════════════════ */
#video .vs-layout {
  display: flex;
  justify-content: center;   /* centred on the page */
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;           /* wraps gracefully on small screens */
}

/* ════════════════════════════════
   MAIN VIDEO PLAYER  (9 : 16)
════════════════════════════════ */
#video .vs-player {
  flex: 0 0 auto;
  width: min(400px, 90vw);   /* shrinks on narrow screens */
  aspect-ratio: 9 / 16;
  max-height: 75vh;          /* ← this is the actual fix: caps height to viewport */
  height: auto;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #1e1e1c;
  cursor: pointer;
  box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.15);
}

#video .vs-player video,
#video .vs-player iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
  object-fit: cover;
}

/* Placeholder dark gradient (remove once real video/poster is set) */
#video .vs-thumb-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #2e2e2c 0%, #141412 100%);
  z-index: 0;
}

/* ── Overlay ── */
#video .vs-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.38);
  transition: opacity 0.25s;
}

#video .vs-player.playing .vs-overlay {
  opacity: 0;
  pointer-events: none;
}

/* ── Play button — uses template accent colour ── */
#video .vs-play-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
}

#video .vs-play-btn:hover {
  background: color-mix(in srgb, var(--accent-color), transparent 30%);
  border-color: var(--accent-color);
  transform: scale(1.07);
}

#video .vs-play-btn i {
  font-size: 26px;
  color: #fff;
  margin-left: 4px; /* optical centre */
}

/* ── Video meta text ── */
#video .vs-meta {
  text-align: center;
  padding: 0 1rem;
}

#video .vs-meta .vs-vtitle {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
}

#video .vs-meta .vs-vduration {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ════════════════════════════════
   THUMBNAIL STRIP
════════════════════════════════ */
#video .vs-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* align strip height to the player */
  align-self: stretch;
  justify-content: center;
}

#video .vs-thumb {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
  background-color: var(--surface-color);
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-width: 160px;
}

#video .vs-thumb:hover {
  border-color: color-mix(in srgb, var(--default-color), transparent 60%);
}

#video .vs-thumb.active {
  border: 2px solid var(--accent-color);
  background: color-mix(in srgb, var(--accent-color), transparent 90%);
}

/* Mini 9:16 preview box inside each thumbnail */
#video .vs-thumb-preview {
  flex: 0 0 36px;
  height: 64px;
  border-radius: 6px;
  background: linear-gradient(160deg, #2e2e2c 0%, #141412 100%);
  /*
    Replace with real poster:
    background-image: url('thumb-1.jpg');
    background-size: cover;
    background-position: center;
  */
}

#video .vs-thumb-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#video .vs-thumb-info i {
  font-size: 16px;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  transition: color 0.2s;
}

#video .vs-thumb.active .vs-thumb-info i {
  color: var(--accent-color);
}

#video .vs-thumb-label {
  font-size: 13px;
  font-weight: 500;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
}

#video .vs-thumb.active .vs-thumb-label {
  color: var(--accent-color);
}

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 575px) {
  #video .vs-layout {
    flex-direction: column;
    align-items: center;
  }

  #video .vs-player {
    flex: 0 0 auto;
    width: 85vw;
    max-width: 300px;
  }

  #video .vs-thumbs {
    flex-direction: row;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
  }

  #video .vs-thumb {
    flex-direction: column;
    min-width: 90px;
    text-align: center;
  }
}
