﻿
body {
    --color: rgba(30, 30, 30);
    --bgColor: rgba(245, 245, 245);

}


h1 {
    text-align: center;
}

ul.v-timeline {
    --col-gap: 2rem;
    --row-gap: 2rem;
    --line-w: 0.25rem;
    display: grid;
    grid-template-columns: var(--line-w) 1fr;
    grid-auto-columns: max-content;
    column-gap: var(--col-gap);
    list-style: none;
    width: min(60rem, 90%);
    margin-inline: auto;
}

    /* line */
    ul.v-timeline::before {
        content: "";
        grid-column: 1;
        grid-row: 1 / span 20;
        background: rgb(225, 225, 225);
        border-radius: calc(var(--line-w) / 2);
    }

    /* columns*/

    /* row gaps */
    ul.v-timeline li:not(:last-child) {
        margin-bottom: var(--row-gap);
    }

    /* card */
    ul.v-timeline li {
        grid-column: 2;
        --inlineP: 1.5rem;
        margin-inline: var(--inlineP);
        grid-row: span 2;
        display: grid;
        grid-template-rows: min-content min-content min-content;
    }

        /* date */
        ul.v-timeline li .date {
            --dateH: 3rem;
            height: var(--dateH);
            margin-inline: calc(var(--inlineP) * -1);
            text-align: center;
            background-color: var(--accent-color);
            color: white;
            font-size: 1.25rem;
            font-weight: 700;
            display: grid;
            place-content: center;
            position: relative;
            border-radius: calc(var(--dateH) / 2) 0 0 calc(var(--dateH) / 2);
        }

            /* date flap */
            ul.v-timeline li .date::before {
                content: "";
                width: var(--inlineP);
                aspect-ratio: 1;
                background: var(--accent-color);
                background-image: linear-gradient(rgba(0, 0, 0, 0.2) 100%, transparent);
                position: absolute;
                top: 100%;
                clip-path: polygon(0 0, 100% 0, 0 100%);
                right: 0;
            }

            /* circle */
            ul.v-timeline li .date::after {
                content: "";
                position: absolute;
                width: 2rem;
                aspect-ratio: 1;
                background: var(--bgColor);
                border: 0.3rem solid var(--accent-color);
                border-radius: 50%;
                top: 50%;
                transform: translate(50%, -50%);
                right: calc(100% + var(--col-gap) + var(--line-w) / 2);
            }

        /* title descr */
        ul.v-timeline li .title,
        ul.v-timeline li .descr {
            /* background: var(--bgColor); */
            position: relative;
            padding: 1.5rem;
            text-align: center;
        }

        ul.v-timeline li .title {
            overflow: hidden;
            padding-block-start: 1.5rem;
            padding-block-end: 1rem;
            font-weight: 500;
        }

        ul.v-timeline li .descr {
            padding-block-end: 1.5rem;
            font-weight: 300;
            /* box-shadow: 0px 1px 0px rgb(100 100 100 / 8%); */
        }

            /* shadows */
            ul.v-timeline li .title::before,
            ul.v-timeline li .descr::before {
                content: "";
                position: absolute;
                width: 90%;
                height: 0.5rem;
                background: rgba(0, 0, 0, 0.5);
                left: 50%;
                border-radius: 50%;
                filter: blur(4px);
                transform: translate(-50%, 50%);
            }

        ul.v-timeline li .title::before {
            bottom: calc(100% + 0.125rem);
        }

        ul.v-timeline li .descr::before {
            z-index: -1;
            bottom: 0.25rem;
        }

@media (min-width: 40rem) {
    ul.v-timeline {
        grid-template-columns: 1fr var(--line-w) 1fr;
    }

        ul.v-timeline::before {
            grid-column: 2;
        }

        ul.v-timeline li:nth-child(odd) {
            grid-column: 1;
        }

        ul.v-timeline li:nth-child(even) {
            grid-column: 3;
        }

        /* start second card */
        ul.v-timeline li:nth-child(2) {
            grid-row: 2/4;
        }

        ul.v-timeline li:nth-child(odd) .date::before {
            clip-path: polygon(0 0, 100% 0, 100% 100%);
            left: 0;
        }

        ul.v-timeline li:nth-child(odd) .date::after {
            transform: translate(-50%, -50%);
            left: calc(100% + var(--col-gap) + var(--line-w) / 2);
        }

        ul.v-timeline li:nth-child(odd) .date {
            border-radius: 0 calc(var(--dateH) / 2) calc(var(--dateH) / 2) 0;
        }
}

.custom-image {
    width: 130px;
    height: auto;
    /* padding: 2px; */
    /* position: relative; */
    /*border-radius: 50%;
    box-shadow: 0px 5px 8px rgb(100 100 100 / 50%);*/
    /* border: 4px dotted #354f9a; */
    filter: drop-shadow(0 25px 10px rgba(40, 40, 40, 0.4));
}

.timeline-event {
    display: inline-flex;
    margin: 5px;
    width: auto;
    z-index: 10;
    position: relative;
    /* display: flex; */
}

.tabs ul.tabs-list li {
    padding: 1em;
    text-align: center;
}

.tab-content {
    margin-top: 40px;
}

.tabs input[name=tab-control]:nth-of-type(2):checked ~ ul.tabs-list > li:nth-child(2),
.tabs input[name=tab-control]:nth-of-type(1):checked ~ ul.tabs-list > li:nth-child(1) {
    /*background-color: #f0f4fdb3;*/
    background-color: #e0e8f5;
}
@media (max-width: 800px) {


    .tabs .tab-content {
        margin-top: 0;
    }

    .user-profile ul.tabs-list li label {
        padding: 8px;
        font-size: 16px;
    }

    .custom-image {
        width: 100px;
        margin: 4px 0;
        /* position: relative; */
        /* border: 4px dotted #354f9a; */
    }

    .timeline-series {
        margin: 0 0px 20px 0;
        padding: 4px 4px 4px 0;
        /* white-space: nowrap; */
        /* width: 400px; */
    }

    .timeline-event {
        margin: 0 1px;
        z-index: 10;
    }

    .row.justify-content-center.user-profile.pt-3.pb-5 {
        padding: 0;
    }
    .tabs ul.tabs-list li {
        padding: 0.5em;
        text-align: center;
    }
    .tabs input[name=tab-control]:nth-of-type(2):checked ~ ul.tabs-list > li:nth-child(2) > label ,
    .tabs input[name=tab-control]:nth-of-type(1):checked ~ ul.tabs-list > li:nth-child(1) > label {
        background: transparent;
    }
    ul.v-timeline li {
        --inlineP: .5rem;
        grid-row: span 2;
    }
        ul.v-timeline li .title, ul.v-timeline li .descr {
            /* background: var(--bgColor); */
            padding: 0.5rem;
        }
    ul.v-timeline {
        --col-gap: 1rem;
        --row-gap: 1rem;
        width: min(60rem, 100%);
    }

}