/* Reviews Wall - Vertical Scrolling Columns */
.reviews-wall {
    max-height: 600px;
    overflow: hidden;
    position: relative;
}

/* Fade effect at top and bottom */
.reviews-wall::before,
.reviews-wall::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    pointer-events: none;
    z-index: 2;
}

.reviews-wall::before {
    top: 0;
    background: linear-gradient(to bottom, white, transparent);
}

.reviews-wall::after {
    bottom: 0;
    background: linear-gradient(to top, white, transparent);
}

/* Individual column - using Bulma */
.reviews-column {
    overflow: hidden;
    position: relative;
    height: 600px;
}

/* Track containing the reviews */
.reviews-track {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    /* Use transform3d for better GPU acceleration */
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    /* Optimize rendering performance */
    contain: layout style paint;
    will-change: transform;
}

/* Column animations - slightly different speeds for organic feel */
.column-1 .reviews-track {
    -webkit-animation: scroll-down 180s linear infinite;
    animation: scroll-down 180s linear infinite;
}

.column-2 .reviews-track {
    -webkit-animation: scroll-down 185s linear infinite;
    animation: scroll-down 185s linear infinite;
}

.column-3 .reviews-track {
    -webkit-animation: scroll-down 175s linear infinite;
    animation: scroll-down 175s linear infinite;
}

.column-4 .reviews-track {
    -webkit-animation: scroll-down 190s linear infinite;
    animation: scroll-down 190s linear infinite;
}

/* Animations continue even on hover - no pause */

/* Individual review card */
.review-card {
    background: white;
    border-radius: 12px;
    padding: 0.7rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    flex-shrink: 0;
    /* Optimize rendering */
    contain: layout style paint;
}

.review-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Job info at top */
.job-info {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.job-type-location {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

/* Business section with avatar */
.business-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.business-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.business-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.business-avatar-placeholder {
    background: #0275d8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    text-transform: uppercase;
}

.business-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.review-label {
    font-size: 0.75rem;
    color: #888;
}

.review-label strong {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.business-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #0275d8;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.business-name:hover {
    text-decoration: underline;
}

/* Review text */
.review-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Rating at bottom */
.review-rating {
    margin-top: 0.5rem;
}

.stars {
    color: #ffa31a;
    font-size: 1rem;
    letter-spacing: 0.1rem;
}

/* Animations - scroll to 50% (duplicates make seamless loop) */
/* Using translate3d for better GPU acceleration and smoother animation */
@keyframes scroll-down {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(0, -50%, 0);
    }
}

/* Webkit-specific animation for better Safari/Chrome support */
@-webkit-keyframes scroll-down {
    0% {
        -webkit-transform: translate3d(0, 0, 0);
    }
    100% {
        -webkit-transform: translate3d(0, -50%, 0);
    }
}

/* Mobile: Single column */
@media screen and (max-width: 768px) {
    .reviews-wall {
        max-height: 500px;
    }
    
    .reviews-column {
        height: 500px;
    }
    
    /* Hide columns 2, 3, 4 on mobile - Bulma columns */
    .reviews-wall .column-2,
    .reviews-wall .column-3,
    .reviews-wall .column-4 {
        display: none !important;
    }
    
    .review-card {
        padding: 1rem;
    }
    
    .review-text {
        font-size: 0.875rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .job-info {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .job-type-location {
        font-size: 0.8rem;
    }
    
    .business-section {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .business-avatar {
        width: 32px;
        height: 32px;
    }
    
    .business-name {
        font-size: 0.8rem;
    }
    
    .review-label {
        font-size: 0.7rem;
    }
}