/* 1. 기본 레이아웃 및 테마 대응 */
.history-section { padding: 100px 0; overflow: hidden; }
.section-header { text-align: center; margin-bottom: 80px; }
.section-header .title-en { font-size: 60px; font-weight: 900; letter-spacing: -1px; }

.historyWrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* 중앙 세로선: 은은하게 배치 */
.historyWrap::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    /*{#background-color: var(--bs-emphasis-color);#}*/
    background-color: #4ec09a;
    opacity: 0.5;
    transform: translateX(-50%);
    z-index: 1;
}

.historyMainList { list-style: none; padding: 0; margin: 0; }

/* 2. 연도 스타일 (중앙 고정) */
.history-year-group { position: relative; width: 100%; margin-bottom: 100px; z-index: 2; }
.yearList { display: block; margin: 0; }
.yearList dt {
    position: relative;
    text-align: center;
    font-size: 48px;
    font-weight: 800;
    color: #4ec09a;
    background: var(--bs-body-bg);
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    padding: 20px 30px;
    z-index: 5;
    margin-bottom: 80px;
}
.yearList dd { margin: 0; }

/* 3. 월별 항목 (고급 애니메이션 적용) */
.monthList { list-style: none; padding: 0; }
.monthList > li {
    position: relative;
    width: 50%;
    margin-bottom: 120px;
    box-sizing: border-box;

    /* 초기 상태: 더 아래에서 대기 */
    opacity: 0;
    transform: translateY(120px);
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 1.2s linear;
    will-change: transform, opacity;
}

/* 좌우 교차 배치 */
.monthList > li:nth-child(odd) { left: 0; padding-right: 100px; text-align: right; }
.monthList > li:nth-child(even) { left: 50%; padding-left: 100px; text-align: left; }

/* 중앙 포인트 점 (Dot) */
.monthList > li::after {
    content: "";
    position: absolute;
    top: 10px;
    width: 16px;
    height: 16px;
    background-color: #4ec09a;
    border: 4px solid var(--bs-body-bg);
    border-radius: 50%;
    z-index: 10;
}
.monthList > li:nth-child(odd)::after { right: -12px; }
.monthList > li:nth-child(even)::after { left: -12px; }

/* 4. 컨텐츠 디테일 */
.monthList strong {
    display: block;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--bs-emphasis-color);
}

.eventList { list-style: none; padding: 0; display: inline-block; width: 100%; }
.eventList > li { margin-bottom: 35px; font-size: 19px; line-height: 1.7; color: var(--bs-body-color); }

.imgArea .poster {
    margin-bottom: 25px;
    border-radius: 16px;
    overflow: hidden;
    display: inline-block;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    background-color: var(--bs-tertiary-bg);
}
.imgArea img { max-width: 100%; height: auto; display: block; }

/* 활성화 상태 (스크롤 감지 시) */
.monthList > li.active {
    opacity: 1;
    transform: translateY(0);
}

.monthList > li {
    position: relative;
    width: 50%;
    margin-bottom: 120px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(120px);
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 1.2s linear;
}

/* [수정] 월 텍스트 (strong) 설정: 컨텐츠 옆으로 강제 이동 */
.monthList strong {
    position: absolute;
    top: 0;
    width: 80px; /* 월 텍스트 너비 */
    font-size: 24px;
    font-weight: 800;
    color: var(--bs-emphasis-color);
}

/* 왼쪽 배치일 때: 월을 선 오른쪽(바깥쪽)에 배치 */
.monthList > li:nth-child(odd) {
    left: 0;
    padding-right: 120px; /* 월이 들어갈 공간 확보 */
    text-align: right;
}
.monthList > li:nth-child(odd) strong {
    right: 20px; /* 선 바로 왼쪽 옆에 배치 */
    text-align: right;
}

/* 오른쪽 배치일 때: 월을 선 왼쪽(바깥쪽)에 배치 */
.monthList > li:nth-child(even) {
    left: 50%;
    padding-left: 120px; /* 월이 들어갈 공간 확보 */
    text-align: left;
}
.monthList > li:nth-child(even) strong {
    left: 20px; /* 선 바로 오른쪽 옆에 배치 */
    text-align: left;
}

/* 상세 리스트는 strong과 겹치지 않게 함 */
.eventList {
    display: block;
    width: 100%;
}



/* 포스터 감싸는 영역 */
.poster-wrapper {
    overflow: hidden;
    border: 1px solid #000;
    background-color: #fff;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.poster img {
    width: 100%;
    display: block;
    filter: grayscale(100%) contrast(120%); /* 기본: 강한 대비의 흑백 */
    transition: filter 0.5s ease;
    border: 1px solid black;
}

/* 이미지 흑백(Grayscale) 설정 효과 및 보더 */
.history-link:hover .poster-wrapper {
    transform: translateY(-5px); /* 위로 살짝 이동 */
    box-shadow: 8px 8px 0px #000; /* 블랙 테마의 각진 그림자 */
}

.history-link:hover .poster img {
    filter: grayscale(0%) contrast(100%); /* 호버 시 컬러 복구 */
    border: 1px solid #4ec09a;
}

/* 5. 반응형 (모바일) */
@media (max-width: 992px) {
    .historyWrap::before { left: 30px; transform: none; }
    .yearList dt { left: 30px; transform: none; font-size: 36px; padding: 10px 20px; }
    .monthList > li {
        width: 100%; left: 0 !important;
        padding: 0 0 80px 60px !important;
        text-align: left !important;
        transform: translateY(60px);
    }
    .monthList > li::after { left: 22px !important; }
    .monthList strong {
        position: static; /* 모바일은 다시 위로 */
        width: 100%;
        text-align: left !important;
        margin-bottom: 15px;
    }
    .monthList > li {
        padding: 0 0 60px 50px !important;
    }

}
@media (max-width: 768px) {
    .history-link .poster img {
        filter: none;
        -webkit-filter: none; /* 아이폰/사파리 호환성 확보 */
        border: 1px solid black;
    }
}