/* ========================================
   MODERN TIMELINE SECTION - REDESIGNED
   ======================================== */

.modern-timeline-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%, #f8f9fa 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* Wave Transition */
.timeline-wave-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 1;
}

.timeline-wave-top svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Modern Timeline Header */
.modern-timeline-header {
    text-align: center;
    margin-bottom: 5rem;
    position: relative;
    z-index: 2;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(76, 175, 80, 0.1);
    border: 2px solid rgba(76, 175, 80, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d5016;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.15);
    transition: all 0.4s ease;
}

.header-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.25);
    background: rgba(76, 175, 80, 0.15);
}

.header-badge i {
    color: #4CAF50;
    font-size: 1.1rem;
}

.timeline-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #2d5016;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(45, 80, 22, 0.1);
    letter-spacing: -1px;
}

.timeline-subtitle {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-subtitle p {
    font-size: 1.3rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.timeline-underline {
    width: 120px;
    height: 6px;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 50%, #4CAF50 100%);
    margin: 0 auto;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.timeline-underline::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(102, 187, 106, 0.1));
    border-radius: 22px;
    z-index: -1;
}

/* Timeline Container */
.modern-timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Central Timeline Line */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(to bottom, 
        rgba(76, 175, 80, 0.3) 0%, 
        #4CAF50 25%, 
        #66BB6A 50%, 
        #4CAF50 75%, 
        rgba(76, 175, 80, 0.3) 100%
    );
    transform: translateX(-50%);
    border-radius: 3px;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
    z-index: 1;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 25%;
    background: linear-gradient(to bottom, #FFD700, #FFA500);
    border-radius: 3px;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
    transition: height 2s ease-in-out;
}

/* Timeline Items */
.timeline-items {
    position: relative;
    z-index: 2;
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    min-height: 180px;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

/* Timeline Markers */
.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transition: all 0.5s ease;
}

.timeline-marker:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.timeline-marker.completed {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
}

.timeline-marker.upcoming {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border-color: #4CAF50;
}

.timeline-marker.future {
    background: linear-gradient(135deg, #9C27B0, #BA68C8);
    border-color: #9C27B0;
}

.marker-inner {
    position: relative;
    z-index: 2;
}

.marker-inner i {
    font-size: 1.8rem;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.marker-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: 0.6;
    z-index: 1;
}

.timeline-marker.completed .marker-glow {
    background: radial-gradient(circle, rgba(255, 215, 0, 0.4), transparent);
    animation: completedPulse 3s infinite;
}

.timeline-marker.upcoming .marker-glow,
.timeline-marker.future .marker-glow {
    background: radial-gradient(circle, rgba(76, 175, 80, 0.4), transparent);
}

.marker-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(76, 175, 80, 0.6);
    animation: pulse 2s infinite;
    z-index: 0;
}

@keyframes completedPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.3;
    }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.4;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Timeline Content */
.timeline-content {
    width: calc(50% - 60px);
    padding: 0 2rem;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
}

/* Timeline Cards */
.timeline-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 10px 20px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.timeline-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.15),
        0 15px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.8s ease;
    z-index: 1;
}

.timeline-card:hover::before {
    left: 100%;
}

