/* Poliürea Yalıtım — galeri slider / lightbox */
html.py-lightbox-open,
body.py-lightbox-open {
  overflow: hidden;
}

.py-lightbox-trigger {
  cursor: zoom-in;
}

.py-lightbox-trigger:focus-visible {
  outline: 3px solid #9cf51d;
  outline-offset: 4px;
  border-radius: 8px;
}

.py-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 78px 28px;
  background: rgba(2, 13, 27, 0.96);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.py-lightbox.is-open {
  display: flex;
  animation: pyLightboxFade .18s ease-out;
}

.py-lightbox__dialog {
  position: relative;
  width: min(1320px, 100%);
  height: min(88vh, 900px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  outline: none;
}

.py-lightbox__stage {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  background: #071729;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .48);
}

.py-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  transform: scale(.985);
  transition: opacity .18s ease, transform .18s ease;
}

.py-lightbox__image.is-ready {
  opacity: 1;
  transform: scale(1);
}

.py-lightbox__loader {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 4px solid rgba(255, 255, 255, .18);
  border-top-color: #9cf51d;
  border-radius: 50%;
  animation: pyLightboxSpin .75s linear infinite;
}

.py-lightbox__loader[hidden] {
  display: none;
}

.py-lightbox__error {
  display: none;
  padding: 20px;
  color: #fff;
  text-align: center;
}

.py-lightbox__error.is-visible {
  display: block;
}

.py-lightbox__meta {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  color: #fff;
}

.py-lightbox__caption {
  min-width: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.py-lightbox__counter {
  min-width: 70px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: #d8e3ec;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  background: rgba(7, 23, 41, .78);
}

.py-lightbox__close,
.py-lightbox__nav {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  background: rgba(7, 23, 41, .82);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.py-lightbox__close:hover,
.py-lightbox__nav:hover,
.py-lightbox__close:focus-visible,
.py-lightbox__nav:focus-visible {
  color: #071729;
  background: #9cf51d;
  outline: none;
}

.py-lightbox__close:active,
.py-lightbox__nav:active {
  transform: scale(.96);
}

.py-lightbox__close {
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.py-lightbox__nav {
  top: 50%;
  width: 52px;
  height: 64px;
  margin-top: -32px;
  border-radius: 14px;
  font-size: 34px;
}

.py-lightbox__prev {
  left: 16px;
}

.py-lightbox__next {
  right: 16px;
}

.py-lightbox__nav[hidden] {
  display: none;
}

.py-lightbox__hint {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
  padding: 7px 11px;
  border-radius: 999px;
  color: #d8e3ec;
  font-size: 12px;
  background: rgba(7, 23, 41, .76);
  pointer-events: none;
}

@keyframes pyLightboxFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pyLightboxSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 820px) {
  .py-lightbox {
    padding: 14px 10px 18px;
  }

  .py-lightbox__dialog {
    width: 100%;
    height: 90vh;
    gap: 10px;
  }

  .py-lightbox__stage {
    border-radius: 12px;
  }

  .py-lightbox__close {
    top: 10px;
    right: 10px;
    width: 42px;
    height: 42px;
    font-size: 25px;
  }

  .py-lightbox__nav {
    top: auto;
    bottom: 12px;
    width: 48px;
    height: 48px;
    margin: 0;
    border-radius: 50%;
    font-size: 30px;
  }

  .py-lightbox__prev { left: 12px; }
  .py-lightbox__next { right: 12px; }

  .py-lightbox__hint {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 68px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .py-lightbox__meta {
    gap: 10px;
  }

  .py-lightbox__caption {
    font-size: 13px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .py-lightbox__counter {
    min-width: 62px;
    padding: 6px 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .py-lightbox,
  .py-lightbox__image,
  .py-lightbox__close,
  .py-lightbox__nav {
    animation: none !important;
    transition: none !important;
  }
}
