/* ========================================
   ELYSIAN PROJECT GALLERY
======================================== */


/* HERO */

.gallery-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 82% 40%,
      rgba(120, 173, 23, .10),
      transparent 28%
    ),
    #fbfaf6;
  border-bottom: 1px solid var(--line);
}


.gallery-hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -150px;
  border: 80px solid rgba(120, 173, 23, .035);
  border-radius: 50%;
}


.gallery-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 100px;
  padding-bottom: 100px;
  max-width: 1180px;
}


.gallery-hero h1 {
  color: var(--green-950);
  margin-bottom: 22px;
}


.gallery-intro {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.8;
  margin: 0;
}



/* ACTIVE NAV */

.nav-active {
  color: #b8dc72 !important;
}



/* ========================================
   GALLERY
======================================== */

.gallery-section {
  padding: 80px 0 100px;
  background: #fff;
}


.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}



/* IMAGE CARD */

.gallery-item {
  display: block;
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--paper);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
}


.gallery-item::after {
  content: "View project";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 47, 34, .72);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .25s ease;
}


.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}


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


.gallery-item:hover::after {
  opacity: 1;
}


.gallery-hidden {
  display: none;
}



/* LOAD MORE */

.gallery-more {
  display: flex;
  justify-content: center;
  margin-top: 50px;
}


.btn-gallery-more {
  background: transparent;
  color: var(--green-900);
  border: 2px solid var(--green-900);
  cursor: pointer;
  min-height: 50px;
  padding: 0 28px;
}


.btn-gallery-more:hover {
  background: var(--green-900);
  color: #fff;
}



/* ========================================
   BOTTOM CTA
======================================== */

.gallery-cta {
  padding: 70px 0;
  background: var(--green-950);
  color: #fff;
}


.gallery-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}


.gallery-cta h2 {
  color: #fff;
  margin-bottom: 12px;
}


.gallery-cta p:not(.eyebrow) {
  color: #d7e3db;
  margin: 0;
}



/* ========================================
   LIGHTBOX
======================================== */

body.lightbox-active {
  overflow: hidden;
}


.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;

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

  padding: 50px 100px;

  background: rgba(3, 24, 17, .95);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity .25s ease,
    visibility .25s ease;
}


.lightbox-open {
  opacity: 1;
  visibility: visible;
}


.lightbox-image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  max-height: 88vh;
}


.lightbox-image-wrap img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 25px 70px rgba(0, 0, 0, .35);
}


.lightbox-count {
  position: absolute;
  left: 50%;
  bottom: -36px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .75);
  font-family: 'Montserrat', sans-serif;
  font-size: .75rem;
  letter-spacing: .08em;
}



/* CLOSE */

.lightbox-close {
  position: absolute;
  right: 30px;
  top: 20px;

  border: 0;
  background: transparent;

  color: #fff;

  font-size: 3rem;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;
  opacity: .8;
}


.lightbox-close:hover {
  opacity: 1;
}



/* ARROWS */

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 58px;
  height: 58px;

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

  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;

  background: rgba(255,255,255,.08);
  color: #fff;

  font-size: 2.5rem;
  line-height: 1;

  cursor: pointer;

  transition: background .2s ease;
}


.lightbox-arrow:hover {
  background: var(--lime);
}


.lightbox-prev {
  left: 28px;
}


.lightbox-next {
  right: 28px;
}



/* ========================================
   TABLET
======================================== */

@media (max-width: 900px) {

  .gallery-hero-inner {
    padding-top: 80px;
    padding-bottom: 80px;
  }


  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
  }


  .gallery-cta-inner {
    align-items: flex-start;
    flex-direction: column;
  }


  .lightbox {
    padding:
      70px 70px
      60px;
  }

}



/* ========================================
   MOBILE
======================================== */

@media (max-width: 600px) {

  .gallery-hero-inner {
    padding-top: 65px;
    padding-bottom: 65px;
  }


  .gallery-hero h1 {
    font-size: 3rem;
  }


  .gallery-section {
    padding: 50px 0 70px;
  }


  .project-gallery {
    grid-template-columns: 1fr;
    gap: 12px;
  }


  .gallery-item {
    aspect-ratio: 4 / 3;
  }


  .gallery-item::after {
    display: none;
  }


  .lightbox {
    padding:
      70px 15px
      80px;
  }


  .lightbox-arrow {
    top: auto;
    bottom: 18px;

    width: 46px;
    height: 46px;

    transform: none;
  }


  .lightbox-prev {
    left: calc(50% - 58px);
  }


  .lightbox-next {
    right: calc(50% - 58px);
  }


  .lightbox-close {
    right: 18px;
    top: 15px;
  }


  .lightbox-count {
    bottom: -30px;
  }

}