/* ==========================================================================
   SoftwareStudio Group Sp. z o.o. - assets/lightbox.css
   Uniwersalna galeria zrzutow ekranu + modal Lightbox.
   Podpinane WYLACZNIE na podstronach osadzajacych zrzuty ekranu
   (nie w globalnym header/footer), razem z assets/lightbox.js.
   Zaleznosc: zmienne z assets/style.css (--ss-*, --r-*, --sh-*) -
   plik style.css musi byc zaladowany przed lightbox.css.
   ========================================================================== */

/* --------------------------------------------------------------------
   Siatka i pojedynczy zrzut ekranu (<figure class="wms-shot">)
   -------------------------------------------------------------------- */
.wms-shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 1.75rem 0;
}

.wms-shot {
  margin: 1.75rem 0;
  background: var(--ss-white, #fff);
  border: 1px solid var(--ss-border, #e4e9f2);
  border-radius: var(--r-lg, 16px);
  overflow: hidden;
  box-shadow: var(--sh-sm, 0 2px 8px rgba(12,19,32,.06));
}
.wms-shot-grid .wms-shot { margin: 0; }
.wms-shot--wide { max-width: 900px; margin-left: auto; margin-right: auto; }

.wms-lightbox-trigger {
  display: block;
  width: 100%;
  line-height: 0;
  background: var(--ss-bg-alt, #f5f7fb);
  cursor: zoom-in;
  position: relative;
  text-decoration: none;
}
.wms-lightbox-trigger::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12,19,32,0);
  transition: background .2s ease;
}
.wms-lightbox-trigger:hover::after,
.wms-lightbox-trigger:focus-visible::after { background: rgba(12,19,32,.08); }
.wms-lightbox-trigger:focus-visible {
  outline: 3px solid var(--ss-blue, #2b5fa3);
  outline-offset: -3px;
}
.wms-lightbox-trigger img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.wms-shot figcaption {
  padding: 1rem 1.15rem 1.15rem;
  color: var(--ss-muted, #5a6a7e);
  font-size: .92rem;
  line-height: 1.5;
}
.wms-shot figcaption strong {
  display: block;
  font-family: var(--ss-font-head, inherit);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ss-text, #14202f);
  margin-bottom: .3rem;
}

/* --------------------------------------------------------------------
   LIGHTBOX - modal pelnoekranowy (wstrzykiwany przez lightbox.js)
   -------------------------------------------------------------------- */
.wms-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background: rgba(8,12,20,.92);
}
.wms-lightbox[hidden] { display: none; }

.wms-lightbox-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 380px);
  width: 100%;
  max-width: 1180px;
  max-height: 100%;
  background: var(--ss-navy, #16243f);
  border-radius: var(--r-lg, 16px);
  overflow: hidden;
  box-shadow: var(--sh-lg, 0 24px 56px rgba(12,19,32,.14));
}
@media (max-width: 860px) {
  .wms-lightbox-dialog { grid-template-columns: 1fr; max-height: 92vh; overflow-y: auto; }
}

.wms-lightbox-image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05070c;
  min-height: 260px;
  touch-action: pan-y;
}
.wms-lightbox-image-wrap img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
@media (max-width: 860px) {
  .wms-lightbox-image-wrap img { max-height: 50vh; }
}

.wms-lightbox-info {
  padding: 1.75rem 1.6rem;
  background: var(--ss-navy, #16243f);
  color: var(--ss-white, #fff);
  overflow-y: auto;
}
.wms-lightbox-counter {
  display: inline-block;
  font-family: var(--ss-font-head, inherit);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--ss-orange-300, #ff9a5c);
  text-transform: uppercase;
  margin-bottom: .6rem;
}
.wms-lightbox-title {
  font-family: var(--ss-font-head, inherit);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.wms-lightbox-caption {
  font-size: .98rem;
  color: #cfd8e6;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.wms-lightbox-desc {
  font-size: .9rem;
  line-height: 1.65;
  color: #aab6c8;
  border-top: 1px solid rgba(255,255,255,.14);
  padding-top: 1rem;
}

.wms-lightbox-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(8,12,20,.55);
  color: var(--ss-white, #fff);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.wms-lightbox-close:hover,
.wms-lightbox-close:focus-visible { background: var(--ss-orange, #ff6a13); }

.wms-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: rgba(8,12,20,.55);
  color: var(--ss-white, #fff);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.wms-lightbox-nav:hover,
.wms-lightbox-nav:focus-visible { background: var(--ss-orange, #ff6a13); }
.wms-lightbox-prev { left: .75rem; }
.wms-lightbox-next { right: .75rem; }
.wms-lightbox-nav:focus-visible,
.wms-lightbox-close:focus-visible {
  outline: 3px solid var(--ss-white, #fff);
  outline-offset: 2px;
}
@media (max-width: 860px) {
  .wms-lightbox-nav { width: 40px; height: 40px; font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .wms-lightbox-trigger::after,
  .wms-lightbox-close,
  .wms-lightbox-nav { transition: none; }
}
