/* History Page Styles */

/* Hero Section */
.history-hero {
    position: relative;
    height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: white;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    clip-path: inset(0% 50% 0% 50%);
    transition: clip-path 1.2s ease-out;
}

.hero-background img.expand {
    clip-path: inset(0% 0% 0% 0%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.8s forwards;
}

.hero-description {
    font-size: 1.1rem;
    opacity: 0.9;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 1.1s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-arrow {
    width: 45px;
    height: 45px;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.scroll-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Timeline Content */
.timeline-content {
    background: #f8f9fa;
    padding: 80px 0;
    min-height: 100vh;
}

.timeline-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 회색 배경 라인 */
.timeline-line {
    position: absolute;
    left: 240px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ddd;
    z-index: 1;
    transform: translateX(-50%);
}

/* 채워지는 파란색 라인 */
.timeline-line-progress {
    position: absolute;
    left: 240px;
    top: 0;
    width: 2px;
    background: #007bff;
    z-index: 2;
    height: 0;
    transition: height 0.1s ease-out;
    transform: translateX(-50%);
}

/* 스크롤에 따라 움직이는 화살표 원형 */
.timeline-arrow {
    position: absolute;
    left: 240px;
    top: 0;
    width: 40px;
    height: 40px;
    background: #007bff;
    border: 3px solid #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    z-index: 10;
    transform: translateX(-50%);
    box-shadow: 0 3px 8px rgba(0, 123, 255, 0.3);
    transition: all 0.1s ease-out;
}

.timeline-arrow i {
    transform: rotate(90deg);
}

.timeline-item {
    position: relative;
    margin-bottom: 80px;
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.timeline-year {
    position: relative;
    width: 160px;
    text-align: left;
    flex-shrink: 0;
}

.year-number {
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
    display: block;
    line-height: 1;
}

.year-awards {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.year-awards img {
    width: 400px;
    height: 400px;
    object-fit: contain;
}

.timeline-content-box {
    position: relative;
    flex: 1;
    margin-left: 40px;
    padding: 0;
}

.timeline-events {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.event-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.event-month {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.event-text {
    flex: 1;
    line-height: 1.6;
    color: #333;
    word-break: keep-all;
    white-space: normal;
}

.event-subtext {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 0.9rem;
    padding-left: 15px;
    border-left: 2px solid #e9ecef;
    word-break: keep-all;
    white-space: normal;
    line-height: 1.5;
}

/* Scroll Animation for Timeline */
.timeline-item {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.timeline-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-background img {
        clip-path: inset(0% 50% 0% 50%);
    }

    .timeline-line,
    .timeline-line-progress {
        left: 120px;
        transform: translateX(-50%);
    }

    .timeline-arrow {
        left: 120px;
    }

    .timeline-year {
        width: 100px;
    }

    .timeline-content-box {
        margin-left: 0px; /* 라인/화살표에 더 가깝게 */
    }
}

@media (max-width: 768px) {
    .history-hero {
        height: 28vh;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .hero-background img {
        clip-path: inset(0% 50% 0% 50%);
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
    }

    /* 히어로 텍스트를 살짝 위로 이동 (우선순위 강제) */
    .history-hero .hero-content { transform: translateY(-14px) !important; }

    .scroll-indicator {
        bottom: 10px;
    }
    .scroll-arrow {
        width: 35px;         /* 기존 50px -> 40px */
        height: 35px;        /* 기존 50px -> 40px */
        border-width: 1.5px; /* 기존 2px -> 1.5px (선택) */
        font-size: 1rem;     /* 기존 1.2rem -> 1rem */
    }
    .timeline-content {
        padding: 40px 0;
    }

    .timeline-wrapper {
        padding: 0 15px;
    }

    .timeline-item {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        margin-bottom: 40px;
        gap: 10px; /* 월과 내용 간 간격 축소 */
    }

    .timeline-line {
        display: none;
    }

    .timeline-year {
        width: 60px;
        text-align: left;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .year-number {
        font-size: 1.3rem;
        font-weight: 700;
    }

    .timeline-content-box {
        margin-left: -30px; /* 라인/화살표 방향으로 더 가깝게 */
        width: 100%;
        text-align: left;
    }

    .timeline-content-box::before {
        display: none;
    }

    .timeline-events {
        text-align: left;
        gap: 15px;
    }

    .event-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
        text-align: left;
        justify-content: flex-start;
    }

    .event-month {
        align-self: flex-start;
        font-size: 0.8rem;
        padding: 3px 6px;
        min-width: 25px;
    }

    .event-text {
        flex: 1;
        line-height: 1.4;
        font-size: 0.8rem;
    }

    .event-subtext {
        font-size: 0.7rem;
        margin-top: 5px;
        padding-left: 10px;
    }
}

@media (max-width: 480px) {
    /* 초소형에서는 텍스트를 조금 더 위로 */
    .history-hero .hero-content { transform: translateY(-16px) !important; }
    .timeline-year {
        width: 60px;
        text-align: left;
        margin-bottom: 0;
        flex-shrink: 0;
    }
}