/* Author video reviews — expanding cards (design adapted from development LP).
   Uses Emmaus theme tokens from main.css. Load AFTER theme CSS. */

.lp-video-section {
  background: linear-gradient(180deg, var(--lp-sage) 0%, var(--lp-paper) 72%);
  overflow: hidden;
}

.lp-video-section * {
  box-sizing: border-box;
}

.lp-video-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 64px;
}

.lp-video-header-copy {
  max-width: 720px;
}

.lp-video-header .lp-kicker {
  display: inline-block;
  margin-bottom: 8px;
}

.lp-video-header h2 {
  margin: 0;
}

.lp-video-header h2 em {
  font-style: normal;
}

.lp-video-header-note {
  max-width: 280px;
  margin: 0;
  color: var(--lp-muted);
  font-size: 14px;
  line-height: 1.7;
  text-align: right;
}

.lp-review-video-grid {
  display: flex;
  gap: 28px;
  align-items: stretch;
}

.lp-review-video-card {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  grid-template-columns: 0fr 1fr;
  column-gap: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 22px;
  background: transparent;
  transition:
    flex-grow 0.55s cubic-bezier(0.22, 0.8, 0.24, 1),
    grid-template-columns 0.55s cubic-bezier(0.22, 0.8, 0.24, 1),
    column-gap 0.55s ease,
    padding 0.55s ease,
    background-color 0.4s ease,
    border-color 0.4s ease;
}

.lp-review-video-card.active {
  flex-grow: 2.1;
  grid-template-columns: 1.1fr 1fr;
  column-gap: 18px;
  padding: 10px;
  border-color: var(--lp-line);
  background: var(--lp-soft);
}

.lp-review-video-card blockquote {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  padding: 28px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--lp-ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.lp-review-video-card blockquote > :not(.lp-quote-mark) {
  min-width: 220px;
}

.lp-review-video-card.active blockquote {
  padding: 28px 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease 0.2s, visibility 0s;
}

.lp-review-video-card blockquote p {
  font-family: var(--lp-heading);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 400;
  line-height: 1.35;
  margin: 24px 0;
  letter-spacing: -0.02em;
}

.lp-quote-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lp-orange);
  color: var(--lp-white);
  line-height: 0;
}

.lp-quote-mark svg {
  width: 18px;
  height: 14px;
  display: block;
}

.lp-review-video-card small {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  color: var(--lp-orange);
  background: var(--lp-peach);
  border: 1px solid var(--lp-line);
  border-radius: 25px;
  padding: 5px 10px;
  align-self: start;
}

.lp-review-video-media {
  position: relative;
  min-width: 0;
  height: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  background: #141715;
}

.lp-review-video-play {
  display: block;
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-width: 0;
  cursor: pointer;
}

.lp-review-video-play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.lp-review-video-play:hover img,
.lp-review-video-card.active .lp-review-video-play img {
  transform: scale(1.03);
}

.lp-review-video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--lp-orange);
  color: var(--lp-white);
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(40, 61, 51, 0.28);
  pointer-events: none;
  transition: background 0.25s ease, transform 0.25s ease;
}

.lp-review-video-play:hover .lp-review-video-play-icon {
  background: var(--lp-orange-deep);
  transform: translate(-50%, -50%) scale(1.06);
}

.lp-review-video-media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  z-index: 2;
}

.lp-review-video-media.is-playing .lp-review-video-play {
  visibility: hidden;
}

.lp-review-video-media.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lp-review-spin 0.8s linear infinite;
  pointer-events: none;
  z-index: 3;
}

@keyframes lp-review-spin {
  to {
    transform: rotate(360deg);
  }
}

.lp-video-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 48px;
}

.lp-video-actions .lp-phone {
  background: var(--lp-white);
  color: var(--lp-ink);
  border-color: var(--lp-line);
}

.lp-video-actions .lp-phone:hover {
  background: var(--lp-peach);
  color: var(--lp-ink);
  border-color: var(--lp-orange);
}

@media (max-width: 1100px) {
  .lp-video-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 40px;
  }

  .lp-video-header-note {
    max-width: none;
    text-align: left;
  }

  .lp-review-video-grid {
    gap: 18px;
  }

  .lp-review-video-card.active {
    column-gap: 8px;
  }

  .lp-review-video-card.active blockquote {
    padding: 15px 8px;
  }

  .lp-review-video-card blockquote p {
    font-size: 16px;
    margin: 15px 0;
  }
}

@media (max-width: 820px) {
  .lp-review-video-grid {
    flex-wrap: wrap;
    gap: 14px;
  }

  .lp-review-video-card {
    flex: 1 1 calc(50% - 7px);
  }

  .lp-review-video-card:not(.active) {
    height: 300px;
  }

  .lp-review-video-card:not(.active) .lp-review-video-media {
    aspect-ratio: auto;
    height: 100%;
  }

  .lp-review-video-card.active {
    flex: 1 1 100%;
    order: -1;
    padding: 8px;
  }

  .lp-review-video-card.active blockquote {
    padding: 15px 10px;
  }

  .lp-review-video-card blockquote > :not(.lp-quote-mark) {
    min-width: 0;
  }

  .lp-review-video-card.active .lp-review-video-media {
    max-height: 320px;
    aspect-ratio: 3 / 4;
  }

  .lp-video-actions {
    margin-top: 36px;
  }

  .lp-video-actions .lp-button,
  .lp-video-actions .lp-phone {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .lp-review-video-card {
    flex: 1 1 100%;
  }

  .lp-review-video-card:not(.active) {
    height: 260px;
  }

  .lp-review-video-card small {
    font-size: 11px;
  }

  .lp-review-video-play-icon {
    width: 50px;
    height: 50px;
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-review-video-card,
  .lp-review-video-card blockquote,
  .lp-review-video-play img,
  .lp-review-video-play-icon {
    transition: none;
  }

  .lp-review-video-media.is-loading::after {
    animation: none;
  }
}
