/* Phrases Slider - Horizontal Scrolling Banner */
.phrases-bar {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    position: relative;
    margin-top: 10px;
    margin-bottom: 30px;
    background-color: transparent;
}

.phrases-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Base slider styles for all rows */
.phrases-slider {
    display: flex;
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* Position the phrase sets inside each slider */
.phrases-set {
    display: flex;
    flex-shrink: 0;
    padding-right: 60px; /* Further increased padding between sets */
    width: fit-content; /* Ensure proper width based on content */
    min-width: 100%;
    gap: 10px; /* Add gap between phrase items */
}

/* First set of phrases (moves right to left) */
.phrases-slider.row-1 .phrases-set {
    animation: moveLeftInfinite 30s linear infinite;
}

/* Second set of phrases (moves left to right - opposite) */
.phrases-slider.row-2 .phrases-set {
    animation: moveRightInfinite 28s linear infinite;
}

/* Third set of phrases (moves right to left again) */
.phrases-slider.row-3 .phrases-set {
    animation: moveLeftInfinite 32s linear infinite;
}

/* Pause animations on hover */
.phrases-slider:hover .phrases-set {
    animation-play-state: paused;
}

/* Animation for right to left movement */
@keyframes moveLeftInfinite {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-33.33% - 20px)); } /* Move one-third for perfect loop with 3 sets */
}

/* Animation for left to right movement */
@keyframes moveRightInfinite {
    0% { transform: translateX(calc(-33.33% - 20px)); } /* Start from one-third position */
    100% { transform: translateX(0); }
}

/* Remove floating animations - just simple horizontal gliding */

.phrase-item {
    display: inline-flex;
    align-items: center;
    margin: 0 25px;
    opacity: 0.92;
    transition: opacity 0.3s ease;
    padding: 0 10px;
}

.phrase-item:hover {
    opacity: 1;
}

.phrase-item:hover .phrase-text {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.phrase-text {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    padding: 8px 16px;
    position: relative;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    border: 1px solid rgba(230, 230, 230, 0.8);
    letter-spacing: 0.2px;
    white-space: nowrap;
    display: block;
    min-width: max-content;
}

/* Make a duplicate set for seamless scrolling */
.phrases-set {
    display: inline-flex;
    animation: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .phrases-bar {
        padding: 5px 0;
    }
    
    .phrases-container {
        gap: 18px;
    }
    
    .phrases-slider {
        height: auto;
        margin: 4px 0;
    }
    
    .phrase-text {
        font-size: 14px;
        padding: 4px 10px;
    }
    
    .phrase-item {
        margin: 0 10px;
    }
    
    .row-1 {
        animation-duration: 35s;
    }
    
    .row-2 {
        animation-duration: 30s;
    }
    
    .row-3 {
        animation-duration: 40s;
    }
}

/* Add slight variation to phrases based on different patterns per row */
/* Row 1 colors */
.phrases-slider.row-1 .phrase-item:nth-child(4n+1) .phrase-text {
    background-color: rgba(245, 245, 255, 0.9);
    border-color: rgba(224, 224, 255, 0.8);
    color: #6a6ac0;
}

.phrases-slider.row-1 .phrase-item:nth-child(4n+2) .phrase-text {
    background-color: rgba(247, 255, 247, 0.9);
    border-color: rgba(224, 255, 224, 0.8);
    color: #5a8a5a;
}

.phrases-slider.row-1 .phrase-item:nth-child(4n+3) .phrase-text {
    background-color: rgba(255, 250, 240, 0.9);
    border-color: rgba(255, 228, 196, 0.8);
    color: #c08040;
}

/* Row 2 colors with different pattern */
.phrases-slider.row-2 .phrase-item:nth-child(4n) .phrase-text {
    background-color: rgba(245, 245, 255, 0.9);
    border-color: rgba(224, 224, 255, 0.8);
    color: #6a6ac0;
}

.phrases-slider.row-2 .phrase-item:nth-child(4n+1) .phrase-text {
    background-color: rgba(255, 250, 240, 0.9);
    border-color: rgba(255, 228, 196, 0.8);
    color: #c08040;
}

.phrases-slider.row-2 .phrase-item:nth-child(4n+2) .phrase-text {
    background-color: rgba(247, 255, 247, 0.9);
    border-color: rgba(224, 255, 224, 0.8);
    color: #5a8a5a;
}

/* Row 3 colors with yet another pattern */
.phrases-slider.row-3 .phrase-item:nth-child(4n+2) .phrase-text {
    background-color: rgba(245, 245, 255, 0.9);
    border-color: rgba(224, 224, 255, 0.8);
    color: #6a6ac0;
}

.phrases-slider.row-3 .phrase-item:nth-child(4n+3) .phrase-text {
    background-color: rgba(255, 250, 240, 0.9);
    border-color: rgba(255, 228, 196, 0.8);
    color: #c08040;
}

.phrases-slider.row-3 .phrase-item:nth-child(4n) .phrase-text {
    background-color: rgba(247, 255, 247, 0.9);
    border-color: rgba(224, 255, 224, 0.8);
    color: #5a8a5a;
}

.phrases-slider.row-3 .phrase-item:nth-child(4n+1) .phrase-text {
    background-color: rgba(240, 250, 255, 0.9);
    border-color: rgba(196, 228, 255, 0.8);
    color: #4080c0;
}

.phrases-slider.row-3 .phrase-item:nth-child(4n+4) .phrase-text {
    background-color: rgba(255, 245, 250, 0.9);
    border-color: rgba(255, 224, 240, 0.8);
    color: #c0608a;
}
