/* 흐름 컨텐츠 레이아웃 */
.flow-content {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
    min-height: 400px;
}

/* 요소 컨테이너 */
.flow-items-container {
    position: relative;
    width: 100%;
    height: 300px;
}

/* 공통 아이템 스타일 */
.flow-item {
    position: absolute;
    width: 250px;
    height: 100px;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); /* 애니메이션 개선 */
    opacity: 1;
    cursor: pointer;
    z-index: 5;
}

/* 내부 컨텐츠 스타일 */
.flow-item-inner {
    background-color: #FFCF4B;
    border-radius: 990px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
}

.flow-item span {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    text-align: center;
    white-space: nowrap;
}

/* 왼쪽 요소 위치 */
.flow-item.left[data-index="0"] {
    top: 5%;
    left: 5%;
}

.flow-item.left[data-index="1"] {
    top: 45%;
    left: 0;
}

.flow-item.left[data-index="2"] {
    top: 85%;
    left: 5%;
}

/* 오른쪽 요소 위치 */
.flow-item.right[data-index="3"] {
    top: 5%;
    right: 5%;
}

.flow-item.right[data-index="4"] {
    top: 45%;
    right: 0;
}

.flow-item.right[data-index="5"] {
    top: 85%;
    right: 5%;
}

/* 원 위치 조정 */
.water-circle-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

/* 아이템 호버 효과 */
.flow-item:hover .flow-item-inner {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* 아이템 활성화 상태 (중앙으로 이동 중) */
.flow-item.active {
    z-index: 4;
}

/* 아이템이 원 중앙으로 이동했을 때 스타일 */
.flow-item.absorbed {
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

/* 방향별 흡수 애니메이션 */
.flow-item.left.absorbed {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.7) rotate(-10deg); /* 왼쪽은 반시계 방향 회전 */
}

.flow-item.right.absorbed {
    right: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.7) rotate(10deg); /* 오른쪽은 시계 방향 회전 */
}

/* 반응형 스타일 */
@media (max-width: 992px) {
    .flow-items-container {
        height: 350px;
    }
    
    .flow-item {
        width: 140px;
    }
    
    .flow-item span {
        font-size: 14px;
    }
    
    /* 모바일에서 위치 조정 */
    .flow-item.left[data-index="0"] {
        left: 2%;
    }
    
    .flow-item.left[data-index="1"] {
        left: -5%;
    }
    
    .flow-item.left[data-index="2"] {
        left: 2%;
    }
    
    .flow-item.right[data-index="3"] {
        right: 2%;
    }
    
    .flow-item.right[data-index="4"] {
        right: -5%;
    }
    
    .flow-item.right[data-index="5"] {
        right: 2%;
    }
}

@media (max-width: 576px) {
    .flow-items-container {
        height: 600px;
    }
    
    /* 모바일에서는 세로로 배치 */
    .flow-item {
        width: 130px;
    }
    
    .flow-item.left,
    .flow-item.right {
        left: 0;
        right: auto;
    }
    
    .flow-item.left[data-index="0"] {
        top: 0;
    }
    
    .flow-item.left[data-index="1"] {
        top: 15%;
    }
    
    .flow-item.left[data-index="2"] {
        top: 30%;
    }
    
    .flow-item.right[data-index="3"] {
        top: 55%;
        left: auto;
        right: 0;
    }
    
    .flow-item.right[data-index="4"] {
        top: 70%;
        left: auto;
        right: 0;
    }
    
    .flow-item.right[data-index="5"] {
        top: 85%;
        left: auto;
        right: 0;
    }
    
    /* 모바일에서 원 위치 */
    .water-circle-container {
        top: 45%;
    }
}
