/* Home gallery slider + lightbox (fits existing site palette via CSS variables) */

.page--home__gallery .home-slider__loading .skeleton-box {
  height: 24rem;
}

@media (min-width: 48rem) {
  .page--home__gallery .home-slider__loading .skeleton-box {
    height: 28rem;
  }
}

.home-gallery__item {
  position: relative;
  display: block;
  min-height: 100%;
  background: var(--color-white);
  border-radius: 0.5rem;
  overflow: hidden;
  color: inherit;
}

.home-gallery__media {
  position: relative;
  display: block;
  padding-bottom: 66%;
  background: var(--color-black);
}

.home-gallery__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.home-gallery__hint {
  position: absolute;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 1;
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-white);
  background: rgba(0, 0, 0, 0.55);
  border-radius: 10rem;
  opacity: 0.95;
  user-select: none;
}

@media (min-width: 62rem) {
  .home-gallery__item:hover .home-gallery__media img {
    transform: scale(1.03);
    opacity: 0.9;
  }
}

/* Lightbox */

body.gallery-lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-lightbox.is-active {
  display: block;
  opacity: 1;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.gallery-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  width: min(110rem, calc(100vw - 3rem));
  height: min(80vh, 70rem);
  margin: 10vh auto 0;
  padding: 0;
}

@media (max-width: 61.98rem) {
  .gallery-lightbox__dialog {
    grid-template-columns: 1fr;
    width: calc(100vw - 2rem);
    height: 78vh;
    margin-top: 8vh;
    position: relative;
  }
  
  .gallery-lightbox__close {
    position: absolute;
    top: -4.5rem;
    right: 0;
    background: rgba(0, 0, 0, 0.75);
  }
}

.gallery-lightbox__figure {
  position: relative;
  margin: 0;
  width: 100%;
  height: 100%;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.gallery-lightbox__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: transparent;
}

.gallery-lightbox__close {
  position: absolute;
  top: -5rem;
  right: 0;
  z-index: 10;
  display: grid;
  place-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border: none;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.65);
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 61.98rem) {
  .gallery-lightbox__close {
    top: -5.5rem;
    right: 0;
    width: 4rem;
    height: 4rem;
  }
}

.gallery-lightbox__close svg {
  width: 1.6rem;
  height: 1.6rem;
  fill: var(--color-white);
}

.gallery-lightbox__nav {
  display: grid;
  place-content: center;
  width: 5rem;
  height: 5rem;
  border: none;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

@media (max-width: 61.98rem) {
  .gallery-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .gallery-lightbox__nav--prev {
    left: 0.8rem;
  }

  .gallery-lightbox__nav--next {
    right: 0.8rem;
  }
}

.gallery-lightbox__nav svg {
  width: 2.2rem;
  height: 2.2rem;
  fill: var(--color-white);
}

.gallery-lightbox__nav--prev svg {
  transform: rotate(-180deg);
}

.gallery-lightbox__nav:hover {
  background: rgba(0, 0, 0, 0.55);
}

.gallery-lightbox__close:hover {
  background: rgba(0, 0, 0, 0.85);
}

.gallery-lightbox__close:active,
.gallery-lightbox__nav:active {
  transform: scale(0.95);
}


.page--home__advantages {
    position: static !important;
}