.steps-wrapper {
    max-width: 1200px;

    transition: all 0.3s ease;
}

/* 접힌 상태 헤더 */
.steps-collapsed-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    margin-left:10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.steps-collapsed-header span:first-child {
    font-size: 10px;
    font-weight: 700;
    color: #003380;
}

.toggle-icon {
    font-size: 20px;
    color: #63cdff;
    transition: transform 0.3s ease;
}

/* 펼쳐진 상태 */
.steps-expanded {
    position: relative;
    display: block;
}

.steps-close-btn {
    position: absolute;
    top: 10px;
    right: 30px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #63cdff;
    border-radius: 50%;
    color: #63cdff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.steps-close-btn:hover {
    background: #63cdff;
    color: #fff;
    transform: rotate(90deg);
}

/* 접힌 상태일 때 */
.steps-wrapper.collapsed .steps-collapsed-header {
    display: flex;
}

.steps-wrapper.collapsed .steps-expanded {
    display: none;
}

.steps-wrapper.collapsed .toggle-icon {
    transform: rotate(-180deg);
}


/*  */
.steps-container {
    max-width: 1200px;
    /* margin: 0 auto 30px; */
    padding: 20px 0px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);  /* repeat(2, 1fr) → repeat(4, 1fr) */
    grid-template-rows: auto;  /* repeat(2, 1fr) → auto */
    gap: 12px;
}

.step-box {
    background: #fff;
    border: 3px solid #63cdff;
    border-radius: 15px;
    padding: 18px 15px;
    color: #003380;
    position: relative;
    overflow: hidden;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}
.step-box:hover {
    background: #63cdff;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 205, 255, 0.3);
}

.step-header {
    display: flex;
    align-items: baseline;
    gap: 0;  /* 8px → 0 */
    margin-bottom: 8px;  /* 12px → 8px */
}

.step-number {
    font-size: 14px;  /* 11px → 14px */
    font-weight: 700;
    opacity: 0.8;  /* 0.7 → 0.8 */
    letter-spacing: 0.5px;
    text-transform: lowercase;  /* STEP → step */
}

.step-num {
    font-size: 14px;  /* 28px → 14px */
    font-weight: 700;  /* 900 → 700 */
    line-height: 1;
}

.step-content h3 {
    font-size: 18px;  /* 20px → 18px */
    font-weight: 800;
    margin: 0 0 6px 0;  /* 0 0 8px 0 → 0 0 6px 0 */
    line-height: 1.3;
}

.step-content p {
    font-size: 12px;  /* 13px → 12px */
    margin: 0;
    opacity: 0.85;
    line-height: 1.4;  /* 1.5 → 1.4 */
    white-space: nowrap;  /* 한 줄로 표시 */
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-arrow {
    display: none; /* PC에서는 숨김 */
}

/* ===== 모바일 ===== */
@media (max-width: 768px) {
    .steps-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        display: flex;
        flex-direction: row;
        gap: 0;
        padding: 0;
        /* margin-bottom: 15px; */
        overflow: hidden;
        height: 80px; /* 고정 높이 */
    }

    .step-box {
        min-height: 80px;
        max-height: 80px;
        border-radius: 0;
        border: none;
        border-right: 1px solid rgba(99, 205, 255, 0.3);
        padding: 10px 8px;
        flex: 1;
        transition: flex 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .step-box:last-child {
        border-right: none;
    }

    .step-box:hover {
        transform: none;
        box-shadow: none;
        background: #fff;
        color: #003380;
    }

    .step-header {
        margin-bottom: 0;
        gap: 4px;
        align-items: flex-start;
        flex-direction: column;
    }

    .step-number {
        font-size: 8px;
        margin-bottom: 2px;
        opacity: 0.6;
    }

    .step-num {
        font-size: 32px;
        font-weight: 900;
        color: #63cdff;
    }

    .step-content {
        display: none; /* 모바일에서는 기본적으로 숨김 */
    }

    .step-arrow {
        display: block;
        position: absolute;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #63cdff;
        font-size: 20px;
        font-weight: bold;
        cursor: pointer;
        padding: 5px;
        transition: all 0.3s;
        opacity: 0.6;
    }

    .step-arrow:active {
        transform: translateY(-50%) scale(0.85);
        opacity: 1;
    }

    /* 확장된 상태 */
/* 확장된 상태 */
.step-box.active {
    flex: 6;
    padding: 15px 12px;
    background: #63cdff;
    color: #fff;
    flex-direction: row;  /* 추가 */
    align-items: center;  /* 추가 */
    gap: 12px;  /* 추가 */
}

.step-box.active .step-header {
    flex-shrink: 0;  /* 추가 */
}

.step-box.active .step-num {
    color: #fff;
}

.step-box.active .step-content {
    display: block;
    margin-top: 0;  /* 8px → 0 */
    animation: fadeIn 0.3s ease;
    flex: 1;  /* 추가 */
}

.step-box.active .step-content h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.step-box.active .step-content p {
    font-size: 11px;
    line-height: 1.4;
}

.step-box.active .step-arrow {
    color: #fff;
    opacity: 1;
}

/* 축소된 상태 */
.step-box.collapsed {
    flex: 0.8;
    padding: 10px 5px;
    justify-content: center;  /* 추가 */
    align-items: center;  /* 추가 */
}

.step-box.collapsed .step-header {
    display: none;  /* 추가: 전체 헤더 숨김 */
}

.step-box.collapsed .step-number {
    display: none;
}

.step-box.collapsed .step-num {
    display: none;  /* 추가: 숫자도 숨김 */
}

.step-box.collapsed .step-arrow {
    right: 50%;  /* 변경: 중앙에 배치 */
    transform: translate(50%, -50%);  /* 변경 */
    font-size: 16px;
}

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-5px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (max-width: 480px) {
    .steps-container {
        height: 70px;
    }

    .step-box {
        min-height: 75px;
        max-height: 75px;
        padding: 8px 6px;
    }

    .step-number {
        font-size: 10px;
    }

    .step-num {
        font-size: 32px;
    }

    .step-box.active .step-content h3 {
        font-size: 14px;
    }

    .step-box.active .step-content p {
        font-size: 10px;
    }

    .step-box.collapsed .step-num {
        font-size: 20px;
    }

    .step-arrow {
        font-size: 18px;
        right: 3px;
    }
}

@media (max-width: 360px) {
    .steps-container {
        height: 70px;
    }

    .step-box {
        min-height: 70px;
        max-height: 70px;
    }

    .step-num {
        font-size: 24px;
    }

    .step-box.collapsed .step-num {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .steps-wrapper {
        /* margin-bottom: 15px; */
    }
    
    .steps-collapsed-header {
        margin-left: 8px;
        padding: 3px 2px;
    }
    
    .steps-collapsed-header span:first-child {
        font-size: 10px;
    }
    
    .steps-close-btn {
        top: 8px;
        right: 15px;
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .steps-container {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .steps-collapsed-header span:first-child {
        font-size: 9px;
    }
    
    .toggle-icon {
        font-size: 18px;
    }
    
    .steps-close-btn {
        width: 20px;
        height: 20px;
        font-size: 9px;
    }
}