/* ============================================
   1. GLOBAL / BASE
============================================ */
#projects {
    position: relative;
    background: #103946;
    overflow: visible;
    isolation: isolate;
}
#projects .sticky {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.project-back {
    width: 100vw;
    height: 100vh;
}
.projects-title {
    opacity: 0;
}
h2.projects-title {
    max-width: 300px;
}
/* ============================================
   2. CAROUSEL WRAPPER & TRACK
============================================ */
.carousel-wrapper {
    position: relative;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
    opacity: 0;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: opacity, transform;
    z-index: 10;
}
.carousel-wrapper.visible {
    opacity: 1;
}
#carouselTrack,
.carousel-track {
    display: flex;
    width: 200%;
    height: 100%;
    transform: translate3d(0,0,0);
    backface-visibility: hidden;
    will-change: transform;
    position: relative;
    z-index: 120;
}
/* ============================================
   3. CONTAINER SLIDES
============================================ */
.container-slide {
    flex: 0 0 50%;
    width: 50%;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    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
============================================ */
.project-card {
    position: absolute;
    border-radius: 2rem;
    overflow: hidden;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform, width, height, left, top, opacity;
}
.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);
}
#projects article.group img {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #1a4d5f;
}
#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));
}
#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;
}
#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
============================================ */
.filmstrip-viewport {
    position: relative;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    transform: translateZ(0);
    backface-visibility: hidden;
}
#filmstripTrack,
.filmstrip-track {
    display: flex;
    align-items: center;
    gap: 24px;
    width: max-content;
    transform: translate3d(0,0,0);
    backface-visibility: hidden;
    will-change: transform;
}
.filmstrip-card {
    position: relative !important;
    top: 10% !important;
    left: auto !important;
    flex-shrink: 0;
    width: 160px !important;
    height: 80% !important;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform, opacity;
}
/* ============================================
   7. CONTAINER 1 TITLE
============================================ */
.container1-title , .container1-title-2 {
    position: absolute;
    top: 30px;
    left: 60px;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    text-align: left;
    z-index: 100;
    pointer-events: none;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: opacity;
    height: 130px;
}
.container1-title-2 {
    top: unset !important;
    bottom: 65px !important;
    color: var(--sn-warm-gray);
    height: 30px;
}
.container1-title > * {
    text-align: left;
}
.container1-title h2 {
    color: var(--sn-peach);

}
.container1-title p, .container1-title b {
    margin: 0;
    color: var(--sn-warm-gray);
}
/* ============================================
   8. VIEW MORE BUTTON
============================================ */
#loadMoreProjects {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 14px 32px;
    border: 1px solid var(--sn-green);
    border-radius: 999px;
    background: var(--sn-deep-teal);
    color: var(--sn-green);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    position: absolute;
    right: 60px;
    z-index: 110;
    box-shadow: 0 0 10px 1px var(--sn-green);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
#loadMoreProjects:hover {
    background: var(--sn-green);
    color: var(--sn-deep-teal);
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(183,255,74,0.25);
}
#loadMoreProjects:active {
    transform: translateY(-1px) scale(0.98);
}
#loadMoreProjects:focus-visible {
    outline: 2px solid var(--sn-cream);
    outline-offset: 4px;
}
#loadMoreProjects::after {
    content: "↓";
    font-size: 18px;
    line-height: 1;
    transition: transform 0.3s ease;
}
#loadMoreProjects:hover::after {
    transform: translateY(3px);
}
/* ============================================
   9. SLIDE INDICATORS
============================================ */
.slide-indicator .dot {
    cursor: pointer;
    transition: all 0.3s ease;
}
.slide-indicator .dot.active {
    width: 24px;
    background: #caa46c;
    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);
}
/* ============================================
   10. PLUS INDICATOR
============================================ */
.plus-indicator {
    position: fixed;
    bottom: 40px;
    left: 50%;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    background: rgba(16,57,70,0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transition: opacity 0.5s cubic-bezier(0.34,1.56,0.64,1), transform 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.plus-indicator.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.plus-indicator .plus-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(202,164,108,0.2);
    border-radius: 50%;
    background: rgba(202,164,108,0.15);
    color: #caa46c;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
}
.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;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
}
.plus-indicator .plus-progress {
    width: 0%;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg,#caa46c,#e8c39a);
    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 {
    border-color: #caa46c;
    background: #caa46c;
    color: #103946;
}
/* ============================================
   11. 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;
}
/* ============================================
   12. SCROLL CUE
============================================ */
.scroll-cue-h {
    left: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100vw;
    height: 41px;
}
.main-scroll-cue-h {
    height: 100%;
    margin: 0 auto;
    padding: 0 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);
    border-radius: 35px;
    backdrop-filter: blur(20px);
}
.scroll-cue-h span {
    display: block;
    width: 40px;
    height: 1.5px;
    margin: 0;
    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%);
}
.scroll-cue-h strong {
    padding: 0 16px;
    font-size: 10px;
    letter-spacing: 3px;
}

/* ============================================
   14. MOBILE CAROUSEL
============================================ */
#projects .projects-carousel-mobile {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
}
#projects .projects-carousel-mobile > div {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 100%;
    min-height: 100vh;
    padding: 0 20px;
    scroll-snap-align: start;
}
#projects .projects-carousel-mobile article {
    position: relative;
    width: 100%;
    max-width: 380px;
    min-height: 480px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 2rem;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(20px);
    box-shadow: 0 40px 120px rgba(0,0,0,0.45);
}
#projects .projects-carousel-mobile article img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* ============================================
   15. DESKTOP CAROUSEL
