/* ============================================
   PROJECTS SECTION STYLES - REORGANIZED
   ============================================ */

/* ============================================
   1. GLOBAL / BASE
   ============================================ */

#projects {
  background: #103946;
}

#projects .sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.project-back {
  width: 100vw;
  height: 100vh;
}

.projects-title {
  opacity: 0;
}

/* ============================================
   2. CAROUSEL WRAPPER & TRACK
   ============================================ */

.carousel-wrapper {
  position: relative;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.95) translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.carousel-wrapper.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.carousel-track {
  display: flex;
  width: 200%;          /* exactly 2 slides */
  height: 100%;
  will-change: transform;
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   3. CONTAINER SLIDES
   ============================================ */

.container-slide {
  flex: 0 0 50%;         /* 50% of a 200%-wide track = exactly 1 viewport */
  width: 50%;
  min-width: 0;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   4. PROJECT CARD CONTAINER
   ============================================ */

.project-card-container {
  position: relative;
  width: 780px;
  height: 620px;
}

#projectContainer {
  position: relative;
  width: 780px;
  height: 620px;
  margin: 0 auto;
}

/* ============================================
   5. PROJECT CARDS - BASE STYLES
   ============================================ */

.project-card {
  position: absolute;
  border-radius: 2rem;
  overflow: hidden;
  will-change: transform, width, height, left, top;
  transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-card article.group {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease;
}

.project-card article.group:hover {
  transform: translateY(-8px);
  box-shadow: 0 50px 150px rgba(0, 0, 0, 0.55);
}

/* Card images */
#projects article.group img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #1a4d5f;
}

/* Gradient overlay */
#projects article.group .absolute.inset-0.bg-gradient-to-t {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, black, rgba(0,0,0,0.45) 40%, rgba(0,0,0,0.05));
}

/* Glow effect on hover */
#projects article.group .group-hover\:opacity-60 {
  opacity: 0;
  transition: opacity 0.7s ease;
}
#projects article.group:hover .group-hover\:opacity-60 {
  opacity: 0.6;
}

/* Arrow icon */
#projects article.group .group-hover\:rotate-45 {
  transition: transform 0.5s ease, background-color 0.3s ease, color 0.3s ease;
}
#projects article.group:hover .group-hover\:rotate-45 {
  transform: rotate(45deg);
}

.project-card article.group h3 {
  font-size: 1.5rem ;
}

/* ============================================
   6. FILMSTRIP STYLES
   ============================================ */

.filmstrip-viewport {
  overflow: hidden;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
}

.filmstrip-track {
  display: flex;
  align-items: center;
  gap: 24px;
  width: max-content;
  will-change: transform;
}

/* Filmstrip cards — NOT absolutely positioned */
.filmstrip-card {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  flex-shrink: 0;
  width: 480px;
  height: 560px;
}

/* ============================================
   7. SLIDE INDICATORS
   ============================================ */

.slide-indicator .dot {
  cursor: pointer;
  transition: all 0.3s ease;
}

.slide-indicator .dot.active {
  background: #caa46c;
  width: 24px;
  box-shadow: 0 0 20px rgba(202, 164, 108, 0.4);
}

.slide-indicator .dot:hover {
  transform: scale(1.2);
  background: rgba(255, 255, 255, 0.4);
}

/* ============================================
   8. PLUS INDICATOR
   ============================================ */

.plus-indicator {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(16, 57, 70, 0.85);
  backdrop-filter: blur(20px);
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
}

