
/* timeline */
.af_timeline {
    position: relative;
    width: 100%;
    height: 460px;
    /* margin-top: 50px; */
    /* margin-bottom: 50px; */
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
    padding-top: 0px;
    margin-bottom: -150px;
}

.af_timeline_svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.af_timeline_stroke {
    stroke-dasharray: 20;
    stroke-width: 3px;
    /* rounded caps */
    stroke-linecap: round;
    animation: dash 450s linear infinite;
    animation-fill-mode: forwards;
}

.afs_speed_1 {
    animation-duration: 500s!important;
}
.afs_speed_2 {
    animation-duration: 600s!important;
}
.afs_speed_3 {
    animation-duration: 700s!important;
}
.afs_speed_4 {
    animation-duration: 800s!important;
}

@keyframes dash {
    to {
        stroke-dashoffset: -8000;
    }
}

.af_timeline_content {
    gap: 20px;
    width: 80%;
    height: 100%;
    z-index: 999999;
    max-width: 1100px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-column-gap: 20px;
}

.af_timeline_content_item {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    flex-direction: column;
    height: 100%;
    position: relative;
}
.af_timeline_slider .af_timeline_slider_nav .af_timeline_slider_dot,
.af_timeline_dot {
    width: 30px;
    height: 30px;
    background-color: var(--primary);
    border-radius: 50%;
    /* margin-bottom: 10px; */
    position: absolute;
    top: calc(50% - 15px);
    transform: scale(0.7);
    box-shadow:
        0px 0px 0px 10px rgba(235, 93, 31, .3),
        0px 0px 0px 25px rgba(235, 93, 31, 0.15);
}

.af_timeline_content_item h3 {
    font-family: var(--headerfont);
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    padding: 0;
    position: absolute;
    color: var(--secondary);
    top: calc(50% + 40px);
    /* color: #065056!important; */
}

.af_timeline_content_item p {
    font-family: var(--bodyfont);
    font-size: 17px;
    padding: 0;
    position: absolute;
    top: calc(50% + 67px);
    left: 0;
}

.af_timeline_stroke_wrapper {
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
    height: 100%;
    justify-content: center;
    /* margin-bottom: -100px; */
}

.af_timeline_img {
    width: 100%;
    height: 200px;
}

.af_timeline_img_item {
    background-size: contain;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: left center;
}
.af_timeline_content_item > *,
.af_timeline_content_item > * > *,
.af_timeline_content_item > * > * > *,
.af_timeline_content_item > * > * > * > * {
    transition-timing-function: cubic-bezier(0, 1.037, 0.758, 0.946);
    transition-duration: 1s;
}
.af_timeline_content_item:hover > .af_timeline_img{
    transform: scale(1.1);
}
.af_timeline_content_item:hover > .af_timeline_dot {
    transform: scale(1);
    border-radius: 50%!important;
    box-shadow:
        0px 0px 0px 15px rgba(235, 93, 31, .3),
        0px 0px 0px 30px rgba(235, 93, 31, 0.15);
}


