/* ==========================================================
   Get Set Publishing — Media pages
   assets/css/media-pages.css
   Used by: illustration-gallery.php + book-shelf.php events (ig-), videos.php (vd-),
            testimonials.php (tm-), shared viewer (mv-)
   Uses the design tokens from gsp.css (--gsp-*).
   ========================================================== */

/* ---------- Shared: hero add-ons ---------- */
.mp-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Illustrations gallery (ig-) ---------- */
.ig-grid { column-count: 4; column-gap: 22px; }
.ig-item {
  position: relative; display: block; width: 100%; margin: 0 0 22px; padding: 0; border: 0;
  background: var(--gsp-mist); border-radius: var(--gsp-r-md); overflow: hidden; cursor: zoom-in;
  break-inside: avoid; box-shadow: var(--gsp-shadow-sm);
  transition: transform .45s var(--gsp-ease), box-shadow .45s var(--gsp-ease);
}
.ig-item[hidden] { display: none; }
.ig-item img { display: block; width: 100%; height: auto; transition: transform .8s var(--gsp-ease); }
.ig-item::after {
  content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(14,36,43,.45));
  opacity: 0; transition: opacity .35s;
}
.ig-zoom {
  position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gsp-gold); color: var(--gsp-ink); font-size: .9rem;
  opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s var(--gsp-ease);
}
.ig-item:hover, .ig-item:focus-visible { transform: translateY(-4px); box-shadow: var(--gsp-shadow-md); }
.ig-item:hover img { transform: scale(1.04); }
.ig-item:hover::after, .ig-item:focus-visible::after { opacity: 1; }
.ig-item:hover .ig-zoom, .ig-item:focus-visible .ig-zoom { opacity: 1; transform: none; }

@media (max-width: 1199.98px) { .ig-grid { column-count: 3; } }
@media (max-width: 767.98px)  { .ig-grid { column-count: 2; column-gap: 14px; } .ig-item { margin-bottom: 14px; border-radius: var(--gsp-r-sm); } }
@media (max-width: 420px)     { .ig-grid { column-count: 1; } }

/* ---------- Videos & Reels (vd-) ---------- */
.vd-jump { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.vd-grid { display: grid; gap: 26px; grid-template-columns: repeat(3, 1fr); }
.vd-grid-reels { grid-template-columns: repeat(5, 1fr); gap: 20px; }

.vd-card {
  position: relative; display: block; width: 100%; padding: 0; border: 0; text-align: left; cursor: pointer;
  background: var(--gsp-ink); border-radius: var(--gsp-r-lg); overflow: hidden; box-shadow: var(--gsp-shadow-md);
  transition: transform .45s var(--gsp-ease), box-shadow .45s var(--gsp-ease);
}
.vd-card:hover, .vd-card:focus-visible { transform: translateY(-5px); box-shadow: var(--gsp-shadow-lg); }
.vd-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--gsp-ink-900); }
.vd-grid-reels .vd-thumb { aspect-ratio: 9 / 16; }
.vd-thumb-43 { aspect-ratio: 4 / 3; }
.vd-thumb.is-portrait img { object-fit: contain; }
.vd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--gsp-ease), opacity .3s; }
.vd-card:hover .vd-thumb img { transform: scale(1.05); }
.vd-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,36,43,0) 45%, rgba(14,36,43,.7)); pointer-events: none; }
.vd-play {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gsp-gold); color: var(--gsp-ink); font-size: 1.15rem; padding-left: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .35s var(--gsp-ease);
}
.vd-card:hover .vd-play { transform: scale(1.1); }
.vd-grid-reels .vd-play { width: 54px; height: 54px; margin: -27px 0 0 -27px; font-size: .95rem; }
.vd-meta { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 18px 20px; color: #fff; }
.vd-meta strong { display: block; font-family: var(--gsp-serif); font-size: 1.2rem; line-height: 1.2; font-weight: 600; }
.vd-meta small { display: block; margin-top: 4px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gsp-gold); }
.vd-grid-reels .vd-meta { padding: 12px 14px; }
.vd-grid-reels .vd-meta strong { font-size: .95rem; }

