/* =========================================================
   DAN TOURS — Circular 3D Gallery
   ========================================================= */
.cgal-stage {
  position: relative;
  width: 100%;
  height: clamp(400px, 56vh, 620px);
  margin: 0 auto;
  perspective: 2000px;
  perspective-origin: 50% 50%;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;           /* let vertical page scroll through */
}
.cgal-stage.cgal-grabbing { cursor: grabbing; }

.cgal-ring {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.cgal-item {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--sand);
  box-shadow: 0 24px 55px -18px rgba(29, 29, 29, 0.55);
  border: 1px solid rgba(154, 131, 82, 0.25);
  text-decoration: none;
  backface-visibility: hidden;
  transition: opacity 0.3s linear;
}
.cgal-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.cgal-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 34px 16px 14px;
  font-family: var(--font-label, serif);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.32) 55%, transparent);
}

/* ---- Arrows ---- */
.cgal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  width: clamp(44px, 4vw, 56px);
  height: clamp(44px, 4vw, 56px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(154, 131, 82, 0.5);
  background: rgba(248, 246, 242, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--charcoal);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px -8px rgba(29, 29, 29, 0.4);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.cgal-arrow:hover { background: var(--gold); color: var(--warm); }
.cgal-arrow:active { transform: translateY(-50%) scale(0.94); }
.cgal-prev { left: clamp(8px, 2vw, 28px); }
.cgal-next { right: clamp(8px, 2vw, 28px); }

@media (max-width: 600px) {
  .cgal-stage { height: clamp(360px, 66vh, 520px); }
}

/* Touch: the 44px floor above was authored in the zoomed coordinate space, so
   the global `zoom` renders it as a 32x32 real-pixel target. Counter-scale it.
   Scoped to touch/small screens — on desktop a mouse hits 40px fine, and this
   keeps the arrows visually unchanged there. */
@media (max-width: 1000px), (pointer: coarse) {
  .cgal-arrow {
    width:  max(clamp(44px, 4vw, 56px), calc(44px / var(--ui-scale, 1)));
    height: max(clamp(44px, 4vw, 56px), calc(44px / var(--ui-scale, 1)));
  }
}
