/* Breakpoint Helper Classes */

.mo-br,
.m-br {
    display: none;
}

/* Hero Scroll Effect (Text Only) */
.hero-text-outer {
    position: relative;
    height: 150vh;
    background: #fff;
}

.hero-text-inner {
    position: sticky;
    top: 50px;
    /* Aligned with GNB */
    width: 100%;
    height: 284px;
    background: #fff;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Standardized breakpoints to match common.css */
@media (max-width: 767px) {


    .hero-text-inner {
        top: 72px;
        height: auto;
        min-height: 200px;
        padding: 40px 0;
    }
}

.hero-text-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--section-padding-y) 20px;
    gap: 60px;
    text-align: center;
}

.hero-text-section h2 {
    width: 100%;
    max-width: 768px;
    font-family: 'Pretendard';
    font-weight: 700;
    font-size: clamp(24px, 2.3vw + 15.7px, 60px);
    line-height: 140%;
    color: #E9E9E9;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.hero-text-section h2 .char {
    transition: color 0.4s ease;
}

.hero-text-section h2 .char.active {
    color: #363636;
}

/* ===== History Page Styles ===== */

.history-section {
    position: relative;
    padding: 0;
    background: #fff;
}

.history-inner {
    max-width: 1920px;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--section-padding-y) var(--section-padding-x) 15vh;
    gap: clamp(100px, 8.33vw, 160px);
}

/* Timeline Line */
.history-line-wrapper {
    position: absolute;
    left: clamp(200px, 41vw, 788px);
    top: 50px;
    bottom: 100px;
    width: 24px;
    display: flex;
    justify-content: center;
    z-index: 1;
}

.history-line-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #E9E9E9;
}

.history-line-progress {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, rgba(242, 113, 0, 0) 0%, #F27100 100%);
    z-index: 2;
}

.history-moving-dot {
    position: absolute;
    left: 50%;
    top: 0;
    width: 10px;
    height: 10px;
    background: #F27100;
    border: 5px solid #fff;
    box-shadow: 0 0 0 8px #F27100;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

/* Year Row */
.history-year-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(40px, 6.25vw, 120px);
    position: relative;
    z-index: 2;
}

.history-year-heading {
    flex-shrink: 0;
    width: clamp(200px, 32.3vw, 620px);
    display: flex;
    flex-direction: column;
    gap: 16px;   /* 검수 0809: PC 수상경력 사이간격 40→16 */
}

.history-year-heading h2 {
    width: 100%;
    font-family: 'Pretendard';
    font-weight: 700;
    font-size: 60px; /* 검수 0730: 데스크탑 연도 60px (Figma 핑크) */
    line-height: 140%;
    color: #000; /* 검수 0703: 년도는 스크롤 없이 기본 활성(진하게) */
    margin: 0;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.history-year-row.active .history-year-heading h2 {
    color: #000;
}

/* Content Area */
.history-content-area {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 30px; /* 검수 0730: 데스크탑 항목 간격 60→30 (Figma 간격 30px) */
    padding-top: 30px; /* 검수 0731: 상단 패딩 40→30 */
    overflow: hidden;
}

.history-month-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(20px, 2.6vw, 50px);
}

.history-month-label {
    flex-shrink: 0;
    width: clamp(66px, 3.4vw, 80px);
    font-family: 'Pretendard';
    font-weight: 700;
    font-size: 24px; /* 검수 0730: 데스크탑 월 라벨 24px (Figma) */
    line-height: 150%;
    color: #A7A7A7;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.history-month-item.active .history-month-label {
    color: #F27100;
}

.history-desc-group {
    min-width: 0;
    max-width: 100%;
    width: fit-content;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-desc-item {
    font-family: 'Pretendard';
    font-weight: 700;
    font-size: 24px; /* 검수 0730: 데스크탑 내용 24px (Figma) */
    line-height: 150%;
    color: #A7A7A7;
    margin: 0;
    transition: color 0.3s ease;
}

.history-month-item.active .history-desc-item {
    color: #000;
}

.history-image-box {
    margin-top: 16px;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 500 / 300;
    border-radius: 50px 0px;
    overflow: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
}

.history-image-box.has-border {
    border: 1px solid #d3d3d3;
}

.history-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Award Badge */
.history-award-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.award-badge {
    display: inline-flex;
    align-items: center;
    padding: 16px 24px 16px 18px;
    gap: 12px;
    background: #F8F9FB;
    border-radius: 1000px;
    width: fit-content;
}

.award-badge .award-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0; /* 검수 0730: 긴 텍스트(예: 2013) 항목에서 아이콘이 flex로 찌그러지던 것 방지 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.award-badge .award-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.award-badge .award-text {
    font-family: 'Pretendard';
    font-weight: 500;
    font-size: 18px; /* 검수 0730: 데스크탑 수상경력 clamp→18px 고정 */
    line-height: 160%;
    color: #4E4E4E;
}

