/* Standalone V141 gallery. Every selector is scoped to this section. */
.baku-gallery {
  min-width: 0;
}

.baku-gallery .baku-gallery-stage {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(31, 37, 34, 0.14);
  border-radius: 1.35rem;
  background: #eae1d3;
  box-shadow: 0 14px 34px rgba(31, 37, 34, 0.08);
}

.baku-gallery .baku-gallery-viewport {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  height: clamp(260px, 55vw, 560px);
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: auto;
  overscroll-behavior-x: contain;
  touch-action: auto;
  scrollbar-width: thin;
  scrollbar-color: #62766a #eae1d3;
}

.baku-gallery .baku-gallery-viewport:focus-visible {
  outline: 3px solid #c6933d;
  outline-offset: -3px;
}

.baku-gallery figure.baku-gallery-slide {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  height: 100%;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #eae1d3;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.baku-gallery .baku-gallery-slide picture {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.baku-gallery .baku-gallery-slide img {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
}

.baku-gallery .baku-gallery-slide figcaption {
  display: block;
  margin: 0;
  padding: 0.65rem 1rem;
  background: #fffaf2;
  color: #3c4841;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}

.baku-gallery .baku-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 0.85rem 0 0;
  padding: 0;
}

.baku-gallery .baku-gallery-controls[hidden] {
  display: none !important;
}

.baku-gallery .baku-gallery-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  min-width: 3rem;
  height: 3rem;
  margin: 0;
  padding: 0.5rem;
  border: 1px solid #163f35;
  border-radius: 999px;
  background: #163f35;
  color: #fffaf2;
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.baku-gallery .baku-gallery-controls button:hover:not(:disabled) {
  background: #245c4f;
}

.baku-gallery .baku-gallery-controls button:focus-visible {
  outline: 3px solid #c6933d;
  outline-offset: 3px;
}

.baku-gallery .baku-gallery-controls button:disabled {
  opacity: 0.4;
  cursor: default;
}

.baku-gallery [data-gallery-count] {
  min-width: 4.1rem;
  color: #163f35;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .baku-gallery .baku-gallery-viewport {
    scroll-behavior: auto;
  }
}
