﻿/*This is in its own file because ChatGPT had to help me fix issues and it messes up my CSS ): It works now tho! */

/* Timeline Container */
.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 50px auto;
    display: flex;
    flex-direction: column;
    padding-top: 50px; 
    padding-bottom: 80px;
}

    /* Vertical Timeline Line */
    .timeline-container::before {
        content: "";
        position: absolute;
        left: 50%;
        width: 4px;
        height: 100%;
        background-color: var(--theme-primary);
        transform: translateX(-50%);
    }

/* Top Date Label */
.timeline-date-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: bold;
    color: var(--theme-dark);
    background: var(--theme-neutral);
    padding: 8px 15px;
    border-radius: 5px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

/* Bottom Date Label */
.timeline-date-bottom {
    position: absolute;
    bottom: -60px; 
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: bold;
    color: var(--theme-dark);
    background: var(--theme-neutral);
    padding: 8px 15px;
    border-radius: 5px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

/* Timeline Items */
.timeline-item {
    position: relative;
    display: flex;
    justify-content: flex-start;
    padding: 20px;
    width: 50%;
}

    /* Alternate Right Side Items */
    .timeline-item:nth-child(even) {
        align-self: flex-end;
        justify-content: flex-end;
    }

/* Timeline Content Box */
.timeline-content {
    background-color: var(--theme-neutral);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    width: 80%;
    text-align: left;
    position: relative;
}

.timeline-item::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%; 
    height: 4px;
    background-color: var(--theme-primary);
    transform: translateY(-50%);
}

/* Left-side items (extend line LEFT to the timeline) */
.timeline-item:nth-child(odd)::before {
    right: 0%; /* Moves line towards the timeline */
}

/* Right-side items (extend LEFT to the timeline) */
.timeline-item:nth-child(even)::before {
    left: 0%; /* Moves line towards the timeline */
}

/* Circle Markers on the Timeline */
.timeline-item::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background-color: var(--theme-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Left-side markers (on the timeline line) */
.timeline-item:nth-child(odd)::after {
    left: 100%;
    transform: translate(-50%, -50%);
}

/* Right-side markers (on the timeline line) */
.timeline-item:nth-child(even)::after {
    right: 100%;
    transform: translate(50%, -50%);
}

/* Heading in the Box */
.timeline-content h3 {
    margin: 0;
    font-size: 22px;
    font-weight: bold;
}

.timeline-content h4 {
    margin-top: 3px;
    font-size: 16px;
    color: var(--theme-neutral-text);
    font-weight: bold;
    font-style: italic;
}

/* Text in the Box */
.timeline-content p {
    margin: 5px 0 0;
    font-size: 16px;
    color: rgba(0, 0, 0, 0.7);
}

@media (max-width: 600px) 
{
    /* Hide timeline line */
    .timeline-container::before {
        display: none;
    }

    /* Hide connector lines */
    .timeline-item::before {
        display: none;
    }

    /* Hide circle markers */
    .timeline-item::after {
        display: none;
    }

    /* Full width for items */
    .timeline-item {
        width: 100%;
        justify-content: center;
        align-items: center;
        padding: 10px 15px;
    }

    /* Content box full width and centered */
    .timeline-content {
        width: 100%;
        text-align: left;
        box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.08);
    }

    /* Smaller top/bottom dates */
    .timeline-date-top,
    .timeline-date-bottom {
        font-size: 14px;
        padding: 5px 10px;
        max-width: 90%;
        text-align: center;
    }

    /* Reduce text sizes slightly */
    .timeline-content h3 {
        font-size: 18px;
    }

    .timeline-content h4 {
        font-size: 14px;
    }

    .timeline-content p {
        font-size: 14px;
    }
}