.plus-indicator.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.plus-indicator .plus-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(202, 164, 108, 0.15);
  border: 1px solid rgba(202, 164, 108, 0.2);
  color: #caa46c;
  font-size: 18px;
  font-weight: 700;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.plus-indicator .plus-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.plus-indicator .plus-progress-wrap {
  width: 120px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.plus-indicator .plus-progress {
  height: 100%;
  background: linear-gradient(90deg, #caa46c, #e8c39a);
  border-radius: 4px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.plus-indicator.complete {
  border-color: rgba(202, 164, 108, 0.3);
}

.plus-indicator.complete .plus-icon {
  background: #caa46c;
  color: #103946;
  border-color: #caa46c;
}

/* ============================================
   9. THUMBNAIL ACTIVE STATE
   ============================================ */

.thumbnail-active {
  border-color: #B7FF4A !important;
  box-shadow: 0 0 18px rgba(183, 255, 74, 0.35) !important;
}

.thumbnail-active .bg-\[rgba\(183\,_255\,_74\,_0\.1\)\] {
  background-color: rgba(183, 255, 74, 0.1) !important;
}

.thumbnail-inactive {
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

/* ============================================
   10. SCROLL CUE
   ============================================ */

.scroll-cue-h {
  width: 100vw;
  height: 41px;
  left: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.main-scroll-cue-h {
  height: 100%;
  backdrop-filter: blur(20px);
  color: oklab(1 0 5.96046e-8 / 0.45);
  background-color: color-mix(in oklab, #fff 5%, transparent);
  border: 1px solid color-mix(in oklab, #fff 5%, transparent);
  margin: 0 auto;
  padding: 0 20px;
  border-radius: 35px;
}

.scroll-cue-h span {
  display: block;
  width: 40px;
  height: 1.5px;
  background-image: linear-gradient(to right, rgb(183, 255, 74) 0%, lab(92.8565 -42.0091 73.7401 / 0.7) 50%, rgba(0, 0, 0, 0) 100%);
  margin: 0;
}

.scroll-cue-h strong {
  padding: 0 16px;
  font-size: 10px;
  letter-spacing: 3px;
}

/* ============================================
   11. PROJECTS HEADER
   ============================================ */

.projects-header {
  /* base styles from inline classes */
}

/* ============================================
   12. MOBILE CAROUSEL
   ============================================ */

#projects .projects-carousel-mobile {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
}

#projects .projects-carousel-mobile > div {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

#projects .projects-carousel-mobile article {
  width: 100%;
  max-width: 380px;
  min-height: 480px;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  position: relative;
}

#projects .projects-carousel-mobile article img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   13. DESKTOP CAROUSEL
   ============================================ */

#projects .projects-carousel {
  display: flex;
  height: 100vh;
  width: 330vw;
  transition: transform 0.1s linear;
  will-change: transform;
  align-items: center;
}

#projects .article-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  flex-shrink: 0;
}

/* ============================================
   14. DESKTOP RESPONSIVE - CONTAINER 2 & 3
   ============================================ */

/* ── Large Desktop ── */
@media (min-width: 1400px) {
  .container-slide:nth-child(2) .project-card,
  .container-slide:nth-child(3) .project-card {
    width: 560px !important;
    height: 620px !important;
  }
}

/* ── Desktop ── */
@media (max-width: 1399px) and (min-width: 1200px) {
  .container-slide:nth-child(2) .project-card,
  .container-slide:nth-child(3) .project-card {
    width: 500px !important;
    height: 600px !important;
  }
}

/* ── Small Desktop ── */
@media (max-width: 1199px) and (min-width: 1025px) {
  .container-slide:nth-child(2) .project-card,
  .container-slide:nth-child(3) .project-card {
    width: 500px !important;
    height: 600px !important;
  }
}

/* ============================================
   15. MOBILE RESPONSIVE - ALL BREAKPOINTS
   ============================================ */

   @media (max-width: 900px) {
    h2.projects-title {
        font-size: 40px !important;
    }
   }
/* ── Tablet & Below (max-width: 768px) ── */
@media (max-width: 768px) {
  /* Section */
  #projects {
    height: auto !important;
  }

  #projects .sticky {
    position: relative;
    height: auto;
    overflow: visible;
  }

  /* Carousel */
  #projects .projects-carousel {
    display: none !important;
  }

  #projects .projects-carousel-mobile {
    display: flex !important;
  }

  #projects .projects-header {
    position: relative;
    padding-top: 40px;
  }

  /* Wrapper */
  .carousel-wrapper {
    opacity: 1 !important;
    position: relative !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Track */
  #carouselTrack {
    display: block !important;
    width: 100% !important;
    transform: none !important;
    transition: none !important;
  }

  #carouselTrack > .container-slide {
    width: 50%;
    flex: 0 0 50%;
  }

  /* Container slides */
  .container-slide {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 1rem !important;
  }

  .container-slide .project-card-container {
    width: 100% !important;
    max-width: 90% !important;
    height: auto !important;
    min-height: 700px;
    padding: 0 10px;
    display: flex !important;
    flex-direction: column !important;
  }

  .container-slide[data-container="0"] .project-card {
    width: 100% !important;
    height: 340px !important;
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
    right: 0 !important;
    bottom: 0 !important;
  }

  /* Filmstrip */
  .filmstrip-card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 48%;
    height: 250px;
  }

  #filmstripTrack {
    flex-direction: row !important;
    max-width: 90%;
    flex-wrap: wrap;
    margin: 0 auto !important;
  }

  .card-number {
    display: none !important;
  }

  /* Plus indicator */
  .plus-indicator {
    bottom: 20px;
    padding: 8px 16px;
    gap: 10px;
  }

  .plus-indicator .plus-progress-wrap {
    width: 60px;
  }

  .plus-indicator .plus-text {
    font-size: 11px;
  }

  .plus-indicator .plus-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  /* Project card container */
  .project-card-container {
    width: 420px;
    height: 380px;
  }

  .pin-spacer {
    padding: 0 !important;
  }

  .scroll-cue-h {
    display: none;
  }

  .projects-header {
    display: none !important;
  }

  #modal-projects {
    width: 100%;
    display: none;
  }
}

/* ── Mobile (max-width: 767px) ── */
@media (max-width: 767px) {
  .carousel-wrapper {
    opacity: 1 !important;
    position: relative !important;
    height: auto !important;
    overflow: visible !important;
  }

  #carouselTrack {
    display: block !important;
    width: 100% !important;
    transform: none !important;
    transition: none !important;
  }

  #carouselTrack > .container-slide {
    width: 50%;
    flex: 0 0 50%;
  }

  .filmstrip-card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
  }

  #filmstripTrack {
    width: 100%;
  }

  .container-slide {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 1rem !important;
  }

  .container-slide .project-card-container {
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  .scroll-cue-h {
    display: none;
  }

  .projects-header {
    display: none !important;
  }

  #modal-projects {
    width: 100%;
    display: none;
  }
  .filmstrip-card .project-card {
    width: 48% !important;
  }

}

@media (max-width: 650px) {
    #filmstripTrack {
        gap: unset !important;
    }
    .filmstrip-card {
        margin: 1% !important;
    }
    .modal-projects > div {
        height: 98% !important;
    }
    .close-modal-btn + div.overflow-hidden {
        max-height: 300px;
    }
}
/* ── Small Mobile (max-width: 480px) ── */
@media (max-width: 480px) {
.container-slide {
    padding: 0 !important;
    padding-top: 20px;
}
#filmstripTrack, .container-slide .project-card-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}
.filmstrip-card {
    height: 200px !important;
}
.filmstrip-card h3 {
    font-size: 14px !important;
}
.container-slide[data-container="0"] .project-card {
    height: 230px !important;
}

  #projects .projects-carousel-mobile article {
    min-height: 400px;
    max-width: 320px;
  }

  .project-card-container {
    width: 320px;
    height: 280px;
  }
}
