/* The uploaded carousel layout; native photo scrolling remains the no-JS fallback. */
.clinic-gallery { margin-top: 4px; }
.gallery-enhanced .strip {
  --gallery-width: min(420px, 64vw);
  --gallery-height: calc(var(--gallery-width) * 1.1);
  display: block; position: relative;
  height: calc(var(--gallery-height) + 120px);
  padding: 0; margin: 0;
  overflow: hidden; overflow: clip;
  perspective: 1400px;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
  cursor: grab;
  scroll-snap-type: none;
  outline: none;
}
.gallery-enhanced .strip.is-dragging { cursor: grabbing; }
.gallery-enhanced .strip:focus-visible { outline: 3px solid var(--link); outline-offset: 6px; border-radius: 28px; }
.gallery-enhanced .strip figure {
  position: absolute; left: 50%; top: calc(50% - 22px);
  width: var(--gallery-width); height: var(--gallery-height);
  margin: calc(var(--gallery-height) / -2) 0 0 calc(var(--gallery-width) / -2);
  border-radius: calc(var(--gallery-width) / 2) calc(var(--gallery-width) / 2) 16px 16px;
  overflow: hidden; background: var(--surface);
  box-shadow: 0 30px 60px -28px rgba(14,26,61,.55);
  will-change: transform, opacity; backface-visibility: hidden;
  scroll-snap-align: none;
}
.gallery-enhanced .strip figure:nth-child(n) .ph { width: 100%; height: 100%; border-radius: inherit; }
.gallery-enhanced .strip figure::after { content: ''; position: absolute; inset: 0; background: #0a1226; opacity: var(--gallery-veil, 0); pointer-events: none; }
.gallery-enhanced .strip figure:focus-visible { outline: 3px solid var(--link); outline-offset: -4px; }
.gallery-enhanced .strip figure figcaption { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gallery-frame {
  position: absolute; left: 50%; top: 50%; z-index: 2000; pointer-events: none;
  width: calc(var(--gallery-width) + 28px); height: calc(var(--gallery-height) + 72px);
  transform: translate(-50%, -50%); border: none; border-radius: 26px;
  box-shadow: none;
}
.gallery-caption { position: absolute; left: 6px; right: 6px; bottom: 15px; text-align: center; color: var(--link); font-size: 21px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.gallery-arrow { position: absolute; top: 50%; z-index: 3000; width: 48px; height: 48px; margin-top: -24px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 400 28px/1 system-ui; cursor: pointer; display: grid; place-items: center; box-shadow: 0 10px 24px -12px rgba(14,26,61,.5); transition: transform .3s cubic-bezier(.22,1,.36,1), background .3s, color .3s, opacity .3s; }
.gallery-arrow[hidden] { display: none; }
.gallery-previous { left: 0; } .gallery-next { right: 0; }
.gallery-arrow:hover:not(:disabled) { background: var(--link); color: var(--surface); transform: scale(1.08); }
.gallery-arrow:active:not(:disabled) { transform: scale(.94); }
.gallery-arrow:disabled { opacity: .35; cursor: not-allowed; }
.gallery-arrow:focus-visible, .gallery-position:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.gallery-controls { display: flex; align-items: center; gap: 22px; margin-top: 28px; }
.gallery-controls[hidden] { display: none; }
.gallery-hint { font-size: 14px; color: var(--muted); white-space: nowrap; }
.gallery-position {
  --gallery-progress: 0%;
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  min-width: 0;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  accent-color: var(--link);
}
.gallery-position::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--link) 0 var(--gallery-progress), var(--line) var(--gallery-progress) 100%);
}
.gallery-position::-moz-range-track { height: 5px; border-radius: 999px; background: var(--line); }
.gallery-position::-moz-range-progress { height: 5px; border-radius: 999px; background: var(--link); }
.gallery-position::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5.5px;
  border: 0;
  border-radius: 50%;
  background: var(--link);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--link) 22%, transparent);
}
.gallery-position::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: var(--link);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--link) 22%, transparent);
}
.gallery-count { flex-shrink: 0; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }


@media (max-width: 720px) {
  .gallery-hint { display: none; }
  .gallery-arrow { width: 40px; height: 40px; margin-top: -20px; font-size: 24px; }
  .gallery-controls { gap: 16px; }
  .gallery-count { font-size: 11px; }
  .gallery-caption { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-arrow, .gallery-position { transition: none; }
}
