.clinic-gallery {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.clinic-gallery__header {
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.clinic-gallery__header > p {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.35rem;
}

.clinic-gallery__controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.clinic-gallery__count {
  min-width: 49px;
  color: var(--muted);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.clinic-gallery__count b { color: var(--ink); }

.clinic-gallery__controls button {
  width: 43px;
  height: 43px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 1.2rem;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.clinic-gallery__controls button:hover:not(:disabled) {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
  transform: translateY(-2px);
}

.clinic-gallery__controls button:focus-visible,
.clinic-gallery__track:focus-visible {
  outline: 3px solid rgba(131, 217, 93, .65);
  outline-offset: 3px;
}

.clinic-gallery__controls button:disabled {
  opacity: .32;
  cursor: default;
}

.clinic-gallery__track {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-flow: row nowrap;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-deep) rgba(29, 59, 66, .08);
  padding: 0 0 13px;
  touch-action: pan-x pinch-zoom;
}

.clinic-gallery__track::-webkit-scrollbar { height: 7px; }
.clinic-gallery__track::-webkit-scrollbar-track { background: rgba(29, 59, 66, .08); border-radius: 999px; }
.clinic-gallery__track::-webkit-scrollbar-thumb { background: var(--accent-deep); border-radius: 999px; }

.clinic-gallery__slide {
  width: 88%;
  min-width: 0;
  max-width: 650px;
  height: auto;
  aspect-ratio: 4 / 3;
  flex: 0 0 88%;
  margin: 0;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border-radius: var(--radius-lg);
  background: #dfe6e2;
  box-shadow: var(--shadow-soft);
}

.clinic-gallery__slide img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.clinic-gallery__slide--portrait img { object-position: center 46%; }

@media (max-width: 980px) {
  .clinic-gallery { order: -1; }
}

@media (max-width: 700px) {
  .clinic-gallery__header { align-items: end; }
  .clinic-gallery__header > p { font-size: 1.15rem; }
  .clinic-gallery__track { gap: 12px; }
  .clinic-gallery__slide {
    width: 92%;
    max-width: 92%;
    flex-basis: 92%;
    border-radius: var(--radius);
  }
  .clinic-gallery__controls button { width: 40px; height: 40px; }
}
