/* ===================================
   TIMELINE & SCROLL SECTIONS
   =================================== */

/* Scroll Timeline Section */
.scroll-timeline-section {
    background-image: url('../images/gland.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.scroll-timeline-container {
    display: grid;
    grid-template-columns: 30% 70%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Year Display - Sticky */
.timeline-year-display {
    position: -webkit-sticky; /* For Safari */
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-right: 3px solid var(--yellow);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease;
}

/* Background images for different sections */
.timeline-year-display[data-bg="story"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/aboutus/story.webp');
}

.timeline-year-display[data-bg="2020"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/aboutus/lockdown.webp');
}

.timeline-year-display[data-bg="2021"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/aboutus/DIY.webp');
}

.timeline-year-display[data-bg="2022"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/aboutus/city.webp');
}

.timeline-year-display[data-bg="2023"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/aboutus/buzz.webp');
}

.timeline-year-display[data-bg="2024"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/aboutus/heart.webp');
}

.timeline-year-display[data-bg="2025"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/aboutus/cooking.webp');
}

.timeline-dots {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

/* Hide scrollbar */
.timeline-content-display::-webkit-scrollbar {
    display: none;
}

.timeline-content-display {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.current-year {
    font-family: 'Proxima Nova Black', 'Proxima Nova', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    color: var(--white);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.current-year.changing {
    transform: translateY(-20px);
    opacity: 0;
}

/* Content Display - Normal Scroll Flow */
.timeline-content-display {
    padding: 0 4rem;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

.timeline-slide {
    min-height: 100vh; /* Each slide takes full viewport height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem 0;
    opacity: 0; /* Initially hidden */
    transform: translateY(50px); /* Start slightly lower */
    transition: opacity 0.8s ease, transform 0.8s ease;
    scroll-snap-align: start;
}

.timeline-slide.is-visible {
    opacity: 1; /* Fade in when visible */
    transform: translateY(0); /* Slide in from bottom */
}

.timeline-image-placeholder {
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--yellow);
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.timeline-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

.timeline-text {
    color: var(--white);
    width: 100%;
    max-width: 800px;
}

.timeline-text h3 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--yellow);
    margin-bottom: 2rem;
    font-family: 'Proxima Nova', sans-serif;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.timeline-text p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.7;
    color: var(--white);
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.timeline-text p:last-child {
    margin-bottom: 0;
}

/* Hero Content within Timeline */
.timeline-hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    height: 100%;
    color: var(--white);
    grid-column: 1 / -1; /* Span full width */
}

.timeline-hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    color: var(--yellow);
    margin-bottom: 2rem;
    font-family: 'Proxima Nova', sans-serif;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.timeline-hero-content p {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    line-height: 1.6;
    color: var(--white);
    margin-bottom: 3rem;
    max-width: 600px;
    opacity: 0.95;
}

.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: gentle-bounce 2s ease-in-out infinite;
}

.scroll-hint span {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: var(--yellow);
    font-weight: 600;
}

.scroll-arrow {
    font-size: 2rem;
    color: var(--yellow);
    font-weight: bold;
}

.timeline-title {
    font-size: 2.2rem;
    margin-bottom: 2rem;
}

.timeline::before {
    left: 30px;
    width: 3px;
    background: var(--accent);
}

.timeline-item {
    margin-bottom: 3rem;
    flex-direction: row !important;
    justify-content: flex-start !important;
}

.timeline-item:nth-child(odd),
.timeline-item:nth-child(even) {
    flex-direction: row;
    justify-content: flex-start;
}

.timeline-year {
    font-size: 1rem;
    padding: 0.8rem 1rem;
    min-width: 60px;
    position: static;
    transform: none;
    margin-right: 1.5rem;
    border: 2px solid var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.timeline-year::before,
.timeline-year::after {
    display: none;
}

.timeline-content {
    max-width: none;
    padding: 1.5rem;
    padding: 1.5rem;
    border-left: 3px solid var(--primary-green);
}

.timeline-content h3 {
    font-size: 1.3rem;
}

.timeline-content p {
    font-size: 1rem;
}

.timeline-year {
    font-size: 1rem;
    padding: 6px 14px;
    margin-bottom: 1rem;
}

.timeline-section {
    padding: 60px 0;
}

.timeline-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.mobile-slide-content {
    padding: 2rem 1.5rem;
    max-width: 340px;
}

.mobile-year {
    font-size: 1.5rem;
    padding: 0.4rem 1.2rem;
}

.mobile-slide h3 {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
}

.mobile-slide p {
    font-size: 0.95rem;
}

/* Blog Post Section */
.blog-post-section {
    background-image: url('../images/gland.webp') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .scroll-timeline-container {
        grid-template-columns: 1fr;
        height: 100vh;
        overflow: hidden;
    }
    
    .timeline-year-display {
        display: block;
        position: fixed;
        top: 90px;
        right: 0;
        height: auto;
        width: 120px;
        background: rgba(21, 21, 21, 0.9);
        backdrop-filter: blur(10px);
        z-index: 10;
        padding: 0.75rem;
        text-align: center;
        border: 2px solid var(--yellow);
        border-right: none;
        border-radius: 12px 0 0 12px;
    }

    .current-year {
        font-size: 1.2rem;
        color: var(--yellow);
        font-weight: 700;
    }
    
    .timeline-dots {
        display: none;
    }
    
    .timeline-content-display {
        padding: 0;
        height: 100vh;
        overflow-y: scroll;
        scroll-snap-type: y mandatory;
        scroll-behavior: smooth;
    }
    
    .timeline-slide {
        position: relative;
        width: 100vw;
        height: 100vh; /* Full viewport height for snap scrolling */
        margin-left: calc(-50vw + 50%);
        padding: 0;
        border-radius: 0;
        overflow: hidden;
        scroll-snap-align: start;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
    }
    
    /* Mobile specific background images for each slide */
    .timeline-slide[data-year="STORY"],
    .timeline-slide[data-year=""] {
        background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('../images/aboutus/story.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    .timeline-slide[data-year="2020"] {
        background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('../images/aboutus/lockdown.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    .timeline-slide[data-year="2021"] {
        background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('../images/aboutus/DIY.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    .timeline-slide[data-year="2022"] {
        background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('../images/aboutus/city.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    .timeline-slide[data-year="2023"] {
        background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('../images/aboutus/buzz.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    .timeline-slide[data-year="2024"] {
        background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('../images/aboutus/heart.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    .timeline-slide[data-year="2025"] {
        background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('../images/aboutus/cooking.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    /* Text overlay positioned at very bottom of the image */
    .timeline-text {
        width: 100%;
        padding: 1rem 1.5rem 6rem 1.5rem;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
        color: var(--white);
        z-index: 2;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
    }
    
    .timeline-text h3 {
        color: var(--bright-yellow);
        margin-bottom: 1rem;
        font-size: 1.8rem;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    }
    
    .timeline-text p {
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
        line-height: 1.6;
    }
    
    .scroll-arrow-animated {
        display: inline-block;
        animation: bounceArrow 2s ease-in-out infinite;
        margin-left: 0.5rem;
    }
    
    @keyframes bounceArrow {
        0%, 20%, 50%, 80%, 100% {
            transform: translateY(0);
        }
        40% {
            transform: translateY(-8px);
        }
        60% {
            transform: translateY(-4px);
        }
    }
    
    .timeline-image-placeholder {
        height: 250px;
    }
    
    .timeline-text h3 {
        font-size: 1.8rem;
    }
    
    .timeline-hero-content {
        min-height: 80vh; /* Ensure hero is substantial on mobile */
    }
}

@media (max-width: 480px) {
    .timeline-section {
        padding: 60px 0;
    }
    
    .timeline-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .mobile-slide-content {
        padding: 2rem 1.5rem;
        max-width: 340px;
    }
    
    .mobile-year {
        font-size: 1.5rem;
        padding: 0.4rem 1.2rem;
    }
    
    .mobile-slide h3 {
        font-size: 1.2rem;
        margin-bottom: 1.2rem;
    }
    
    .mobile-slide p {
        font-size: 0.95rem;
    }
}