/* --- Feedback Section --- */
.feedback-section {
    padding: 80px 20px; /* Tăng padding để có không gian thở */
    background-color: #f8f9fa;
    text-align: center;
    overflow: hidden; /* Quan trọng: để ẩn các slide tràn ra ngoài */
    position: relative; /* Để có thể định vị các phần tử con */
}

.feedback-section h2 {
    font-size: 38px;
    color: #333;
    margin-bottom: 50px;
    font-weight: 700;
}

.feedback-carousel-container {
    max-width: 1200px; /* Chiều rộng tối đa của carousel */
    margin: 0 auto;
    overflow: hidden; /* Quan trọng: chỉ hiển thị phần bên trong */
    position: relative;
    padding: 20px 0; /* Đệm trên dưới để tránh bóng đổ bị cắt */
}

.feedback-track {
    display: flex; /* Sử dụng Flexbox để các slide nằm cạnh nhau */
    width: fit-content; /* Quan trọng: chiều rộng tự động ôm hết các slide con */
    animation: scrollFeedback 10s linear infinite; /* Animation cuộn chậm hơn và mượt hơn */
}

.feedback-track:hover {
    animation-play-state: paused; /* Dừng cuộn khi di chuột qua */
}

.feedback-slide {
    /* Hiển thị 3 slide cùng lúc trên màn hình lớn */
    flex: 0 0 calc(33.33% - 40px); /* 1/3 chiều rộng trừ đi tổng margin giữa các slide */
    width: 380px; /* Điều chỉnh chiều rộng cơ sở của từng slide */
    margin: 0 20px; /* Khoảng cách giữa các slide */
    padding: 40px;
    background-color: #ffffff;
    border-radius: 16px; /* Bo tròn góc mềm mại hơn */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* Bóng đổ mềm mại hơn */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    min-height: 280px; /* Đảm bảo chiều cao tối thiểu cho slide */
    transition: transform 0.3s ease-in-out; /* Thêm transition cho hiệu ứng hover */
}

.feedback-slide:hover {
    transform: translateY(-5px); /* Nâng nhẹ slide lên khi hover */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.feedback-content {
    margin-bottom: 25px;
}

.feedback-content p {
    font-size: 18px;
    line-height: 1.7;
    color: #555;
    font-style: italic; /* Đánh giá nên để chữ nghiêng */
    quotes: "“" "”" "‘" "’"; /* Định nghĩa dấu ngoặc kép */
}

.feedback-content p::before {
    content: open-quote;
    font-size: 2.5em;
    color: #a0a0a0;
    line-height: 0.1em;
    vertical-align: -0.4em;
    margin-right: 5px;
}

.feedback-content p::after {
    content: close-quote;
    font-size: 2.5em;
    color: #a0a0a0;
    line-height: 0.1em;
    vertical-align: -0.4em;
    margin-left: 5px;
}

.feedback-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto; /* Đẩy phần tác giả xuống dưới cùng */
}

.feedback-author .author-avatar {
    width: 65px; /* Kích thước avatar lớn hơn một chút */
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #673ab7; /* Màu tím đậm hơn */
    box-shadow: 0 0 0 3px rgba(103, 58, 183, 0.3); /* Vòng ngoài sáng */
}

.feedback-author .author-info {
    text-align: left;
}

.feedback-author h4 {
    font-size: 19px;
    color: #333;
    margin: 0;
    font-weight: 600;
}

.feedback-author span {
    font-size: 15px;
    color: #777;
}

/* --- Keyframe Animation for Scrolling --- */
@keyframes scrollFeedback {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Di chuyển bằng 50% chiều rộng của track */
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .feedback-slide {
        flex: 0 0 calc(50% - 30px); /* Hiển thị 2 slide trên màn hình trung bình */
        width: 450px;
        margin: 0 15px;
    }
    @keyframes scrollFeedback {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); } /* Vẫn là 50% tổng chiều rộng track */
    }
}

@media (max-width: 768px) {
    .feedback-section h2 {
        font-size: 32px;
    }
    .feedback-slide {
        flex: 0 0 calc(100% - 40px); /* Hiển thị 1 slide trên màn hình nhỏ */
        width: 100%; /* Đảm bảo chiếm đủ chiều rộng */
        margin: 0 20px;
    }
    .feedback-carousel-container {
        padding: 15px 0;
    }
    @keyframes scrollFeedback {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); } /* Vẫn là 50% tổng chiều rộng track */
    }
}


/* --- Dark Mode adjustments --- */
body.dark-mode .feedback-section {
    background-color: #1a1a1a;
}

body.dark-mode .feedback-section h2 {
    color: #e0e0e0;
}

body.dark-mode .feedback-slide {
    background-color: #2b2b2b;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

body.dark-mode .feedback-slide:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

body.dark-mode .feedback-content p {
    color: #ccc;
}

body.dark-mode .feedback-content p::before,
body.dark-mode .feedback-content p::after {
    color: #777; /* Màu dấu ngoặc kép trong dark mode */
}

body.dark-mode .feedback-author h4 {
    color: #eee;
}

body.dark-mode .feedback-author span {
    color: #bbb;
}

body.dark-mode .feedback-author .author-avatar {
    border-color: #a76ff0; /* Màu viền avatar trong dark mode */
    box-shadow: 0 0 0 3px rgba(167, 111, 240, 0.3);
}