.award-highlight {
    color: #000;
    font-weight: 700;
}

/* Floating Navigation (FAB) */
.history-fab {
    position: sticky;
    bottom: 40px;
    left: 0;
    right: 0;
    transform: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 10px;
    gap: 4px;
    height: 78px;
    width: fit-content;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    z-index: 100;
    box-sizing: border-box;
}

.fab-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 20px;
    height: 58px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    text-decoration: none;
    box-sizing: border-box;
}

.fab-btn span {
    font-family: 'Pretendard';
    font-weight: 500;
    font-size: 18px;
    line-height: 160%;
    color: #363636;
    white-space: nowrap;
}

.fab-btn.active {
    background: #000;
}

.fab-btn.active span {
    color: #fff;
}

/* ══════════════════════════════════════════
   TABLET (768px ~ 1439px)
   ══════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1439px) {

    /* 타임라인 라인 위치: 콘텐츠 영역 내 gap 중앙 (패딩 고려) */
    .history-line-wrapper {
        left: calc(var(--h-pad) + (100% - 2 * var(--h-pad) - 60px) * 0.4444 + 18px);
    }

    /* 내부 패딩 clamp */
    .history-inner {
        --h-pad: 60px; /* 검수 0708: 태블릿 좌우 마진 60 고정 (좁아져도 유지) */
        padding: clamp(60px, 8vw, 120px) var(--h-pad) 15vh;
        gap: clamp(60px, 8vw, 120px);
    }

    /* 좌우 4:5 비율 — gap 25px */
    .history-year-row {
        gap: 60px;
        align-items: flex-start;
    }

    .history-year-heading {
        width: calc((100% - 60px) * 0.4444); /* 검수 0708: 실제 gap(60) 반영 — 오른쪽 마진 60 확보 */
        flex-shrink: 0;
        min-width: 0;
        overflow: hidden;
        gap: 16px;   /* 검수 0809: 태블릿 수상경력 사이간격 16 */
        box-sizing: border-box;
    }

    .history-content-area {
        width: calc((100% - 60px) * 0.5556);
        flex-shrink: 0;
        flex-grow: 0;
        min-width: 0;
        padding-top: clamp(5px, 0.8vw, 12px);
        gap: 18px;
        box-sizing: border-box;
    }

    /* 연도 폰트 clamp */
    .history-year-heading h2 {
        font-size: clamp(40px, 6vw, 70px);
    }

    /* 월/설명 폰트 clamp */
    .history-month-label {
        font-size: clamp(18px, 2.2vw, 26px);
        width: clamp(50px, 6vw, 70px);
    }

    .history-desc-item {
        font-size: clamp(18px, 2.2vw, 26px);
    }

    .history-month-item {
        gap: clamp(16px, 2.5vw, 40px);
    }

    /* 이미지 clamp */
    .history-image-box {
        max-width: clamp(240px, 40vw, 450px);
        border-radius: clamp(20px, 3vw, 40px) 0;
    }

    /* 뱃지 넘침 방지 */
    .award-badge {
        width: fit-content;
        max-width: 100%;
        padding: clamp(10px, 1.5vw, 16px) clamp(14px, 2vw, 24px) clamp(10px, 1.5vw, 16px) clamp(12px, 1.5vw, 18px);
        gap: clamp(8px, 1vw, 12px);
    }

    .award-badge .award-icon {
        width: clamp(32px, 3.5vw, 40px);
        height: clamp(32px, 3.5vw, 40px);
        flex-shrink: 0;
    }

    .award-badge .award-text {
        font-size: clamp(12px, 1.5vw, 18px);
        word-break: keep-all;
        overflow-wrap: break-word;
    }

    /* FAB 네비게이션 clamp */
    .history-fab {
        height: clamp(60px, 8vw, 78px);
        padding: clamp(6px, 1vw, 10px);
        gap: clamp(2px, 0.5vw, 4px);
    }

    .fab-btn {
        padding: clamp(10px, 1.5vw, 16px) clamp(12px, 2vw, 20px);
        height: clamp(44px, 6vw, 58px);
    }

    .fab-btn span {
        font-size: clamp(14px, 1.8vw, 18px);
    }
}

/* Tablet/Mobile: 프로그레스바 왼쪽 이동은 모바일에서만 */
@media (max-width: 767px) {
    .history-line-wrapper {
        left: clamp(16px, 11.2vw - 104px, 40px);
    }

    .history-inner {
        padding-left: clamp(60px, 11vw - 40px, 100px);
    }
}

