/*
|--------------------------------------------------------------------------
| TIMELINE COMPONENT STYLES
|--------------------------------------------------------------------------
| These styles are specifically for the horizontal/vertical timeline layout.
*/

.timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

/* Background image for the timeline section */
#timeline {
    background-image: url('./images/wcu-bg.png') !important;
    background-size: cover;
    background-attachment: fixed;
    background-position: top center;
}

/* Vertical line down the center */
.timeline:before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    background-color: var(--secondary);
    /* Use secondary color for the line */
}

.timeline>li {
    position: relative;
    margin-bottom: 50px;
    min-height: 50px;
}

/* Clearfix for panels */
.timeline>li:after,
.timeline>li:before {
    display: table;
    content: " ";
}

.timeline>li:after {
    clear: both;
}

/* Timeline Panel (The main content box) */
.timeline>li .timeline-panel {
    position: relative;
    float: left;
    width: 46%;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    /* Improved shadow */
}

/* Arrow for the right-side panel (pointing left) */
.timeline>li .timeline-panel:before {
    position: absolute;
    top: 26px;
    right: -15px;
    display: inline-block;
    border-top: 15px solid transparent;
    border-left: 15px solid #e9ecef;
    border-right: 0 solid #e9ecef;
    border-bottom: 15px solid transparent;
    content: " ";
}

.timeline>li .timeline-panel:after {
    position: absolute;
    top: 27px;
    right: -14px;
    display: inline-block;
    border-top: 14px solid transparent;
    border-left: 14px solid #fff;
    border-right: 0 solid #fff;
    border-bottom: 14px solid transparent;
    content: " ";
}

/* Timeline Badge (The circle in the center) */
.timeline>li .timeline-badge {
    position: absolute;
    top: 16px;
    left: 50%;
    z-index: 100;
    width: 50px;
    height: 50px;
    margin-left: -25px;
    border-radius: 50%;
    text-align: center;
    font-size: 1.4em;
    line-height: 50px;
    color: #fff;
    background-color: var(--primary);
}

/* Inverted Timeline Panel (For the left side) */
.timeline>li.timeline-inverted>.timeline-panel {
    float: right;
}

/* Arrow for the left-side panel (pointing right) */
.timeline>li.timeline-inverted>.timeline-panel:before {
    right: auto;
    left: -15px;
    border-right-width: 15px;
    border-left-width: 0;
}

.timeline>li.timeline-inverted>.timeline-panel:after {
    right: auto;
    left: -14px;
    border-right-width: 14px;
    border-left-width: 0;
}

/* Panel Content Styling */
.timeline-heading h4 {
    margin-top: 0;
    color: inherit;
}

.timeline-heading h4.subheading {
    text-transform: none;
}

.timeline-body>p,
.timeline-body>ul {
    margin-bottom: 0;
}

/* Responsive Styles for Timeline */
@media (max-width: 767px) {

    /* Move vertical line to the left for mobile */
    .timeline:before {
        left: 40px;
    }

    /* Adjust panel width and position */
    .timeline>li .timeline-panel {
        width: calc(100% - 90px);
        float: right;
    }

    /* Center badge over the new line position */
    .timeline>li .timeline-badge {
        left: 15px;
        margin-left: 0;
    }

    /* Force all arrows to point toward the center line from the right */
    .timeline>li .timeline-panel:before,
    .timeline>li .timeline-panel:after,
    .timeline>li.timeline-inverted>.timeline-panel:before,
    .timeline>li.timeline-inverted>.timeline-panel:after {
        border-left-width: 0 !important;
        border-right-width: 15px !important;
        left: -15px !important;
        right: auto !important;
    }
}