/* ==========================================================================
   Global Boxing — Galeria zdjęć
   ========================================================================== */

/* ── Home slider ── */

.gallery-home {
  background: var(--gb-black-soft);
}

.gallery-catalogs-wrap {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.65rem, 1.5vw, 1.25rem);
  margin-top: 2rem;
}

.gallery-catalogs-wrap--home {
  margin-top: 2rem;
}

.gallery-catalogs-swiper {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.gallery-catalog-slide {
  height: auto;
}

.gallery-catalog-slide .gallery-catalog {
  width: 100%;
}

.gallery-catalogs-wrap .gallery-catalogs-prev,
.gallery-catalogs-wrap .gallery-catalogs-next {
  --swiper-navigation-size: 18px;
  position: static !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: 0 !important;
  transform: none !important;
  border-radius: 50%;
  border: 1px solid var(--gb-border);
  background: rgba(0, 0, 0, 0.55);
  color: var(--gb-white);
  z-index: 2;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, opacity 0.25s;
}

.gallery-catalogs-wrap .gallery-catalogs-prev::after,
.gallery-catalogs-wrap .gallery-catalogs-next::after {
  font-size: 1rem;
  font-weight: 700;
}

.gallery-catalogs-wrap .gallery-catalogs-prev:hover,
.gallery-catalogs-wrap .gallery-catalogs-next:hover {
  background: var(--gb-red);
  border-color: var(--gb-red);
}

.gallery-catalogs-wrap .swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ── Home — slider zdjęć (w100, jak reels) ── */

.gallery-photos-bleed {
  width: 100%;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 2rem;
  overflow: hidden;
}

.gallery-photos-swiper-wrap {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.65rem, 1.5vw, 1.25rem);
  padding-bottom: 1.5rem;
}

.gallery-photos-swiper {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.gallery-photos-swiper .swiper-slide {
  height: auto;
}

.gallery-photo-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  aspect-ratio: 9 / 16;
  border-radius: 0.85rem;
  overflow: hidden;
  background: var(--gb-black-card);
  border: 1px solid var(--gb-border);
  cursor: grab;
  transition:
    transform 0.35s var(--ease-out),
    border-color 0.35s,
    box-shadow 0.35s;
}

.gallery-photos-swiper.swiper-grab .gallery-photo-card {
  cursor: grab;
}

.gallery-photos-swiper.swiper-grabbing .gallery-photo-card {
  cursor: grabbing;
}

.gallery-photo-card:hover,
.gallery-photo-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(225, 6, 0, 0.45);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
}

.gallery-photo-card:focus-visible {
  outline: 2px solid var(--gb-red);
  outline-offset: 3px;
}

.gallery-photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-photo-expand {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--gb-white);
  pointer-events: none;
}

.gallery-photos-swiper-wrap .gallery-photos-prev,
.gallery-photos-swiper-wrap .gallery-photos-next {
  --swiper-navigation-size: 18px;
  position: static !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: 0 !important;
  transform: none !important;
  border-radius: 50%;
  border: 1px solid var(--gb-border);
  background: rgba(0, 0, 0, 0.55);
  color: var(--gb-white);
  z-index: 2;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, opacity 0.25s;
}

.gallery-photos-swiper-wrap .gallery-photos-prev::after,
.gallery-photos-swiper-wrap .gallery-photos-next::after {
  font-size: 1rem;
  font-weight: 700;
}

.gallery-photos-swiper-wrap .gallery-photos-prev:hover,
.gallery-photos-swiper-wrap .gallery-photos-next:hover {
  background: var(--gb-red);
  border-color: var(--gb-red);
}

.gallery-photos-swiper-wrap .swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

@media (max-width: 767px) {
  .gallery-catalogs-wrap .gallery-catalogs-prev,
  .gallery-catalogs-wrap .gallery-catalogs-next,
  .gallery-photos-swiper-wrap .gallery-photos-prev,
  .gallery-photos-swiper-wrap .gallery-photos-next {
    width: 38px;
    height: 38px;
  }
}

a.gallery-catalog {
  text-decoration: none;
  color: inherit;
}

a.gallery-catalog:focus-visible {
  outline: 2px solid var(--gb-red);
  outline-offset: 3px;
}

.gallery-slider-wrap {
  margin-top: 2rem;
}

.gallery-slider-main {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gallery-slider-view {
  position: relative;
  flex: 1;
  display: block;
  padding: 0;
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--gb-black-card);
  aspect-ratio: 16 / 10;
}

.gallery-slider-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.gallery-slider-view:hover .gallery-slider-img {
  transform: scale(1.03);
}

.gallery-slider-zoom {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--gb-glass-border);
  color: var(--gb-white);
  backdrop-filter: blur(8px);
  transition: background 0.25s, transform 0.25s;
}

.gallery-slider-view:hover .gallery-slider-zoom {
  background: var(--gb-red);
  transform: scale(1.05);
}

.gallery-slider-btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--gb-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--gb-white);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}

.gallery-slider-btn:hover {
  background: var(--gb-red);
  border-color: var(--gb-red);
}

.gallery-slider-thumbs {
  display: flex;
  gap: 0.65rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.gallery-slider-thumb {
  flex: 0 0 88px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.25s, border-color 0.25s;
  aspect-ratio: 4 / 3;
  background: var(--gb-black-card);
}

.gallery-slider-thumb.is-active {
  opacity: 1;
  border-color: var(--gb-red);
}

.gallery-slider-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-home-cta {
  margin-top: 2rem;
  text-align: center;
}

.gallery-home .gallery-photos-bleed {
  margin-top: 2rem;
}

#galleryPage .gallery-photos-block {
  padding-bottom: 3.5rem;
}

#galleryPage .gallery-photos-bleed--page {
  margin-top: 0;
}

