/* Realizacje — karuzela + lightbox + SEO */

.gallery {
  padding: 72px 32px;
  background: var(--bg);
}

.gallery__head {
  text-align: center;
  margin-bottom: 20px;
}

.gallery__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.gallery__accent {
  background: linear-gradient(90deg, var(--gold), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gallery__sub {
  color: var(--gray);
  max-width: 40rem;
  margin: 0 auto 12px;
}

.gallery__intro {
  max-width: 720px;
  margin: 0 auto 28px;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Karuzela — jeden slajd, niska wysokość */
.gallery__slider {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gallery__track-wrap {
  flex: 1;
  overflow: hidden;
  border-radius: 14px;
}

.gallery__track {
  display: flex;
  transition: transform 500ms var(--ease);
}

.gallery__slide {
  flex: 0 0 100%;
  margin: 0;
  position: relative;
}

.gallery__slide-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #111;
  text-align: left;
  position: relative;
  transition: box-shadow 280ms var(--ease);
}

.gallery__slide-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.78) 100%);
  z-index: 1;
}

.gallery__slide-btn:hover,
.gallery__slide-btn:focus-visible {
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
  outline: none;
}

.gallery__slide-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--orange), 0 16px 32px rgba(0, 0, 0, 0.45);
}

.gallery__photo {
  display: block;
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: center 75%;
}

.gallery__slide-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 16px 18px 14px;
  color: #fff;
  pointer-events: none;
}

.gallery__card-loc {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 4px;
}

.gallery__card-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
}

.gallery__card-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--orange);
}

.gallery__card-hint::after {
  content: "→";
}

.gallery__arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--orange);
  background: rgba(255, 119, 0, 0.08);
  color: var(--orange);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 250ms var(--ease), box-shadow 250ms var(--ease);
}

.gallery__arrow:hover {
  background: rgba(255, 119, 0, 0.2);
  box-shadow: 0 0 20px rgba(255, 119, 0, 0.28);
}

.gallery__footer {
  max-width: 920px;
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.gallery__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 320px;
}

.gallery__dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
  transition: background 250ms var(--ease), transform 250ms var(--ease);
}

.gallery__dots button.is-active {
  background: var(--orange);
  transform: scale(1.25);
  box-shadow: 0 0 10px rgba(255, 119, 0, 0.45);
}

.gallery__status {
  font-size: 0.82rem;
  color: var(--gray);
  min-width: 3.5rem;
  text-align: center;
}

/* Lista SEO — widoczna dla botów i użytkowników bez JS */
.gallery__seo-details {
  max-width: 920px;
  margin: 20px auto 0;
}

.gallery__seo-summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--gray);
  text-align: center;
  list-style: none;
}

.gallery__seo-summary::-webkit-details-marker {
  display: none;
}

.gallery__seo-summary:hover {
  color: var(--orange);
}

.gallery__seo-list {
  max-width: 920px;
  margin: 14px auto 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.gallery__seo-list li {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
  border-left: 2px solid rgba(255, 119, 0, 0.35);
  padding-left: 12px;
}

.gallery__seo-list strong {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gallery-lightbox[hidden]:not(.is-open) {
  display: none;
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.gallery-lightbox__panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  max-width: 960px;
  width: 100%;
  max-height: min(90vh, 720px);
  background: #141414;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
}

.gallery-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox__media {
  background: #0a0a0a;
  min-height: 240px;
}

.gallery-lightbox__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-lightbox__body {
  padding: 28px 24px 24px;
  overflow-y: auto;
}

.gallery-lightbox__loc {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}

.gallery-lightbox__title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 14px;
}

.gallery-lightbox__detail {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.gallery-lightbox__specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 0;
  font-size: 0.85rem;
}

.gallery-lightbox__specs dt {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.gallery-lightbox__specs dd {
  margin: 0;
  color: #fff;
  font-weight: 600;
}

@media (max-width: 640px) {
  .gallery {
    padding: 56px 16px;
  }

  .gallery__photo {
    height: 260px;
  }

  .gallery__arrow {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  .gallery__slider {
    gap: 8px;
  }

  .gallery-lightbox {
    padding: 0;
    align-items: flex-end;
  }

  .gallery-lightbox__panel {
    grid-template-columns: 1fr;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
  }

  .gallery-lightbox__media {
    max-height: 40vh;
  }

  .gallery-lightbox__body {
    padding: 20px 18px 28px;
  }

  .gallery__seo-list {
    margin-top: 20px;
  }
}
