﻿/* TỔNG THỂ */


/* KHUNG CHÍNH CỦA TOÀN BỘ SLIDE */
.carousel-container {
    /*max-width: 1200px;*/
    width: 100%;
    margin: 0 auto;
    text-align: center;
    background-color:#fff;
}

/* KHUNG BAO GỒM NÚT VÀ KHUNG ẢNH - SỬ DỤNG FLEXBOX */
.carousel-display-area {
    display: flex;
    align-items: center; /* Căn nút và khung ảnh theo chiều dọc */
    justify-content: center;
    /*margin-bottom: 25px;*/
}

/* KHUNG HIỂN THỊ HÌNH ẢNH (VIEWPORT) */
.carousel-viewport {
    position: relative;
    height: auto;
    flex: 1; /* Cho phép viewport chiếm không gian còn lại */
    /*max-width: 700px;*/
    width:90%;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 800px;
    overflow: hidden;
    min-height:470px;
}

/* THANH CHỨA CÁC SLIDE */
.carousel-track {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
}

/* TỪNG SLIDE (ITEM) */
.carousel-slide {
    width: 50%;
    /*max-width: 500px;*/
    position: absolute;
    transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.6s ease, z-index 0s 0.3s;
    cursor: pointer;
}

    .carousel-slide img {
        width: 100%;
        display: block;
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    }

    /* Vị trí và style cho 3 slide */
    .carousel-slide:first-child { /* Slide bên trái */
        transform: translateX(-80%) scale(0.75);
        opacity: 0.6;
        z-index: 1;
    }

    .carousel-slide:nth-child(2) { /* Slide ở giữa (active) */
        transform: translateX(0) scale(1);
        opacity: 1;
        z-index: 2;
        cursor: default;
    }

    .carousel-slide:last-child { /* Slide bên phải */
        transform: translateX(80%) scale(0.75);
        opacity: 0.6;
        z-index: 1;
    }

/* NÚT ĐIỀU HƯỚNG */
.carousel-button {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    flex-shrink: 0; /* Ngăn nút bị co lại */
    margin: 0 15px; /* Tạo khoảng cách với khung ảnh */
}

    .carousel-button:hover {
        background-color: #f1f1f1;
        transform: scale(1.05);
    }

/* KHUNG CHỨA NỘI DUNG TEXT */
.carousel-text-container {
    padding: 0 20px;
    min-height: 220px;
    position: relative;
}

.slide-content {
    display: none;
    animation: fadeIn 0.8s ease;
}

    .slide-content.active {
        display: block;
    }

    .slide-content h3 {
        font-size: 1.5rem;
        margin-bottom: 10px;
        color: #222;
    }

    .slide-content p {
        color: #555;
        max-width: 60%;
        margin: 0 auto;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive cho màn hình nhỏ */
@media (max-width: 768px) {
    .carousel-viewport {
        height: 250px;
    }

    .carousel-slide {
        max-width: 180px;
    }

        .carousel-slide:first-child {
            transform: translateX(-65%) scale(0.7);
        }

        .carousel-slide:last-child {
            transform: translateX(65%) scale(0.7);
        }

    .carousel-text-container {
        min-height: 250px;
    }

    .carousel-button {
        width: 40px;
        height: 40px;
        margin: 0 5px;
    }
}
