﻿@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

:root {
    --yellow: #fbc94c !important;
    --red: #800000 !important;
    --font-ttl: "Inter", sans-serif;
    --font-body: "Roboto", sans-serif !important;
    --light2: #f0f0f0;
    --rgba-light2: 240, 240, 240;
}

/*- History The Story ---------------------------------------------------------------------------------------------------------------*/

@media (min-width: 768px) {
    .history-story h1 {
        text-align: center;
    }

    .history-story ul {
        --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;
        margin-inline: auto;
    }

        /* line */
        .history-story ul::before {
            content: "";
            grid-column: 1;
            grid-row: 1 / span 20;
            background: rgb(225, 225, 225);
            border-radius: calc(var(--line-w) / 2);
        }

        .history-story ul li:not(:last-child) {
            margin-bottom: var(--row-gap);
        }

        /* card */
        .history-story ul 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 */
            .history-story ul li .date {
                --dateH: 3rem;
                height: 4rem;
                margin-inline: calc(var(--inlineP) * -1);
                text-align: center;
                background-color: white;
                color: var(--red);
                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 */
                .history-story ul li .date::before {
                    content: "";
                    width: var(--inlineP);
                    aspect-ratio: 1;
                    background: var(--logo-color-bg);
                    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 */
                .history-story ul li .date::after {
                    content: "";
                    position: absolute;
                    /*width: 2rem;*/
                    width: 2rem;
                    aspect-ratio: 1;
                    /*background: var(--light2);*/
                    border: 0.3rem solid white;
                    border-radius: 50%;
                    top: 50%;
                    transform: translate(50%, -50%);
                    right: calc(100% + var(--col-gap) + var(--line-w) / 2);
                }

            /* title descr */
            .history-story ul li .title,
            .history-story ul li .descr {
                /*background: var(--bgColor);*/
                position: relative;
                padding-inline: 1.5rem;
            }

            .history-story ul li .title {
                overflow: hidden;
                padding-block-start: 1.5rem;
                padding-block-end: 1rem;
                font-weight: 500;
            }

            .history-story ul li .descr {
                padding-block-end: 1.5rem;
                /*font-weight: 300;*/
            }

                /* shadows */
                .history-story ul li .title::before,
                .history-story ul li .descr::before {
                    content: "";
                    position: absolute;
                    width: 100%;
                    height: 0.5rem;
                    background: rgba(0, 0, 0, 0.5);
                    left: 50%;
                    border-radius: 50%;
                    filter: blur(8px);
                    transform: translate(-50%, 50%);
                }

            .history-story ul li .title::before {
                bottom: calc(100% + 0.125rem);
            }

            .history-story ul li .descr::before {
                z-index: -1;
                bottom: 0.25rem;
            }


    .history-story ul {
        grid-template-columns: 1fr var(--line-w) 1fr;
    }

        .history-story ul::before {
            grid-column: 2;
        }

        .history-story ul li:nth-child(odd) {
            grid-column: 1;
        }

        .history-story ul li:nth-child(even) {
            grid-column: 3;
        }

        /* start second card */
        .history-story ul li:nth-child(2) {
            grid-row: 2/4;
        }

        .history-story ul li:nth-child(odd) .date::before {
            clip-path: polygon(0 0, 100% 0, 100% 100%);
            left: 0;
        }

        .history-story ul li:nth-child(odd) .date::after {
            transform: translate(-50%, -50%);
            left: calc(100% + var(--col-gap) + var(--line-w) / 2);
        }

        .history-story ul li:nth-child(odd) .date {
            border-radius: 0 calc(var(--dateH) / 2) calc(var(--dateH) / 2) 0;
        }
}

@media (max-width: 767px) {
    .history-story h1 {
        text-align: center;
    }

    .history-story ul {
        --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;
        margin-inline: auto;
    }

        /* line */
        .history-story ul::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 */
        .history-story ul li:not(:last-child) {
            margin-bottom: var(--row-gap);
        }

        /* card */
        .history-story ul 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 */
            .history-story ul li .date {
                --dateH: 3rem;
                height: 4rem;
                margin-inline: calc(var(--inlineP) * -1);
                text-align: center;
                background-color: white;
                color: var(--red);
                font-size: 1rem;
                font-weight: bold;
                display: grid;
                place-content: center;
                position: relative;
                border-radius: calc(var(--dateH) / 2) 0 0 calc(var(--dateH) / 2);
            }

                /* date flap */
                .history-story ul li .date::before {
                    content: "";
                    width: var(--inlineP);
                    aspect-ratio: 1;
                    background: var(--logo-color-bg);
                    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 */
                .history-story ul li .date::after {
                    content: "";
                    position: absolute;
                    width: 2rem;
                    aspect-ratio: 1;
                    /*background: var(--bgColor);*/
                    border: 0.3rem solid white;
                    border-radius: 50%;
                    top: 50%;
                    transform: translate(50%, -50%);
                    right: calc(100% + var(--col-gap) + var(--line-w) / 2);
                }

            /* title descr */
            .history-story ul li .title,
            .history-story ul li .descr {
                /*background: var(--bgColor);*/
                position: relative;
                padding-inline: 1.5rem;
            }

            .history-story ul li .title {
                overflow: hidden;
                padding-block-start: 1.5rem;
                padding-block-end: 1rem;
                font-weight: 500;
            }

            .history-story ul li .descr {
                /*padding-block-end: 1.5rem;*/
                padding: 5px 0 1rem 0;
                /*font-weight: 300;*/
            }

                /* shadows */
                .history-story ul li .title::before,
                .history-story ul li .descr::before {
                    content: "";
                    position: absolute;
                    width: 100%;
                    height: 0.5rem;
                    background: rgba(0, 0, 0, 0.5);
                    left: 50%;
                    border-radius: 50%;
                    filter: blur(8px);
                    transform: translate(-50%, 50%);
                }

            .history-story ul li .title::before {
                bottom: calc(100% + 0.125rem);
            }

            .history-story ul li .descr::before {
                z-index: -1;
                bottom: 0.25rem;
            }
}
