/* Prudencia Timeline - Scrollytelling Feature */

.timeline-section {
    position: relative;
    height: 700vh; /* 7x viewport height for scroll-based animation */
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
}

.timeline-container {
    position: sticky;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
}

.timeline-title {
    position: absolute;
    top: clamp(5%, 8vh, 10%);
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cinzel', serif;
    font-size: clamp(1.5rem, 5vw, 4rem);
    font-weight: 700;
    color: #7fbfb0;
    letter-spacing: clamp(0.1em, 0.5vw, 0.3em);
    text-shadow: 0 0 20px rgba(184, 149, 106, 0.5);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 0 1rem;
    text-align: center;
    white-space: nowrap;
}

.timeline-title.visible {
    opacity: 1;
}

.timeline-scroll-hint {
    position: absolute;
    bottom: clamp(3%, 5vh, 5%);
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.7rem, 2.5vw, 1rem);
    color: var(--secondary-color);
    letter-spacing: clamp(0.1em, 0.3vw, 0.2em);
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 10;
    padding: 0 1rem;
    text-align: center;
}

.timeline-scroll-hint.visible {
    opacity: 0.7;
}

.timeline-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.timeline-wrapper::before,
.timeline-wrapper::after,
.timeline-container::before,
.timeline-container::after {
    display: none !important;
}

.timeline-track {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 700%; /* Wide enough for all milestones */
    height: 2px;
    background: linear-gradient(to right, 
        rgba(127, 191, 176, 0.2) 0%, 
        rgba(127, 191, 176, 0.6) 50%, 
        rgba(127, 191, 176, 0.2) 100%);
    transition: transform 0.1s ease-out;
}

.timeline-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(to right, 
        var(--secondary-color),
        var(--accent-color));
    box-shadow: 0 0 20px rgba(127, 191, 176, 0.6);
    width: 0%;
    transition: width 0.1s ease-out;
    display: none; /* Hidden as requested */
}

.timeline-bike {
    position: absolute;
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(40px, 10vw, 80px);
    height: clamp(25px, 6vw, 50px);
    z-index: 20;
    transition: transform 0.1s ease-out;
    filter: drop-shadow(0 5px 15px rgba(127, 191, 176, 0.4));
}

.timeline-bike svg {
    width: 100%;
    height: 100%;
}

/* SVG Bicycle Design */
.bike-frame {
    fill: none;
    stroke: var(--secondary-color);
    stroke-width: 2;
}

.bike-wheel {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 2;
}

.bike-seat {
    fill: var(--secondary-color);
}

.timeline-milestones {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 500%;
    height: 100%;
    transition: transform 0.1s ease-out;
}

.milestone {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.milestone-node {
    width: clamp(16px, 3vw, 20px);
    height: clamp(16px, 3vw, 20px);
    border-radius: 50%;
    background: rgba(127, 191, 176, 0.3);
    border: clamp(2px, 0.5vw, 3px) solid var(--secondary-color);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(127, 191, 176, 0.3);
}

.milestone.active .milestone-node {
    width: clamp(24px, 4.5vw, 30px);
    height: clamp(24px, 4.5vw, 30px);
    background: var(--accent-color);
    box-shadow: 0 0 30px rgba(136, 204, 192, 0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(136, 204, 192, 0.6);
    }
    50% {
        box-shadow: 0 0 40px rgba(136, 204, 192, 1);
    }
}

.milestone-content {
    position: absolute;
    top: clamp(40px, 8vh, 60px);
    min-width: clamp(160px, 40vw, 250px);
    max-width: clamp(220px, 50vw, 300px);
    padding: clamp(12px, 3vw, 20px);
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-radius: clamp(10px, 2vw, 15px);
    border: 1px solid rgba(127, 191, 176, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.milestone.active .milestone-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.milestone-year {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 700;
    color: #b8956a;
    margin-bottom: clamp(5px, 1.5vw, 10px);
    text-shadow: 0 0 10px rgba(184, 149, 106, 0.3);
}

.milestone-edition {
    font-family: 'Times New Roman', serif;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: clamp(0.05em, 0.2vw, 0.1em);
    margin-bottom: clamp(5px, 1.5vw, 10px);
}

.milestone-description {
    font-family: 'Times New Roman', serif;
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: clamp(10px, 2vw, 15px);
}

.milestone-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(6px, 1.5vw, 10px);
    margin-top: clamp(10px, 2vw, 15px);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(6px, 1.5vw, 8px);
    background: rgba(127, 191, 176, 0.1);
    border-radius: clamp(6px, 1.5vw, 8px);
}

.stat-value {
    font-family: 'Times New Roman', serif;
    font-size: clamp(1rem, 3vw, 1.3rem);
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    font-family: 'Times New Roman', serif;
    font-size: clamp(0.65rem, 1.8vw, 0.75rem);
    color: #999;
    text-transform: uppercase;
    margin-top: 3px;
}

.milestone-image {
    width: 100%;
    height: 150px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 15px;
    border: 1px solid rgba(127, 191, 176, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline-section {
        height: 900vh; /* More scroll space on mobile */
    }
}

@media (max-width: 480px) {
    .timeline-section {
        height: 1000vh; /* Even more scroll space on small devices */
    }
    
    .timeline-title {
        letter-spacing: 0.15em;
        word-spacing: 0.3em;
    }
}

@media (max-width: 375px) {
    .timeline-section {
        height: 1100vh; /* Maximum scroll space for very small devices */
    }
    
    .milestone-stats {
        grid-template-columns: 1fr;
    }
    
    .milestone-content {
        left: 50%;
        transform: translateX(-50%);
    }
}
