/* text--bg 흐르는 텍스트 애니메이션 */
.text--bg {
    overflow: hidden !important;
    white-space: nowrap !important;
}

.text--bg p,
.text--bg h1,
.text--bg h2,
.text--bg h3,
.text--bg h4,
.text--bg h5,
.text--bg h6,
.text--bg div {
    overflow: hidden !important;
    white-space: nowrap !important;
}

/* 기본 애니메이션 설정 */
.text-flow-wrapper {
    display: inline-block !important;
    white-space: nowrap !important;
    padding-left: 100%;
    animation: text-flow-ltr 35s linear infinite !important;
    /* 부모 요소의 폰트 속성 상속 */
    font-size: inherit !important;
    color: inherit !important;
    font-weight: inherit !important;
    font-family: inherit !important;
    letter-spacing: inherit !important;
    text-transform: inherit !important;
    line-height: inherit !important;
}

/* 홀수번째 섹션 (1, 3, 5): 왼쪽에서 오른쪽으로 */
section.sig:nth-child(odd) .text-flow-wrapper {
    animation: text-flow-ltr 35s linear infinite !important;
}

/* 짝수번째 섹션 (2, 4): 오른쪽에서 왼쪽으로 */
section.sig:nth-child(even) .text-flow-wrapper {
    animation: text-flow-rtl 35s linear infinite !important;
}

/* 왼쪽에서 오른쪽 애니메이션 */
@keyframes text-flow-ltr {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0%);
    }
}

/* 오른쪽에서 왼쪽 애니메이션 */
@keyframes text-flow-rtl {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 호버 시 애니메이션 일시정지 (선택사항) */
.text--bg:hover .text-flow-wrapper {
    animation-play-state: paused;
}

/* 성능 최적화 */
.text--bg .text-flow-wrapper {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}