/* === EVENTS TIMELINE === */
.events-timeline-wrapper {
    padding: 0 15px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--modern-timeline-line);
    z-index: 1;
}

.timeline-entry {
    position: relative;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    z-index: 2;
}

.timeline-icon-marker {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--modern-card-bg);
    border: 2px solid var(--modern-icon-border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.timeline-icon-marker .icon-graphic { font-size: 20px; }
.timeline-icon-marker.icon-goal .icon-graphic { color: #2ecc71; }
.timeline-icon-marker.icon-yellow-card .icon-graphic { color: #f1c40f; }
.timeline-icon-marker.icon-red-card .icon-graphic { color: #e74c3c; }
.timeline-icon-marker.icon-subst .icon-graphic { color: #3498db; }
.timeline-icon-marker.icon-var .icon-graphic { color: #9b59b6; }

.timeline-content-wrapper {
    width: calc(50% - 40px);
    padding: 0px 15px;
    text-align: right;
    position: relative;
}

.timeline-entry-left .timeline-content-wrapper {
    order: 1;
    text-align: right;
    margin-right: calc(50% + 40px);
}

.timeline-entry-left .timeline-icon-marker { order: 2; }

.timeline-entry-right .timeline-content-wrapper {
    order: 3;
    text-align: left;
    margin-left: calc(50% + 40px);
}

.timeline-entry-right .timeline-icon-marker { order: 2; }

.event-time-indicator {
    font-size: 10px;
    font-weight: 600;
    color: var(--modern-time-color);
    margin-bottom: 4px;
}

.event-player-primary {
    font-size: 16px;
    font-weight: 600;
    color: var(--modern-text-primary);
    margin-bottom: 3px;
}

.event-main-detail-text {
    font-size: 10px;
    color: var(--modern-text-secondary);
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 4px;
}

.event-sub-detail-text {
    font-size: 10px;
    color: var(--modern-text-secondary);
    line-height: 1.4;
}

.event-sub-detail-text.is-substitution small {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Responsive adjustments for timeline */
@media (max-width: 300px) {
    .timeline::before {
        left: 22px;
        transform: translateX(0);
    }
    .timeline-entry { flex-direction: row; }
    .timeline-icon-marker {
        position: relative;
        left: 0;
        transform: translateX(0);
        margin-right: 15px;
        flex-shrink: 0;
    }
    .timeline-content-wrapper,
    .timeline-entry-left .timeline-content-wrapper,
    .timeline-entry-right .timeline-content-wrapper {
        width: auto;
        flex-grow: 1;
        text-align: left;
        margin-left: 0;
        margin-right: 0;
        order: initial !important;
    }

/* تعديلات للهواتف الأصغر (أقل من 576px) */
@media (max-width: 575.98px) {
    .timeline::before {
        left: 20px;
    }
    .timeline-icon-marker {
        width: 30px;
        height: 30px;
        margin-right: 10px;
    }
    .timeline-icon-marker .icon-graphic {
        font-size: 14px;
    }
    .event-player-primary {
        font-size: 12px;
    }
}

/* تعديلات للأجهزة اللوحية (من 576px إلى 991.98px) */
@media (min-width: 576px) and (max-width: 991.98px) {
    .timeline-content-wrapper {
        width: calc(45% - 30px);
    }
    .timeline-entry-left .timeline-content-wrapper {
        margin-right: calc(55% + 30px);
    }
    .timeline-entry-right .timeline-content-wrapper {
        margin-left: calc(55% + 30px);
    }
}

/* تعديلات لأجهزة الكمبيوتر (992px فما فوق) */
@media (min-width: 992px) {
    .timeline-content-wrapper {
        width: calc(50% - 40px);
    }
    .timeline-entry-left .timeline-content-wrapper {
        margin-right: calc(50% + 40px);
    }
    .timeline-entry-right .timeline-content-wrapper {
        margin-left: calc(50% + 40px);
    }
}

/* تعديلات للشاشات الكبيرة جداً (1200px فما فوق) */
@media (min-width: 1200px) {
    .events-timeline-wrapper {
        max-width: 1140px;
    }
}
}