/* enkele timeline widget */
:root{
    --single_timeline_height: 520px;
    --single_timeline_width: 290px;
    --single_timeline_dot_size: 25px;
    --single_timeline_dot_offset: 7px;
    --single_timeline_content_height: 150px;
    --single_timeline_content_offset: 35px;
    --single_timeline_content_padding: 26px;
    --single_timeline_nav_height: 30px;
    --single_timeline_nav_offset: 60px;
    --single_timeline_nav_side_margin: 55px;
    --single_timeline_btn_size: 40px;
    --single_timeline_track_height: 8px;
    --single_timeline_stripe_width: 30px;
    --single_timeline_stripe_solid: 15px;
}
.af_timeline_slider {
    position: relative;
    width: var(--single_timeline_width);
    height: var(--single_timeline_height);
}
.af_timeline_slider .af_timeline_slider_img {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--single_timeline_width);
    height: calc(var(--single_timeline_height) - var(--single_timeline_content_height) - var(--single_timeline_nav_offset) - var(--single_timeline_content_offset) + var(--single_timeline_content_padding));
    overflow: hidden;
    z-index: 9;
}
.af_timeline_slider .af_timeline_slider_img .af_timeline_slider_img_item {
    width: var(--single_timeline_width);
    height: calc(var(--single_timeline_height) - var(--single_timeline_content_height) - var(--single_timeline_nav_offset) - var(--single_timeline_content_offset) + var(--single_timeline_content_padding));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition-timing-function: cubic-bezier(0, 1.037, 0.758, 0.946);
    transition-duration: 1s;
}
.af_timeline_slider .af_timeline_slider_content {
    position: absolute;
    top: calc(var(--single_timeline_height) - var(--single_timeline_content_height) - var(--single_timeline_nav_offset) - var(--single_timeline_content_offset));
    left: 0;
    width: var(--single_timeline_width);
    height: var(--single_timeline_content_height);
    z-index: 8;
    background-color: white;
    border-radius: var(--border-radius-medium) var(--border-radius-small) var(--border-radius-medium) var(--border-radius-small);
    overflow: hidden;
}
.af_timeline_slider .af_timeline_slider_content .af_timeline_slider_content_track {
    position:absolute;
    left: 0px;
    top: 0px;
    background-color: white;
    height: 100%;
    display: flex;
}
.af_timeline_slider .af_timeline_slider_content .af_timeline_slider_content_track .af_timeline_slider_content_item {
    width: var(--single_timeline_width);
    padding: var(--single_timeline_content_padding);
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: var(--shadow-md);   
}
.af_timeline_slider .af_timeline_slider_content .af_timeline_slider_content_track h4 {
    font-family: var(--headerfont);
    font-size: 20px;
    margin: 0;
    padding: 0;
}
.af_timeline_slider .af_timeline_slider_content .af_timeline_slider_content_track p {
    font-family: var(--bodyfont);
    font-size: 16px;
}
.af_timeline_slider .af_timeline_slider_nav {
    position: absolute;
    top: calc(var(--single_timeline_height) - var(--single_timeline_nav_offset));
    left: 0px;
    width: var(--single_timeline_width);
    height: var(--single_timeline_nav_height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.af_timeline_slider .af_timeline_slider_nav .af_timeline_slider_dot{
    width: var(--single_timeline_dot_size);
    height: var(--single_timeline_dot_size);
    top: calc(var(--single_timeline_dot_offset) * -1);
}
.af_timeline_slider .af_timeline_slider_nav .af_timeline_slider_navtrack {
    position:absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(var(--single_timeline_width) - (var(--single_timeline_nav_side_margin) * 2));
    height: var(--single_timeline_track_height);
    /* border: 1px solid orange; */
    overflow-x: hidden;
    overflow-y: visible;
}
.af_timeline_slider .af_timeline_slider_nav .af_timeline_slider_btn.af_next,
.af_timeline_slider .af_timeline_slider_nav .af_timeline_slider_btn.af_prev {
    width: var(--single_timeline_btn_size);
    height: var(--single_timeline_btn_size);
    color: white;
    font-size: 20px;
    cursor: pointer;
    background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cpath%20fill%3D%22%23eb5d20%22%20d%3D%22M14.5857864%2C12%20L6.29289322%2C20.2928932%20C5.90236893%2C20.6834175%205.90236893%2C21.3165825%206.29289322%2C21.7071068%20C6.68341751%2C22.0976311%207.31658249%2C22.0976311%207.70710678%2C21.7071068%20L16.7071068%2C12.7071068%20C17.0976311%2C12.3165825%2017.0976311%2C11.6834175%2016.7071068%2C11.2928932%20L7.70710678%2C2.29289322%20C7.31658249%2C1.90236893%206.68341751%2C1.90236893%206.29289322%2C2.29289322%20C5.90236893%2C2.68341751%205.90236893%2C3.31658249%206.29289322%2C3.70710678%20L14.5857864%2C12%20Z%22%20transform%3D%22rotate(-180%2011.5%2012)%22%2F%3E%0A%3C%2Fsvg%3E%0A');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
.af_timeline_slider .af_timeline_slider_nav .af_timeline_slider_btn.af_next{
    transform: rotate(180deg);
}

.af_timeline_slider_trackinner{
    position:absolute;
    left: -100%;
    top: 50%;
    height: calc(100% - calc(var(--single_timeline_track_height) - 3px));
    width: 300%;
    background-color: #e5e5f7;
    opacity: 1;
    background-image: linear-gradient(to right, var(--secondary), var(--secondary) var(--single_timeline_stripe_solid), var(--bg) 10px, var(--bg) );
    background-size: var(--single_timeline_stripe_width) 100%;
}
.af_timeline_slider_navtrack.af_navtrack_dot{
    overflow-x: visible!important;
    overflow-y: visible!important;
}

.fade-enter-active, .fade-leave-active {
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-enter {
    opacity: 0;
    transform: scale(1.05);
    filter: blur(10px);
}
.fade-leave-to {
    opacity: 0;
    transform: scale(0.95);
    filter: blur(10px);
}

.slide-fade-enter-active {
    transition: all 0.5s ease;
}
.slide-fade-leave-active {
    transition: all 0.5s ease;
}
.slide-fade-enter {
    transform: translateX(30px);
    opacity: 0;
}
.slide-fade-leave-to {
    transform: translateX(-30px);
    filter: blur(10px);
    opacity: 0;
}

.af_timeline_slider_trackinner,
.af_timeline_slider_dot {
    transition: all .6s ease;
}

.af_timeline_slider_dot {
    cursor: grab;
}

.af_timeline_slider_dot:active {
    cursor: grabbing;
}

.af_timeline_slider_navtrack {
    cursor: pointer;
}

.af_timeline_slider_fade::after{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    content: "";
    background: linear-gradient(90deg, var(--bg) 0%, rgba(23, 23, 23, 0) 30%, rgba(23, 23, 23, 0) 70%, var(--bg) 100%);
}


/* ===========================================
   MOBILE TIMELINE STYLING
   Breakpoint: 768px en kleiner
   Links uitgelijnde verticale timeline
   =========================================== */

@media screen and (max-width: 768px) {
    
    /* Verberg de desktop SVG stroke */
    .af_timeline_svg,
    .af_timeline_stroke_wrapper {
        display: none;
    }
    
    /* Basis timeline container aanpassingen */
    .af_timeline {
        height: auto;
        margin-bottom: 0;
        padding: 30px 20px;
        position: relative;
    }
    
    /* Grid naar verticale layout */
    .af_timeline_content {
        --timeline-left: 15px;
        --dot-size: 24px;
        --line-offset: calc(var(--timeline-left) + (var(--dot-size) / 2));
        
        display: flex;
        flex-direction: column;
        gap: 30px;
        width: 100%;
        max-width: 100%;
        padding: 10px 0;
        position: relative;
    }
    
    /* Verticale stroke lijn - links uitgelijnd */
    .af_timeline_content::before {
        content: "";
        position: absolute;
        left: var(--line-offset);
        top: 0;
        bottom: 0;
        width: 3px;
        background: repeating-linear-gradient(
            to bottom,
            var(--secondary, #065056) 0px,
            var(--secondary, #065056) 10px,
            transparent 10px,
            transparent 20px
        );
        background-size: 3px 20px;
        animation: verticalDash 420s linear infinite;
        transform: translateX(-50%);
        z-index: 1;
        opacity: 0.25;
    }

    .af_timeline_content::after {
        content: "";
        position: absolute;
        left: 15px;
        top: 0;
        bottom: 0;
        width: 25px;
        background-image: linear-gradient(to bottom, var(--bg), transparent 10%, transparent 90%, var(--bg));
        z-index: 1;
    }
    
    @keyframes verticalDash {
        0% {
            background-position: 0 0;
        }
        100% {
            background-position: 0 8000px;
        }
    }
    
    /* Timeline items - horizontal layout */
    .af_timeline_content_item {
        position: relative;
        display: grid;
        grid-template-columns: var(--dot-size) 80px 1fr;
        grid-template-rows: auto auto;
        column-gap: 15px;
        row-gap: 5px;
        align-items: center;
        padding-left: var(--timeline-left);
        z-index: 2;
    }
    
    /* Dot links */
    .af_timeline_content_item .af_timeline_dot {
        position: relative;
        top: auto;
        left: auto;
        width: var(--dot-size);
        height: var(--dot-size);
        transform: scale(0.75);
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: center;
        z-index: 3;
        box-shadow:
            0px 0px 0px 6px rgba(235, 93, 31, .3),
            0px 0px 0px 14px rgba(235, 93, 31, 0.15);
    }
    
    .af_timeline_content_item:hover .af_timeline_dot {
        transform: scale(0.9);
        box-shadow:
            0px 0px 0px 8px rgba(235, 93, 31, .3),
            0px 0px 0px 18px rgba(235, 93, 31, 0.15);
    }
    
    /* Afbeelding styling - compact */
    .af_timeline_img {
        width: 80px;
        height: 80px;
        grid-column: 2;
        grid-row: 1 / 3;
        border-radius: 6px;
        overflow: hidden;
    }
    
    .af_timeline_img_item {
        background-position: center;
        background-size: cover;
    }
    
    /* Tekst rechts van afbeelding */
    .af_timeline_content_item h3 {
        position: relative;
        top: auto;
        margin: 0;
        font-size: 17px;
        text-align: left;
        grid-column: 3;
        grid-row: 1;
        align-self: end;
    }
    
    .af_timeline_content_item p {
        position: relative;
        top: auto;
        left: auto;
        margin: 0;
        font-size: 14px;
        text-align: left;
        line-height: 1.4;
        grid-column: 3;
        grid-row: 2;
        align-self: start;
    }
    
    /* Hover effecten aanpassen voor touch */
    .af_timeline_content_item:hover > .af_timeline_img {
        transform: scale(1.05);
    }
}

/* ===========================================
   EXTRA SMALL DEVICES (< 480px)
   =========================================== */

@media screen and (max-width: 480px) {
    
    .af_timeline {
        padding: 20px 15px;
    }
    
    .af_timeline_content {
        --timeline-left: 10px;
        --dot-size: 20px;
        gap: 25px;
    }
    
    .af_timeline_content_item {
        grid-template-columns: var(--dot-size) 60px 1fr;
        column-gap: 10px;
    }
    
    .af_timeline_img {
        width: 60px;
        height: 60px;
    }
    
    .af_timeline_content_item h3 {
        font-size: 15px;
    }
    
    .af_timeline_content_item p {
        font-size: 13px;
    }
    
    .af_timeline_content_item .af_timeline_dot {
        box-shadow:
            0px 0px 0px 5px rgba(235, 93, 31, .3),
            0px 0px 0px 12px rgba(235, 93, 31, 0.15);
    }
    
    .af_timeline_content_item:hover .af_timeline_dot {
        box-shadow:
            0px 0px 0px 6px rgba(235, 93, 31, .3),
            0px 0px 0px 14px rgba(235, 93, 31, 0.15);
    }
}

/* ===========================================
   SLIDER WIDGET MOBILE STYLING
   =========================================== */

@media screen and (max-width: 768px) {
    
    :root {
        --single_timeline_height: 480px;
        --single_timeline_dot_size: 22px;
        --single_timeline_content_height: 130px;
        --single_timeline_content_padding: 20px;
        --single_timeline_btn_size: 36px;
    }
    
    .af_timeline_slider {
        width: var(--single_timeline_width);
        height: var(--single_timeline_height);
        margin: 0 auto;
    }
    
    .af_timeline_slider .af_timeline_slider_img,
    .af_timeline_slider .af_timeline_slider_img .af_timeline_slider_img_item {
        width: var(--single_timeline_width);
    }
    
    .af_timeline_slider .af_timeline_slider_content {
        width: var(--single_timeline_width);
    }
    
    .af_timeline_slider .af_timeline_slider_content .af_timeline_slider_content_track .af_timeline_slider_content_item {
        width: var(--single_timeline_width);
        padding: 24px 16px;
    }
    
    .af_timeline_slider .af_timeline_slider_content .af_timeline_slider_content_track h4 {
        font-size: 18px;
    }
    
    .af_timeline_slider .af_timeline_slider_content .af_timeline_slider_content_track p {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .af_timeline_slider .af_timeline_slider_nav {
        width: var(--single_timeline_width);
    }
    
    .af_timeline_slider .af_timeline_slider_nav .af_timeline_slider_navtrack {
        width: calc(var(--single_timeline_width) - 100px);
    }
}

@media screen and (max-width: 480px) {
    
    :root {
        --single_timeline_height: 440px;
        --single_timeline_width: min(230px, 85vw);
        --single_timeline_content_height: 120px;
        --single_timeline_content_padding: 16px;
        --single_timeline_btn_size: 32px;
    }
}