/* ==============================================
   VIDEOS PAGE — css/videos.css
   Builds on css/style.css
   ============================================== */

/* ── Hero ──────────────────────────────────── */
.videos-hero {
  background: linear-gradient(135deg, #1B2B3A 0%, #243447 55%, #2D3E50 100%);
}

/* ── Filter Bar ────────────────────────────── */
.videos-filter-bar {
  background: #fff;
  border-bottom: 1px solid #E5E7EB;
  padding: 0;
  position: sticky;
  top: 68px;
  z-index: 40;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.videos-filter-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  border: 1.5px solid #E5E7EB;
  background: #F9FAFB;
  color: #374151;
  font-size: 0.84rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: #C9A03C;
  color: #C9A03C;
  background: #FFFBF0;
}

.filter-btn.active {
  background: #C9A03C;
  border-color: #C9A03C;
  color: #fff;
  font-weight: 600;
}

.videos-count {
  font-size: 0.82rem;
  color: #6B7280;
  font-weight: 500;
  white-space: nowrap;
}

.videos-count span {
  font-weight: 700;
  color: #1B2B3A;
}

/* ── Video Grid Section ─────────────────────── */
.videos-section {
  padding: 4rem 0 5rem;
  background: #F8F9FB;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* ── Video Card ─────────────────────────────── */
.video-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

/* Thumbnail wrapper */
.video-thumb-wrap {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  background: #0f0f0f;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.video-card:hover .video-thumb {
  transform: scale(1.04);
  filter: brightness(0.75);
}

/* Play overlay */
.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s ease;
}

.video-card:hover .video-play-overlay {
  background: rgba(0, 0, 0, 0.28);
}

.video-play-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(201, 160, 60, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.15rem;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
  box-shadow: 0 4px 18px rgba(201, 160, 60, 0.5);
  padding-left: 3px; /* optical centering of play icon */
}

.video-card:hover .video-play-btn {
  opacity: 1;
  transform: scale(1);
}

.video-play-btn:hover {
  background: #b8882e;
}

/* YouTube badge */
.video-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card body */
.video-card-body {
  padding: 1rem 1.1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Category tags */
.video-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  width: fit-content;
}

.video-tag--swp {
  background: rgba(27, 43, 58, 0.1);
  color: #1B2B3A;
}

.video-tag--imanage {
  background: rgba(74, 58, 168, 0.1);
  color: #4A3AA8;
}

.video-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1A1A2E;
  line-height: 1.4;
  margin: 0;
  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-channel {
  font-size: 0.78rem;
  color: #9CA3AF;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.4rem;
}

/* ── Hide animation ─────────────────────────── */
.video-card.hidden {
  display: none;
}

/* ── No results ─────────────────────────────── */
.no-results {
  text-align: center;
  padding: 4rem 1rem;
  color: #9CA3AF;
}

.no-results i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
  display: block;
}

.no-results p {
  font-size: 1.05rem;
}

/* ── CTA Band ───────────────────────────────── */
.videos-cta-band {
  background: linear-gradient(135deg, #1B2B3A 0%, #243447 100%);
  padding: 4rem 0;
}

.videos-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.videos-cta-text h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
}

.videos-cta-text p {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  max-width: 480px;
}

.videos-cta-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Reuse btn styles from style.css – define fallbacks here */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-gold {
  background: #C9A03C;
  color: #fff;
  border: 2px solid #C9A03C;
}

.btn-gold:hover {
  background: #b8882e;
  border-color: #b8882e;
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
}

/* ── Lightbox Modal ─────────────────────────── */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.video-modal[hidden] {
  display: none;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.video-modal-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.video-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.video-modal-close:hover {
  background: #C9A03C;
}

.video-modal-title-bar {
  padding: 0.7rem 1rem 0;
  background: #111;
}

.video-modal-title {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Inter', sans-serif;
}

.video-modal-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  background: #000;
}

.video-modal-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 1200px) {
  .videos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .videos-filter-bar {
    position: static;
  }
}

@media (max-width: 600px) {
  .videos-grid {
    grid-template-columns: 1fr;
  }

  .videos-cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .videos-cta-actions {
    justify-content: center;
  }

  .videos-count {
    display: none;
  }
}
