/*
  Mobilna przebudowa galerii do 1023px + style strony gallery.html.
  Plik można dołączyć PO styles.css.
*/
  .mobile-gallery-preview {
    display: block;
    width: calc(100% - 40px);
    max-width: 1200px;
    margin: 40px auto 40px auto;
    padding: 24px 0 12px;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    backdrop-filter: none;
  }

  .mobile-gallery-preview__box {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
  }

  .mobile-gallery-preview__content {
    padding: 20px 20px 8px;
    text-align: center;
  }

  .mobile-gallery-preview__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 40px 40px 0 40px;
    justify-items: center;
  }

  .mobile-gallery-preview__grid img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
  }

  .mobile-gallery-preview__grid img:only-child {
    grid-column: 1 / -1;
  }

  .mobile-gallery-preview__actions {
    padding: 18px 20px 18px;
    text-align: center;
  }

    .mobile-gallery-preview__content h2 {
    margin: 0 0 10px;
    font-size: clamp(1.6rem, 4vw, 2rem);
  }

  .mobile-gallery-preview__content p {
    margin: 0;
    line-height: 1.6;
  }

.mobile-gallery-preview__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 16px;
  border-radius: 24px;
  color: #7f633d;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  transition: background 0.25s ease, transform 0.25s ease;
}

.mobile-gallery-preview__button:hover {
  background: rgba(154, 123, 79, 0.16);
  transform: translateY(-1px);
}

@media (max-width: 1023px) {
.gallery-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .gallery-page-main {
    padding: 24px 16px 40px;
  }

  .gallery-page-nav-wrap {
    padding: 14px 16px;
  }

  /* Ukrycie starej galerii tylko na telefonie i tablecie */
  #gallery,
  .gallery,
  .gallery-section,
  .gallery-wrapper,
  .gallery-columns,
  .gallery-container,
  .main-gallery,
  .photo-gallery {
    display: none !important;
  }
}

.gallery-page-body {
  margin: 0;
  color: #111;
  font-family: "Montserrat", sans-serif;
}

.gallery-page-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.gallery-page-nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.gallery-page-logo,
.gallery-page-nav a {
  color: #111;
  text-decoration: none;
}

.gallery-page-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.gallery-page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.gallery-page-nav a {
  font-weight: 600;
}

.gallery-page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.gallery-page-hero {
  max-width: 820px;
  margin-bottom: 40px;
  margin-top: 20px;
  background: none;
}

.gallery-page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.gallery-page-hero p {
  margin: 0;
  line-height: 1.7;
}

.gallery-page-grid-section {
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.gallery-page-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.gallery-page-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.gallery-page-card img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-page-card:hover img {
  transform: scale(1.03);
}

.mobile-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  padding: 24px;
  box-sizing: border-box;
}

.mobile-lightbox.is-open {
  display: flex;
}

.mobile-lightbox__figure {
  margin: 0;
  max-width: min(1100px, 90vw);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-lightbox.is-open .lightbox-close,
.mobile-lightbox.is-open .lightbox-prev,
.mobile-lightbox.is-open .lightbox-next {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  align-items: center;
  justify-content: center;
}

.mobile-lightbox__figure img,
#lightboxImage {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
}

/* zamknięcie */
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border: 2px solid #000;
  background: rgba(255, 255, 255, 0.92);
  color: #000;
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10001;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  padding: 0;
}

/* strzałki */
.lightbox-prev,
.lightbox-next {
  position: fixed;
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  padding: 0;
  font-weight: 700;
}

@media (max-width: 767px) {
  .mobile-lightbox {
    padding: 16px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }
}

.gallery-page-body .desktop-menu a {
  color: #000000;
}

.feature-content__button {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 50%;
  min-height: 56px;
  padding: 12px 18px;
  margin: 20px auto;

  background: #f7f4ee;
  border: 1px solid rgba(166, 145, 110, 0.22);
  border-radius: 22px;

  color: #3f454b;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}