/* ======================================================
   SLIDE 5 : UPCOMING PROJECT
   ====================================================== */

#slide-5.project-section {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
  padding: 10px;
}

/* ===============================
   MAIN GRID
================================ */

#slide-5 .container-projects {
  width: 100%;
  max-width: 1400px;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 80px;
  align-items: center;
  margin: 0 auto;
}

/* ===============================
   LEFT SIDE
================================ */

#slide-5 .left-side {
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 420px;
}

/* Title */
#slide-5 .section-title {
  font-family: 'Libre Caslon Text', Georgia, serif;
  font-size: clamp(2.8rem, 3vw, 3.6rem);
  font-weight: 700;
  color: var(--burgundy);
  position: relative;
  padding-bottom: 14px;
}

#slide-5 .section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 90px;
  height: 4px;
  background: var(--burgundy);
}

/* ===============================
   THUMBNAILS GRID (DESKTOP)
================================ */

#slide-5 .thumbnails-grid-project {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
   padding: 0;
   width: 100%;
   max-width: 70%;
  /* overflow: hidden; */
  align-content: start;
}

#slide-5 .thumbnail-project {
  aspect-ratio: 3 / 4;
  border-radius: 18px;
   height: auto;
  max-height: 200px;
  overflow: hidden;
  /* touch-action: manipulation; */
  cursor: pointer;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  position: relative;
}
.thumbnails-grid-project,
.thumbnail-project {
  touch-action: pan-x;
}
#slide-5 .thumbnail-project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#slide-5 .thumbnail-project:hover {
  transform: scale(1.04);
}

#slide-5 .thumbnail-project.active {
  border-color: var(--burgundy);
  box-shadow: 0 12px 30px rgba(139, 30, 63, 0.35);
}

/* ===============================
   RIGHT SIDE : MAIN DISPLAY
================================ */

#slide-5 .right-side {
  position: relative;
  height: 70vh;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.2);
  width: 100%;
  max-height: 620px;
}

/* Image wrapper */
#slide-5 .main-display-project {
  width: 100%;
  height: 100%;
  position: relative;

}

/* Main images */
#slide-5 .display-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#slide-5 .display-image.active {
  opacity: 1;
}

/* ===============================
   OVERLAY TEXT
================================ */

#slide-5 .display-overlay {
  position: absolute;
  inset: 0;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.35) 45%,
    transparent 75%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
}

#slide-5 .display-overlay.active {
  opacity: 1;
}

#slide-5 .display-title {
   font-family: 'Libre Caslon Text', Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.2;
}

#slide-5 .display-description {
  max-width: 720px;
  font-family: 'Aventa', 'Montserrat', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
}

/* ======================================================
   MOBILE ≤ 768px
   ====================================================== */


@media (max-width: 768px) {

  #slide-5.project-section {
    padding: 40px 20px;
    min-height: 100vh;
  }

  #slide-5 .container-projects {
    grid-template-columns: 1fr;
    gap: 0;
    align-items: stretch;
  }

  /* Header Section */
  #slide-5 .left-side {
    order: 1 ! important;
    margin-bottom: 30px;
    max-width: 100%;
  }

  #slide-5 .section-title {
    font-size: 2.5rem;
    text-align: left;
    padding-bottom: 12px;
  }

  #slide-5 .section-title::after {
    width: 70px;
    height: 3px;
  }

  /* Main Display */
  #slide-5 .right-side {
    order: 2 ! important;
    height: 400px;
    max-height: none;
    border-radius: 20px;
    margin-bottom: 20px;
  }

  #slide-5 .display-overlay {
    padding: 30px 25px;
  }

  #slide-5 .display-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  #slide-5 .display-description {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  /* Thumbnails - Horizontal Scroll */
  #slide-5 .thumbnails-grid-project {
    order: 3;
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 30, 63, 0.5) rgba(0, 0, 0, 0.1);
  }

  #slide-5 .thumbnails-grid-project::-webkit-scrollbar {
    height: 6px;
  }

  #slide-5 .thumbnails-grid-project::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
  }

  #slide-5 .thumbnails-grid-project::-webkit-scrollbar-thumb {
    background: rgba(139, 30, 63, 0.5);
    border-radius: 10px;
  }

  #slide-5 .thumbnail-project {
    flex: 0 0 48%;
    min-width: 58%;
    max-width: 58%;
    aspect-ratio: 3 / 4;
    max-height: 200px;
    scroll-snap-align: start;
  }

  #slide-5 .thumbnail-project:hover {
    transform: none;
  }
}

@media (max-width: 480px){
    #slide-5 .section-title{
    font-size: 2rem;
}
}

/* =========================================================
   27-INCH / 2K SCREENS (2560px+)
========================================================= */
@media (min-width: 2560px) {

  #slide-5 .container-projects {
    max-width: 2000px;
    grid-template-columns: 580px 1fr;
    gap: 120px;
  }

  #slide-5 .left-side {
    max-width: 580px;
    gap: 26px;
  }

  #slide-5 .section-title {
    font-size: 5rem;
  }

  #slide-5 .section-title::after {
    width: 130px;
    height: 6px;
  }

  #slide-5 .thumbnail-project {
    max-height: 300px;
    border-radius: 24px;
  }

  #slide-5 .right-side {
    height: 75vh;
    max-height: 860px;
    border-radius: 36px;
  }

  #slide-5 .display-overlay {
    padding: 80px;
  }

  #slide-5 .display-title {
    font-size: 4rem;
    margin-bottom: 20px;
  }

  #slide-5 .display-description {
    font-size: 1.3rem;
    max-width: 960px;
  }
}

/* =========================================================
   4K SCREENS (3840px+)
========================================================= */
@media (min-width: 3840px) {

  #slide-5 .container-projects {
    max-width: 3000px;
    grid-template-columns: 800px 1fr;
    gap: 180px;
  }

  #slide-5 .left-side {
    max-width: 800px;
    gap: 36px;
  }

  #slide-5 .section-title {
    font-size: 7rem;
  }

  #slide-5 .section-title::after {
    width: 180px;
    height: 8px;
  }

  #slide-5 .thumbnail-project {
    max-height: 420px;
    border-radius: 32px;
  }

  #slide-5 .right-side {
    height: 75vh;
    max-height: 1200px;
    border-radius: 48px;
  }

  #slide-5 .display-overlay {
    padding: 120px;
  }

  #slide-5 .display-title {
    font-size: 6rem;
    margin-bottom: 28px;
  }

  #slide-5 .display-description {
    font-size: 1.8rem;
    max-width: 1400px;
  }
}