/* =====================================================
   🌸 GLOBAL SETUP
===================================================== */
body {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    background-color: #ffecd2;
    /* Nền trang chủ đạo */
}

.container,
.row {
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    /* Bỏ scroll dọc */
}

/* =====================================================
   🖼️ IMAGE STACK (ảnh sole hai cột)
===================================================== */
.img-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    padding: 10px;
}

.img-stack img {
    width: 48%;
    /* chia 2 cột */
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* So le nhẹ tạo cảm giác art */
.img-stack img:nth-child(odd) {
    transform: translateY(10px);
}

.img-stack img:nth-child(even) {
    transform: translateY(-10px);
}

/* Hover effect */
.img-stack img:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
    z-index: 10;
}

/* Responsive: ẩn trên mobile */
@media (max-width: 767px) {
    .img-stack {
        display: none;
    }
}

/* =====================================================
   🎠 HERO CAROUSEL & ACTIVITIES SLIDER
===================================================== */
.hero-carousel,
.activities-slider {
    overflow-x: hidden;
    overflow-y: hidden;
    width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
}

/* Card slider */
.activities-slider .slider-cell {
    width: 25%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 5px;
}

.slider-cell .card {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.slider-cell .card img.card-img-top {
    height: 180px;
    object-fit: cover;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.slider-cell .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.slider-cell .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.slider-cell .card-text-activity {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .activities-slider .slider-cell {
        width: 50%;
    }
}

@media (max-width: 767.98px) {
    .activities-slider .slider-cell {
        width: 100%;
    }
}

/* =====================================================
   🖌️ ART HERO (Galleries Solo Image chồng)
===================================================== */
.art-hero .art-image {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.art-hero .art-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ảnh chính */
.art-hero .art-image-main {
    height: 300px;
    border-radius: 16px;
    z-index: 1;
    position: relative;
}

/* Ảnh phụ */
.art-hero .art-image-top {
    width: 40%;
    height: 150px;
    transform: rotate(-6deg);
}

.art-hero .art-image-bottom {
    width: 38%;
    height: 140px;
    transform: rotate(6deg);
}

.art-hero .art-image-left {
    width: 35%;
    height: 130px;
    transform: rotate(-8deg);
}

/* Hover effect */
.art-hero .art-image:hover {
    transform: scale(1.05) rotate(0deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Tablet */
@media (max-width: 991px) {
    .art-hero .art-image-main {
        height: 250px;
    }

    .art-hero .art-image-top,
    .art-hero .art-image-bottom,
    .art-hero .art-image-left {
        width: 35%;
        height: 120px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .art-hero .row {
        display: block;
        margin: auto;
    }

    .art-hero .col-lg-6 {
        margin-bottom: 20px;
    }

    .art-hero .art-image-main {
        width: 100%;
        height: auto;
        margin: 0 auto;
        border-radius: 12px;
        display: block;
    }

    .art-hero .art-image-main img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .art-hero .art-image-top,
    .art-hero .art-image-bottom,
    .art-hero .art-image-left {
        width: 40%;
        height: auto;
        border-radius: 8px;
    }
}

/* =====================================================
   📰 NEWS CARD
===================================================== */
#news .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#news .card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

#news .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#news .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#news .card-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Mobile: căn giữa card tin tức */
@media (max-width: 767.98px) {
    /* Row căn giữa */
    #news .row {
        display: flex;             /* vẫn flex */
        flex-direction: column;    /* stack card dọc */
        align-items: center;       /* căn giữa toàn bộ col */
        margin-left: 0 !important; /* loại bỏ negative margin */
        margin-right: 0 !important;
        gap: 1rem;                 /* space giữa card */
    }

    /* Col full-width max */
    #news .col-10,
    #news .col-sm-8 {
        width: 100% !important;
        max-width: 400px;          /* giới hạn chiều rộng */
        margin: 0 auto;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Card full-width */
    #news .card {
        width: 100%;
        margin: 0 auto;
    }
}

/* =====================================================
   🔘 BUTTON READ MORE
===================================================== */
.tn-btn-readmore {
    background-color: var(--primary-color);
    color: var(--text-dark);
    font-weight: 600;
    border-radius: var(--btn-radius);
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    box-shadow: var(--btn-shadow);
    text-align: center;
}

.tn-btn-readmore:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    color: var(--text-dark);
}

.tn-btn-readmore:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(252, 182, 159, 0.3);
}

/* =====================================================
   🎓 TRIAL CLASS CARD
===================================================== */
#trial-class .trial-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--main-accent), var(--main-light));
    border-radius: 1.5rem;
    overflow: hidden;
    padding: 3rem;
    gap: 2rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

#trial-class .trial-content {
    flex: 1;
    z-index: 2;
}

#trial-class .trial-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#trial-class .trial-image img {
    max-width: 90%;
    height: auto;
    border-radius: 1rem;
}

.trial-btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    transition: 0.3s ease;
}

.trial-btn:hover {
    background: var(--primary-hover, #e96a00);
    transform: translateY(-2px);
}

/* Mobile */
@media (max-width: 767px) {
    #trial-class .trial-card {
        flex-direction: column;
        text-align: center;
        padding: 3rem 1.5rem;
        background: var(--trial-bg) no-repeat center/cover;
        color: #fff;
        position: relative;
    }

    #trial-class .trial-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 1;
        border-radius: 1.5rem;
    }

    #trial-class .trial-content {
        z-index: 2;
    }

    #trial-class .trial-image {
        display: none;
    }

    .trial-btn {
        background: rgba(255, 255, 255, 0.9);
        color: #333;
        font-weight: 700;
    }

    .trial-btn:hover {
        background: #fff;
        color: var(--primary-color);
    }
}

/* =====================================================
   💡 FEATURE CONTENT (mục nổi bật)
===================================================== */
.feature-row {
    width: 100%;
    margin-top: 1rem;
}

.feature-item {
    transition: transform 0.3s ease, background-color 0.3s ease;
    border-radius: 10px;
    padding: 0.5rem 0.8rem;
}

.feature-item:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

.feature-item i {
    color: #ffb703;
    flex-shrink: 0;
}

.feature-text h6 {
    font-weight: 700;
    color: #222;
}

.feature-text p {
    color: #555;
    font-size: 0.9rem;
    text-align: justify;
}

/* ======================================
   🎓 CHƯƠNG TRÌNH HỌC — RESPONSIVE OPTIMIZED
====================================== */

#programs .section-title {
    font-size: 1.8rem;
    letter-spacing: 0.5px;
}

/* Card style */
#programs .program-card {
    transition: all 0.3s ease;
}

#programs .program-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Icon */
#programs i {
    transition: transform 0.3s ease, color 0.3s ease;
}

#programs .program-card:hover i {
    transform: scale(1.1);
    color: #ffb703;
}



/* 🔹 Mobile: căn giữa row & card, giữ khoảng cách đều */
@media (max-width: 767.98px) {
    #programs {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Row căn giữa */
    #programs .row {
        display: block;
        margin: auto;
    }

    /* Card full-width nhưng max-width giới hạn */
    #programs .col-10 {
        flex: 0 0 100%;
        max-width: 400px;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        margin: 0 auto;
        /* ✅ quan trọng để căn giữa col */
    }

    /* Card style */
    #programs .program-card {
        margin: 0 auto;
        width: 100%;
        max-height: 300px;
    }
}