@import url("./common.css");

.history-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    width: 100%;
    /* max-width: 1200px; */
    box-sizing: border-box;
}

.history-nav {
    position: sticky;
    top: var(--header-height);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 31px;
    margin-bottom: 68px;
    width: 100%;
    height: 116px;
    box-sizing: border-box;
    background-color: #ffffffcc;
    z-index: 10;
}

.history-nav-item {
    position: relative;
    padding: 0 25px;
    height: 46px;
    box-sizing: border-box;
    background: none;
    color: #666;
    font-weight: 700;
    font-size: 20px;
    line-height: 26px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-nav-item:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border: 1px solid #DEDEDE;
    border-radius: 60px;
    background-color: transparent;
    transition: all 0.3s ease;
    z-index: -1;
}

.history-nav-item:hover,
.history-nav-item.active {
    color: #fff;
}

.history-nav-item:hover:after,
.history-nav-item.active:after {
    width: 100%;
    background-color: #3C3C3C;
}

.timeline-wrapper {
    position: relative;
    margin: 0 auto;
    width: 100%;
    /* max-width: 1200px; */
}

.timeline-wrapper:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: calc(100% - 150px);
    background-color: rgba(0, 0, 0, 0.12);
}

.timeline-decade {
    position: relative;
    margin: 0 auto;
    max-width: 1920px;
    background-repeat: no-repeat;
    background-position: 100% 0;
}

.timeline-decade+.timeline-decade {
    margin-top: 320px;
}

.timeline-decade:nth-child(1) {
    background-image: url("../images/history/history_1.png");
}

.timeline-decade:nth-child(2) {
    background-image: url("../images/history/history_2.png");
}

.timeline-decade:nth-child(3) {
    background-image: url("../images/history/history_3.png");
}

.decade-header {
    position: sticky;
    top: calc(var(--header-height) + 116px + 50px);
    left: 0;
    width:50%;
    transform: translate(365px, 150px);
    z-index: 1;
}

.decade-img {
    position: absolute;
    top: -150px;
    /* top: -406px; */
    margin-left: 163px;
    display: none;
}

.decade-label {
    font-weight: 800;
    font-size: 132px;
    line-height: 1;
    color: #000;
}

.decade-label-desc {
    margin-top: 15px;
    font-weight: 700;
    font-size: 50px;
    line-height: 1.2;
    color: #222;
}

.event-wrapper {
    position: relative;
    margin-top: 440px;
}

.timeline-event {
    position: relative;
    display: flex;
    gap: 30px;
    margin: 100px 0 100px calc(50% + 1px);
    padding-left: 0;
    /* width: 60%; */
}

.event-year {
    padding-left: 20px;
    flex: 0 0 130px;
    font-weight: 700;
    font-size: 40px;
    color: #222;
}

.event-year:before {
    content: '';
    position: absolute;
    top: 16px;
    left: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #D9D9D9;

}

.event-content {
    margin-top: 5px;
    flex: 1 1 100%;

}

.event-content p {
    padding-left: 30px;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.4;
    color: #555;
    text-indent: -30px;
}

.event-content p+p {
    margin-top: 15px;
}

/* .event-content p:last-child {
    margin-bottom: 0;
} */

.month-label {
    display: inline-block;
    width: 40px;
    color: #222;
    font-weight: 700;
    text-indent: 0;
}

@media (max-width: 1920px) {
    .decade-header {
        transform: translate(20vw, 150px);
    }
}

@media (max-width: 1400px) {
    .decade-header {
        transform: translate(0, 150px);
    }
}

/* 모바일 환경에서 맨 위로 버튼 크기 확대 */
@media (max-width: 768px) {
    .history-container {
        padding: 0 30px;
        width: 100%;
    }

    .history-nav {
        display: none;
    }

    .timeline-wrapper:before {
        display: none;
    }

    .timeline-decade+.timeline-decade {
        margin-top: 69px;
    }

    .event-wrapper {
        margin-top: 0;
    }

    .event-wrapper:before {
        content: '';
        position: absolute;
        top: 8px;
        left: 0;
        width: 1px;
        height: calc(100% + 70px);
        background-color: rgba(0, 0, 0, 0.12);
    }

    .timeline-decade:last-child .event-wrapper::before {
        height: calc(100% - 10px);
    }

    .timeline-decade {
        background: none !important;
    }

    .decade-header {
        position: relative;
        top: 0;
        left: 0;
        margin-top: -35px;
        background-color: transparent;
        transform: none;
    }

    .decade-label {
        font-size: 48px;
    }

    .decade-label-desc {
        margin-top: 10px;
        font-size: 24px;
    }

    .decade-img {
        position: relative;
        top: 0;
        display: inline;
        margin: 0 -30px;
        width: calc(100% + 60px);
        max-width: none;
    }

    .decade-header+.timeline-event {
        margin-top: 38px;
    }

    .timeline-event {
        flex-direction: column;
        gap: 13px;
        margin: 38px 0 0 5px;
        width: 100%;
    }

    .event-year {
        flex: 0 0 auto;
        padding-left: 16px;
        font-size: 20px;
    }

    .event-year:before {
        top: 8px;
        left: -8px;
    }

    .event-content {
        padding-left: 16px;
        font-size: 16px;
    }

    .month-label {
        width: 30px;
        min-height: 1px;
        font-size: 14px;
    }

    .event-content p{
        font-size: 14px;
    }

    .event-content p+p {
        margin-top: 10px;
    }


}

@media (max-width: 480px) {}