/* Timeline Container */
.timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Timeline Line */
.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

/* Timeline Item */
.timeline-item {
    position: relative;
    margin-bottom: 50px;
    display: flex;
    align-items: flex-start;
    z-index: 2;
}

/* Marker */
.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    flex-shrink: 0;
}

.timeline-marker-icon,
.timeline-marker-text {
    font-size: 18px;
    font-weight: 600;
}

/* Card */
.timeline-card {
    position: relative;
    width: calc(50% - 40px);
    box-sizing: border-box;
}

/* Left Layout */
.timeline-layout-left .timeline-line {
    left: 0;
    transform: none;
}

.timeline-layout-left .timeline-marker {
    left: 0;
    transform: translateX(-50%);
}

.timeline-layout-left .timeline-card {
    width: calc(100% - 60px);
    margin-left: 60px;
}

/* Right Layout */
.timeline-layout-right .timeline-line {
    left: auto;
    right: 0;
    transform: none;
}

.timeline-layout-right .timeline-marker {
    left: auto;
    right: 0;
    transform: translateX(50%);
}

.timeline-layout-right .timeline-card {
    width: calc(100% - 60px);
    margin-right: 60px;
    margin-left: auto;
}

/* Alternate Layout */
.timeline-item-left .timeline-card {
    margin-right: auto;
    margin-left: 0;
}

.timeline-item-right .timeline-card {
    margin-left: auto;
    margin-right: 0;
}

/* Media */
.timeline-media {
    margin: 15px 0;
    overflow: hidden;
    border-radius: 4px;
}

.timeline-media img {
    max-width: 100%;
    height: auto;
    display: block;
}

.timeline-video iframe {
    width: 100%;
    min-height: 300px;
}

/* Slideshow */
.timeline-slideshow {
    position: relative;
}

.timeline-slideshow img {
    display: none;
    width: 100%;
    height: auto;
}

.timeline-slideshow img.active {
    display: block;
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 10px;
    box-sizing: border-box;
}

.slideshow-nav button {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: background 0.3s;
}

.slideshow-nav button:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Typography */
.timeline-date {
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-title {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

.timeline-description {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

/* Preset Styles */

/* Minimal */
.timeline-preset-minimal .timeline-card {
    box-shadow: none;
    border-left: 3px solid #5851ea;
}

.timeline-preset-minimal .timeline-marker {
    box-shadow: none;
}

/* Elegant */
.timeline-preset-elegant .timeline-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.timeline-preset-elegant .timeline-marker {
    box-shadow: 0 4px 12px rgba(88, 81, 234, 0.2);
}

.timeline-preset-elegant .timeline-title {
    font-family: 'Georgia', serif;
}

/* Modern */
.timeline-preset-modern .timeline-card {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: none;
    border-radius: 12px;
}

.timeline-preset-modern .timeline-marker {
    box-shadow: 0 0 0 8px rgba(88, 81, 234, 0.1);
}

.timeline-preset-modern .timeline-date {
    background: #f5f5f5;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-container {
        padding: 0 15px;
    }

    .timeline-line {
        left: 20px !important;
        right: auto !important;
        transform: none !important;
    }

    .timeline-marker {
        left: 20px !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }

    .timeline-card {
        width: calc(100% - 50px) !important;
        margin-left: 50px !important;
        margin-right: 0 !important;
    }

    .timeline-title {
        font-size: 20px;
    }

    .timeline-description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .timeline-container {
        padding: 0 10px;
    }

    .timeline-item {
        margin-bottom: 30px;
    }

    .timeline-card {
        width: calc(100% - 40px) !important;
        margin-left: 40px !important;
    }

    .timeline-marker {
        width: 30px !important;
        height: 30px !important;
    }

    .timeline-marker-icon,
    .timeline-marker-text {
        font-size: 14px;
    }

    .timeline-title {
        font-size: 18px;
    }

    .slideshow-nav button {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
}
