/* ==========================================
   GALLERY PAGE – BASE LAYOUT
   ========================================== */

.gallery-page-root {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px 64px;
}

/* ==========================================
   MASONRY GRID
   - Desktop: 5 columns
   - ≤ 950px: 3 columns
   ========================================== */

.gallery-grid {
  column-count: 5;
  column-gap: 10px;
}

@media (max-width: 950px) {
  .gallery-grid {
    column-count: 3;
  }
}

/* each item behaves like a masonry “brick” */
.gallery-item {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  break-inside: avoid;
  position: relative;
}

/* remove any old pairTile card styling inside the gallery */
.gallery-grid .pairTile {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

/* ==========================================
   IMAGES
   ========================================== */

.gallery-img,
.gallery-grid .pairTile-img {
  display: block;
  width: 100%;
  height: auto;          /* keep original ratio */
  max-width: 100%;
  max-height: none;
  border-radius: 9px;
  object-fit: contain;

  transform: scale(1);
  transition: transform 0.25s ease, filter 0.25s ease;
}

/* simple zoom on hover / focus */
.gallery-item:hover .gallery-img,
.gallery-item:focus-visible .gallery-img {
  transform: scale(1.04);
}

/* tiny spacing tweak mobile */
@media (max-width: 600px) {
  .gallery-grid {
    column-gap: 8px;
  }

  .gallery-item {
    margin-bottom: 8px;
  }
}

/* ==========================================
   SPECIAL TEXT TILE IN GALLERY
   ========================================== */

.gallery-item--text {
  cursor: default;
  break-inside: avoid;
}

.gallery-text-frame {
  background: var(--txt-box-gallery-bg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  border-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;
  margin: 0;
  padding: 18px 0;
}

.gallery-text-line {
  margin: 0;
  text-align: left;
  font-weight: 700;
  line-height: 1.2;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  color: var(--txt-box-gallery);
}

/* Smaller quote text on desktop */
@media (min-width: 700px) {
  .gallery-text-line {
    font-size: 1.8rem;
    line-height: 1.3;
  } }




/* ==========================================
   COPIED 1:1 – SLIDER / LIGHTBOX ARROWS & DOTS
   ========================================== */

/* SLIDER WRAPPER – CONTEXT FOR ARROWS & DOTS */
.pairCard-slider {
  position: relative;
  z-index: 3;
}

/* ARROWS (white circles, same style as old) */
.pairCard-arrow {
  position: absolute;
  top: 45%;
  transform: translateY(-55%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--arrow-circle-br);
  box-shadow: 0 4px 10px rgba(0,0,0,.20);
  opacity: 0.9;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 20px;
  font-weight: 700;
  color: var(--arrow-normal);

  z-index: 1;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.pairCard-arrow-prev { left: -18px; }
.pairCard-arrow-next { right: -18px; }

.pairCard-arrow:hover {
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
  color: var(--arrow-on-hover);
}

/* Indicator bar under the card */
.pairCard-indicators {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0 24px;

  position: relative;
  left: 0;
  right: 0;
  bottom: 17px;
  z-index: 0;
}

.pairCard-indicator {
  position: relative;

  flex: 1 1 0;
  height: 4px;
  border-radius: 999px;
  border: 0;
  background: var(--indicator-not-active);
  cursor: pointer;
  padding: 0;
}

@media (max-width: 980.98px) {
  .pairCard-indicators {
    padding: 0 32px;
  }
}

/* active base bar (while autoplay runs) */
.pairCard-indicator.is-active {
  background: var(--indicator-not-active);
}

/* red progress bar inside */
.pairCard-indicator::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--indicator-loading);
  border-radius: inherit;
}

/* autoplay progress (JS adds .is-progress) */
.pairCard-indicator.is-progress::before {
  width: 100%;
  transition: width 4.5s linear;
}

/* after manual click: solid active color, no red progress */
.pairCard-indicator.is-manual {
  background: var(--indicator-active);
}

.pairCard-indicator.is-manual::before {
  transition: none;
  width: 0;
}

/* ===== MOBILE SCALING (copied 1:1) ===== */
@media (max-width: 480px) {
  .pairCarousel-root .pairCard {
    transform: scale(0.85) translateX(-30px);
    transform-origin: center;
    margin: 0 auto;
  }

  .pairLightbox-dialog {
    transform: scale(0.95);
  }
}

/* ==========================================
   LEVEL 5 – LIGHTBOX OVERLAY
   ========================================== */

.pairLightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.pairLightbox.is-open {
  display: flex;
}

.pairLightbox-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

.pairLightbox-dialog {
  position: relative;
  width: min(800px, 95vw);
  height: min(900px, 70vh);
  background: var(--lightbox-br);
  border-radius: 20px;
  padding: 32px 48px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.75);

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image scales inside the fixed dialog box */
.pairLightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

/* close button */
.pairLightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--close-botton-border);
  background: var(--close-botton-box);
  color: var(--close-botton);
  font-size: 22px;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* arrows in lightbox */
.pairLightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--arrow-circle-br);
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
  opacity: 0.9;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 26px;
  font-weight: 700;
  color: var(--arrow-normal);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.pairLightbox-arrow-prev { left: 16px; }
.pairLightbox-arrow-next { right: 16px; }

.pairLightbox-arrow:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  color: var(--arrow-on-hover);
}

.pairLightbox-indicators {
  position: absolute;
  left: 60px;
  right: 60px;
  bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 0;
}

.pairLightbox-indicator {
  width: 50px;
  height: 4px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: var(--indicator-not-active);
  cursor: pointer;
}

.pairLightbox-indicator.is-active {
  background: var(--indicator-active);
  width: 80px;
}

@media (max-width: 768px) {
  .pairLightbox-dialog {
    width: 80vw;
    height: 56vh;
    padding: 18px 24px 40px;
    border-radius: 18px;
  }

  .pairLightbox-arrow {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .pairLightbox-indicators {
    left: 24px;
    right: 24px;
    bottom: 10px;
  }
}
