/* Fade-in effect */
img.fade-in {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

img.fade-in.loaded {
  opacity: 1;
}

/* Featured Banner */
.featured-banner {
  width: 100%;
  height: 600px; 
  display: block;
  overflow: hidden;
}

.featured-banner .banner-img {
  width: 100%;
  height: 100%; 
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0;
  transition: opacity 1.5s ease;

}

.featured-banner .banner-img.loaded {
  opacity: 1;
}

/* Show only desktop image by default */
.featured-banner .desktop-banner {
  display: block !important;
}

.featured-banner .mobile-banner {
  display: none !important;
}

/* Project Description Section */
.project-description {
  padding: 4em 8em;
  display: flex;
  flex-direction: row;
  gap: 40px;
}

.content-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.description-left, .description-right {
  width: 50%;
}

.description-left h2 {
  font-size: 50px;
  padding-right: 3em;
  margin-top: 0; 
}

.description-right p {
  font-size: 18px;
}

/* Gallery Section */
.gallery {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 3x3 Grid for Desktop */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 5em;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1 / 1; /* Square images */
  object-fit: contain;
  min-height: 250px; /* Ensures visibility */
}

/* Full-Width Image */
.gallery-full img {
  width: 100%;
  object-fit: contain;
  display: block;
  padding: 0 5em;
}

/* Placeholder for missing images */
.gallery-grid img:not([src]),
.gallery-full img:not([src]) {
  display: block;
}

/* 4:3 Poster Grid */
.posters-grid-4x3 img {
  aspect-ratio: auto;
  object-fit: cover;
  width: 100%;
  height: auto;
  min-height: unset !important;
}

/* A3 Poster Grid */
.posters-grid-a3 img {
  aspect-ratio: auto;
  object-fit: cover;
  width: 100%;
  height: auto;
  min-height: unset !important;
}

/* Large Laptops / Small Desktops (1281px - 1800px) */
@media (min-width: 1281px) and (max-width: 1800px) {
  .description-left h2 {
    font-size: 36px;
    padding-right: 5em;
    margin-top: 0; 
  }
}

/* Small Laptops (1025px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
  .description-left h2 {
    font-size: x-large;
    padding-right: 3em;
    margin-top: 0; 
  }

  .description-right p {
    font-size: 14px;
    padding-left: 1em;
    font-weight: 400;
  }
}

/* Medium Screens (Small laptops / Tablets in landscape) */
@media (min-width: 769px) and (max-width: 1024px) {
  .project-description {
    padding: 2em 3.2em 2em 3.2em;
  }
  
  .description-left h2 {
    font-size: x-large;
    padding-right: 2em;
    margin-top: 0; 
  }

  .description-right p {
    font-size: 11.5px;
    padding-left: 1em;
    font-weight: 400;
  }

  .featured-banner {
    height: auto; 
  }

  .featured-banner .banner-img {
    width: 100%;
    aspect-ratio: 5 / 3; 
    object-fit: cover;
    max-height: 80vh; 
  }

  /* 2x2 Grid for Tablet */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 3em;
  }

  .gallery-full img {
    object-fit: contain;
    aspect-ratio: auto; 
    max-height: 80vh; 
    padding: 0 3em;
  }
}

/* Mobile View */
@media (max-width: 768px) {
  .featured-banner {
    height: auto; 
  }

  .featured-banner .banner-img {
    width: 100%;
    aspect-ratio: 4 / 4; 
    object-fit: cover;
    max-height: 80vh; 
  }

  .featured-banner .desktop-banner {
    display: none !important;
  }

  .featured-banner .mobile-banner {
    display: block !important;
    object-position: 90% center;
  }
  
  .project-description {
    padding: 40px 10%;
  }

  .content-wrapper {
    flex-direction: column; 
  }

  .description-left, .description-right {
    width: 100%;
  }

  .description-left h2 {
    font-size: 1.5rem;
    margin-bottom: 20px; 
    padding-right: 0;
  }

  .description-right p {
    font-size: 13px;
  }

  /* Convert Grid to Single Column */
  .gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-left: 10%;
    padding-right: 10%;
    padding-top: 0px;
    padding-bottom: 0px;
  }
  
  /* Ensure Full-Width Images Stay Full Width */
  .gallery-full img {
    object-fit: contain;
    aspect-ratio: auto; 
    max-height: 80vh; 
    padding: 0;
  }

  /* 4:3 Poster Grid */
  .posters-grid-4x3 img {
    aspect-ratio: auto;
  }

  /* A3 Poster Grid */
  .posters-grid-a3 img {
    aspect-ratio: auto;
  }


}
