/* Client testimonial video on the project pages. The cover (play button, name, length)
   is added by assets/js/testimonial-video.js and fades out once the video is playing. */

.testimonial_video_wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 2px solid #2A2B25;
  border-radius: 16px;
  background: #131615;
  box-shadow: 0 32px 64px -32px rgba(14, 16, 15, 0.55);
}

.testimonial_video_wrap video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial_video_cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(14, 16, 15, 0) 42%, rgba(14, 16, 15, 0.9) 100%);
  color: #FFFCE1;
  text-align: left;
  cursor: pointer;
  transition: opacity 0.4s ease;
}

.testimonial_video_cover:focus-visible {
  outline: 3px solid #FFE32A;
  outline-offset: -6px;
}

.testimonial_video_wrap.is-playing .testimonial_video_cover {
  opacity: 0;
  pointer-events: none;
}

/* Play button: a light frosted glass ring around a glossy yellow disc with a rounded play icon.
   The bright edge and soft shadow keep it readable on light and dark video frames. */
.testimonial_video_play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255, 252, 225, 0.22);
  -webkit-backdrop-filter: blur(14px) brightness(1.08);
  backdrop-filter: blur(14px) brightness(1.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 252, 225, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 16px 36px -12px rgba(14, 16, 15, 0.55);
  color: #0E100F;
  transform: translate(-50%, -50%);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.4s ease;
}

.testimonial_video_play_core {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 26%, #FFF59A 0%, #FFE32A 52%, #F2CF00 100%);
  box-shadow:
    0 8px 22px -4px rgba(255, 227, 42, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 6px rgba(14, 16, 15, 0.08);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s ease;
}

/* A soft yellow glow that breathes outward, inviting the click */
.testimonial_video_play::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(255, 227, 42, 0.6), 0 0 24px rgba(255, 227, 42, 0.35);
  pointer-events: none;
  animation: testimonialVideoPulse 2.6s cubic-bezier(0.25, 0.6, 0.3, 1) infinite;
}

.testimonial_video_play svg {
  display: block;
  width: 26px;
  height: 26px;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (hover: hover) {
  .testimonial_video_cover:hover .testimonial_video_play {
    transform: translate(-50%, -50%) scale(1.06);
    background-color: rgba(255, 252, 225, 0.32);
  }

  .testimonial_video_cover:hover .testimonial_video_play_core {
    transform: scale(1.05);
    box-shadow:
      0 10px 30px -4px rgba(255, 227, 42, 0.7),
      inset 0 1px 0 rgba(255, 255, 255, 0.55),
      inset 0 -3px 6px rgba(14, 16, 15, 0.08);
  }

  .testimonial_video_cover:hover .testimonial_video_play svg {
    transform: translateX(1px) scale(1.06);
  }
}

.testimonial_video_cover:focus-visible .testimonial_video_play {
  transform: translate(-50%, -50%) scale(1.06);
}

/* Smaller screens: a slightly smaller button */
@media (max-width: 479px) {
  .testimonial_video_play {
    width: 72px;
    height: 72px;
  }

  .testimonial_video_play_core {
    width: 54px;
    height: 54px;
  }

  .testimonial_video_play svg {
    width: 21px;
    height: 21px;
  }
}

.testimonial_video_meta {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 22px 20px;
  font-family: 'Inter', sans-serif;
}

.testimonial_video_name {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.testimonial_video_info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.4;
  text-transform: uppercase;
  color: rgba(255, 252, 225, 0.72);
}

.testimonial_video_duration {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 252, 225, 0.16);
  color: #FFFCE1;
  letter-spacing: 0.5px;
}

/* Spinner in the play button while the video starts */
.testimonial_video_wrap.is-loading .testimonial_video_cover {
  pointer-events: none;
}

.testimonial_video_wrap.is-loading .testimonial_video_play svg {
  opacity: 0;
}

.testimonial_video_wrap.is-loading .testimonial_video_play::before {
  animation: none;
  opacity: 0;
}

.testimonial_video_wrap.is-loading .testimonial_video_play::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(14, 16, 15, 0.25);
  border-top-color: #0E100F;
  border-radius: 50%;
  animation: testimonialVideoSpin 0.8s linear infinite;
}

@keyframes testimonialVideoPulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.42);
    opacity: 0;
  }
}

@keyframes testimonialVideoSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial_video_play::before {
    animation: none;
    opacity: 0;
  }

  .testimonial_video_play,
  .testimonial_video_play_core,
  .testimonial_video_play svg {
    transition: none;
  }
}
