/* Main Container */
.vc-snake-timeline-inner {
    position: relative;
    display: block;
    overflow: hidden;
    padding: 20px 0;
}

/* Central Vertical Line */
.vc-snake-timeline-inner::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 6px;
    background: #BB1B0E;
    margin-left: -3px;
    z-index: 1;
}

.vc-snake-timeline-item {
    position: relative;
    box-sizing: border-box;
    padding: 10px;
    width: 50% !important;
    /* Animation initial state */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.vc-snake-timeline-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* HEADER: Year and Dot */
.timeline-header-meta {
    position: relative;
    height: auto;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

/* Default Right Side (Even items in flow, but we want 1st=left, 2nd=right) */
/* Wait, let's stick to standard: Odd = Right, Even = Left? Or user wanted Left then Right? */
/* Usually timeline starts Left. */

/* Item General Styles */
.timeline-year {
    color: #BB1B0E;
    font-weight: bold;
    font-size: 1.5em;
    line-height: 40px;
    display: block;
    margin-bottom: 5px;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background: #fff;
    border: 4px solid #BB1B0E;
    border-radius: 50%;
    position: absolute;
    top: 20px;
    /* Adjust to align with year/title */
    z-index: 20;
    box-shadow: 0 0 0 2px #fff;
}

/* BODY: Content */
.timeline-body {
    background: #f9f9f9;
    padding: 15px;
    position: relative;
    z-index: 5;
    border-radius: 8px;
}

.vc-snake-timeline-item img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    height: auto;
    display: block;
    margin: 10px auto;
}

h3.timeline-title {
    display: none;
}


/* -------------------------------------------
   DESKTOP & TABLET: Alternating
   Min-width 600px
-------------------------------------------- */
@media (min-width: 600px) {

    /* ODD ITEMS: Float LEFT, Content LEFT, Dot RIGHT */
    .vc-snake-timeline-item.is-odd {
        float: left !important;
        clear: both !important;
        /* Force stacking */
        text-align: right;
        padding-right: 40px;
        /* Space for dot/line */
        margin-top: -30px;
        /* Slight overlap to tighten vertical space if desired, or 0 */
    }

    /* Reset margin for the very first item */
    .vc-snake-timeline-item:first-child {
        margin-top: 0;
    }

    .vc-snake-timeline-item.is-odd .timeline-header-meta {
        justify-content: flex-end;
        /* Year on right */
        flex-direction: row;
        /* Ensure row direction */
    }

    .vc-snake-timeline-item.is-odd .timeline-dot {
        right: -13px;
        left: auto;
    }


    /* EVEN ITEMS: Float RIGHT, Content RIGHT, Dot LEFT */
    .vc-snake-timeline-item.is-even {
        float: right !important;
        clear: both !important;
        /* Force stacking */
        text-align: left;
        padding-left: 40px;
        margin-top: -30px;
        /* Stagger effect */
    }

    .vc-snake-timeline-item.is-even .timeline-header-meta {
        justify-content: flex-start;
        flex-direction: row;
        /* Ensure row direction */
    }

    .vc-snake-timeline-item.is-even .timeline-dot {
        left: -13px;
        right: auto;
    }

    /* Connectors */
    .vc-snake-timeline-item.is-odd::before {
        content: '';
        position: absolute;
        top: 32px;
        /* Center with dot */
        right: 0;
        width: 40px;
        height: 2px;
        background: #BB1B0E;
        z-index: 10;
    }

    .vc-snake-timeline-item.is-even::before {
        content: '';
        position: absolute;
        top: 32px;
        left: 0;
        width: 40px;
        height: 2px;
        background: #BB1B0E;
        z-index: 10;
    }

    /* Cleanup old snake pseudo elements */
    .vc-snake-timeline-item::after {
        display: none !important;
    }
}


/* -------------------------------------------
   MOBILE: 1 Column
   Max 599px
-------------------------------------------- */
@media (max-width: 599px) {
    .vc-snake-timeline-inner::before {
        left: 20px;
        /* Line on the left */
        margin-left: 0;
    }

    .vc-snake-timeline-item {
        width: 100%;
        float: none;
        padding-left: 50px;
        /* Space for line/dot */
        text-align: left;
    }

    .timeline-header-meta {
        justify-content: flex-start;
    }

    .timeline-dot {
        left: 8px;
        /* Center on line at 20px + width 6/2=3 -> 23px center. Dot 24px/2=12. 23-12=11? */
        /* Line left 20. Width 6. Center 23. */
        /* Dot width 24 (16+8 border). Center 12. */
        /* Left = 23 - 12 = 11px. */
        left: 11px;
    }

    .vc-snake-timeline-item::before {
        display: none !important;
    }

    .vc-snake-timeline-item::after {
        display: none !important;
    }
}