/* Vizualizator global de imagini și galerii · v0.4.6.30.2 */
html.image-lightbox-open,
body.image-lightbox-open {
  overflow: hidden;
}

main img.image-lightbox-enabled {
  cursor: zoom-in;
}

main img.image-lightbox-enabled:focus-visible,
main [data-image-lightbox-anchor]:focus-visible {
  outline: 3px solid #e6ad2f;
  outline-offset: 4px;
}

.image-lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: hidden;
}

.image-lightbox[open] {
  display: grid;
  place-items: center;
}

.image-lightbox::backdrop {
  background: rgba(1, 18, 27, 0.88);
  backdrop-filter: blur(7px);
}

.image-lightbox-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1240px, calc(100vw - 36px));
  height: min(900px, calc(100dvh - 36px));
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 18px;
  overflow: hidden;
  background: #061c25;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

.image-lightbox-toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  padding: 10px 12px 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(4, 32, 42, 0.98);
}

.image-lightbox-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.image-lightbox-counter {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #d9edf1;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.image-lightbox-title {
  overflow: hidden;
  color: #fff;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-lightbox-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
}

.image-lightbox-action,
.image-lightbox-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.image-lightbox-action:hover,
.image-lightbox-download:hover,
.image-lightbox-action:focus-visible,
.image-lightbox-download:focus-visible {
  border-color: #efbf4c;
  background: rgba(239, 191, 76, 0.18);
  color: #fff;
  outline: none;
}

.image-lightbox-action:active,
.image-lightbox-download:active {
  transform: translateY(1px);
}

.image-lightbox-action svg,
.image-lightbox-download svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.image-lightbox-close {
  border-color: rgba(255, 255, 255, 0.28);
  background: #fff;
  color: #062837;
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
  border-color: #fff;
  background: #f4d37b;
  color: #062837;
}

.image-lightbox-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(34, 118, 123, 0.2), transparent 43%),
    #021016;
  touch-action: pan-y;
}

.image-lightbox-figure {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 22px 76px;
  display: grid;
  place-items: center;
  overflow: auto;
}

.image-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 5px;
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.32);
  user-select: none;
  -webkit-user-drag: none;
}

.image-lightbox-image.is-loading {
  opacity: 0;
}

.image-lightbox-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #efbf4c;
  border-radius: 50%;
  animation: image-lightbox-spin 0.8s linear infinite;
}

.image-lightbox-loader[hidden] {
  display: none;
}

@keyframes image-lightbox-spin {
  to { transform: rotate(360deg); }
}

.image-lightbox-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 48px;
  height: 58px;
  margin-top: -29px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 13px;
  background: rgba(2, 31, 41, 0.82);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.image-lightbox-nav:hover,
.image-lightbox-nav:focus-visible {
  background: #0b7479;
  outline: 3px solid rgba(239, 191, 76, 0.7);
  outline-offset: 2px;
}

.image-lightbox-nav:active {
  transform: scale(0.96);
}

.image-lightbox-nav[hidden] {
  display: none;
}

.image-lightbox-nav svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.image-lightbox-prev { left: 14px; }
.image-lightbox-next { right: 14px; }

.image-lightbox-caption {
  min-height: 48px;
  padding: 13px 22px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 32, 42, 0.98);
  color: #dcebed;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: center;
}

.image-lightbox-caption:empty {
  display: none;
}

.image-lightbox:fullscreen,
.image-lightbox.is-maximized {
  background: #020d12;
}

.image-lightbox:fullscreen .image-lightbox-card,
.image-lightbox.is-maximized .image-lightbox-card {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
}

body.high-contrast .image-lightbox-card,
body.high-contrast .image-lightbox-toolbar,
body.high-contrast .image-lightbox-caption {
  background: #000;
  border-color: #fff;
}

body.high-contrast .image-lightbox-stage {
  background: #000;
}

body.high-contrast .image-lightbox-action,
body.high-contrast .image-lightbox-download,
body.high-contrast .image-lightbox-nav {
  border-color: #fff;
  background: #000;
  color: #fff;
}

@media (max-width: 720px) {
  .image-lightbox-card {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .image-lightbox-toolbar {
    min-height: 56px;
    padding: 8px 8px 8px 12px;
    gap: 8px;
  }

  .image-lightbox-heading {
    gap: 7px;
  }

  .image-lightbox-title {
    max-width: 30vw;
    font-size: 0.78rem;
  }

  .image-lightbox-counter {
    min-height: 26px;
    padding: 3px 7px;
    font-size: 0.68rem;
  }

  .image-lightbox-action,
  .image-lightbox-download {
    width: 39px;
    min-width: 39px;
    height: 39px;
    padding: 0;
  }

  .image-lightbox-action span,
  .image-lightbox-download span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .image-lightbox-figure {
    padding: 15px 48px;
  }

  .image-lightbox-nav {
    width: 40px;
    height: 52px;
    margin-top: -26px;
    border-radius: 10px;
  }

  .image-lightbox-prev { left: 5px; }
  .image-lightbox-next { right: 5px; }

  .image-lightbox-caption {
    min-height: 42px;
    padding: 10px 14px 11px;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .image-lightbox-action,
  .image-lightbox-download,
  .image-lightbox-nav {
    transition: none;
  }

  .image-lightbox-loader {
    animation-duration: 1.4s;
  }
}
