.history-container { max-width: 1200px; margin: 0 auto; padding: 60px 20px 120px; overflow:hidden;}
.history-timeline { position: relative; width: 100%; }

/* 중앙 수직선 */
.timeline-line {
    position: absolute; left: 50%; top: 0; bottom: 0;
    width: 1px; background: #e2e8f0; transform: translateX(-50%);
    /*z-index: 1;*/
}
/* 실시간으로 채워지는 파란 선 */
.line-fill {
    position: absolute; top: 0; left: 0; width: 100%;
    background: #3b82f6;
    height: 0%; /* JS에서 제어 */
    transition: height 0.1s ease-out;
}

/* 이중 원 디자인 */
.circle {
    position: absolute; left: 50%; top: 0%;
    width: 26px; height: 26px;
    transform: translate(-50%, -50%);
    z-index: 20;
    transition: top 0.1s ease-out;
}

/* 바깥쪽: 퍼지는 파동 효과 */
.circle .outer {
    position: absolute; width: 100%; height: 100%;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

/* 안쪽: 고정된 중심점 */
.circle .inner {
    position: absolute; left: 50%; top: 50%;
    width: 12px; height: 12px;
    background: #3b82f6;
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

/* 깜빡이며 퍼지는 애니메이션 */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    70% { transform: scale(2.5); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

.year-header { width: 100%; text-align: center; margin: 100px 0 50px; clear: both; }
.year-header span { font-size: 2.5rem; font-weight: 900; background: #fff; padding: 0 30px; position: relative; z-index: 2; }

/* 아이템 공통: 한 줄을 통째로 차지 (옆으로 안 붙게) */
.history-item {
    width: 100%;
    clear: both;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* [왼쪽 뭉치기 그룹] */
.left-group { align-items: flex-end; padding-right: 50%; }
.left-group .month-label { padding-right:60px; }
.left-group .history-content { text-align: right; padding-right: 60px; width: 100%; }
.left-group .timeline-dot { left: 50%; transform: translateX(-50%); }
.left-group .history-card { align-items: flex-end; display: flex; flex-direction: column; }

/* [오른쪽 뭉치기 그룹] */
.right-group { align-items: flex-start; padding-left: 50%; }
.right-group .month-label { padding-left:60px; }
.right-group .history-content { text-align: left; padding-left: 60px; width: 100%; }
.right-group .timeline-dot { left: 50%; transform: translateX(-50%); }
.right-group .history-card { align-items: flex-start; display: flex; flex-direction: column; }

/* 간격 조절 */
.history-item { margin-bottom: 20px; } /* 같은 달 안의 글들 사이 간격 */
.history-item.new-month { margin-top: 60px; } /* 달이 바뀔 때만 확 띄움 */

/* 월 표시 및 점 */
.month-label { font-size: 2rem; font-weight: 800; color: #3b82f6; line-height: 1; margin-bottom: 15px; }
.timeline-dot {
    position: absolute; top: 12px; width: 14px; height: 14px;
    background: #3b82f6; border: 3px solid #fff; border-radius: 50%; z-index: 10;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* 텍스트 및 이미지 */
.history-title { font-size: 1.2rem; font-weight: 600; color: #334155; margin: 0; word-break: keep-all; }
.history-img { width: 100%; max-width: 450px; border-radius: 12px; overflow: hidden; margin-top: 15px; }
.history-img img { width: 100%; display: block; }

/* =========================
   Tablet & Mobile (1024px 이하 통합)
   지그재그 해제 -> 왼쪽 정렬 통일
========================= */
@media (max-width: 1024px) {
    .history-container { padding: 40px 20px 80px; }

    /* 1. 중앙 수직선 & 움직이는 원을 왼쪽으로 고정 */
    .timeline-line {
        left: 20px !important;
        transform: none !important;
    }
    .circle {
        left: 50%;
        transform: translate(-50%, -50%) !important;
    }

    /* 2. 연도 헤더 왼쪽 정렬 */
    .year-header {
        text-align: left !important;
        margin: 60px 0 30px !important;
        padding-left: 40px;
    }
    .year-header span {
        font-size: 2.2rem;
        padding: 0 15px;
        margin-left: -5px; /* 선과 겹치는 느낌 방지 */
    }

    /* 3. 좌우 그룹(left-group, right-group) 구분 삭제 및 왼쪽 정렬 */
    .history-item {
        width: 100% !important;
        padding-left: 50px !important; /* 선과 콘텐츠 사이 여백 */
        padding-right: 0 !important;
        align-items: flex-start !important;
        flex-direction: column !important;
    }
    .history-item.new-month { margin-top:30px; }

    /* 그룹별 패딩 및 정렬 강제 초기화 */
    .left-group, .right-group {
        padding-left: 50px !important;
        padding-right: 0 !important;
        align-items: flex-start !important;
    }

    .history-content {
        text-align: left !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .history-card {
        align-items: flex-start !important;
        display: flex;
        flex-direction: column;
    }

    .month-label {
        padding: 0 !important;
        margin-bottom: 10px;
        font-size: 1.7rem;
        text-align: left !important;
    }


    /* 4. 타임라인 점(Dot) 위치 고정 */
    .timeline-dot {
        left: 13px !important; /* 선(20px) 중심에 맞춤 */
        top: 8px;
        transform: none !important;
    }

    /* 5. 이미지 크기 조정 */
    .history-img {
        max-width: 100%; /* 화면 너비에 맞춰 확장 */
        margin-top: 12px;
    }

    .history-title {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    /* AOS 애니메이션 방향 통일 (선택사항) */
    /* 모바일에서 좌우로 나오면 화면이 튀어 보일 수 있으니 아래쪽에서 올라오게 통일 권장 */
    [data-aos="fade-left"], [data-aos="fade-right"] {
        transform: translate3d(0, 30px, 0) !important;
        opacity: 0;
    }
    .aos-animate {
        transform: translate3d(0, 0, 0) !important;
        opacity: 1 !important;
    }
}

/* 480px 이하 초소형 기기 미세 조정 */
@media (max-width: 480px) {
    .year-header span { font-size: 1.6rem; }
    .month-label { font-size: 1.4rem; }
    .history-title { font-size: 1rem; }
}