/**
 * WebGTR Video Testimonials Section Styles
 * Global 3-in-a-row, 1-to-slide carousel with top-right arrows,
 * bottom indicator dots, pure video cards, and lightbox modal.
 *
 * @package WebGTR
 */

/* --------------------------------------------------------------------------
   1. Video Testimonials Section Container & Header
   -------------------------------------------------------------------------- */
.video-testimonials-section {
  position: relative;
  padding: 20px 0;
  overflow: hidden;
}

.vt-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.vt-header h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.8vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-accent);
  margin-top: 18px;
}

.vt-header p.sub {
  color: var(--text-second);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.6;
  margin: 14px auto 0;
  max-width: 660px;
}

/* --------------------------------------------------------------------------
   2. Top-Right Carousel Arrows, 3-in-a-Row Viewport & Slide Track
   -------------------------------------------------------------------------- */
.vt-carousel-top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 20px;
}

.vt-carousel-arrows {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vt-arrow-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  color: var(--text-accent);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}

.vt-arrow-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

/* Pure-CSS Chevron Fallback if SVG is stripped by server/plugin */
#vtPrevBtn:not(:has(svg))::before,
#vtNextBtn:not(:has(svg))::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  border-top: 2.2px solid currentColor;
  border-right: 2.2px solid currentColor;
}

#vtPrevBtn:not(:has(svg))::before {
  transform: rotate(-135deg);
  margin-left: 3px;
}

#vtNextBtn:not(:has(svg))::before {
  transform: rotate(45deg);
  margin-right: 3px;
}

.vt-arrow-btn:hover:not(:disabled) {
  background: var(--webgtr-linear);
  border-color: transparent;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(214, 85, 165, 0.35);
}

.vt-arrow-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.vt-carousel-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 8px 2px 14px;
}

.vt-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.vt-card {
  flex: 0 0 calc((100% - 48px) / 3);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease, background 0.25s ease;
  outline: none;
}

.vt-card:hover,
.vt-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(255, 156, 141, 0.45);
  background: var(--bg-card-hover);
  box-shadow: 0 24px 55px -15px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(214, 85, 165, 0.2);
}

/* Bottom Carousel Indicator Dots */
.vt-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.vt-dot {
  width: 10px;
  height: 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, box-shadow 0.3s ease;
}

.vt-dot:hover {
  background: var(--primary-coral);
}

.vt-dot.active {
  width: 28px;
  background: var(--webgtr-linear);
  box-shadow: 0 0 12px rgba(214, 85, 165, 0.45);
}

/* --------------------------------------------------------------------------
   3. Video Preview Stage, Ambient Posters, Thumbnails & Micro-Grid Overlay
   -------------------------------------------------------------------------- */
.vt-thumb-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.vt-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.vt-card:hover .vt-thumb-img {
  transform: scale(1.04);
}

.vt-thumb-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 6, 15, 0.45) 0%, rgba(4, 6, 15, 0.2) 50%, rgba(4, 6, 15, 0.55) 100%);
  z-index: 1;
  pointer-events: none;
}

.vt-poster-1 {
  background:
    radial-gradient(circle at 22% 25%, rgba(255, 156, 141, 0.28), transparent 55%),
    radial-gradient(circle at 82% 80%, rgba(214, 85, 165, 0.28), transparent 55%),
    linear-gradient(145deg, #0b1124 0%, #060913 100%);
}

.vt-poster-2 {
  background:
    radial-gradient(circle at 80% 20%, rgba(86, 153, 239, 0.28), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(96, 83, 203, 0.32), transparent 55%),
    linear-gradient(145deg, #0b1228 0%, #050814 100%);
}

.vt-poster-3 {
  background:
    radial-gradient(circle at 25% 75%, rgba(16, 185, 129, 0.24), transparent 55%),
    radial-gradient(circle at 78% 22%, rgba(86, 153, 239, 0.26), transparent 55%),
    linear-gradient(145deg, #091522 0%, #050912 100%);
}

.vt-thumb-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
  pointer-events: none;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   4. Top Status & Duration Pills
   -------------------------------------------------------------------------- */
.vt-thumb-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vt-verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(6, 10, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: #E2E8F0;
  letter-spacing: 0.03em;
}

.vt-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
}

.vt-duration-pill {
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(6, 10, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   5. Centered Glassmorphic Play Button & Hover Ring
   -------------------------------------------------------------------------- */
.vt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}

.vt-play-btn svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
  margin-left: 3px;
  flex-shrink: 0;
}

/* Pure-CSS Play Triangle Fallback if SVG is stripped */
.vt-play-btn:not(:has(svg))::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 9px 0 9px 16px;
  border-color: transparent transparent transparent #FFFFFF;
}

.vt-play-ring {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 156, 141, 0.4);
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.vt-card:hover .vt-play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--webgtr-linear);
  border-color: transparent;
  box-shadow: 0 14px 35px rgba(214, 85, 165, 0.55);
}

