/* Software Evolution Section */
.software-evolution {
    padding: 80px 0;
    background: 
        linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%),
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
    position: relative;
    overflow: hidden;
}

.evolution-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.evolution-header {
    text-align: center;
    margin-bottom: 80px;
}

.evolution-header h2 {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1.2;
}

.evolution-header p {
    font-size: 1.3rem;
    color: #64748b;
    font-weight: 500;
    max-width: 700px;
    margin: 0 auto;
}

/* Timeline - Desktop: alternating left/right layout */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 0;
}

/* Central line through the middle */
.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    top: 0;
    left: 50%;
    margin-left: -2px;
    height: 100%;
    border-radius: 2px;
    z-index: 1;
}

/* Progress line */
.timeline-progress {
    position: absolute;
    width: 4px;
    background: linear-gradient(135deg, #4527A0, #00BFA5);
    top: 0;
    left: 50%;
    margin-left: -2px;
    height: 0%;
    border-radius: 2px;
    z-index: 2;
    transition: height 0.3s ease;
}

/* Desktop: Items alternating left/right */
.timeline-item {
    padding: 0;
    margin-bottom: 100px;
    position: relative;
    display: flex;
    width: 100%;
}

.timeline-item:nth-child(odd) {
    justify-content: flex-end; /* Right side */
}

.timeline-item:nth-child(even) {
    justify-content: flex-start; /* Left side */
}

/* Desktop: Timeline marker on the center line */
.timeline-marker {
    position: absolute;
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 20; /* Higher z-index to be above the line */
}

/* Desktop: Content positioning - Truly equal spacing */
.timeline-content {
    display: block;
    max-width: 420px;
    padding: 30px;
    width: 100%;
    border-radius: 20px;
    border: 2px solid #e2e8f0;
    background: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 5;
    text-align: left;
}

/* Right cards - 120px from center */
.timeline-item:nth-child(odd) .timeline-content {
    margin-right: calc(50% + 120px);
}

/* Left cards - 120px from center */  
.timeline-item:nth-child(even) .timeline-content {
    margin-left: calc(50% + 120px);
}

/* Tablet/Mobile: Centered layout - Switch earlier at 1200px */
@media (max-width: 1200px) {
    .timeline {
        max-width: 800px;
    }
    
    /* Override desktop alternating layout */
    .timeline-item {
        padding: 0 !important;
        text-align: center !important;
        display: block !important;
        justify-content: unset !important;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding: 0 !important;
        text-align: center !important;
        display: block !important;
        justify-content: unset !important;
    }
    
    /* Marker centered above cards for tablet/mobile */
    .timeline-marker {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        margin-bottom: 30px;
        gap: 20px;
        z-index: 10;
    }
    
    /* Content centered for tablet/mobile */
    .timeline-content {
        display: block;
        margin: 0 auto !important;
        max-width: 500px;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin: 0 auto !important;
    }
}

.timeline-icon {
    width: 90px;
    height: 90px;
    background: white !important; /* Force white background */
    border: 5px solid #B0BEC5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.5s ease;
    margin-bottom: 20px;
    position: relative;
    z-index: 25; /* Very high z-index to be above everything */
}

.timeline-icon::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: white;
    border-radius: 50%;
    z-index: -1; /* Behind the icon but above the line */
}

.timeline-icon.progress-reached {
    border-color: #4527A0;
    box-shadow: 
        0 8px 30px rgba(69, 39, 160, 0.3),
        0 0 0 2px rgba(69, 39, 160, 0.2);
    background: linear-gradient(135deg, rgba(69, 39, 160, 0.1), rgba(0, 191, 165, 0.1));
}

