/* ==========================================================================
   SAJ Dental Clinic — "Video Testimonials" section
   Scope: everything lives under .video-review-section, plus the modal
   (.video-review-modal), which JS moves to <body> while keeping its tokens.
   Grid: 3 columns (desktop / iPad landscape), 2 + 1 centred (iPad portrait),
   1 column (mobile). Cards stay 16:9.
   ========================================================================== */

.video-review-section,
.video-review-modal {
  --vr-navy: #0B356D;
  --vr-navy-deep: #0B2340;
  --vr-blue: #1D6FC4;
  --vr-orange: #FF6A21;
  --vr-text: #4A5A75;
  --vr-white: #FFFFFF;

  --vr-font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --vr-font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --vr-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.video-review-section {
  --vr-gutter: clamp(16px, 4vw, 56px);
  --vr-gap: clamp(18px, 2.2vw, 32px);
  --vr-play: clamp(56px, 5.2vw, 82px);

  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  padding: clamp(64px, 6.5vw, 104px) 0 clamp(80px, 8vw, 128px);
  background: linear-gradient(180deg, #EDF5FD 0%, #E4EFFA 100%);
  font-family: var(--vr-font-body);
  color: var(--vr-text);
  -webkit-font-smoothing: antialiased;
}

.video-review-section *,
.video-review-section *::before,
.video-review-section *::after,
.video-review-modal *,
.video-review-modal *::before,
.video-review-modal *::after {
  box-sizing: border-box;
}

.video-review-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Reveal fail-safe: GSAP owns visibility once the section is .video-review-ready.
   -------------------------------------------------------------------------- */
.video-review-section.video-review-js [data-vr-reveal] {
  visibility: hidden;
  animation: video-review-failsafe 0s linear 2.5s forwards;
}

.video-review-section.video-review-ready [data-vr-reveal] {
  animation: none;
}

@keyframes video-review-failsafe {
  to { visibility: visible; }
}

/* ==========================================================================
   Background
   ========================================================================== */
.video-review-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.video-review-layer {
  position: absolute;
}

.video-review-layer--full {
  inset: 0;
}

.video-review-layer-inner {
  width: 100%;
  height: 100%;
}

.video-review-shape {
  display: block;
  width: 100%;
  height: 100%;
}

.video-review-shape--glow {
  position: absolute;
  left: 15%;
  right: 15%;
  top: 0;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
}

.video-review-layer--blob-a {
  top: -12%;
  right: -8vw;
  width: 40vw;
  height: 70%;
}

.video-review-shape--blob-a {
  border-radius: 58% 42% 46% 54% / 50% 56% 44% 50%;
  background: radial-gradient(closest-side, rgba(176, 210, 242, 0.6), rgba(176, 210, 242, 0));
  filter: blur(8px);
}

.video-review-layer--blob-b {
  bottom: -18%;
  left: -10vw;
  width: 46vw;
  height: 66%;
}

.video-review-shape--blob-b {
  border-radius: 44% 56% 60% 40% / 56% 44% 56% 44%;
  background: radial-gradient(closest-side, rgba(186, 216, 244, 0.55), rgba(186, 216, 244, 0));
  filter: blur(8px);
}

.video-review-layer--tooth {
  top: clamp(24px, 4vw, 70px);
  left: clamp(-30px, 1.6vw, 40px);
  width: clamp(130px, 15vw, 270px);
  aspect-ratio: 400 / 440;
  opacity: 0.9;
}

.video-review-shape--tooth {
  overflow: visible;
  transform: rotate(-6deg);
  filter: drop-shadow(0 20px 30px rgba(29, 111, 196, 0.12));
}

/* ==========================================================================
   Header
   ========================================================================== */
.video-review-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: calc(1400px + var(--vr-gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--vr-gutter);
}

.video-review-header {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.video-review-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--vr-navy);
}

.video-review-eyebrow-line {
  display: block;
  width: 44px;
  height: 2px;
  border-radius: 2px;
  background: var(--vr-orange);
  transform-origin: right center;
}

.video-review-heading {
  margin: 22px 0 18px;
  font-family: var(--vr-font-display);
  font-size: clamp(36px, 4.4vw, 68px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--vr-navy);
}

.video-review-heading-main,
.video-review-heading-highlight {
  display: block;
}

.video-review-heading-highlight {
  font-style: italic;
  font-weight: 600;
  color: var(--vr-orange);
}

.video-review-description {
  max-width: 790px;
  margin: 0 auto;
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.6;
  color: var(--vr-text);
  text-wrap: balance;
}

/* ==========================================================================
   Video grid + cards
   ========================================================================== */
.video-review-grid-wrap {
  margin-top: clamp(32px, 3.4vw, 52px);
}

.video-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--vr-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.video-review-item {
  min-width: 0;
}

.video-review-card {
  position: relative;
  padding: clamp(5px, 0.5vw, 8px);
  border-radius: clamp(20px, 1.8vw, 28px);
  background: var(--vr-white);
  box-shadow:
    0 30px 60px -32px rgba(11, 53, 109, 0.38),
    0 4px 14px rgba(11, 53, 109, 0.05);
  cursor: pointer;
}

/* Inner frame: clips the thumbnail and overlay */
.video-review-media,
.video-review-overlay {
  border-radius: clamp(15px, 1.4vw, 21px);
}

.video-review-media {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #C9DAEC;
}

.video-review-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transform-origin: 50% 50%;
}

