/**
 * Galeri — cards/gallery/card.css
 * Lightbox (.pb-lightbox) gallery JS ile kullanılır.
 */

.pb-block--gallery .pb-block__subtitle {
  margin-bottom: .75rem;
}

/* Galeri */
.pb-gallery {
  display: grid;
  gap: .75rem;
}
.pb-gallery--grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pb-gallery--grid-3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pb-gallery--grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pb-gallery--masonry {
  columns: 3;
  column-gap: .75rem;
}
.pb-gallery--masonry .pb-gallery__item {
  break-inside: avoid;
  margin-bottom: .75rem;
}
.pb-gallery--featured {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 140px;
}
.pb-gallery--featured .pb-gallery__item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
.pb-gallery--strip {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: .35rem;
}
.pb-gallery--strip .pb-gallery__item {
  flex: 0 0 min(72vw, 320px);
  scroll-snap-align: start;
}
.pb-gallery__item {
  border: 0;
  padding: 0;
  background: none;
  cursor: zoom-in;
  border-radius: .5rem;
  overflow: hidden;
  line-height: 0;
}
.pb-gallery__item--link {
  display: block;
  text-decoration: none;
  cursor: pointer;
}
.pb-gallery__item--static {
  cursor: default;
}
.pb-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pb-gallery__item:hover .pb-gallery__img,
.pb-gallery__item:focus-visible .pb-gallery__img {
  transform: none;
}

/* Video kartı */
.pb-video-card {
  max-width: 56rem;
}
.pb-video-card__title {
  margin: 0 0 .85rem;
}
.pb-video-card__media {
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .1);
  background: #0f172a;
}
.pb-video-card__player {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}
.pb-video-card__caption {
  margin: .65rem 0 0;
  font-size: .95rem;
  color: var(--muted, #5c6670);
}

/* Galeri lightbox */
.pb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.pb-lightbox[hidden] { display: none; }
.pb-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 15, 30, .88);
}
.pb-lightbox__panel {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}
.pb-lightbox__img {
  max-width: 100%;
  max-height: calc(92vh - 3rem);
  width: auto;
  height: auto;
  border-radius: .5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.pb-lightbox__close,
.pb-lightbox__nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  backdrop-filter: blur(6px);
}
.pb-lightbox__close:hover,
.pb-lightbox__nav:hover,
.pb-lightbox__close:focus-visible,
.pb-lightbox__nav:focus-visible {
  background: rgba(255, 255, 255, .24);
}
.pb-lightbox__close {
  top: -3rem;
  right: 0;
}
.pb-lightbox__nav--prev { left: -3.25rem; top: 50%; transform: translateY(-50%); }
.pb-lightbox__nav--next { right: -3.25rem; top: 50%; transform: translateY(-50%); }
.pb-lightbox__counter {
  color: rgba(255, 255, 255, .85);
  font-size: .9rem;
}
@media (max-width: 768px) {
  .pb-gallery--grid-3,
  .pb-gallery--grid-4,
  .pb-gallery--featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pb-gallery--masonry { columns: 2; }
  .pb-gallery--featured .pb-gallery__item:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }
  .pb-lightbox__nav--prev { left: .25rem; }
  .pb-lightbox__nav--next { right: .25rem; }
  .pb-lightbox__close { top: .25rem; right: .25rem; }
}

