/* Gallery Hero */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 700px;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-image: url("https://res.cloudinary.com/monkeytours/images/w_2560,h_1440,c_scale/f_auto,q_auto/v1751312254/Azura2025/Azura_Playa_Samara_1_-_landscape/Azura_Playa_Samara_1_-_landscape.jpg?_i=AA");
  background-position: center top;
  /* Center horizontally, align to top initially */
  background-size: cover;
  background-repeat: no-repeat;
  will-change: transform;
  /* Hint to the browser for animation optimization */
  transform: translateZ(0);
  /* Promote to its own layer for smoother rendering */
}

.video-background::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #b3897b 0%, rgba(179, 137, 123, 0.43) 100%);
  z-index: 99;
}

.video-background::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #b3897b 0%, rgba(179, 137, 123, 0.43) 100%);
  z-index: 99;
  mix-blend-mode: color;
}

.hero-content {
  min-width: 370px;
  width: 600px;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: end;
  justify-items: center;
  height: 100%;
  text-align: center;
  color: white;
  padding-bottom: 8rem;
}

.logo-container-landing {
  background: url("https://demo.azuraresorts.com/wp-content/uploads/azura-logo-white-380.svg") center/contain no-repeat;
  width: 381px;
  height: 149px;
}

.hero-content h1 {
  font-size: var(--font-size-lg);
  /* margin-bottom: 1rem; */
  font-weight: 400;
  margin: 0;
}

.hero-content h2 {
  font-size: var(--font-size-lg);
  margin-bottom: 2rem;
  font-family: var(--font-secondary);
  margin: 0;
}

.hero-title {
  padding-top: 20px;
}

.hero-title.gallery {
  font-size: 52px;
  font-weight: 200;
  margin-bottom: 20px;
}

.hero-subtitle.gallery {
  font-family: 'Montserrat';
  text-transform: uppercase;
  font-size: 14px;
}

/* Gallery Container */

.gallery-module {
  margin: 0 auto;
  margin-top: -200px;
  width: 100%;
  padding: 120px 60px;
}

.gallery-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(18, 215px);
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
}

.gallery-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Gallery Images */

.gallery-images img:nth-child(1) {
  grid-column: 1;
  grid-row: first-line / 2;
  height: 500px;
  margin-top: 40px;
  background-position: -140px !important;
}

.gallery-images img:nth-child(4) {
  grid-column: 1;
  grid-row: 4 / 4;
  height: 300px;
  margin-top: 95px;
}

.gallery-images img:nth-child(7) {
  grid-column: 1;
  grid-row: 6 / 6;
  height: 300px;
  margin-top: -50px;
}

.gallery-images img:nth-child(10) {
  grid-column: 1;
  grid-row: 7 / 7;
  height: 500px;
  margin-top: 35px;
}

.gallery-images img:nth-child(13) {
  grid-column: 1;
  grid-row: 9 / 9;
  height: 300px;
  margin-top: 90px;
}

.gallery-images img:nth-child(16) {
  grid-column: 1;
  grid-row: 11 / 11;
  height: 300px;
  margin-top: -54px;
}

.gallery-images img:nth-child(19) {
  grid-column: 1;
  grid-row: 12 / 12;
  height: 500px;
  margin-top: 30px;
}

.gallery-images img:nth-child(22) {
  grid-column: 1;
  grid-row: 14 / 14;
  height: 300px;
  margin-top: 88px;
}

.gallery-images img:nth-child(25) {
  grid-column: 1;
  grid-row: 16 / 16;
  height: 300px;
  margin-top: -54px;
}

.gallery-images img:nth-child(28) {
  grid-column: 1;
  grid-row: 17 / 17;
  height: 500px;
  margin-top: 35px;
}

.gallery-images img:nth-child(31) {
  grid-column: 1;
  grid-row: 19 / 19;
  height: 300px;
  margin-top: 90px;
}

.gallery-images img:nth-child(34) {
  grid-column: 1;
  grid-row: 21 / 21;
  height: 300px;
  margin-top: -53px;
}

.gallery-images img:nth-child(37) {
  grid-column: 1;
  grid-row: 22 / 22;
  height: 500px;
  margin-top: 3px;
}

.gallery-images img:nth-child(40) {
  display: none;
}

.gallery-images img:nth-child(2) {
  grid-column: 2;
  grid-row: first-line / 2;
  height: 300px;
}

.gallery-images img:nth-child(5) {
  grid-column: 2;
  grid-row: second-line / 3;
  height: 300px;
  margin-top: 90px;
}

.gallery-images img:nth-child(8) {
  grid-column: 2;
  grid-row: 4 / 6;
  height: 500px;
  margin-top: 178px;
}

.gallery-images img:nth-child(11) {
  grid-column: 2;
  grid-row: 7 / 7;
  height: 300px;
  margin-top: 5px;
}

.gallery-images img:nth-child(14) {
  grid-column: 2;
  grid-row: 8 / 9;
  height: 500px;
  margin-top: 93px;
}

.gallery-images img:nth-child(17) {
  grid-column: 2;
  grid-row: 11 / 11;
  height: 300px;
  margin-top: -79px;
}

.gallery-images img:nth-child(20) {
  grid-column: 2;
  grid-row: 12 / 12;
  height: 300px;
  margin-top: 10px;
}

.gallery-images img:nth-child(23) {
  grid-column: 2;
  grid-row: 13 / 13;
  height: 500px;
  margin-top: 100px;
}

.gallery-images img:nth-child(26) {
  grid-column: 2;
  grid-row: 16/ 16;
  height: 300px;
  margin-top: -70px;
}

.gallery-images img:nth-child(29) {
  grid-column: 2;
  grid-row: 17/ 17;
  height: 300px;
  margin-top: 18px;
}

