/* Lightbox галереи расшифровки */
html.gptr-lb-open,
html.gptr-lb-open body {
  overflow: hidden;
}

.gptr-body .gallery a,
.gptr-body .wp-block-gallery a,
.gptr-body .wp-block-image a,
.gptr-body .gptr-single-image a,
.gptr-body figure a:has(img) {
  cursor: zoom-in;
}

.gptr-lb {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.gptr-lb[hidden] {
  display: none !important;
}
.gptr-lb__backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay, rgba(0, 0, 0, 0.78));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.gptr-lb__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100dvh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px 16px;
  box-sizing: border-box;
}
.gptr-lb__close {
  appearance: none;
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 1px solid color-mix(in srgb, var(--accent, #3dba7a) 45%, transparent);
  border-radius: 999px;
  background: var(--accent, #3dba7a);
  color: var(--on-accent, #06140d);
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 18px color-mix(in srgb, var(--accent, #3dba7a) 40%, transparent);
}
.gptr-lb__close:hover {
  filter: brightness(1.08);
}
.gptr-lb__nav {
  appearance: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 52px;
  height: 52px;
  border: 1px solid color-mix(in srgb, var(--accent, #3dba7a) 45%, transparent);
  border-radius: 999px;
  background: var(--accent, #3dba7a);
  color: var(--on-accent, #06140d);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 18px color-mix(in srgb, var(--accent, #3dba7a) 40%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gptr-lb__nav--prev {
  left: 14px;
}
.gptr-lb__nav--prev::before {
  content: "‹";
}
.gptr-lb__nav--next {
  right: 14px;
}
.gptr-lb__nav--next::before {
  content: "›";
}
.gptr-lb__nav:hover {
  filter: brightness(1.08);
}
.gptr-lb__nav[hidden] {
  display: none !important;
}
.gptr-lb__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.gptr-lb__scroller {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  cursor: zoom-in;
}
.gptr-lb.is-zoomed .gptr-lb__scroller {
  cursor: grab;
}
.gptr-lb__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity 0.18s ease;
  filter: none;
  opacity: 1;
  transform: none;
  user-select: none;
  -webkit-user-drag: none;
}
.gptr-lb__img.is-lq,
.gptr-lb__img.is-mq,
.gptr-lb__img.is-hq {
  filter: none;
  opacity: 1;
  transform: none;
}
.gptr-lb__caption {
  max-width: min(720px, 92vw);
  margin: 0;
  padding: 0 8px;
  text-align: center;
  font-size: clamp(13px, 1.6vw, 15px);
  line-height: 1.45;
  color: color-mix(in srgb, #fff 88%, transparent);
  text-wrap: pretty;
}
.gptr-lb__caption[hidden] {
  display: none !important;
}
@media (max-width: 960px) {
  .gptr-lb__caption {
    display: none !important;
  }
}
.gptr-lb__load {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 3;
  width: min(280px, calc(100% - 32px));
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, #0b0b0b 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #3dba7a) 35%, transparent);
  box-sizing: border-box;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}
.gptr-lb__load[hidden] {
  display: none !important;
}
.gptr-lb__load-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.gptr-lb__load-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--accent, #3dba7a);
  transition: width 0.12s linear;
}
.gptr-lb__load.is-indeterminate .gptr-lb__load-bar {
  width: 35% !important;
  animation: gptr-lb-indeterminate 1s ease-in-out infinite;
}
.gptr-lb__load-label {
  margin-top: 7px;
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--cream, #f2ede4);
  text-align: center;
  opacity: 0.9;
}
@keyframes gptr-lb-indeterminate {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(280%);
  }
}
.gptr-lb__counter {
  flex: 0 0 auto;
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 13px;
  color: var(--cream, #f2ede4);
  opacity: 0.85;
}
.gptr-lb__counter[hidden] {
  display: none !important;
}
.gptr-lb__film {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  max-width: min(100%, 920px);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.gptr-lb__film[hidden] {
  display: none !important;
}
.gptr-lb__film::-webkit-scrollbar {
  display: none;
}
.gptr-lb__frame {
  appearance: none;
  flex: 0 0 auto;
  width: 72px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0.55;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}
.gptr-lb__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gptr-lb__frame.is-active {
  opacity: 1;
}
.gptr-lb__frame.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent, #3dba7a);
}

@media (max-width: 640px) {
  .gptr-lb__nav {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }
  .gptr-lb__nav--prev {
    left: 8px;
  }
  .gptr-lb__nav--next {
    right: 8px;
  }
  .gptr-lb__close {
    width: 44px;
    height: 44px;
    top: 8px;
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gptr-lb__img {
    transition: none;
    filter: none !important;
    transform: none !important;
  }
  .gptr-lb__load-bar {
    transition: none;
  }
  .gptr-lb__load.is-indeterminate .gptr-lb__load-bar {
    animation: none;
  }
}

@media print {
  .gptr-lb {
    display: none !important;
  }
}
