/* Gallery photo viewer (assets/js/gallery-viewer.js): a card carousel, and a full screen zoom view */
.gv { position: fixed; inset: 0; z-index: 100000; display: none; color: #fff; font-family: "Inter", sans-serif; overflow: hidden; }
.gv.gv-show { display: block; }
.gv-bg { position: absolute; inset: 0; background: #0b0b0b; opacity: 0; transition: opacity .3s ease; }
.gv-backdrop { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(50px) saturate(1.2);
  opacity: 0; transform: scale(1.1); transition: opacity .5s ease, background-image .5s ease; }
.gv.gv-in .gv-bg { opacity: 1; }
.gv.gv-in .gv-backdrop { opacity: .28; }

/* ---------- Carousel ---------- */
.gv-flow { position: absolute; inset: 72px 0 96px; touch-action: pan-y; transition: opacity .25s ease; }
.gv-track { position: absolute; inset: 0; }
.gv-track.gv-follow { transition: none; }
.gv-card { position: absolute; overflow: hidden; border-radius: 28px; background: #1d1d1d; cursor: pointer; opacity: 0;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
  transition: left .55s cubic-bezier(.22, .8, .2, 1), top .55s cubic-bezier(.22, .8, .2, 1), width .55s cubic-bezier(.22, .8, .2, 1),
    height .55s cubic-bezier(.22, .8, .2, 1), opacity .4s ease, border-radius .55s ease; }
.gv-card.gv-noanim { transition: none !important; }
.gv-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none;
  transform: scale(1.06); transition: transform .8s cubic-bezier(.22, .8, .2, 1), filter .5s ease; filter: brightness(.62) saturate(.85); }
.gv-card.gv-active { cursor: zoom-in; }
.gv-card.gv-active img { transform: scale(1); filter: none; }
.gv-card:not(.gv-active):hover img { filter: brightness(.85); }
.gv-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 55%; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, .35) 45%, transparent); opacity: 0; transition: opacity .4s ease; }
.gv-active .gv-shade, .gv-near .gv-shade { opacity: 1; }
.gv-num { position: absolute; top: 18px; right: 22px; font-size: 14px; letter-spacing: .08em; font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity .3s ease; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.gv-active .gv-num { opacity: .9; transition-delay: .2s; }
.gv-info { position: absolute; left: 28px; right: 28px; bottom: 26px; opacity: 0; transform: translateY(14px);
  transition: opacity .35s ease, transform .45s cubic-bezier(.22, .8, .2, 1); pointer-events: none; }
.gv-active .gv-info { opacity: 1; transform: none; transition-delay: .18s; pointer-events: auto; }
.gv-title { font-family: "Prompt", sans-serif; font-size: clamp(22px, 2.6vw, 36px); line-height: 1.15; font-weight: 500; margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gv-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gv-pill { font-size: 12px; padding: 5px 12px; border-radius: 30px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .22); white-space: nowrap; }
.gv-pill.gv-tag { color: #ffa415; border-color: rgba(255, 164, 21, .45); background: rgba(255, 164, 21, .12); }
.gv-go { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #111; background: #fff; border-radius: 30px;
  padding: 8px 16px; text-decoration: none; font-weight: 500; transition: background .15s ease; }
.gv-go:hover { background: #ffa415; color: #111; }
.gv-zoomhint { font-size: 12px; opacity: .75; display: inline-flex; align-items: center; gap: 6px; }
/* The cards next to the middle one show a small title */
.gv-mini { position: absolute; left: 18px; right: 18px; bottom: 18px; font-family: "Prompt", sans-serif; font-size: 15px; line-height: 1.25;
  opacity: 0; transition: opacity .3s ease; pointer-events: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gv-near .gv-mini { opacity: .9; transition-delay: .2s; }

/* ---------- Top and bottom bars ---------- */
.gv-top { position: absolute; top: 0; left: 0; right: 0; height: 72px; display: flex; align-items: center; gap: 8px; padding: 0 20px; z-index: 3; }
.gv-brand { margin-right: auto; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.gv-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 17px;
  transition: background .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease; }
.gv-btn:hover, .gv-btn:focus-visible { background: #ffa415; border-color: #ffa415; color: #111; outline: none; }
.gv-btn[disabled] { opacity: .3; pointer-events: none; }
.gv-zoomctl { display: none; align-items: center; gap: 8px; }
.gv-zoom { font-size: 13px; min-width: 48px; text-align: center; opacity: .8; font-variant-numeric: tabular-nums; }
.gv-back { display: none; }
.gv-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; display: flex; align-items: center; justify-content: center; gap: 18px; z-index: 3; }
.gv-count { font-size: 14px; letter-spacing: .08em; min-width: 72px; text-align: center; font-variant-numeric: tabular-nums; opacity: .85; }
.gv-bar { position: absolute; left: 50%; bottom: 12px; width: 160px; margin-left: -80px; height: 2px; background: rgba(255, 255, 255, .15); border-radius: 2px; overflow: hidden; }
.gv-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #ffa415; border-radius: 2px; transition: width .45s cubic-bezier(.22, .8, .2, 1); }
.gv-hint { position: absolute; left: 50%; top: 80px; transform: translateX(-50%); font-size: 13px; background: rgba(0, 0, 0, .65);
  padding: 7px 16px; border-radius: 20px; pointer-events: none; opacity: 0; transition: opacity .4s ease; white-space: nowrap; z-index: 4; }
.gv-hint.gv-on { opacity: 1; }

/* ---------- Zoom view ---------- */
.gv-stage { position: absolute; inset: 72px 0 24px; overflow: hidden; touch-action: none; cursor: zoom-in; display: none; z-index: 2; }
.gv-stage.gv-zoomed { cursor: grab; }
.gv-stage.gv-drag { cursor: grabbing; }
.gv-img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; -webkit-user-drag: none; will-change: transform;
  transform-origin: 0 0; opacity: 0; transition: opacity .2s ease; border-radius: 6px; }
.gv-img.gv-ready { opacity: 1; }
.gv-img.gv-anim { transition: transform .35s cubic-bezier(.22, .8, .2, 1), opacity .2s ease, border-radius .35s ease; }
.gv-spin { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .2); border-top-color: #ffa415; animation: gv-spin .8s linear infinite; display: none; }
.gv-loading .gv-spin { display: block; }
@keyframes gv-spin { to { transform: rotate(360deg); } }
.gv.gv-zmode .gv-stage { display: block; }
.gv.gv-zmode .gv-flow, .gv.gv-zmode .gv-bottom { opacity: 0; pointer-events: none; }
.gv.gv-zmode .gv-zoomctl { display: flex; }
.gv.gv-zmode .gv-back { display: inline-flex; }
.gv.gv-zmode .gv-brand { display: none; }
.gv.gv-zmode .gv-top::after { content: ""; margin-right: auto; order: 1; }
.gv.gv-zmode .gv-zoomctl, .gv.gv-zmode .gv-close { order: 2; }
.gv-bottom { transition: opacity .25s ease; }

body.gv-open { overflow: hidden; }
body.gv-open #client_cursor { display: none !important; }
.cs_portfolio_thumb[data-gv] { cursor: zoom-in; }

@media (max-width: 767px) {
  .gv-flow { inset: 64px 0 88px; }
  .gv-card { border-radius: 22px; }
  .gv-info { left: 18px; right: 18px; bottom: 18px; }
  .gv-num { top: 14px; right: 16px; font-size: 12px; }
  .gv-zoomhint { display: none; }
  .gv-top { height: 64px; padding: 0 12px; }
  .gv-stage { inset: 64px 0 16px; }
  .gv-zoomctl .gv-zoomin, .gv-zoomctl .gv-zoomout, .gv-zoom { display: none; }
  .gv-bottom { height: 88px; }
  .gv-hint { top: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .gv-card, .gv-card img, .gv-img.gv-anim, .gv-info, .gv-bg, .gv-backdrop { transition: none !important; }
}
.gv.gv-leaving .gv-stage { display: block; pointer-events: none; }
