/* ==========================================================================
   GMC Video Overview Section
   Sequence Color: White (#ffffff) alternating with Blue (#f8faff) FAQ section
   Theme Tokens: #273437 (heading), #3478ed (primary accent), #667796 (body)
   ========================================================================== */

.video-section {
  width: 100%;
  padding: 90px 0;
  background-color: #f8faff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Subtle ambient background glow */
.video-section::before {
  content: "";
  position: absolute;
  width: 650px;
  height: 650px;
  top: -380px;
  right: -150px;
  border-radius: 50%;
  pointer-events: none;
}

.video-content {
  width: 100%;
  position: relative;
  z-index: 2;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ==================================================
   HEADING AREA (Matched with other live sections)
================================================== */

.video-heading-area {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 35px;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-section.visible .video-heading-area {
  opacity: 1;
  transform: translateY(0);
}

/* Badge matching .core-capabilities-badge */
.video-heading-area .core-capabilities-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  margin-bottom: 20px;
  border: 1px solid #d6e4ff;
  border-radius: 30px;
  background: #f1f6ff;
  color: #3478ed;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.video-heading-area .badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6d9df5;
  box-shadow: 0 0 0 4px #dce9ff;
  display: block;
}

/* Heading matching .core-capabilities-header h2 (#273437 and span #3478ed) */
.video-heading-area h2 {
  margin-bottom: 15px;
  font-size: 35px;
  line-height: 1.2;
  font-weight: 700;
  color: #273437;
  letter-spacing: 0.5px;
  font-family: "Poppins", sans-serif;
  text-align: center;
}

.video-heading-area h2 span {
  color: #3478ed;
  font-weight: 700;
}

/* Paragraph matching .core-capabilities-header p */
.video-heading-area p {
  max-width: 680px;
  margin: 0 auto;
  color: #667796;
  font-size: 16px;
  line-height: 1.7;
  font-family: inherit;
  text-align: center;
}

/* ==================================================
   WHITE BOX CONTAINER
================================================== */

.white-box {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #d9e5f7;
  border-radius: 24px;
  position: relative;
  box-shadow:
    0 24px 65px rgba(42, 82, 140, 0.09),
    0 6px 20px rgba(42, 82, 140, 0.04);
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition:
    opacity 0.9s ease 0.15s,
    transform 1s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.video-section.visible .white-box {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* When video is playing, box tightens to wrap the video seamlessly */
.white-box.playing {
  padding: 10px;
}

/* ==================================================
   VIDEO FRAME
================================================== */

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: auto;
  position: relative;
  overflow: hidden;
  background: #0f172a;
  border-radius: 18px;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(20, 45, 60, 0.14);
  transition:
    border-radius 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.7s ease;
}

.white-box.playing .video-frame {
  border-radius: 24px;
  box-shadow: none;
  cursor: default;
}

/* ==================================================
   LIVE VERSION THUMBNAIL
================================================== */

.video-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.01);
  transition:
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.5s ease;
}

.video-frame:hover .video-thumbnail {
  transform: scale(1.03);
}

/* Cinematic overlay */
.image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 20, 25, 0.14);
  transition: background 0.4s ease;
}

.video-frame:hover .image-overlay {
  background: rgba(9, 20, 25, 0.22);
}

/* ==================================================
   PLAY BUTTON
================================================== */

.play-wrapper {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s ease;
  pointer-events: none;
}

.video-frame:hover .play-wrapper {
  transform: translate(-50%, -50%) scale(1.08);
}

/* Pulse animation */
.play-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: videoPulse 2.3s infinite;
}

@keyframes videoPulse {
  0% {
    opacity: 0.8;
    transform: scale(0.75);
  }
  75% {
    opacity: 0;
    transform: scale(1.45);
  }
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

/* Play button circle */
.play-button {
  width: 58px;
  height: 58px;
  position: relative;
  z-index: 2;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease;
}

.video-frame:hover .play-button {
  transform: scale(1.05);
}

/* Red play triangle */
.play-triangle {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 14px solid #ff0000;
  margin-left: 3px;
}

/* Hide play wrapper once playing */
.white-box.playing .play-wrapper,
.white-box.playing .image-overlay,
.white-box.playing .video-thumbnail {
  display: none;
}

/* ==================================================
   SOUND TOGGLE PILL OVERLAY
================================================== */

.video-sound-toggle {
  position: absolute;
  bottom: 18px;
  right: 18px;
  z-index: 10;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: all 0.25s ease;
}

.video-sound-toggle:hover {
  background: rgba(52, 120, 237, 0.9);
  border-color: #3478ed;
  transform: scale(1.04);
}

.video-sound-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ==================================================
   YOUTUBE IFRAME
================================================== */

.youtube-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  animation: iframeIn 0.5s ease forwards;
}

@keyframes iframeIn {
  from {
    opacity: 0;
    transform: scale(1.015);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==================================================
   EXTERNAL YOUTUBE LINK BUTTON
================================================== */

.youtube-link-area {
  max-width: 880px;
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.youtube-link-area.show {
  opacity: 1;
  transform: translateY(0);
}

.youtube-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #667796;
  font-size: 13px;
  font-weight: 600;
  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.youtube-link:hover {
  color: #172b50;
  transform: translateY(-2px);
}

.youtube-logo {
  width: 36px;
  height: 25px;
  background: #ff0000;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.youtube-logo::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid #ffffff;
  margin-left: 2px;
}

/* ==================================================
   STORE CTA BUTTONS (from live version)
================================================== */

.video-cta-buttons-wrap {
  max-width: 1080px;
  margin: 45px auto 0;
  text-align: center;
}

.video-cta-buttons-wrap .video-content-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style: none;
  flex-wrap: wrap;
}

/* ==================================================
   RESPONSIVE DESIGN
================================================== */

@media (max-width: 991px) {
  .video-section {
    padding: 70px 0;
  }
  .white-box {
    padding: 16px;
    border-radius: 20px;
  }
  .video-heading-area {
    margin-bottom: 28px;
  }
  .video-heading-area h2 {
    font-size: 30px;
  }
}

@media (max-width: 768px) {
  .video-section {
    padding: 50px 0;
  }
  .video-heading-area h2 {
    font-size: 26px;
  }
  .video-heading-area p {
    font-size: 15px;
  }
  .white-box {
    padding: 12px;
    border-radius: 16px;
  }
  .video-frame {
    border-radius: 14px;
  }
  .white-box.playing {
    padding: 6px;
  }
  .white-box.playing .video-frame {
    border-radius: 18px;
  }
  .play-wrapper {
    width: 80px;
    height: 80px;
  }
  .play-button {
    width: 54px;
    height: 54px;
  }
  .play-triangle {
    border-top-width: 8px;
    border-bottom-width: 8px;
    border-left-width: 14px;
  }
  .youtube-link-area {
    margin-top: 14px;
    justify-content: center;
  }
  .video-cta-buttons-wrap {
    margin-top: 30px;
  }
  .video-cta-buttons-wrap .video-content-buttons {
    gap: 12px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .video-heading-area,
  .white-box,
  .video-frame,
  .play-wrapper,
  .play-wrapper::before,
  .youtube-iframe,
  .youtube-link-area {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
