/* ====================================
   History Timeline Styles
   ==================================== */

.about-history-area {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.history-timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
    z-index: 2;
}

.history-timeline::before {
    content: '';
    position: absolute;
    top: 60px;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    opacity: 0.2;
    z-index: 1;
}

.timeline-start {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    z-index: 10;
}

.timeline-year-marker {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 80px 0 40px 0;
}

.timeline-year-marker:first-of-type {
    margin-top: 100px;
}

.timeline-year-marker span {
    position: relative;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: #fff;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 28px;
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.4);
    z-index: 10;
    letter-spacing: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 80px;
}

.timeline-item:first-of-type {
    margin-top: 100px;
}

.timeline-number-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    z-index: 15;
    border: 4px solid #fff;
}

.timeline-number-center span {
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    text-transform: uppercase;
    line-height: 1.2;
    padding: 0 5px;
}

.timeline-left .timeline-content {
    margin-right: auto;
    margin-left: 0;
    padding-right: 60px;
}

.timeline-right .timeline-content {
    margin-left: auto;
    margin-right: 0;
    padding-left: 60px;
}

.timeline-content {
    width: 48%;
    position: relative;
}

.timeline-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    position: relative;
}

.timeline-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
}

.timeline-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.timeline-card:hover .timeline-image img {
    transform: scale(1.1);
}

.timeline-info {
    padding: 25px;
}

.timeline-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.4;
}

.timeline-arrow {
    position: absolute;
    left: 50%;
    bottom: -50px;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    z-index: 10;
    animation: bounce 2s infinite;
}

.timeline-arrow i {
    color: #fff;
    font-size: 16px;
}

/* Connection lines from cards to center timeline */
.timeline-left .timeline-card::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -30px;
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-50%);
}

.timeline-right .timeline-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -30px;
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-50%);
}

/* Connection dots on the center timeline */
.timeline-left .timeline-card::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -45px;
    width: 15px;
    height: 15px;
    background: #667eea;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.2);
}

.timeline-right .timeline-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -45px;
    width: 15px;
    height: 15px;
    background: #764ba2;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 5px rgba(118, 75, 162, 0.2);
}

/* Bounce animation for arrows */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Timeline End Section */
.timeline-end {
    position: relative;
    text-align: center;
    margin-top: 80px;
    padding-top: 40px;
}

.timeline-end-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    animation: pulse 3s ease-in-out infinite;
}

.timeline-end-icon i {
    font-size: 35px;
    color: #fff;
}

.timeline-end-text {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.timeline-end-subtext {
    font-size: 16px;
    color: #666;
    font-weight: 400;
    font-style: italic;
}

/* Pulse animation for end icon */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 8px 40px rgba(102, 126, 234, 0.6);
    }
}

/* ====================================
   Responsive Styles
   ==================================== */

@media (max-width: 991px) {
    .history-timeline::before {
        left: 30px;
        transform: none;
    }
    
    .timeline-left .timeline-content,
    .timeline-right .timeline-content {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
        margin: 0;
    }
    
    .timeline-left .timeline-card::after,
    .timeline-right .timeline-card::after {
        left: -55px;
        right: auto;
        width: 40px;
    }
    
    .timeline-left .timeline-card::before,
    .timeline-right .timeline-card::before {
        left: -63px;
        right: auto;
    }
    
    .timeline-arrow {
        left: 30px;
        transform: translateX(-50%);
    }
    
    .timeline-start {
        left: 30px;
        transform: none;
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .timeline-year-marker {
        justify-content: flex-start;
        padding-left: 0;
    }
    
    .timeline-year-marker span {
        font-size: 22px;
        padding: 12px 30px;
        margin-left: 70px;
    }
    
    .timeline-number-center {
        left: 30px;
        transform: translateY(-50%);
        width: 65px;
        height: 65px;
    }
    
    .timeline-number-center span {
        font-size: 10px;
    }
    
    .timeline-end-icon {
        width: 70px;
        height: 70px;
    }
    
    .timeline-end-icon i {
        font-size: 28px;
    }
    
    .timeline-end-text {
        font-size: 22px;
    }
    
    .timeline-end-subtext {
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    .about-history-area {
        padding: 60px 0;
    }
    
    .timeline-image {
        height: 160px;
    }
    
    .timeline-info {
        padding: 20px;
    }
    
    .timeline-title {
        font-size: 18px;
    }
    
    .timeline-arrow {
        width: 40px;
        height: 40px;
    }
    
    .timeline-arrow i {
        font-size: 14px;
    }
    
    .timeline-number-center {
        width: 60px;
        height: 60px;
    }
    
    .timeline-number-center span {
        font-size: 10px;
    }
    
    .timeline-year-marker span {
        font-size: 20px;
        padding: 10px 25px;
    }
    
    .timeline-end-icon {
        width: 65px;
        height: 65px;
    }
    
    .timeline-end-icon i {
        font-size: 25px;
    }
    
    .timeline-end-text {
        font-size: 20px;
    }
    
    .timeline-end-subtext {
        font-size: 13px;
    }
}

@media (max-width: 575px) {
    .history-timeline::before {
        left: 20px;
    }
    
    .timeline-start {
        left: 20px;
        font-size: 12px;
        padding: 8px 16px;
    }
    
    .timeline-year-marker {
        justify-content: flex-start;
    }
    
    .timeline-year-marker span {
        font-size: 18px;
        padding: 8px 20px;
        margin-left: 60px;
    }
    
    .timeline-number-center {
        left: 20px;
        width: 55px;
        height: 55px;
    }
    
    .timeline-number-center span {
        font-size: 9px;
    }
    
    .timeline-left .timeline-content,
    .timeline-right .timeline-content {
        padding-left: 60px;
    }
    
    .timeline-arrow {
        left: 20px;
        width: 35px;
        height: 35px;
    }
    
    .timeline-arrow i {
        font-size: 12px;
    }
    
    .timeline-end-icon {
        width: 60px;
        height: 60px;
    }
    
    .timeline-end-icon i {
        font-size: 22px;
    }
    
    .timeline-end-text {
        font-size: 18px;
    }
    
    .timeline-end-subtext {
        font-size: 12px;
    }
}
