﻿/* Timeline Layout */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #e0e0e0;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-left {
    flex-direction: row;
}

.timeline-right {
    flex-direction: row-reverse;
    text-align: right;
}

.timeline-img {
    position: relative;
    flex: 1;
    max-width: 45%;
    overflow: hidden;
    border-radius: 12px;
    height: 320px; /* 📌 ضبط الارتفاع */
}

    .timeline-img img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* 📌 يضمن أن الصورة تملأ الإطار بدون تمدد مشوّه */
        border-radius: 12px;
        transition: transform 0.3s ease;
    }

    .timeline-img:hover img {
        transform: scale(1.05);
    }


    .timeline-img .overlay {
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.55);
        opacity: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        transition: opacity 0.3s ease;
    }

    .timeline-img:hover .overlay {
        opacity: 1;
    }

.overlay a {
    color: #fff;
    font-size: 1.4rem;
}

.timeline-content {
    flex: 1;
    max-width: 45%;
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 0 1.5rem;
}

@media (max-width: 992px) {
    .timeline::before {
        left: 8px;
    }

    .timeline-item {
        flex-direction: column !important;
        text-align: center;
    }

    .timeline-img,
    .timeline-content {
        max-width: 100%;
    }

    .timeline-content {
        margin-top: 1rem;
    }
}
