@charset "UTF-8";
@import "../components/mixins/wood";

.ihk-switch {
    display: none;
}

.timeline-tabs {
    position: relative;
    display: block;
    background-color: $color-primary-light-04;
    background-color: var(--theme-primary-light-04, $color-primary-light-04);
    padding: 24px 20px 0;
    margin-bottom: -8px;

    ul {
        list-style: none;
        display: flex;
        justify-content: center;
        margin: 0 -15px;
        padding: 0;
        position: relative;
        z-index: 1;
    }

    .btn-small {
        min-width: 180px;
        text-align: center;

        &:not(.active) {
            background-color: white;
            color: $color-primary;
            color: var(--theme-primary, $color-primary);
        }

        @media(max-width: 567px) {
            min-width: 0;
            padding-left: 12px;
            padding-right: 12px;
            margin: 0 4px;
        }
        @media(max-width: 349px) {
            font-size: 16px;
            margin: 0 2px;
        }
    }

    ~ .timeline .item-slider {
        .prev,
        .next {
            @media(min-width: 1000px) {
                margin-top: -52px;
            }
            @media(min-width: 1340px) {
                margin-top: -74px;
            }
        }
    }
}

.timeline {
    margin: 0 0 calc(1.5vw + 40px);

    > p:last-child {
        font-size: 14px;
        text-align: right;
        margin: 15px;
    }

    .item-slider {
        position: relative;
        display: block;
        background-color: $color-primary-light-04;
        background-color: var(--theme-primary-light-04, $color-primary-light-04);
        min-height: 460px;
        font-weight: 600;

        &::before {
            content: "";
            position: absolute;
            width: 374px;
            height: 374px;
            background-color: #9AD7A3;
            top: 50%;
            left: 50%;
            border-radius: 50%;
            transform: translate3d(-50%, -50%, 0) scale(1);
            opacity: 1;
            transition: 0.3s ease;
        }

        @media(max-width: 567px) {
            min-height: 380px;

            &::before {
                width: 280px;
                height: 280px;
            }
        }

        @media(max-width: 349px) {
            &::before {
                width: 260px;
                height: 260px;
            }
        }

        .tabs, .count {
            display: none;
        }

        .prev, .next {
            width: 80px;
            height: 80px;
            position: absolute;
            top: 50%;
            margin-top: -40px;
            right: 24px;
            padding: 0;
            font-size: 80px;
            line-height: 1;
            transition: 0.2s ease;
            border: 0;
            background-color: transparent;
            cursor: pointer;

            &::before {
                @include icon-small-arrow-right-simple;
                font-family: "Icons", sans-serif;
            }

            &:hover {
                padding-left: 8px;

                @media(max-width: 999px) {
                    padding-left: 0;
                }
            }

            @media(max-width: 1339px) {
                right: 0;
                width: 50px;
                height: 50px;
                font-size: 50px;
                margin-top: -25px;
            }

            @media(max-width: 567px) {
                font-size: 30px;
                width: 30px;
                height: 30px;
                margin-top: -15px;
            }
        }

        .prev {
            left: 24px;
            transform: scale(-1, 1);

            @media(max-width: 1339px) {
                left: 0;
            }
        }

        .slide {
            min-height: 460px;
            display: flex;
            align-items: center;
            text-align: center;

            &:not(.current) {
                max-height: 460px;
            }

            @media(max-width: 567px) {
                min-height: 380px;

                &:not(.current) {
                    max-height: 380px;
                }
            }
        }

        .text-box {
            padding: 50px 0;

            @media(max-width: 767px) {
                padding: 30px 0;
            }
        }

        .slide:not(.has-image) .container {
            max-width: 1180px;
        }

        .container {
            @media(min-width: 1000px) and (max-width: 1339px) {
                padding: 0 60px;
            }
            @media(min-width: 768px) and (max-width: 999px) {
                padding: 0 120px;
            }
        }

        .year {
            font-family: "Korb", sans-serif;
            font-weight: 700;
            font-size: 100px;
            line-height: 0.9;
            margin-bottom: 0.25em;

            @media(max-width: 1340px) {
                font-size: 80px;
            }
            @media(max-width: 999px) {
                font-size: 72px;
            }
            @media(max-width: 567px) {
                font-size: 48px;
            }
            @media(max-width: 349px) {
                font-size: 40px;
            }
        }

        .subhead {
            font-weight: 700;
        }

        p:last-child {
            margin-bottom: 0;
        }

        @media(min-width: 1000px) {
            .slide.has-image .container {
                display: flex;
                align-items: center;
                justify-content: space-between;

                .image-box, .text-box {
                    flex: 1 1 calc(50% - 20px);
                    max-width: calc(50% - 20px);

                    @media(max-width: 1339px) {
                        flex: 1 1 calc(50% - 15px);
                        max-width: calc(50% - 15px);
                    }
                }

                .image-box {
                    position: relative;
                    margin: 30px 0;

                    &.portrait {
                        flex: 1 1 265px;
                        margin-right: 40px;
                        max-width: 265px;

                        + .text-box {
                            max-width: none;
                        }

                        @media(max-width: 1339px) {
                            margin-right: 30px;
                        }
                    }

                    &.medium {
                        flex: 1 1 320px;
                        margin-right: 40px;
                        max-width: 320px;

                        + .text-box {
                            max-width: none;
                        }

                        @media(max-width: 1339px) {
                            margin-right: 30px;
                        }
                    }

                    img {
                        display: block;
                    }

                    .caption {
                        position: absolute;
                        bottom: 0;
                        left: 0;
                        width: 100%;
                        padding: 8px 12px;
                        background-color: rgba(white, 0.6);
                        text-align: left;
                        backdrop-filter: blur(3px);
                        font-weight: 700;
                        font-size: 15px;
                        line-height: 1.4;

                        span + span {
                            margin-top: 3px;
                        }
                    }

                    .copyright {
                        display: block;
                        font-weight: 400;
                        font-size: 10px;
                    }
                }

                .text-box {
                    text-align: left;
                }

                .year {
                    margin-left: -0.06em;
                }
            }

            &.hide-circle::before {
                transform: translate3d(-50%, -50%, 0) scale(0.8);
                opacity: 0;
            }
        }

        @media(max-width: 999px) {
            .image-box {
                display: none;
            }
        }

        @media(max-width: 767px) {
            p {
                line-height: 1.4;
                font-size: 0.94em;
            }
        }

        @media(max-width: 567px) {
            p {
                padding-left: 10px;
                padding-right: 10px;
            }
        }
    }

    .years {
        position: relative;
        display: block;
        background-color: $color-primary;
        background-color: var(--theme-color-primary, $color-primary);
        color: white;
        overflow: hidden;

        &::before {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            top: 50%;
            margin-top: -4px;
            height: 8px;
            background-color: $color-secondary;
            background-color: var(--theme-color-secondary, $color-secondary);

            @media(max-width: 999px) {
                margin-top: 8px;
                height: 4px;
            }
        }
    }

    .years-wrapper {
        position: relative;
        display: flex;

        &.animate {
            transition: 0.3s ease;
        }

        &.dragging * {
            pointer-events: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
    }

    @media(max-width: 999px) {
        .year-item {
            margin: 26px 32px 26px 0;

            .year {
                white-space: nowrap;

                br {
                    display: none;
                }
            }

            ul {
                display: none;
            }

            .year {
                position: relative;
                font-family: "Korb", sans-serif;
                font-weight: 700;
                font-size: 36px;
                line-height: 1;
                cursor: pointer;
                z-index: 1;
                transition: 0.2s ease;
                margin-bottom: 0;

                &::before {
                    content: "";
                    @include fullsize;
                    background-color: $color-primary;
                    background-color: var(--theme-color-primary, $color-primary);
                    margin: 0 -8px;
                    z-index: -1;
                    transition: 0.2s ease;
                    opacity: 0;
                }
            }

            &.current .year::before,
            &.anchor .year::before {
                opacity: 1;
            }

            &.current .year {
                color: $color-secondary;
                color: var(--theme-color-secondary, $color-secondary);
            }

            &.last {
                margin-right: 200px;
            }
        }
    }

    @media(min-width: 1000px) {
        .year-item {
            position: relative;
            font-size: 0.75em;
            line-height: 1.3em;
            display: flex;
            align-items: flex-start;
            min-height: 360px;
            flex: 1 1 320px;
            max-width: 320px;
            min-width: 320px;
            padding: 18px 20px 22px;

            &::before {
                content: "";
                position: absolute;
                left: 0;
                top: 26px;
                bottom: calc(50% - 4px);
                width: 4px;
                background-color: white;
                z-index: 2;
            }

            @media(max-width: 999px) {
                min-height: 0;
                flex: 1 1 150px;
                max-width: 150px;
                min-width: 60px;

                &::before {
                    display: none;
                }
            }

            &:nth-child(odd) {
                align-items: flex-end;

                &::before {
                    bottom: 26px;
                    top: calc(50% - 4px);
                }
            }

            &.anchor {
                &::before {
                    display: none;
                }
                .year::before {
                    opacity: 1;
                }
                &:not(:first-child) {
                    margin-right: 40px;
                }
            }

            &.last {
                margin-right: 400px;
            }

            &.anchor ~ .anchor ~ .anchor {
                margin-right: 70px;

                .year::before {
                    margin-right: 0.6em;
                }
            }

            .year {
                position: absolute;
                bottom: 50%;
                margin: calc(-4px - 0.15em) -0.06em;
                font-family: "Korb", sans-serif;
                font-weight: 700;
                font-size: 60px;
                line-height: 1;
                cursor: pointer;
                z-index: 1;
                transition: 0.2s ease;

                &::before {
                    content: "";
                    @include fullsize;
                    background-color: $color-primary;
                    background-color: var(--theme-color-primary, $color-primary);
                    margin: 0 -16px;
                    z-index: -1;
                    transition: 0.2s ease;
                    opacity: 0;
                }

                @media(max-width: 999px) {
                    font-size: 40px;
                    position: relative;
                }
            }

            &.current {
                &::before {
                    background-color: $color-secondary;
                    background-color: var(--theme-color-secondary, $color-secondary);
                }

                .year {
                    color: $color-secondary;
                    color: var(--theme-color-secondary, $color-secondary);

                    &::before {
                        opacity: 1;
                    }
                }
            }

            ul {
                margin: 0 -70% 0 -0.28em;
                padding: 0;
                list-style: none;

                @media(max-width: 999px) {
                    display: none;
                }
            }

            .title {
                margin: 0;
                font-family: 'Source Sans Pro', sans-serif;
                font-weight: 600;
            }

            li {
                position: relative;
                cursor: pointer;
                transition: 0.2s ease;
                z-index: 3;
                padding: 0.2em 0;
                top: 0.25em;

                &::before {
                    content: '';
                    position: absolute;
                    left: 0;
                    top: 0;
                    bottom: 0;
                    width: 15px;
                    transition: 0.2s ease;
                }

                &:hover, &.active {
                    color: $color-secondary;
                    color: var(--theme-color-secondary, $color-secondary);
                }

                p {
                    transform: translate3d(0, 0, 0);
                    transition: 0.2s ease;
                }

                &:hover p {
                    transform: translate3d(10px, 0, 0);
                }
            }

            .slide {
                display: none;
            }
        }
    }

}