@media (max-width: 767px) {

    .mo-br,
    .m-br {
        display: block;
    }

    .history-year-row {
        flex-direction: column;
        gap: 20px; /* 검수 0730: 연도↔내용 간격 30→20 (Figma 20px) */
    }

    /* 검수 0730: 연도 블록 사이 간격 100→80 (Figma 80px) */
    .history-inner {
        gap: 80px;
    }

    .history-year-heading {
        width: 100%;
        gap: 8px; /* 검수 0731: 모바일 연도↔수상, 수상↔수상 간격 20→8 */
    }

    .history-content-area {
        width: 100%; /* 검수 0708: 모바일 콘텐츠 영역 전체폭 → 이미지 가로 fill */
        padding-top: 0;
        gap: 60px;
    }

    .history-month-item {
        width: 100%;
        gap: 24px;
    }

    /* 검수 0708: 모바일은 라벨이 상단(flex-column)이므로 설명영역을 전체폭으로 → 이미지도 전체폭 */
    .history-desc-group {
        width: 100%;
        min-width: 0;
        max-width: none;
        gap: 12px; /* 검수 0730: 설명줄 사이 간격 16→12 (Figma 12px) */
    }

    .history-image-box {
        max-width: 100%;
        border-radius: 30px 0;
    }

    .history-fab {
        position: sticky;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        display: flex;
        flex-direction: row;
        align-items: center;
        /* 검수 0708: 가로 영역 확장 시 좌우 간격 추가 */
        padding: 6px clamp(6px, 6vw - 15px, 40px);
        box-sizing: border-box;
        width: 100%;
        height: 53px;
        background: rgba(255, 255, 255, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.8);
        border-left: none;
        border-right: none;
        border-bottom: none;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        filter: drop-shadow(0px 2px 16px rgba(0, 0, 0, 0.12));
        border-radius: 0px;
        z-index: 100;
        overflow: hidden;
        justify-content: space-between;
        gap: 0;
    }

    .history-fab::-webkit-scrollbar {
        display: none;
    }

    .fab-btn {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 10px 12px;
        gap: 2px;
        width: 87px;
        height: 41px;
        border-radius: 10px;
        flex: 1;
        background: transparent;
        border: none;
        box-sizing: border-box;
        text-decoration: none;
    }

    .fab-btn.active {
        background: #000000;
    }

    .fab-btn span {
        width: 100%;
        height: auto;
        font-family: 'Pretendard';
        font-style: normal;
        font-weight: 400;
        font-size: 14px;
        line-height: 150%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: #363636;
        white-space: nowrap;
    }

    .fab-btn.active span {
        color: #FFFFFF;
    }
}

/* Mobile Range Optimization (1023px and below) */
@media (max-width: 767px) {
    .history-inner {
        padding-left: clamp(60px, 4vw + 45px, 100px);
        padding-right: clamp(16px, 4.4vw + 1px, 60px);
    }

    .history-line-wrapper {
        left: clamp(16px, 2.4vw + 7px, 40px);
    }

    .history-year-heading h2 {
        font-size: clamp(36px, 4.4vw + 20px, 50px);
    }
}

/* Mobile 360 Optimized */
@media (max-width: 767px) {
    .hero-text-inner {
        padding: 0;
        min-height: auto;
    }

    .history-inner {
        /* 검수 0708: 좌측 패딩 — 360=60px, 화면 커지면 증가(라인과 본문 간격 확보) */
        padding: clamp(60px, 16vw, 100px) 16px clamp(60px, 16vw, 100px) clamp(60px, 10vw + 24px, 100px);
        gap: clamp(80px, 27vw, 160px);
    }

    .history-line-wrapper {
        left: clamp(16px, 4.4vw, 40px);
        top: 20px;
        bottom: 60px;
    }

    .history-year-heading h2 {
        font-size: 30px; /* 검수 0730: 모바일 연도 30px (Figma) */
    }

    .history-month-item {
        flex-direction: column;
        gap: 4px; /* 검수 0730: 월↔설명 간격 16→4 (Figma 4px) */
    }

    .history-month-label,
    .history-desc-item {
        font-size: 18px; /* 검수 0730: 모바일 월·내용 20→18, 행간 150% (Figma) */
        line-height: 150%;
    }

    /* 검수 0708: 가로만 전체폭, 세로는 원본 비율(aspect-ratio 사용 안 함) */
    .history-image-box {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: auto;
        border-radius: 20px 0;
    }

    .history-image-box img {
        height: auto;
    }

    .award-badge {
        width: fit-content;
        max-width: 100%;
        padding: 10px 24px 10px 14px; /* 검수 0730: 좌우 패딩 18/20→14/24 (Figma 4005:20031) */
        gap: 8px;
    }

    .award-badge .award-text {
        font-size: 14px;
    }

    .award-badge .award-icon {
        width: 32px;
        height: 32px;
    }
}

/* 데스크탑 전용 줄바꿈 */
@media (min-width: 768px) {
    .award-line1::after {
        content: '\A';
        white-space: pre;
    }
}