/* Card Header */
.card-header {
    padding: 1.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.project-icon {
    width: 70px;
    height: 70px;
    min-width: 70px;
    min-height: 70px;
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.project-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 30px rgba(76, 175, 80, 0.4);
}

.project-icon i {
    font-size: 1.6rem;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.project-info {
    flex: 1;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d5016;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 3px rgba(45, 80, 22, 0.1);
}

.project-type {
    font-size: 0.9rem;
    color: #4CAF50;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Completion Badges */
.completion-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid;
    transition: all 0.3s ease;
}

.completion-badge.completed {
    background: rgba(255, 215, 0, 0.15);
    color: #B8860B;
    border-color: rgba(255, 215, 0, 0.3);
}

.completion-badge.upcoming {
    background: rgba(76, 175, 80, 0.15);
    color: #2d5016;
    border-color: rgba(76, 175, 80, 0.3);
}

.completion-badge.future {
    background: rgba(156, 39, 176, 0.15);
    color: #7B1FA2;
    border-color: rgba(156, 39, 176, 0.3);
}

.completion-badge:hover {
    transform: scale(1.05);
}

/* Card Body */
.card-body {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.timeline-year {
    font-size: 3rem;
    font-weight: 800;
    color: #4CAF50;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(76, 175, 80, 0.2);
    letter-spacing: -1px;
}

.completed .timeline-year {
    color: #FFD700;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.future .timeline-year {
    color: #9C27B0;
    text-shadow: 0 2px 10px rgba(156, 39, 176, 0.3);
}

.project-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 2rem;
    text-align: justify;
}

/* Project Stats */
.project-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(76, 175, 80, 0.1);
    padding: 0.7rem 1.2rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d5016;
    border: 1px solid rgba(76, 175, 80, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(76, 175, 80, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.stat-item i {
    color: #4CAF50;
    font-size: 1rem;
}

/* Background Elements */
.timeline-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    color: rgba(76, 175, 80, 0.1);
    font-size: 2rem;
    animation: floatElements 25s infinite ease-in-out;
}

.elem-1 {
    top: 15%;
    left: 8%;
    animation-delay: 0s;
}

.elem-2 {
    top: 45%;
    right: 12%;
    animation-delay: -8s;
}

.elem-3 {
    bottom: 25%;
    left: 15%;
    animation-delay: -16s;
}

.elem-4 {
    top: 70%;
    right: 8%;
    animation-delay: -12s;
}

@keyframes floatElements {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-25px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-15px) rotate(180deg);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-35px) rotate(270deg);
        opacity: 0.7;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .timeline-title {
        font-size: 3rem;
    }
    
    .timeline-card {
        margin: 0 1rem;
    }
}

@media (max-width: 992px) {
    .modern-timeline-container {
        max-width: 600px;
    }
    
    .timeline-content {
        width: calc(50% - 40px);
        padding: 0 1rem;
    }
    
    .timeline-marker {
        width: 60px;
        height: 60px;
    }
    
    .marker-inner i {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .modern-timeline-section {
        padding: 60px 0;
    }
    
    .timeline-title {
        font-size: 2.5rem;
    }
    
    .timeline-subtitle p {
        font-size: 1.1rem;
    }
    
    /* Mobile Timeline - Single Column */
    .timeline-line {
        left: 30px;
        transform: none;
    }
    
    .timeline-item {
        flex-direction: row !important;
        margin-bottom: 3rem;
    }
    
    .timeline-marker {
        left: 30px !important;
        transform: translateX(-50%);
        width: 50px;
        height: 50px;
    }
    
    .marker-inner i {
        font-size: 1.2rem;
    }
    
    .timeline-content {
        width: calc(100% - 80px) !important;
        margin-left: 80px !important;
        margin-right: 0 !important;
        padding: 0 1rem;
    }
    
    .card-header {
        padding: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .timeline-year {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .project-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Disable complex animations on mobile */
    .floating-element {
        display: none;
    }
    
    .timeline-card:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 576px) {
    .modern-timeline-header {
        margin-bottom: 3rem;
    }
    
    .timeline-title {
        font-size: 2rem;
    }
    
    .header-badge {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
    
    .timeline-line {
        left: 20px;
    }
    
    .timeline-marker {
        left: 20px !important;
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
    
    .marker-inner i {
        font-size: 1rem;
    }
    
    .timeline-content {
        width: calc(100% - 60px) !important;
        margin-left: 60px !important;
    }
    
    .card-header {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .project-icon {
        width: 65px;
        height: 65px;
        min-width: 65px;
        min-height: 65px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .project-icon i {
        font-size: 1.4rem;
    }
    
    .project-title {
        font-size: 1.2rem;
    }
    
    .timeline-year {
        font-size: 1.8rem;
    }
    
    .completion-badge {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}

/* Animation enhancements for desktop */
@media (min-width: 769px) {
    .timeline-item:hover .timeline-marker {
        transform: translateX(-50%) scale(1.15) rotate(10deg);
    }
    
    .timeline-item:hover .project-icon {
        transform: scale(1.1) rotate(-5deg);
    }
    
    .timeline-progress {
        animation: progressFill 3s ease-in-out 1s forwards;
    }
}

@keyframes progressFill {
    0% {
        height: 25%;
    }
    100% {
        height: 30%;
    }
}

/* Accessibility Improvements */
.timeline-card:focus,
.timeline-marker:focus {
    outline: 3px solid rgba(76, 175, 80, 0.5);
    outline-offset: 3px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .timeline-card,
    .timeline-marker,
    .project-icon,
    .floating-element {
        animation: none;
        transition: none;
    }
    
    .marker-pulse,
    .marker-glow {
        animation: none;
    }
}