.video-review-overlay {
  position: absolute;
  inset: clamp(5px, 0.5vw, 8px);
  background:
    linear-gradient(180deg, rgba(8, 26, 54, 0) 45%, rgba(8, 26, 54, 0.38) 70%, rgba(8, 26, 54, 0.82) 100%),
    rgba(8, 26, 54, 0.04);
  pointer-events: none;
}

.video-review-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(8, 26, 54, 0.18);
  opacity: 0;
  transition: opacity 0.6s var(--vr-ease);
}

.video-review-card.is-hover .video-review-overlay::after {
  opacity: 1;
}

/* Play button */
.video-review-play {
  position: absolute;
  left: 50%;
  top: 46%;
  width: var(--vr-play);
  height: var(--vr-play);
  margin: calc(var(--vr-play) / -2) 0 0 calc(var(--vr-play) / -2);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.video-review-play:focus {
  outline: none;
}

.video-review-play:focus-visible {
  outline: 3px solid var(--vr-orange);
  outline-offset: 6px;
}

.video-review-play-ring,
.video-review-play-glow {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  pointer-events: none;
}

.video-review-play-ring {
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.55);
  opacity: 0.6;
}

.video-review-play-glow {
  inset: -32%;
  background: radial-gradient(closest-side, rgba(29, 111, 196, 0.32), rgba(29, 111, 196, 0));
  opacity: 0;
}

.video-review-play-disc {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--vr-white);
  box-shadow: 0 14px 30px -10px rgba(8, 26, 54, 0.45);
}

.video-review-play-disc svg {
  width: 40%;
  height: 40%;
  margin-left: 6%;
  fill: var(--vr-blue);
}

/* Bottom meta */
.video-review-meta {
  position: absolute;
  left: clamp(5px, 0.5vw, 8px);
  right: clamp(5px, 0.5vw, 8px);
  bottom: clamp(5px, 0.5vw, 8px);
  display: flex;
  align-items: center;
  gap: clamp(10px, 1vw, 14px);
  padding: 0 clamp(12px, 1.3vw, 20px) clamp(12px, 1.3vw, 20px);
  color: var(--vr-white);
  pointer-events: none;
}

.video-review-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: end center;
  width: clamp(38px, 3.4vw, 50px);
  height: clamp(38px, 3.4vw, 50px);
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(180deg, #F4F9FE, #DCEAF7);
  box-shadow: 0 6px 14px rgba(8, 26, 54, 0.25);
}

.video-review-avatar svg {
  width: 64%;
  height: 64%;
  margin-bottom: 8%;
  fill: #8DBBE6;
}

.video-review-meta-text {
  flex: 1 1 auto;
  min-width: 0;
}

