/* ============================================================
   Avatar Carousel - 人頭圓形輪播
   ============================================================ */

.avatar-carousel-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
    background: #ffffff;
    padding: 8px 0;
    gap: 0;
    position: relative;
}

.avatar-carousel-row {
    display: flex;
    width: max-content;
    gap: 32px;
    will-change: transform;
}

.avatar-carousel-row.scroll-left {
    animation: avatarScrollLeft 35s linear infinite;
}

.avatar-carousel-row.scroll-right {
    animation: avatarScrollRight 35s linear infinite;
}

@keyframes avatarScrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 向右捲動：從 -50% 開始（顯示複製組），捲到 0（顯示原始組），無縫循環 */
@keyframes avatarScrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.avatar-carousel-row:hover {
    animation-play-state: paused;
}

.avatar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    padding: 12px 8px;
}

.avatar-item:hover {
    transform: translateY(-8px) scale(1.05);
}

.avatar-item .avatar-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(102, 126, 234, 0.3);
    background: #fff;
    position: relative;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
    transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.avatar-item:hover .avatar-circle {
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    border-color: rgba(118, 75, 162, 0.7);
}

.avatar-item .avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.avatar-item .avatar-name {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avatar-item:hover .avatar-name {
    color: #6366f1;
}

/* Responsive - 平板 */
@media only screen and (max-width: 991px) {
    .avatar-carousel-area {
        padding: 6px 0;
    }
    .avatar-item .avatar-circle {
        width: 72px;
        height: 72px;
    }
    .avatar-item .avatar-name {
        font-size: 12px;
    }
    .avatar-carousel-row {
        gap: 24px;
    }
}

/* Responsive - 手機 */
@media only screen and (max-width: 767px) {
    .avatar-carousel-area {
        padding: 4px 0;
    }
    .avatar-item .avatar-circle {
        width: 60px;
        height: 60px;
        border-width: 2px;
    }
    .avatar-item .avatar-name {
        font-size: 11px;
        max-width: 70px;
    }
    .avatar-item {
        gap: 8px;
        padding: 8px 4px;
    }
    .avatar-carousel-row {
        gap: 16px;
    }
}
