/* history.css - 연혁 페이지 전용 스타일 */

.history-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.history-container {
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 40px;
    width: 80%;
    margin: 0 auto;
}

.history-content {
    font-family: 'Pretendard-Regular', 'Noto Sans KR', sans-serif;
    position: relative;
}

.history-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

/* 수직선 - 제거하고 JS로 구현 */
.history-timeline::before {
    content: none;
}

/* 애니메이션 키프레임 추가 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 타임라인 라인 스타일 */
.timeline-line {
    position: absolute;
    /* left는 JS에서 동적으로 계산 */
    top: 0;
    width: 2px;
    background-color: #e0e0e0;
    z-index: 1;
    height: 0; /* 초기 높이 0 */
}

/* 타임라인 아이템 - 구분선 추가 */
.timeline-item {
    position: relative;
    display: flex;
    margin-bottom: 40px;
    padding-bottom: 40px; /* 패딩 추가 */
    border-bottom: 1px solid #f0f0f0; /* 구분선 추가 */
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.timeline-item:nth-child(1) {
    animation-delay: 0.3s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.6s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.9s;
}

.timeline-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none; /* 마지막 아이템은 구분선 제거 */
}

/* 연도 표시 */
.timeline-year {
    flex: 0 0 90px;
    font-size: 28px;
    font-weight: 700;
    text-align: right;
    padding-right: 30px;
    position: relative;
    z-index: 2;
}

/* 이벤트 컨테이너 */
.timeline-events {
    flex: 1;
    padding-left: 30px;
    padding-top: 3px;
}

/* 개별 이벤트 - 구분선 제거 */
.timeline-event {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: none; /* 기존 구분선 제거 */
}

.timeline-event:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 이벤트 날짜 */
.event-date {
    flex: 0 0 70px;
    font-weight: 600;
    color: #238E96;
}

/* 이벤트 내용 */
.event-content {
    flex: 1;
    font-size: 16px;
    /*line-height: 1.6;*/
    color: var(--text-sub1);
}

/* 정기활동 섹션 스타일 수정 - 타임라인과 일관되게 */
.recurring-events {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px dashed #e0e0e0;
    position: relative;
    display: flex; /* flex로 변경 */
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 1.2s; /* 마지막 타임라인 아이템 이후에 표시 */
}

.recurring-title {
    flex: 0 0 90px; /* timeline-year와 동일한 너비 */
    font-size: 28px;
    font-weight: 700;
    text-align: right;
    padding-right: 30px;
    margin-bottom: 0; /* 기존 마진 제거 */
    position: relative;
    z-index: 2;
}

.recurring-list {
    flex: 1;
    list-style: none;
    padding: 0 0 0 30px; /* timeline-events와 동일하게 왼쪽 패딩 */
    margin: 0;
    display: block; /* flex에서 block으로 변경 */
}

.recurring-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    background-color: transparent; /* 배경색 제거 */
    border-radius: 0; /* 둥근 모서리 제거 */
    border-left: none; /* 왼쪽 테두리 제거 */
    box-shadow: none; /* 그림자 제거 */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    display: block; /* flex에서 block으로 변경 */
}

.recurring-item.animated {
    opacity: 1;
    transform: translateY(0);
}

.recurring-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recurring-content {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-sub1);
}

/* 활동 태그 스타일 */
.activity-tag {
    display: inline-block;
    background-color: rgba(255, 127, 42, 0.1);
    color: var(--main-color);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
    font-weight: 500;
}

/* 반응형 조정 */
@media (max-width: 1024px) {
    .history-container {
        width: 90%;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .history-container {
        width: 100%;
        padding: 25px;
    }

    .history-timeline::before {
        left: 70px;
    }

    .timeline-year {
        flex: 0 0 70px;
        font-size: 24px;
        padding-right: 20px;
    }

    .timeline-events {
        padding-left: 20px;
    }

    .recurring-events {
        flex-direction: row; /* 행 방향 유지 */
    }

    .recurring-title {
        flex: 0 0 70px; /* timeline-year와 같은 너비 */
        font-size: 24px;
        text-align: right; /* 오른쪽 정렬 유지 */
        padding-right: 20px; /* timeline-year와 동일한 패딩 */
        margin-bottom: 0;
    }

    .recurring-list {
        padding-left: 20px; /* timeline-events와 같은 패딩 */
    }
}

@media (max-width: 480px) {
    .history-container {
        padding: 20px 15px;
    }

    .history-timeline {
        padding-left: 0;
    }

    .timeline-year {
        flex: 0 0 50px;
        font-size: 20px;
        padding-right: 15px;
    }

    .timeline-event {
        flex-direction: column;
        align-items: flex-start;
    }

    .event-date {
        margin-bottom: 5px;
    }

    .event-content {
        font-size: 15px;
    }

    /* 매년 섹션도 같은 스타일 적용 */
    .recurring-title {
        flex: 0 0 50px;
        font-size: 20px;
        padding-right: 15px;
    }

    .recurring-content {
        font-size: 15px;
    }
}