.gallery-images img:nth-child(32) {
  grid-column: 2;
  grid-row: 18/ 18;
  height: 500px;
  margin-top: 105px;
}

.gallery-images img:nth-child(35) {
  grid-column: 2;
  grid-row: 21/ 21;
  height: 300px;
  margin-top: -65px;
}

.gallery-images img:nth-child(38) {
  grid-column: 2;
  grid-row: 22 / 22;
  height: 300px;
  margin-top: -12px;
}

.gallery-images img:nth-child(41) {
  grid-column: 2;
  grid-row: 22 / 23;
  height: 500px;
  margin-top: 305px;
}

.gallery-images img:nth-child(3) {
  grid-column: 3;
  grid-row: first-line / 2;
  height: 500px;
  margin-top: 40px;
}

.gallery-images img:nth-child(6) {
  grid-column: 3;
  grid-row: 4 / 4;
  height: 300px;
  margin-top: 95px;
}

.gallery-images img:nth-child(9) {
  grid-column: 3;
  grid-row: 6 / 6;
  height: 300px;
  margin-top: -50px;
}

.gallery-images img:nth-child(12) {
  grid-column: 3;
  grid-row: 7 / 7;
  height: 500px;
  margin-top: 35px;
}

.gallery-images img:nth-child(15) {
  grid-column: 3;
  grid-row: 9 / 9;
  height: 300px;
  margin-top: 90px;
}

.gallery-images img:nth-child(18) {
  grid-column: 3;
  grid-row: 11 / 11;
  height: 300px;
  margin-top: -54px;
}

.gallery-images img:nth-child(21) {
  grid-column: 3;
  grid-row: 12 / 12;
  height: 500px;
  margin-top: 30px;
}

.gallery-images img:nth-child(24) {
  grid-column: 3;
  grid-row: 14 / 14;
  height: 300px;
  margin-top: 88px;
}

.gallery-images img:nth-child(27) {
  grid-column: 3;
  grid-row: 16 / 16;
  height: 300px;
  margin-top: -54px;
}

.gallery-images img:nth-child(30) {
  grid-column: 3;
  grid-row: 17 / 17;
  height: 500px;
  margin-top: 35px;
}

.gallery-images img:nth-child(33) {
  grid-column: 3;
  grid-row: 19 / 19;
  height: 300px;
  margin-top: 90px;
}

.gallery-images img:nth-child(36) {
  grid-column: 3;
  grid-row: 21 / 21;
  height: 300px;
  margin-top: -53px;
}

.gallery-images img:nth-child(39) {
  grid-column: 3;
  grid-row: 22 / 22;
  height: 500px;
  margin-top: 3px;
}

/*  Gallery Images End */

.gallery-images img:hover {
  transform: scale(1.02);
}

/* Fullscreen Gallery Modal */
.gallery-modal {
  display: flex;
  /* Use flexbox for centering */
  visibility: hidden;
  /* Hidden by default */
  opacity: 0;
  position: fixed;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 10000000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.gallery-modal-content {
  position: relative;
  margin: auto;
  padding: 0;
  width: 80%;
  max-width: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery-modal.visible {
  visibility: visible;
  opacity: 1;
}

.gallery-modal-content .gallery-image {
  max-width: 100%;
  max-height: 90vh;
  /* Limit height to 90% of viewport height */
  width: auto;
  /* Allow width to adjust proportionally */
  height: auto;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
  object-fit: contain;
  /* Ensures the image maintains its aspect ratio */
}

.gallery-modal-content .gallery-image.fade-out {
  opacity: 0;
}

/* Pagination styles */
.gallery-pagination {
  display: flex;
  justify-content: center;
  margin: 30px 0;
  gap: 10px;
}

.page-number {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(47, 47, 47, 0.7);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-number:hover {
  background-color: rgba(47, 47, 47, 0.9);
}

.page-number.active {
  background-color: #2f2f2f;
}

/* Loading Spinner */
.loading-spinner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
  z-index: 2;
}

.loading-spinner.visible {
  visibility: visible;
  opacity: 1;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.close-gallery {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  z-index: 2;
  cursor: pointer;
}

.close-gallery:hover,
.close-gallery:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* Gallery Navigation */
.gallery-nav {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  /* Controls background size */
  height: 50px;
  /* Controls background size */
  background-color: rgb(47, 47, 47);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s;
  z-index: 2;
}

.gallery-nav:hover {
  background-color: rgb(27, 27, 27);
}

.gallery-nav.prev {
  left: 30px;
}

.gallery-nav.next {
  right: 30px;
}

.gallery-nav img {
  width: 15px;
  /* Controls icon size */
  height: 15px;
  /* Controls icon size */
}

/*? Media Queries 1024px to ? */

/* Tablet */
@media screen and (max-width: 1024px) {
  .gallery-module {
    width: 100%;
    margin-top: -200px;
  }

  .gallery-images {
    gap: 20px;
  }

  .gallery-images img {
    flex: 1 1 calc(50% - 20px);
    height: 400px;
  }

  .gallery-nav {
    font-size: 20px;
    padding: 10px;
    width: 40px;
    height: 40px;
  }
}

@media screen and (max-width: 600px) {
  .gallery-module {
    padding: 40px 10px;
    margin-top: auto;
  }

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

  .gallery-images img {
    height: 100% !important;
    width: 100% !important;
    margin-top: 0 !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .gallery-images img:last-child {
    display: none;
  }

  .gallery-nav {
    font-size: 16px;
    padding: 8px;
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 420px) {
  .hero-content {
    padding: 90px 20px;
  }

  .hero-title.gallery {
    padding: 0;
    font-size: 32px;
  }

  .hero-subtitle.gallery {
    font-size: 14px;
    font-weight: 400;
    text-transform: lowercase;
  }
}