.phase-1 .timeline-icon {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.phase-1 .timeline-icon.progress-reached {
    border-color: #ef4444;
    box-shadow: 
        0 8px 30px rgba(239, 68, 68, 0.3),
        0 0 0 2px rgba(239, 68, 68, 0.2);
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.phase-2 .timeline-icon {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

.phase-2 .timeline-icon.progress-reached {
    border-color: #f59e0b;
    box-shadow: 
        0 8px 30px rgba(245, 158, 11, 0.3),
        0 0 0 2px rgba(245, 158, 11, 0.2);
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

.phase-3 .timeline-icon {
    border-color: #00BFA5;
    background: linear-gradient(135deg, rgba(69, 39, 160, 0.1), rgba(0, 191, 165, 0.1));
    animation: currentEraGlow 2s ease-in-out infinite;
}

.phase-3 .timeline-icon.progress-reached {
    border-color: #00BFA5;
    box-shadow: 
        0 8px 30px rgba(0, 191, 165, 0.4),
        0 0 0 2px rgba(0, 191, 165, 0.3);
    background: linear-gradient(135deg, rgba(69, 39, 160, 0.1), rgba(0, 191, 165, 0.1));
}

@keyframes currentEraGlow {
    0%, 100% { 
        box-shadow: 0 8px 30px rgba(0, 191, 165, 0.2);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 12px 40px rgba(0, 191, 165, 0.4);
        transform: scale(1.05);
    }
}

.timeline-icon svg {
    width: 40px;
    height: 40px;
    color: #64748b;
    transition: all 0.3s ease;
}

.phase-1 .timeline-icon svg {
    color: #ef4444;
}

.phase-2 .timeline-icon svg {
    color: #f59e0b;
}

.phase-3 .timeline-icon svg {
    color: #00BFA5;
}

.timeline-year {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #4527A0, #00BFA5);
    padding: 10px 18px;
    border-radius: 25px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(69, 39, 160, 0.3);
    position: relative;
    z-index: 25;
}

/* Timeline Cards - Base styles (positioning handled above) */

.timeline-content::before {
    content: '';
    /*position: absolute;*/
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    transition: all 0.4s ease;
}

.phase-1 .timeline-content::before {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.phase-2 .timeline-content::before {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.phase-3 .timeline-content::before {
    background: linear-gradient(135deg, #4527A0, #00BFA5);
}

.phase-3 .timeline-content {
    background: linear-gradient(135deg, rgba(69, 39, 160, 0.05), rgba(0, 191, 165, 0.05));
    border: 3px solid transparent;
    background-clip: padding-box;
    box-shadow: 
        0 25px 80px rgba(69, 39, 160, 0.15),
        0 12px 40px rgba(0, 191, 165, 0.1),
        inset 0 0 0 1px rgba(69, 39, 160, 0.1);
    position: relative;
    overflow: hidden;
}

.phase-3 .timeline-content::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #4527A0, #00BFA5, #3730a3);
    border-radius: 26px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        background: linear-gradient(135deg, #4527A0, #00BFA5);
        opacity: 0.6;
    }
    50% {
        background: linear-gradient(135deg, #00BFA5, #3730a3, #4527A0);
        opacity: 0.8;
    }
}

.timeline-content:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.15),
        0 15px 40px rgba(0, 0, 0, 0.1);
}

.phase-3 .timeline-content:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 
        0 35px 100px rgba(69, 39, 160, 0.25),
        0 20px 60px rgba(0, 191, 165, 0.15);
}

.timeline-content h3 {
    font-size: 1.7rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 18px;
    line-height: 1.3;
    background: linear-gradient(135deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.phase-3 .timeline-content h3 {
    background: linear-gradient(135deg, #4527A0, #00BFA5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
}

.timeline-content p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 28px;
    font-size: 1.05rem;
    font-weight: 400;
}

.phase-3 .timeline-content p {
    color: #4527A0;
    font-weight: 500;
}

/* Characteristics */
.phase-characteristics {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.characteristic {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 18px;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.characteristic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.characteristic:hover::before {
    left: 100%;
}

.characteristic.positive {
    color: #15803d;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 101, 52, 0.05));
    border: 2px solid rgba(34, 197, 94, 0.2);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.1);
}

.characteristic.negative {
    color: #dc2626;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
    border: 2px solid rgba(239, 68, 68, 0.2);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1);
}

.characteristic.neutral {
    color: #d97706;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
    border: 2px solid rgba(245, 158, 11, 0.2);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.characteristic svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.characteristic:hover {
    transform: translateX(6px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
} 

/* Additional responsive adjustments for mobile */
@media (max-width: 768px) {
    .software-evolution {
        padding: 60px 0;
    }
    
    .evolution-container {
        padding: 0 20px;
    }
    
    .evolution-header {
        margin-bottom: 60px;
    }
    
    .evolution-header h2 {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .evolution-header p {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .timeline {
        padding: 20px 0;
    }
    
    .timeline-item {
        margin-bottom: 80px;
    }
    
    .timeline-content {
        padding: 24px;
        max-width: 400px;
    }
    
    .timeline-content h3 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }
    
    .timeline-content p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 16px;
    }
    
    .timeline-marker {
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .timeline-icon {
        width: 65px;
        height: 65px;
    }
    
    .timeline-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .timeline-year {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    
    .characteristic {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .characteristic svg {
        width: 16px;
        height: 16px;
    }
}


    
    .timeline-content h3 {
        font-size: 1.3rem;
    }
    
    .timeline-content p {
        font-size: 0.95rem;
    }
    
    .timeline-marker {
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .timeline-icon {
        width: 60px;
        height: 60px;
    }
    
    .timeline-icon svg {
        width: 26px;
        height: 26px;
    }
    
    .timeline-year {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
    
    .characteristic {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .characteristic svg {
        width: 14px;
        height: 14px;
    }
} 