.vt-card:hover .vt-play-ring {
  opacity: 1;
  transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   5B. Inline Video Frame Playback State
   -------------------------------------------------------------------------- */
.vt-card.is-playing {
  cursor: default;
}

.vt-card.is-playing:hover {
  transform: none;
}

.vt-card.is-playing .vt-thumb-top,
.vt-card.is-playing .vt-play-btn,
.vt-card.is-playing .vt-thumb-img,
.vt-card.is-playing .vt-thumb-scrim,
.vt-card.is-playing .vt-thumb-grid-bg {
  opacity: 0;
  pointer-events: none;
}

.vt-inline-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  background: #020409;
}

.vt-inline-video,
.vt-inline-iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
  background: #020409;
}

.vt-inline-video {
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   6. Video Lightbox Modal & Floating Close Button
   -------------------------------------------------------------------------- */
.vt-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.vt-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.vt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 14, 0.84);
  backdrop-filter: blur(10px);
}

.vt-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 880px;
  background: #090E1D;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 35px 90px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(214, 85, 165, 0.25);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.vt-modal.is-open .vt-modal-dialog {
  transform: translateY(0) scale(1);
}

.vt-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #C7C7C7;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.vt-modal-close svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

/* Pure-CSS Close X Fallback if SVG is stripped */
.vt-modal-close:not(:has(svg))::before,
.vt-modal-close:not(:has(svg))::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.vt-modal-close:not(:has(svg))::before {
  transform: rotate(45deg);
}

.vt-modal-close:not(:has(svg))::after {
  transform: rotate(-45deg);
}

.vt-modal-close:hover {
  background: rgba(255, 156, 141, 0.16);
  border-color: #FF9C8D;
  color: #FFFFFF;
}

.vt-modal-close-floating {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  background: rgba(6, 10, 22, 0.78);
  backdrop-filter: blur(8px);
}

.vt-modal-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020409;
}

.vt-modal-video,
.vt-modal-iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
  background: #020409;
}

.vt-modal-video {
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   7. Day / Light Theme Overrides
   -------------------------------------------------------------------------- */
html[data-theme="light"] .vt-header h2,
body.light-theme .vt-header h2 {
  color: #0F172A !important;
}

html[data-theme="light"] .vt-header p.sub,
body.light-theme .vt-header p.sub {
  color: #475569 !important;
}

html[data-theme="light"] .vt-card,
body.light-theme .vt-card {
  background: #FFFFFF !important;
  border: 1px solid rgba(15, 23, 42, 0.09) !important;
  box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] .vt-card:hover,
body.light-theme .vt-card:hover {
  border-color: rgba(214, 85, 165, 0.4) !important;
  box-shadow: 0 22px 48px -12px rgba(15, 23, 42, 0.14) !important;
}

html[data-theme="light"] .vt-arrow-btn,
body.light-theme .vt-arrow-btn {
  background: #FFFFFF !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  color: #0F172A !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .vt-arrow-btn:hover:not(:disabled),
body.light-theme .vt-arrow-btn:hover:not(:disabled) {
  background: var(--webgtr-linear) !important;
  border-color: transparent !important;
  color: #FFFFFF !important;
}

html[data-theme="light"] .vt-dot,
body.light-theme .vt-dot {
  background: rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .vt-dot.active,
body.light-theme .vt-dot.active {
  background: var(--webgtr-linear);
}

/* --------------------------------------------------------------------------
   8. Responsive Breakpoints (Tablet & Mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .vt-carousel-track {
    gap: 20px;
  }

  .vt-card {
    flex: 0 0 calc((100% - 20px) / 2);
  }
}

@media (max-width: 640px) {
  .video-testimonials-section {
    padding: 10px 0 64px;
  }

  .vt-carousel-track {
    gap: 16px;
  }

  .vt-card {
    flex: 0 0 100%;
  }
}