/*
 * course-reviews.css -- the review wall on the course pages.
 *
 * Standalone and mtime-versioned like course-format.css: css/styles.css is a
 * Grunt build this checkout cannot regenerate. .htaccess rewrites
 * /css/course-reviews.<mtime>.css here. Loaded on course pages only.
 */
.course-idv__reviews { padding: 1.5rem 0 1rem; }
.crv-head { margin: 0 0 1rem; }
.course-idv__reviews__section-title {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.15; font-weight: 700;
  margin: 0 0 .45rem; letter-spacing: -.015em;
}
.crv-summary { margin: 0; font-size: .95rem; line-height: 1.5; color: rgba(255,255,255,.62); }
.crv-summary strong { color: #fff; font-weight: 700; }

/* ------------------------------------------------------------ the strip
   Twelve cards, swipeable. On a phone this is the natural gesture; on a
   desktop the wheel scrolls it sideways and the grid is one click away. */
.crv-strip {
  display: flex; align-items: stretch; gap: .9rem; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; padding: .25rem .1rem 1rem;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
  -webkit-overflow-scrolling: touch;
}
.crv-strip::-webkit-scrollbar { height: 6px; }
.crv-strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 999px; }
.crv-strip > .crv-card { flex: 0 0 min(320px, 82vw); scroll-snap-align: start; }
.crv-strip[hidden] { display: none; }

/* --------------------------------------------------------------- the grid */
.crv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: .9rem; padding-top: .25rem; }
.crv-grid[hidden] { display: none; }

/* --------------------------------------------------------------- one card */
.crv-card {
  display: flex; flex-direction: column; gap: .7rem;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px; padding: .8rem; min-width: 0;
  transition: border-color .2s ease, transform .2s ease;
}
.crv-card:hover { border-color: rgba(244,121,35,.45); }
/* Every card in a row is as tall as the tallest (a screenshot plus its
   footer). A text card fills that height with its quote centred and the
   footer pinned to the bottom, so a row reads as one rhythm. */
.crv-card--text .crv-text { margin: auto 0; font-size: 1.02rem; }
.crv-proof {
  position: relative; display: block; width: 100%; margin: 0; padding: 0; border: 0;
  background: #0d0d0d; border-radius: 10px; overflow: hidden; cursor: zoom-in; text-align: left;
}
.crv-proof img, .crv-proof video { display: block; width: 100%; height: 240px; object-fit: cover; object-position: top; }
.crv-proof video { cursor: default; }
.crv-card--video .crv-proof { cursor: default; }
.crv-zoom-hint, .crv-play {
  position: absolute; right: .55rem; bottom: .55rem; font-size: .72rem; font-weight: 600;
  letter-spacing: .02em; padding: .28rem .55rem; border-radius: 999px;
  background: rgba(0,0,0,.62); color: #fff; pointer-events: none;
}
.crv-play { background: rgba(244,121,35,.9); }
.crv-text {
  margin: 0; font-size: .95rem; line-height: 1.55; color: rgba(255,255,255,.86);
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.crv-card.is-open .crv-text { display: block; -webkit-line-clamp: unset; }
.crv-card--text .crv-text { cursor: pointer; }
.crv-meta { display: flex; flex-direction: column; gap: .2rem; margin-top: auto; }
.crv-stars { color: #F6B73C; font-size: .95rem; letter-spacing: .05em; line-height: 1; }
.crv-stars-off { color: rgba(255,255,255,.18); }
.crv-who { display: flex; flex-wrap: wrap; gap: .15rem .5rem; align-items: baseline; }
.crv-name { font-size: .88rem; font-weight: 600; color: #fff; }
.crv-prog { font-size: .76rem; color: rgba(255,255,255,.5); }

/* ---------------------------------------------------------------- actions */
.crv-actions { display: flex; justify-content: center; padding: .4rem 0 .2rem; }
.crv-more {
  appearance: none; border: 1px solid rgba(255,255,255,.22); background: transparent; color: #fff;
  font: inherit; font-size: .92rem; font-weight: 600; padding: .7rem 1.3rem; border-radius: 999px; cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.crv-more:hover { background: rgba(244,121,35,.14); border-color: rgba(244,121,35,.6); }

/* --------------------------------------------------------------- lightbox */
.crv-lightbox {
  position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.92); padding: 1rem; cursor: zoom-out;
}
.crv-lightbox img { max-width: 96vw; max-height: 92vh; width: auto; height: auto; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.crv-lightbox-close {
  position: absolute; top: .8rem; right: .9rem; appearance: none; border: 0; background: rgba(255,255,255,.12);
  color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 1.3rem; line-height: 1; cursor: pointer;
}
body.crv-lightbox-open { overflow: hidden; }

@media (max-width: 640px) {
  .course-idv__reviews { padding: 1rem 0 .6rem; }
  .crv-proof img, .crv-proof video { height: 220px; }
}
@media (prefers-reduced-motion: reduce) { .crv-card { transition: none; } }
