/* =========================================
   VIDEO DEMO SECTION
========================================= */

/* The section padding is handled by the global .section class */
.video-demo-section {
  background: var(--surface);
}

.video-demo-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem auto;
}

.video-demo-header .section-label {
  justify-content: center;
}

.video-demo-header .section-title {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.video-demo-header .section-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-body-lg);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

/* Base card styling (bg, borders, shadows, hover lift) 
   is handled by the global .card class from the design system. 
   We only add specific overrides here. */
.video-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  padding: 0; /* Override any padding if .card has it */
}

/* Ensure the card hover state also targets the thumbnail properly */
.video-card:hover .video-thumbnail {
  opacity: 0.85;
  transform: scale(1.05);
}

.video-thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f131f; /* Dark underlay for the image */
  overflow: hidden;
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity var(--duration-base) var(--ease-in-out), transform var(--duration-slow) var(--ease-smooth);
}

/* Play Button Overlay - utilizing design system tokens */
.play-btn-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: background var(--duration-base) var(--ease-in-out),
              transform var(--duration-base) var(--ease-bounce),
              box-shadow var(--duration-base) var(--ease-in-out);
  z-index: 2;
  box-shadow: var(--shadow-md);
}

.play-btn-overlay i {
  width: 28px;
  height: 28px;
  margin-left: 4px; /* visually center play icon */
  fill: currentColor;
}

/* On card hover, light up the play button with the primary gradient */
.video-card:hover .play-btn-overlay {
  background: var(--gradient-primary);
  border-color: transparent;
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: var(--shadow-glow-md), var(--shadow-lg);
}

/* Information Box below the video */
.video-info {
  padding: 1.5rem;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.2));
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.video-title {
  font-size: var(--text-h6);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  transition: color var(--duration-fast) var(--ease-in-out);
}

.video-card:hover .video-title {
  color: var(--color-blue-light);
}

.video-duration {
  font-size: var(--text-body-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.video-duration i {
  width: 16px;
  height: 16px;
}

.video-demo-actions {
  text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
