/* History Timeline - Frontend Styles */

.htl-timeline-wrap {
    --htl-primary: #E50C4E;
    --htl-gradient: #FF6B8A;
    --htl-bg: #000;
    --htl-text: #fff;
    --htl-muted: rgba(255, 255, 255, 0.70);
    --htl-line-base: rgba(255, 255, 255, 0.15);
    --htl-line-progress: #fff;
    --htl-dot: #fff;
    --htl-container: 1100px;
    --htl-line-w: 2px;
    --htl-dot-size: 10px;
    --htl-item-gap: 30px;
    --htl-enter-offset: 40px;
    --htl-enter-x: 140px;
    --htl-enter-y: 12px;
    --htl-enter-duration: 600ms;
    --htl-enter-ease: cubic-bezier(.2, .7, .2, 1);
}

.htl-timeline-wrap {
    background: var(--htl-bg);
    color: var(--htl-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
    line-height: 1.6;
    padding: 56px 16px 120px;
    box-sizing: border-box;
}

.htl-timeline-wrap *,
.htl-timeline-wrap *::before,
.htl-timeline-wrap *::after {
    box-sizing: border-box;
}

/* Header */
.htl-header {
    max-width: var(--htl-container);
    margin: 0 auto;
    padding: 24px 0 40px;
}

.htl-title {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: -0.02em;
    color: var(--htl-text);
}

.htl-subtitle {
    margin: 0;
    color: var(--htl-muted);
    font-size: 14px;
}

/* Timeline */
.htl-timeline {
    position: relative;
    padding: 0 0 30px 0;
    max-width: var(--htl-container);
    margin: 0 auto;
}

.htl-timeline-line,
.htl-timeline-progress {
    position: absolute;
    left: 50%;
    top: 100px;
    transform: translateX(-50%);
    width: var(--htl-line-w);
    height: calc(100% - 100px);
    border-radius: 999px;
}

.htl-timeline-line {
    background: var(--htl-line-base);
}

.htl-timeline-progress {
    height: 0%;
    background: var(--htl-line-progress);
    transition: height 200ms ease-out;
    will-change: height;
}

.htl-timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.htl-timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 200px;
    margin: var(--htl-item-gap) 0;
    width: 100%;
}

.htl-timeline-item:first-child {
    margin-top: 0;
}

.htl-timeline-item--left {
    justify-content: flex-end;
    padding-right: 60%;
}

.htl-timeline-item--right {
    justify-content: flex-start;
    padding-left: 60%;
}

.htl-timeline-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: var(--htl-dot-size);
    height: var(--htl-dot-size);
    background: var(--htl-dot);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.02);
}

.htl-timeline-content {
    max-width: 440px;
    opacity: 0;
    transform: translateY(var(--htl-enter-offset));
    transition: opacity var(--htl-enter-duration) var(--htl-enter-ease), transform var(--htl-enter-duration) var(--htl-enter-ease);
}

/* Left/Right slide animation */
.htl-timeline-item--left .htl-timeline-content {
    transform: translateX(calc(var(--htl-enter-x) * -1)) translateY(var(--htl-enter-y));
}

.htl-timeline-item--right .htl-timeline-content {
    transform: translateX(var(--htl-enter-x)) translateY(var(--htl-enter-y));
}

.htl-timeline-item.is-visible .htl-timeline-content {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

.htl-year {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 750;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--htl-primary) 0%, var(--htl-gradient) 50%, var(--htl-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--htl-primary);
}

.htl-desc {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.80);
}

.htl-desc p {
    margin: 0 0 8px;
}

.htl-desc p:last-child {
    margin-bottom: 0;
}

/* Responsive - Tablet & Mobile */
@media (max-width: 900px) {
    .htl-timeline-wrap {
        --htl-enter-x: 40px;
        --htl-item-gap: 20px;
    }
    
    .htl-timeline-item {
        min-height: 140px;
    }
    
    .htl-timeline-item--left,
    .htl-timeline-item--right {
        padding: 0 16px;
    }
    
    .htl-timeline-item--left {
        justify-content: flex-end;
        padding-right: calc(50% + 20px);
        padding-left: 12px;
    }
    
    .htl-timeline-item--right {
        justify-content: flex-start;
        padding-left: calc(50% + 20px);
        padding-right: 12px;
    }
    
    .htl-timeline-content {
        max-width: 100%;
        text-align: left;
    }
    
    .htl-timeline-item--left .htl-timeline-content {
        text-align: right;
    }
    
    .htl-year {
        font-size: 22px;
        margin-bottom: 4px;
    }
    
    .htl-desc {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .htl-timeline-item--left .htl-timeline-content {
        transform: translateX(calc(var(--htl-enter-x) * -1)) translateY(var(--htl-enter-y));
    }
    
    .htl-timeline-item--right .htl-timeline-content {
        transform: translateX(var(--htl-enter-x)) translateY(var(--htl-enter-y));
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .htl-timeline-progress {
        transition: none;
    }
    
    .htl-timeline-content {
        transition: none;
        transform: none;
    }
    
    .htl-timeline-item .htl-timeline-content {
        opacity: 1;
    }
}
