/**
 * Timeline/Journey Component Styles
 * Vertical timeline with years on left, content on right
 */

.edmark-timeline-wrapper {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 20px;
}

.edmark-timeline {
    position: relative;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, transparent 0%, #e5e7eb 10%, #e5e7eb 90%, transparent 100%);
    transform: translateX(-50%);
    z-index: 0;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 50px;
    width: 100%;
    max-width: 1100px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-year {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
    transition: all 0.3s ease;
    text-align: center;
    min-width: 100px;
}

.timeline-item-right .timeline-year {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    margin-right: 0;
}

.timeline-item-left .timeline-year {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    align-self: center;
    margin-left: 0;
}

.timeline-item:hover .timeline-year {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.timeline-marker {
    order: 2;
    flex-shrink: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-item-right .timeline-content {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
}

.timeline-item-left .timeline-content {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
}

.timeline-icon {
    width: 24px;
    height: 24px;
    background: #fff;
    border: 3px solid #ef4444;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-icon {
    transform: scale(1.15);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.15);
}

.timeline-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
}

.timeline-content {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #f1f3f5;
    text-align: left;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.timeline-title {
    font-size: 21px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 14px 0;
    line-height: 1.4;
}

.timeline-description {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.7;
    margin: 0;
}

.timeline-description p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .timeline-item {
        gap: 20px;
    }
    
    .timeline-year {
        font-size: 16px;
        padding: 12px 24px;
        min-width: 100px;
        margin-left: 15px !important;
    }
}

@media (max-width: 768px) {
    .edmark-timeline-wrapper {
        padding: 0 20px;
        margin: 40px auto;
    }
    
    .edmark-timeline {
        padding: 20px 0;
        align-items: flex-start;
    }
    
    .timeline-line {
        left: 12px;
    }
    
    .timeline-item {
        display: block;
        margin-bottom: 24px;
        padding-left: 16px;
        position: relative;
        width: 100%;
        max-width: 100%;
    }
    
    .timeline-item-left,
    .timeline-item-right {
        display: block;
    }
    
    .timeline-marker {
        position: absolute;
        left: 0;
        top: 10px;
        transform: none;
    }
    
    .timeline-icon {
        width: 20px;
        height: 20px;
        border-width: 2px;
    }
    
    .timeline-icon::after {
        width: 6px;
        height: 6px;
    }
    
    .timeline-year {
        display: inline-block;
        margin-bottom: 15px;
        font-size: 14px;
        padding: 10px 20px;
        min-width: auto;
        width: auto;
        box-shadow: 0 3px 12px rgba(239, 68, 68, 0.2);
        margin-left: 15px !important;
    }
    
    .timeline-item-right .timeline-year,
    .timeline-item-left .timeline-year {
        grid-column: unset;
        grid-row: unset;
        justify-self: unset;
        align-self: unset;
        margin-left: 0;
        margin-right: 0;
    }
    
    .timeline-content {
        display: block;
        padding: 20px;
        margin-left: 0;
        margin-top: 0;
        width: 80%;
        margin-left: 16px;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }
    
    .timeline-item-right .timeline-content,
    .timeline-item-left .timeline-content {
        grid-column: unset;
        grid-row: unset;
        align-self: unset;
    }
    
    .timeline-title {
        font-size: 16px;
        margin-bottom: 10px;
        font-weight: 700;
    }
    
    .timeline-description {
        font-size: 14px;
        line-height: 1.65;
        color: #6b7280;
    }
}

@media (max-width: 480px) {
    .timeline-year {
        font-size: 14px;
        padding: 8px 20px;
        margin-left: 15px !important;
    }
    
    .timeline-content {
        padding: 20px;
        margin-left: 15px;
    }
    
    .timeline-title {
        font-size: 16px;
    }
    
    .timeline-description {
        font-size: 13px;
    }
    
    .timeline-icon {
        width: 20px;
        height: 20px;
        border-width: 2px;
    }
    
    .timeline-icon::before {
        width: 6px;
        height: 6px;
    }
}