.video-review-name {
  margin: 0;
  overflow: hidden;
  font-family: var(--vr-font-body);
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--vr-white);
}

.video-review-subtitle {
  margin: 3px 0 0;
  overflow: hidden;
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #DCEBFA;
}

.video-review-duration {
  flex: 0 0 auto;
  padding: 5px 13px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(8, 20, 40, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  color: var(--vr-white);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199.98px) {
  .video-review-section {
    --vr-gap: 18px;
  }

  .video-review-duration {
    padding: 4px 10px;
  }
}

/* iPad portrait: 2 + 1 centred */
@media (max-width: 1023.98px) {
  .video-review-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 24px;
  }

  .video-review-item {
    grid-column: span 2;
  }

  .video-review-item:last-child:nth-child(odd) {
    grid-column: 2 / span 2;
  }

  .video-review-layer--tooth {
    left: -4vw;
    opacity: 0.7;
  }
}

/* Mobile: single column */
@media (max-width: 767.98px) {
  .video-review-section {
    --vr-play: 62px;
  }

  .video-review-eyebrow {
    gap: 12px;
    font-size: 12px;
    letter-spacing: 0.2em;
  }

  .video-review-eyebrow-line {
    width: 30px;
  }

  .video-review-heading {
    margin: 16px 0 14px;
    font-size: clamp(32px, 9vw, 42px);
  }

  .video-review-description {
    max-width: 34em;
    font-size: 15px;
  }

  .video-review-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
    margin: 0 auto;
    row-gap: 20px;
  }

  .video-review-item,
  .video-review-item:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .video-review-media {
    aspect-ratio: 16 / 10;
  }

  .video-review-name {
    font-size: 16px;
  }

  .video-review-subtitle {
    font-size: 13.5px;
  }

  .video-review-layer--tooth {
    top: 8px;
    left: -12vw;
    width: 36vw;
    opacity: 0.55;
  }
}

/* ==========================================================================
   Modal
   ========================================================================== */
html.video-review-lock {
  overflow: hidden;
}

.video-review-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  font-family: var(--vr-font-body);
}

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

.video-review-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 20, 44, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.video-review-modal-dialog {
  position: relative;
  width: min(1040px, 100%);
  padding: clamp(10px, 1vw, 14px);
  border-radius: clamp(18px, 2vw, 28px);
  background: var(--vr-white);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.6);
}

.video-review-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 4px 12px 10px;
}

.video-review-modal-title {
  margin: 0;
  overflow: hidden;
  font-family: var(--vr-font-body);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--vr-navy);
}

.video-review-modal-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(11, 53, 109, 0.14);
  border-radius: 50%;
  background: #F2F7FD;
  color: var(--vr-navy);
  cursor: pointer;
  transition: background-color 0.3s var(--vr-ease), transform 0.3s var(--vr-ease);
}

.video-review-modal-close:hover {
  background: #E2EEFA;
  transform: rotate(90deg);
}

.video-review-modal-close:focus-visible {
  outline: 3px solid var(--vr-orange);
  outline-offset: 3px;
}

.video-review-modal-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.video-review-modal-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 160px);
  overflow: hidden;
  border-radius: clamp(12px, 1.4vw, 20px);
  background: #0B1A30 center / cover no-repeat;
}

.video-review-modal-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.video-review-modal-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(8, 26, 54, 0.55), rgba(8, 26, 54, 0.82));
  text-align: center;
  color: var(--vr-white);
}

.video-review-modal-placeholder-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--vr-white);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.18);
}

.video-review-modal-placeholder-icon svg {
  width: 40%;
  height: 40%;
  margin-left: 6%;
  fill: var(--vr-blue);
}

.video-review-modal-placeholder-text {
  margin: 0;
  font-family: var(--vr-font-display);
  font-size: clamp(18px, 2.2vw, 26px);
  font-style: italic;
  line-height: 1.3;
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .video-review-overlay::after,
  .video-review-modal-close {
    transition: none;
  }

  .video-review-modal-close:hover {
    transform: none;
  }
}

/* Standalone preview page only */
body.video-review-preview {
  margin: 0;
  background: #FFFFFF;
}
