/* Premium gallery lightbox — shared by every photo gallery. */
.plb {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  background: rgba(2, 8, 23, .94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.plb.is-open { opacity: 1; pointer-events: auto; }

.plb__top {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  color: #e2e8f0; font-size: 13px; font-weight: 600;
}
.plb__counter { letter-spacing: .12em; color: #cbd5e1; }
.plb__spacer { flex: 1; }
.plb__btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07); color: #fff; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
  position: relative;
}
.plb__btn:hover { background: rgba(255,255,255,.16); transform: scale(1.06); border-color: rgba(251,191,36,.6); }
.plb__btn.is-active { border-color: #fbbf24; color: #fbbf24; }

/* Autoplay progress ring. */
.plb__btn--play svg { position: absolute; inset: -1px; transform: rotate(-90deg); pointer-events: none; }
.plb__btn--play circle {
  fill: none; stroke: #fbbf24; stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 132; stroke-dashoffset: 132;
}
.plb.is-playing .plb__btn--play circle { animation: plb-ring var(--plb-delay, 4.5s) linear infinite; }
@keyframes plb-ring { from { stroke-dashoffset: 132; } to { stroke-dashoffset: 0; } }

.plb__stage {
  position: relative; flex: 1; min-height: 0; display: flex;
  align-items: center; justify-content: center; overflow: hidden;
}
.plb__img {
  max-width: calc(100vw - 130px); max-height: 100%;
  border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  opacity: 0; transform: scale(.965);
  transition: opacity .35s ease, transform .35s cubic-bezier(.22,.8,.24,1);
  cursor: zoom-in; user-select: none; -webkit-user-drag: none;
}
.plb__img.is-ready { opacity: 1; transform: scale(1); }
.plb.is-zoomed .plb__img { cursor: zoom-out; transition: transform .25s ease; }
@media (max-width: 640px) { .plb__img { max-width: calc(100vw - 16px); } }

.plb__spinner {
  position: absolute; width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.15); border-top-color: #fbbf24;
  animation: plb-spin .8s linear infinite; display: none;
}
.plb.is-loading .plb__spinner { display: block; }
@keyframes plb-spin { to { transform: rotate(360deg); } }

.plb__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16);
  background: rgba(15, 23, 42, .55); color: #fff; font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease, border-color .2s ease; z-index: 5;
}
.plb__nav:hover { background: rgba(251,191,36,.9); color: #0f172a; transform: translateY(-50%) scale(1.08); }
.plb__nav--prev { left: 18px; }
.plb__nav--next { right: 18px; }
@media (max-width: 640px) { .plb__nav { width: 42px; height: 42px; font-size: 18px; } .plb__nav--prev { left: 8px; } .plb__nav--next { right: 8px; } }

.plb__caption {
  text-align: center; color: #e2e8f0; font-size: 14px; padding: 12px 20px 4px;
  min-height: 30px; text-shadow: 0 2px 8px rgba(0,0,0,.6);
}

.plb__thumbs {
  display: flex; gap: 9px; padding: 12px 18px 18px; overflow-x: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent;
  justify-content: safe center;
}
.plb__thumb {
  flex: 0 0 auto; width: 66px; height: 48px; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; opacity: .5; cursor: pointer; padding: 0; background: #0f172a;
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease;
}
.plb__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plb__thumb:hover { opacity: .85; transform: translateY(-3px); }
.plb__thumb.is-active { opacity: 1; border-color: #fbbf24; box-shadow: 0 0 14px rgba(251,191,36,.35); }

@media (prefers-reduced-motion: reduce) {
  .plb, .plb__img, .plb__btn, .plb__nav, .plb__thumb { transition: none !important; }
  .plb.is-playing .plb__btn--play circle { animation: none; }
}