============================================ */
#projects .projects-carousel {
    display: flex;
    align-items: center;
    width: 330vw;
    height: 100vh;
    transform: translateZ(0);
    will-change: transform;
}
#projects .article-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 100vw;
    height: 100vh;
}

@media (max-width: 1200px) {
    .filmstrip-card {
        top: 3% !important;
    }
}

@media (max-width: 900px) {
    .container1-title-2 {
        bottom: 105px;
    }
}
/* ============================================
   17. TABLET
============================================ */
@media (max-width: 768px) {

    .container1-title-2 {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
        margin-top: 15px !important;
    }
    #projects {
        height: auto !important;
        overflow: visible;
    }
    #projects .sticky {
        position: relative;
        height: auto;
        overflow: visible;
    }
    #projects .projects-carousel {
        display: none !important;
    }
    #projects .projects-carousel-mobile {
        display: flex !important;
    }
    #projects .projects-header {
        position: relative;
        padding-top: 0;
    }
    .carousel-wrapper {
        position: relative !important;
        height: auto !important;
        overflow: visible !important;
        opacity: 1 !important;
        transform: none !important;
        will-change: auto;
    }
    #carouselTrack,
    .carousel-track {
        display: block !important;
        width: 100% !important;
        transform: none !important;
        will-change: auto;
        padding: 30px 40px !important;
    }
    #carouselTrack > .container-slide {
        width: 50%;
        flex: 0 0 50%;
    }
    .container-slide {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 30px 40pxg !important;
    }
    #loadMoreProjects {
        display: none !important;
    }
    .container-slide .project-card-container {
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 700px;
        padding: 0;
        gap: 20px !important;
    }
    .container-slide[data-container="0"] .project-card {
        position: static !important;
        top: 0 ;
        right: 0 ;
        left: 0 ;
        width: 100% !important;
        height: 340px ;
        transform: none !important;
        will-change: auto;
        margin-bottom: 25px !important;
    }
    .filmstrip-card {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 24% !important;
        height: 250px !important;
        will-change: auto;
    }
    #filmstripTrack, .filmstrip-track {
        gap: 10px 1% !important;
    }
    .filmstrip-card , .filmstrip-card article  {
        border-radius: 10px;
    }
    .gallery-flag-wrapper + p {
        font-size: 7px;
        transform: rotate(90deg);
        position: absolute;
        top: -60px;
    }
    #filmstripTrack {
        flex-direction: row !important;
        flex-wrap: wrap;
        width: 100%;
        max-width: 100%;
        margin: 0 auto !important;
        transform: none !important;
        will-change: auto;
    }
    .container1-title {
        position: relative;
        top: auto;
        left: 0;
        width: 100%;
        margin-bottom: 50px;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none;
    }
    .container1-title-2 p {
        max-width: 100% !important;
    }
    #loadMoreProjects {
        position: relative;
        right: auto;
        margin: 20px auto;
    }
    .card-number {
        display: none !important;
    }
    .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 {
        width: 420px;
        height: 380px;
    }
    .pin-spacer {
        padding: 0 !important;
    }
    .scroll-cue-h {
        display: none;
    }
    #projects .project-back {
        position: static !important;
        height: auto !important;
    }
    .projects-title {
        opacity: 1;
    }
    #modal-projects {
        display: none;
        width: 100%;
    }
}
/* ============================================
   18. MOBILE
============================================ */
@media (max-width: 767px) {
    .filmstrip-card .project-card {
        width: 48% !important;
    }
    .container1-title h2 ,.container1-title p, .container1-title-2 p {
        text-align: left;
    }
    .container1-title b {
        text-align: left;
        width: 100%;
        display: block;
    }
    #filmstripTrack {
        padding: 0;
    }
    #projects .projects-header {
        left: 0 !important;
    }
}
@media (max-width: 650px) {
    .modal-projects > div {
        height: 98% !important;
    }
    .close-modal-btn + div.overflow-hidden {
        max-height: 300px;
    }
    .container-slide[data-container="0"] .project-card {
        height: 250px !important;
    }
    .container1-title {
        height: auto !important;
    }
}
@media (max-width: 480px) {
    #carouselTrack, .carousel-track {
        padding: 0 !important;
    }
    .container-slide {
        padding: 25px 20px !important;
    }
    .gallery-flag-wrapper + p {
        right: auto !important;
    }
    #filmstripTrack,
    .container-slide .project-card-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    .filmstrip-card {
        height: 220px !important;
    }
    .filmstrip-card h3 {
        font-size: 14px !important;
    }
    .container-slide[data-container="0"] .project-card {
        width: 100% !important;
        height: 230px !important;
        position: static !important;
    }
    #projects .projects-carousel-mobile article {
        min-height: 400px;
        max-width: 320px;
    }
    .project-card-container {
        width: 320px ;
        height: 280px;
    }
}
/* ============================================
   19. PERFORMANCE / REDUCED MOTION
============================================ */
@media (prefers-reduced-motion: reduce) {
    .carousel-wrapper,
    #carouselTrack,
    .carousel-track,
    #filmstripTrack,
    .filmstrip-track,
    .project-card,
    .filmstrip-card,
    .container1-title {
        transition: none !important;
        will-change: auto !important;
    }
}

