﻿/* ========== تایم‌لاین حرفه‌ای و واکنش‌گرا ========== */
.lg-size {
    display: block;
}

.md-size {
    display: none
}
.Timeline-Section {
    background-color: #afcee5
}
.timeline {
    position: relative;
    max-width: 1200px;
    margin: auto;
    padding: 50px 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    width: 4px;
    height: 100%;
    background: repeating-linear-gradient(to bottom, #0172C5 0%, #0172C5 20%, transparent 20%, transparent 40%);
    background-size: 10px 40px;
    border-radius: 2px;
    transform: translateX(-50%);
}

.timeline-items {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-item {
    position: relative;
    width: 50%;
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
    background-color: #0073c861;
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
}

/* استایل آیتم‌های زوج و فرد */

.timeline-item:nth-child(odd) {
    align-self: flex-start;
    text-align: left;
    flex-direction: row-reverse;
    transform: translateX(50px);
}

.timeline-item:nth-child(even) {
    align-self: flex-end;
    text-align: right;
    transform: translateX(-50px);
}

/* افکت هاور برای بزرگ شدن یکدست کل آیتم */

.timeline-item:hover {
    background-color: #0073c8;
    transform: scale(1.1);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.4);
}

.timeline_even::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -85px;
    width: 40px;
    height: 40px;
    border: 5px solid white;
    background: #0172C5;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0px 0px 10px rgba(255, 127, 80, 0.5);
}

.timeline_odd::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -53px;
    width: 40px;
    height: 40px;
    border: 5px solid white;
    background: #0172C5;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0px 0px 10px rgba(255, 127, 80, 0.5);
}

/* استایل برای متن سال */

.year {
    font-size: 22px;
    font-weight: bold;
    background: #0172C5;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-align: center;
    min-width: 80px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: -30px;
    right: 10%
}

/* استایل تصویر داخل تایم‌لاین */

.timeline-item img {
    width: 220px;
    height: auto;
    padding: 10px;
    transition: transform 0.3s ease-in-out;
    filter: grayscale(100%);
}

/* استایل توضیحات (tooltip) */

.tooltip {
    display: block;
    position: static;
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 18px;
    width: 100%;
    text-align: justify;
    opacity: 1;
    visibility: visible;
    transition: transform 0.3s ease-in-out;
}

/* ====== استایل موبایل ====== */

@media (max-width: 1068px) {
    .lg-size { display: none }

    .md-size { display: block }

    .timeline::before { right: 70px; }

    .timeline-items { padding-right: 40px; }

    .timeline {
        position: relative;
        max-width: 1200px;
        margin: auto;
        padding: 50px 100px;
    }

    .tooltip-content { font-size: large; }

    .timeline-item {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        text-align: left !important;
        transform: none !important;
    }

    .timeline_odd::after {
        content: '';
        position: absolute;
        top: 50%;
        right: -58px;
        width: 40px;
        height: 40px;
        border: 5px solid white;
        background: #0172C5;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        box-shadow: 0px 0px 10px rgba(255, 127, 80, 0.5);
    }

    .timeline_even::after {
        content: '';
        position: absolute;
        top: 50%;
        right: -40px;
        width: 40px;
        height: 40px;
        border: 5px solid white;
        background: #0172C5;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        box-shadow: 0px 0px 10px rgba(255, 127, 80, 0.5);
    }

    .year {
        font-size: 18px;
        padding: 8px 16px;
    }

    .timeline-item img {
        width: 100%;
        max-width: 250px;
    }

    /* استایل توضیحات (tooltip) */
    .tooltip {
        display: block;
        position: static;
        color: white;
        padding: 10px;
        border-radius: 5px;
        font-size: 14px;
        width: 100%;
        text-align: justify;
        opacity: 1;
        visibility: visible;
        transition: transform 0.3s ease-in-out;
    }
}

@media (max-width: 765px) {
    .timeline-item img {
        width: 100%;
    }

    .timeline {
        position: relative;
        width: 100%;
        margin: auto;
        padding: 50px 100px;
    }

    .tooltip { display: none; }

    .timeline-items { background-color: transparent; }

    .timeline-item {
        position: relative;
        width: 50%;
        display: flex;
        align-items: center;
        margin-bottom: 40px;
        gap: 20px;
        background-color: #001f37;
        border-radius: 10px;
        padding: 20px;
        transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        box-shadow: 0px 4px 10px transparent;
    }

    .timeline-item {
        width: 100%;
        max-width: 100%;
    }
        .timeline-item:hover {
            background-color: #afcee5
        }
}