@media (max-width: 1199.98px) { .vd-grid-reels { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 991.98px)  { .vd-grid { grid-template-columns: repeat(2, 1fr); } .vd-grid-reels { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575.98px)  { .vd-grid { grid-template-columns: 1fr; } .vd-grid-reels { grid-template-columns: repeat(2, 1fr); gap: 12px; } .vd-card { border-radius: var(--gsp-r-md); } }

/* ---------- Testimonials: video + Trustpilot (tm-) ---------- */
.tm-videos { display: grid; gap: 26px; grid-template-columns: repeat(3, 1fr); }
.tm-videos .vd-thumb { aspect-ratio: 4 / 5; }
.tm-tp-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tm-tp-logo { height: 28px; width: auto; display: block; }

.tm-reviews { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); align-items: start; }
.tm-review {
  display: flex; flex-direction: column; gap: 14px; padding: 28px; background: #fff;
  border: 1px solid var(--gsp-line); border-radius: var(--gsp-r-lg); box-shadow: var(--gsp-shadow-sm);
  transition: transform .4s var(--gsp-ease), box-shadow .4s var(--gsp-ease);
}
.tm-review:hover { transform: translateY(-4px); box-shadow: var(--gsp-shadow-md); }
.tm-stars { display: flex; gap: 3px; }
.tm-stars i {
  width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  background: #00b67a; color: #fff; font-size: .72rem;
}
.tm-review h3 { font-size: 1.25rem; margin: 0; }
.tm-review p { margin: 0; font-size: .96rem; line-height: 1.75; }
.tm-review p + p { margin-top: -4px; }
.tm-by { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--gsp-line); }
.tm-avatar {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gsp-mist); color: var(--gsp-teal); font-family: var(--gsp-serif); font-weight: 700; font-size: 1.05rem;
}
.tm-by strong { display: block; color: var(--gsp-ink); font-size: .95rem; line-height: 1.2; }
.tm-by small { display: block; color: var(--gsp-muted); font-size: .78rem; margin-top: 2px; }
.tm-tag { margin-left: auto; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gsp-muted); background: var(--gsp-cream); padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.tm-src { font-size: .8rem; font-weight: 700; color: var(--gsp-teal); }
.tm-src:hover { color: var(--gsp-teal-700); text-decoration: underline; }
.tm-note { max-width: 760px; margin: 34px auto 0; text-align: center; font-size: .85rem; }
.tm-cta { text-align: center; margin-top: 34px; }

@media (max-width: 1199.98px) { .tm-reviews { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 991.98px)  { .tm-videos { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px)  { .tm-videos { grid-template-columns: 1fr; } .tm-reviews { grid-template-columns: 1fr; } .tm-review { padding: 22px; } }

/* ---------- Shared viewer (mv-) : image lightbox + video player ---------- */
body.mv-open { overflow: hidden; }
.mv {
  position: fixed; inset: 0; z-index: 2600; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 72px 56px; background: rgba(8, 22, 27, 0.94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: mvFade .25s ease both;
}
.mv[hidden] { display: none; }
@keyframes mvFade { from { opacity: 0; } to { opacity: 1; } }
.mv-stage { display: flex; align-items: center; justify-content: center; width: 100%; flex: 1 1 auto; min-height: 0; }
.mv-stage img, .mv-stage video {
  max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 12px; background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,.5); object-fit: contain;
}
.mv-stage video { outline: none; }
.mv-cap { margin: 16px 0 0; color: rgba(255,255,255,.8) !important; font-size: .92rem; font-weight: 600; text-align: center; min-height: 1.4em; }
.mv-close, .mv-nav {
  position: absolute; border: 0; border-radius: 50%; width: 48px; height: 48px; display: grid; place-items: center;
  background: rgba(255,255,255,.12); color: #fff; font-size: 1.05rem; transition: background-color .25s, color .25s;
}
.mv-close:hover, .mv-nav:hover { background: var(--gsp-gold); color: var(--gsp-ink); }
.mv-close { top: 18px; right: 18px; }
.mv-nav { top: 50%; margin-top: -24px; }
.mv-prev { left: 150px; }
.mv-next { right: 150px; }
.mv.mv-single .mv-nav { display: none; }

@media (max-width: 767.98px) {
  .mv { padding: 64px 12px 48px; }
  .mv-nav { top: auto; bottom: 10px; margin-top: 0; width: 44px; height: 44px; }
  .mv-prev { left: calc(50% - 56px); }
  .mv-next { right: calc(50% - 56px); }
  .mv-cap { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ig-item, .ig-item img, .vd-card, .vd-thumb img, .vd-play, .tm-review, .mv { transition: none; animation: none; }
}

/* ---------- Header: keep longer menu labels (e.g. "Book Shelf & Events") on one line ---------- */
.gsp-nav-link { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1279.98px) {
  .gsp-nav { gap: 0; }
  .gsp-nav-link { padding: 10px 9px; font-size: 0.86rem; }
  .gsp-nav-link::after { left: 9px; right: 9px; }
}
@media (min-width: 1280px) and (max-width: 1399.98px) {
  .gsp-nav { gap: 0; }
  .gsp-nav-link { padding: 10px 10px; }
  .gsp-nav-link::after { left: 10px; right: 10px; }
}
/* The phone number stays in the top bar; hide the header copy where the longer menu needs the room. */
@media (min-width: 1200px) and (max-width: 1399.98px) { .gsp-call { display: none !important; } }
.gsp-call-text { white-space: nowrap; }
