/* History Section Base */
.history-section {
    background-color: var(--dark);
    position: relative;
    z-index: 1;
}

/* 배경 원형 장식 (기존 디자인 유지) */
.history-section::before,
.history-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: -1;
}

.history-section::before {
    width: 600px;
    height: 600px;
    left: 10%;
    top: 20%;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.04) 0%, transparent 70%);
}

.history-section::after {
    width: 500px;
    height: 500px;
    right: 15%;
    bottom: 10%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
}

.history-container {
    position: relative;
    padding: 0;
}

/* 중앙 가로선 */
.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
    z-index: 0;
}

.history-row {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    /* 가로선 기준 중앙 정렬 */
}

/* 개별 아이템 공통 스타일 */
.history-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* 세로 연결선 (중요) */
.v-line {
    width: 1px;
    height: 60px;
    /* 원과 박스 사이 거리 */
    background: rgba(255, 255, 255, 0.2);
    position: relative;
}

.year-label {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    transition: 0.3s;
}

.timeline-dot {
    width: 18px;
    height: 18px;
    background: var(--dark);
    border: 3px solid var(--primary);
    border-radius: 50%;
    z-index: 3;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 212, 170, 0.3);
}

/* 카드 기본 스타일 */
.history-card {
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px 10px;
    width: 120%;
    text-align: center;
    transition: 0.4s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.h-icon {
    width: 40px;
    height: 40px;
    background: rgba(0, 212, 170, 0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.h-icon i {
    color: var(--primary);
    font-size: 1rem;
}

.h-date {
    background: var(--primary);
    color: var(--dark);
    font-size: 1rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    margin-bottom: 10px;
    display: inline-block;
}

.h-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.h-desc {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* 하이라이트 (NOW) */
.highlighted {
    border: 1px solid var(--primary);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.2);
}

.item-bottom.item-now .timeline-dot {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
}

/* =================================================
   데스크탑 지그재그 배치 (992px 이상)
   ================================================= */
@media (min-width: 992px) {

    /* 박스가 위에 있는 아이템 (1998, 2007, 2025) */
    .item-top {
        margin-top: -260px;
        /* 위로 끌어올림 */
    }

    .item-top .year-label {
        margin-top: 15px;
    }

    /* 박스가 아래에 있는 아이템 (2005, 2008, NOW) */
    .item-bottom {
        margin-top: 260px;
        /* 아래로 내림 */
    }

    .item-bottom .year-label {
        margin-bottom: 15px;
    }
}

/* =================================================
   반응형 (모바일/태블릿)
   ================================================= */
@media (max-width: 991.98px) {
    .timeline-line {
        display: none;
    }

    .history-container {
        padding: 40px 0;
    }

    .history-row {
        display: block;
    }

    .history-item {
        margin-bottom: 60px;
        flex-direction: column !important;
    }

    /* 모바일에서는 모두 연도 -> 점 -> 선 -> 카드 순으로 통일 */
    .item-top,
    .item-bottom {
        margin-top: 0 !important;
    }

    .item-top {
        flex-direction: column-reverse !important;
    }

    .v-line {
        height: 40px;
    }

    .year-label {
        font-size: 2.5rem;
        margin: 10px 0 !important;
    }

    .history-card {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 767px) {
    .year-label {
        font-size: 2rem;
    }
}