/* ═══════════════════════════════════════════════════
   PN CARS — Fotogalerie stylesheet
   ═══════════════════════════════════════════════════ */

/* ── Filter tabs ── */
.gallery-filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-btn {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--silver);
  border: 1px solid rgba(42,143,212,.2);
  padding: 8px 20px;
  clip-path: polygon(6px 0%,100% 0%,calc(100% - 6px) 100%,0% 100%);
  transition: all .25s;
  background: transparent;
}
.filter-btn:hover {
  border-color: var(--blue);
  color: var(--blue-light);
}
.filter-btn.active {
  background: var(--blue-dark);
  border-color: var(--blue);
  color: var(--white);
  box-shadow: 0 0 16px rgba(42,143,212,.3);
}

/* ── Masonry grid ── */
.gallery-masonry {
  columns: 3;
  column-gap: 6px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 6px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: block;
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform .5s var(--ease), filter .4s;
  filter: brightness(.82);
}
.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(1);
}
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(42,143,212,0);
  transition: background .35s;
}
.gallery-item:hover .gallery-item-overlay {
  background: rgba(42,143,212,.1);
}
.gallery-item-overlay svg {
  width: 40px; height: 40px;
  opacity: 0;
  transform: scale(.7);
  transition: all .35s var(--ease);
  stroke: white;
  filter: drop-shadow(0 0 6px rgba(0,0,0,.5));
}
.gallery-item:hover .gallery-item-overlay svg {
  opacity: 1;
  transform: scale(1);
}

/* Category badge */
.gallery-item-cat {
  position: absolute;
  top: 10px; left: 10px;
  font-size: .6rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(42,143,212,.75);
  padding: 3px 9px;
  clip-path: polygon(4px 0%,100% 0%,calc(100% - 4px) 100%,0% 100%);
  opacity: 0;
  transition: opacity .3s;
}
.gallery-item:hover .gallery-item-cat { opacity: 1; }

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,.93);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-img-wrap {
  position: relative;
  max-width: 88vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 0 60px rgba(42,143,212,.25);
}
.lb-close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 2.2rem;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  line-height: 1;
  font-weight: 300;
  transition: color .2s;
  background: none;
  border: none;
  font-family: inherit;
}
.lb-close:hover { color: white; }
.lb-prev, .lb-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(5,5,7,.7);
  color: white;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
  user-select: none;
}
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-prev:hover, .lb-next:hover {
  background: var(--blue);
  border-color: var(--blue);
}
.lb-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  letter-spacing: .1em;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .gallery-masonry { columns: 2; }
}
@media (max-width: 500px) {
  .gallery-masonry { columns: 1; }
}