#galleryPage .gallery-grid--page {
  display: grid;
  width: 100%;
  padding: 0 clamp(0.75rem, 3vw, 2rem) 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 576px) {
  #galleryPage .gallery-grid--page {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 768px) {
  #galleryPage .gallery-grid--page {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 992px) {
  #galleryPage .gallery-grid--page {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1200px) {
  #galleryPage .gallery-grid--page {
    gap: 18px;
  }
}

#galleryPage .gallery-grid--page .gallery-grid-item {
  aspect-ratio: 9 / 16;
  border-radius: 0.85rem;
  border: 1px solid var(--gb-border);
  transition:
    transform 0.35s var(--ease-out),
    border-color 0.35s,
    box-shadow 0.35s;
}

#galleryPage .gallery-grid--page .gallery-grid-item:hover,
#galleryPage .gallery-grid--page .gallery-grid-item:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(225, 6, 0, 0.45);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
}

#galleryPage .gallery-grid--page .gallery-grid-item:focus-visible {
  outline: 2px solid var(--gb-red);
  outline-offset: 3px;
}

/* ── Galeria page ── */

.gallery-page-hero {
  padding: calc(var(--nav-height) + 3rem) 0 2.5rem;
  background:
    radial-gradient(ellipse 70% 60% at 30% 0%, rgba(225, 6, 0, 0.12), transparent 55%),
    var(--gb-black);
  border-bottom: 1px solid var(--gb-border);
}

.gallery-page-hero .section-title {
  margin-bottom: 0.5rem;
}

#galleryPage .gallery-catalogs-wrap {
  margin-top: 2rem;
}

#galleryPage.has-category .gallery-catalogs-wrap {
  margin-bottom: 0.5rem;
}

.gallery-photos-block[hidden] {
  display: none !important;
}

.gallery-photos-block.is-open {
  display: block;
  animation: galleryPhotosReveal 0.45s var(--ease-out) both;
}

@keyframes galleryPhotosReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#galleryPage .gallery-photos-header {
  margin: 0 0 1.25rem;
}

#galleryPage .gallery-photos-bleed {
  margin-top: 0;
}

.gallery-catalog {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--gb-border);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--gb-black-card);
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.35s var(--ease-out),
    border-color 0.35s,
    box-shadow 0.35s;
}

.gallery-catalog:hover {
  transform: translateY(-4px);
  border-color: rgba(225, 6, 0, 0.4);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.gallery-catalog.is-active {
  border-color: var(--gb-red);
  box-shadow: 0 0 0 1px rgba(225, 6, 0, 0.25);
}

.gallery-catalog-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.gallery-catalog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.gallery-catalog:hover .gallery-catalog-cover img {
  transform: scale(1.05);
}

.gallery-catalog-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 5, 5, 0.85) 0%, transparent 55%);
}

.gallery-catalog-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.1rem 1.25rem;
}

.gallery-catalog-body strong {
  font-size: 1.05rem;
  color: var(--gb-white);
}

.gallery-catalog-body span {
  font-size: 0.8rem;
  color: var(--gb-gray);
}

.gallery-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.gallery-breadcrumb[hidden] {
  display: none;
}

.gallery-breadcrumb button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  font-family: var(--font-main);
  font-size: 0.8rem;
  color: var(--gb-gray);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--gb-border);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}

.gallery-breadcrumb button:hover {
  color: var(--gb-white);
  border-color: rgba(255, 255, 255, 0.25);
}

.gallery-photos-block[hidden] {
  display: none;
}

.gallery-photos-header {
  margin: 0 0 1.25rem;
}

.gallery-active-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.gallery-grid-item {
  position: relative;
  padding: 0;
  border: none;
  border-radius: 0.65rem;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 3 / 4;
  background: var(--gb-black-card);
}

.gallery-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease-out);
}

.gallery-grid-item:hover img {
  transform: scale(1.06);
}

.gallery-grid-zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  color: var(--gb-white);
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-grid-item:hover .gallery-grid-zoom {
  opacity: 1;
}

/* ── Lightbox ── */

.gb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}

.gb-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

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

.gb-lightbox-inner {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gb-lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 85vh;
}

.gb-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 0.5rem;
  object-fit: contain;
}

.gb-lightbox-caption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gb-gray);
}

.gb-lightbox-close {
  position: absolute;
  top: -0.5rem;
  right: 0;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gb-border);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: var(--gb-white);
  cursor: pointer;
  transition: background 0.25s;
}

.gb-lightbox-close:hover {
  background: var(--gb-red);
}

.gb-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gb-border);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: var(--gb-white);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}

.gb-lightbox-nav:hover {
  background: var(--gb-red);
  border-color: var(--gb-red);
}

.gb-lightbox-prev {
  left: -1rem;
}

.gb-lightbox-next {
  right: -1rem;
}

.gb-lightbox-counter {
  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--gb-gray);
}

@media (max-width: 767px) {
  .gallery-slider-main {
    flex-direction: column;
  }

  .gallery-slider-btn {
    display: none;
  }

  .gallery-slider-view {
    width: 100%;
  }

  .gallery-catalogs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
  }

  #galleryPage.has-category .gallery-catalog {
    flex: 0 0 100px;
    max-width: 100px;
  }

  #galleryPage.has-category .gallery-catalog-body {
    padding: 0.65rem 0.5rem;
  }

  #galleryPage.has-category .gallery-catalog-body strong {
    font-size: 0.75rem;
    line-height: 1.25;
  }

  #galleryPage.has-category .gallery-catalog-body span {
    font-size: 0.65rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .gb-lightbox-prev {
    left: 0.25rem;
  }

  .gb-lightbox-next {
    right: 0.25rem;
  }

  .gb-lightbox-nav {
    width: 44px;
    height: 44px;
  }
}
