/* =========================
   GALERIA (masonry column)
   ========================= */

.gallery-masonry{
  column-count: 3;
  column-gap: 14px;
  margin-top: 18px;
}

@media (max-width: 980px){
  .gallery-masonry{ column-count: 2; }
}
@media (max-width: 560px){
  .gallery-masonry{ column-count: 1; }
}

.gallery-item{
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0 0 14px;
  display: inline-block;
  break-inside: avoid;
  cursor: pointer;

  border-radius: 22px;
  overflow: hidden;

  background: rgba(18,24,33,.40);
  border: 1px solid rgba(234,240,246,.10);
  box-shadow: 0 18px 48px rgba(0,0,0,.28);
  position: relative;

  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}

.gallery-item img{
  width: 100%;
  height: auto;
  display: block;
}

.gallery-item::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background: radial-gradient(420px 260px at 20% 0%, rgba(24,224,255,.14), transparent 60%);
  opacity: 0;
  transition: opacity .25s ease;
}

.gallery-item:hover{
  transform: translateY(-2px);
  border-color: rgba(24,224,255,.22);
  box-shadow: 0 22px 70px rgba(0,0,0,.35);
}
.gallery-item:hover::after{ opacity: .9; }

/* =========================
   LIGHTBOX
   ========================= */

.no-scroll{ overflow: hidden !important; }

.lightbox{
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
}
.lightbox.open{ display: block; }

.lightbox-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(10px);
}

/* dialog: wysokość oparta o viewport, nie o rodzica */
.lightbox-dialog{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);

  width: min(1400px, calc(100vw - 28px));
  height: min(92svh, calc(100vh - 28px)); /* svh stabilne na mobile */

  border-radius: 24px;
  overflow: hidden;

  background: rgba(12,16,22,.72);
  border: 1px solid rgba(234,240,246,.12);
  box-shadow: 0 40px 140px rgba(0,0,0,.60);
}

@supports not (height: 1svh){
  .lightbox-dialog{
    height: min(92vh, calc(100vh - 28px));
  }
}

@media (max-width: 720px){
  .lightbox-dialog{
    width: calc(100vw - 16px);
    height: calc(100svh - 16px);
    border-radius: 18px;
  }
  @supports not (height: 1svh){
    .lightbox-dialog{ height: calc(100vh - 16px); }
  }
}

.lightbox-top{
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;

  padding: 12px 14px;
  background: rgba(8,12,16,.55);
  border-bottom: 1px solid rgba(234,240,246,.08);
}

.lightbox-title{
  font-weight: 900;
  color: rgba(234,240,246,.92);
  letter-spacing: -.01em;
}

.lightbox-counter{
  color: rgba(234,240,246,.68);
  font-weight: 700;
  font-size: 13px;
}

.lightbox-close{
  width: 40px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(234,240,246,.12);
  background: rgba(234,240,246,.04);
  color: rgba(234,240,246,.92);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover{
  border-color: rgba(24,224,255,.24);
  background: rgba(24,224,255,.08);
}

/* stage dostaje realną wysokość na zdjęcie */
.lightbox-stage{
  position: relative;
  padding: 16px;
  height: calc(100% - 56px - 44px); /* top (~56) + hint (~44) */
  display: grid;
  place-items: center;
  overflow: hidden;
}

@media (max-width: 720px){
  .lightbox-stage{ padding: 12px; }
}

/* ✅ obraz ma być DUŻY: max-height z viewport */
.lightbox-img{
  width: auto !important;
  height: auto !important;

  max-width: 100% !important;
  max-height: calc(92svh - 56px - 44px - 32px) !important; /* dialog - top - hint - padding */

  object-fit: contain !important;
  object-position: center center !important;

  transform: none !important;
  animation: none !important;

  border-radius: 18px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(234,240,246,.10);
}

@supports not (height: 1svh){
  .lightbox-img{
    max-height: calc(92vh - 56px - 44px - 32px) !important;
  }
}

/* strzałki */
.lightbox-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(234,240,246,.12);
  background: rgba(8,12,16,.55);
  color: rgba(234,240,246,.92);
  font-size: 28px;
  font-weight: 900;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.lightbox-nav:hover{
  border-color: rgba(24,224,255,.24);
  background: rgba(24,224,255,.10);
}

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

@media (max-width: 720px){
  .lightbox-nav{ width: 44px; height: 44px; }
  .lightbox-nav.prev{ left: 10px; }
  .lightbox-nav.next{ right: 10px; }
}

.lightbox-hint{
  padding: 10px 14px 14px;
  font-size: 12px;
  border-top: 1px solid rgba(234,240,246,.06);
  background: rgba(8,12,16,.40);
}
.footer-link{
  color: rgba(24,224,255,.9);
  text-decoration: none;
  font-weight: 700;
  transition: color .2s ease, text-shadow .2s ease;
}

.footer-link:hover{
  color: #18e0ff;
  text-shadow: 0 0 12px rgba(24,224,255,.45);
}
/* CTA – Zapytaj */
.nav-link.cta {
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    #00e5ff,
    #00bcd4
  );
  color: #041318;
  font-weight: 600;
  box-shadow:
    0 0 0 0 rgba(0,229,255,0.0),
    0 6px 20px rgba(0,229,255,0.35);
  transition:
    box-shadow 0.25s ease,
    transform 0.2s ease,
    background 0.25s ease;
}

/* hover */
.nav-link.cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 6px rgba(0,229,255,0.15),
    0 10px 28px rgba(0,229,255,0.45);
}

/* aktywna strona (jak na screenie) */
.nav-link.cta.active {
  box-shadow:
    0 0 0 8px rgba(0,229,255,0.18),
    0 12px 34px rgba(0,229,255,0.55);
}