/* Common css */
/* Prev / Next Swiper button */
.swiper-button-next,
.swiper-rtl .swiper-button-prev,
.swiper-button-prev,
.swiper-rtl .swiper-button-next {
    background: #fff;
    border-radius: 50%;
    width: 3.5rem;
    height: auto;
    aspect-ratio: 1 / 1;
}

.swiper-button-next:after,
.swiper-button-prev:after,
.swiper-button-prev:after,
.swiper-rtl .swiper-button-next:after {
    color: var(--fs-color-primary);
    font-size: 1rem;
    width: .5rem;
    height: auto;
    aspect-ratio: 1 / 2;
}

.swiper-pagination-bullet-active {
    background: var(--fs-color-primary);
}

.swiper-pagination-bullet {
    margin: 0 .5rem !important;
}

/* Banner */
/* 1. Thiết lập animation keyframes */
@keyframes zoomIn {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

/* 2. Gán animation cho ảnh */
.section-banner .slider .banner-bg img {
    animation: zoomIn 10s ease-in-out infinite alternate;
    transform-origin: center center;
}

/* 3. Nút ở right */
.section-banner .slider .flickity-page-dots {
    line-height: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: auto;
    right: 2%;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
}

.section-banner .slider .flickity-page-dots .dot {
    border-radius: 50%;
    cursor: pointer;
    display: inline-block;
    margin: .25rem 0;
    width: 0.75rem;
    height: auto;
    aspect-ratio: 1 / 1;
    transition: opacity .3s;
}

/*==============
* About 
* ==============
*/
.section-about::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 80%;
    background-color: var(--fs-color-primary);
    border-bottom-right-radius: 2rem;
}

.about__text-wrapper {
    padding-right: 4rem;

}

.about__text-wrapper .col-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.about-image img {
    border-radius: 1rem;
}

/*==============
* Course Coming soon 
* ==============
*/
/* ==== Grid 3 cột responsive ==== */
.courses-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 2rem;
    padding: 0 1rem;
}

/* ==== Mỗi item khóa học ==== */
.course-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border-radius: 1.5rem;
    cursor: pointer;
    height: 100%;
}

/* Thumbnail và badge */
.course-thumb {
    position: relative;
    overflow: hidden;
    border-radius: .5rem;
    cursor: pointer;
}

.course-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.course-item:hover img {
    transform: scale(1.1);
}

.course-item:hover .course-title>a {
    color: var(--fs-color-primary);
}

.course-tag {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(210, 158, 49);
    padding: .25rem .75rem;
    border-radius: .5rem;
}

img.badge-img-blur {
    position: absolute;
    z-index: 0;
    width: 80px;
    height: auto;
    top: 0;
    right: 0;
    aspect-ratio: 73 / 83;
    object-fit: cover;
}

.course-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #a00;
    color: #fff;
    border-radius: .5rem;
    text-align: center;
    overflow: hidden;
    font-family: sans-serif;
}

.badge-month {
    padding: 0rem 0.5rem;
    background: #fff;
    border-radius: 8px;
    margin: .3125rem .3125rem 0;
}

.badge-day {
    padding: 0 0.9375rem .25rem;
    font-size: 1.375rem;
}

/* Title */
.course-title {
    font-size: 1.125rem;
    margin: 1.375rem .5rem .75rem;
    width: auto;

    line-height: calc(1 * 2);
    height: calc(2rem * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-title a {
    color: #222;
    text-decoration: none;
}

.course-title:hover a {
    color: var(--fs-color-primary);
}

/* Excerpt chỉ 6 dòng */
.course-excerpt {
    margin: 0rem .5rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Xem thêm link */
.course-more {
    margin: auto 1rem 0rem;
    color: var(--fs-color-primary);
    text-decoration: none;
    font-weight: 500;
    text-align: right;
}

.course-more:hover {
    color: rgba(210, 158, 49);
}

.section-course-coming .swiper-slide {
    height: auto !important;
}

.section-course-coming .swiper-button-next,
.section-course-coming .swiper-button-prev {
    top: 35% !important;
}

.section-course-coming .swiper-button-next {
    right: 2% !important;
}

.section-course-coming .swiper-button-prev {
    left: 2% !important;
}

/* ===============
*   TEAM MEMBERS
*  ===============
*/
.section-team {
    background-color: rgb(249, 249, 249);
}

.team-swiper {
    margin-left: 100px;
    margin-right: 100px;
    padding-bottom: 4rem;
}

.team-swiper-wrapper .swiper-button-prev,
.team-swiper-wrapper .swiper-rtl .swiper-button-next {
    left: 5%;
    box-shadow: 0 0 10px 2px #00000034;
}

.team-swiper-wrapper .swiper-button-next,
.team-swiper-wrapper .swiper-rtl .swiper-button-left {
    right: 5%;
    box-shadow: 0 0 10px 2px #00000034;
}

/* Phóng to slide đang active */
.team-swiper .swiper-slide {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: scale(0.8);
}

.team-swiper .swiper-slide-active {
    transform: scale(1);
    opacity: 1;
    z-index: 10;
    margin-bottom: 2.625rem;

}

.team__image {
    background-color: #fff;
    border-radius: 50%/40%;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.team__image img {
    width: 100%;
}

.team-role {
    columns: #333;
}

/* ====================
*   Interesting Course
*  ====================
*/
.section.section-course::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 60%;
    background-color: var(--fs-color-primary);
    top: 0;
}

.interesting-courses-wrapper .swiper-button-next,
.interesting-courses-wrapper .swiper-button-prev {
    top: 55%;
    transform: translateY(55%);
    box-shadow: 0 0 10px 2px #00000034;
}


.interesting-courses-wrapper .swiper-slide {
    transform: scale(0.9);
    transition: transform 0.4s ease;
    transform-origin: bottom center;
    overflow: hidden;
    border-radius: 1rem;
}

.interesting-courses-swiper .swiper-slide {
    cursor: pointer;
}

.interesting-courses-swiper .swiper-slide-active {
    transform: scale(1);
}

.swiper-button-next {
    right: 15%;
}

.swiper-button-prev {
    left: 15%;
}

.swiper-button-prev:hover::after {
    animation: slideRightFade .3s linear;
}

.swiper-button-next:hover::after {
    animation: slideLeftFade .3s linear;
}

.swiper-button-prev:not(:hover)::after {
    animation: slideLeftFade .3s linear;
}

.swiper-button-next:not(:hover)::after {
    animation: slideRightFade .3s linear;
}

.interesting-course-thumbnail img {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 1rem;
    transition: transform 0.5s ease;
}

.interesting-course-content {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: #000;
    background: #fff;
    padding: .75rem 0 .75rem 1rem;
    border-radius: .5rem;
    max-width: 95%;
}

.interesting-course-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Khoảng cách giữa text và span */
}

.interesting-course-title {
    color: #000;
    width: calc(100% - 1rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.interesting-course-arrow {
    padding: .2rem .625rem;
    color: #fff;
    background-color: var(--fs-color-primary);
    border-radius: 50%;
    margin-right: 1rem;
}

/* Hover */
.interesting-courses-wrapper .swiper-slide:hover .interesting-course-thumbnail img {
    transform: scale(1.1);
}

.interesting-courses-wrapper .swiper-slide:hover .interesting-course-content {
    background-color: var(--fs-color-primary);
}

.interesting-courses-wrapper .swiper-slide:hover .interesting-course-title {
    color: #fff !important;
}

.interesting-courses-wrapper .swiper-slide:hover .interesting-course-arrow {
    color: var(--fs-color-primary);
    background-color: #fff;
}

/* ====================
*   Partner
*  ====================
*/
.partner-slick-wrapper .slick-slide {
    height: 86px;
    padding: 0 1.5rem;
}

.partner-slick-wrapper .slick-slide * {
    height: 86px !important;
    width: 100%;
    object-fit: contain;
}

.partner-slick-wrapper {
    overflow: hidden;
}

.partner-slick .logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 86px;
}

.partner-slick img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
}

@keyframes scroll-marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* ====================
*   News
*  ====================
*/
.custom-news-section {
    display: flex;
    gap: 40px;
}

.main-post {
    width: 42%;
}

.sub-posts {
    display: flex;
    flex-direction: column;
    gap: 36px;
    width: 58%;
}

.sub-post {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* News Wrapper */
.news__body {}

.main-post-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-post-wrapper img {
    width: 100%;
    height: auto;
    aspect-ratio: 475/357;
    object-fit: cover;
}

.sub-post-wrapper {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
}

.sub-post-wrapper .sub-post__img {
    width: 35%;
}

.sub-post-wrapper .news__body {
    width: 65%;
}

.sub-post-wrapper .sub-post__img img {
    height: 100%;
    object-fit: cover;

}

/*  */
.main-post-wrapper img,
.sub-post-wrapper .sub-post__img img {
    border-radius: 1rem;
}

.news__tag {
    padding: .25rem .625rem;
    margin-right: .75rem;
    color: var(--fs-color-primary);
    border: 1px solid var(--fs-color-primary);
    border-radius: 1rem / 50%;
    transition: all .3s ease;
}

.news__title,
.news__content {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-post .post-inner {
    margin: 1rem 0;
    padding-bottom: 1rem;
}

.sub-post .post-inner {
    margin: .625rem 0;
    padding-bottom: .625rem;
}

.post-inner::before {
    content: "";
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
}

.post-inner::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 0%;
    height: 1px;
    background-color: var(--fs-color-primary);
    transition: all .3s ease;
}

/* Animation */
.main-post__image-wrapper,
.sub-post__img {
    overflow: hidden;
    border-radius: 1rem;
}

.main-post img,
.sub-post img {
    transition: transform 0.5s ease;
}

.main-post:hover {
    cursor: pointer;
}

.main-post:hover img,
.sub-post:hover img {
    transform: scale(1.1);
}

.main-post:hover .news__tag,
.sub-post:hover .news__tag {
    color: #ffffff;
    background: var(--fs-color-primary);
}

.main-post:hover .news__title,
.sub-post:hover .news__title {
    color: var(--fs-color-primary) !important;
}

.main-post:hover .post-inner::after,
.sub-post:hover .post-inner::after {
    width: 100%;
}

.main-post:hover .post-inner::before,
.sub-post:hover .post-inner::before {
    height: 0;
}

/**
* MEDIA 
*/
/* Desktop lớn (Widescreen) */
@media screen and (max-width: 1921px) {
    /* CSS cho màn hình <= 1920px */
}

/* Desktop thường / Laptop lớn */
@media screen and (max-width: 1441px) {
    /* CSS cho màn hình <= 1440px */
}

/* Laptop nhỏ / Tablet landscape lớn */
@media screen and (max-width: 1201px) {
    /* CSS cho màn hình <= 1200px */
}

/* Nest hub */
@media screen and (max-width: 1025px) {

    /* CSS cho màn hình <= 1025px */
    /* COMMON */
    .swiper-button-next,
    .swiper-rtl .swiper-button-prev,
    .swiper-button-prev,
    .swiper-rtl .swiper-button-next {
        width: 3rem;
    }

    /* BANNER */
    .section-banner .text-box.banner-layer {
        left: 10%;
        bottom: 10%;
    }

    .about__text-wrapper {
        padding-right: 2rem;
    }
}

/* Tablet landscape / Laptop nhỏ */
@media screen and (max-width: 993px) {
    /* CSS cho màn hình <= 992px */
}

/* Ipad Air */
@media screen and (max-width: 821px) {

    /* CSS cho màn hình <= 821px */
    /* COMMON */
    .swiper-button-next,
    .swiper-rtl .swiper-button-prev,
    .swiper-button-prev,
    .swiper-rtl .swiper-button-next {
        width: 2.25rem;
    }

    .interesting-courses-wrapper .swiper-button-next,
    .interesting-courses-wrapper .swiper-button-prev {
        top: 60%;
    }

    /* ABOUT */
    .about__text-wrapper {
        padding-right: 1rem;

    }

    .about__text-wrapper .about__title {
        padding-right: 1rem;
        margin-bottom: 1.5rem;
    }

    .about__text-wrapper .about__content {
        text-align: justify !important;
    }

    /* INTERESTING COURSE */
    .interesting-course-title {
        font-size: 1rem;
    }

    .interesting-course-content {
        padding: .5rem 0 .5rem .75rem;
    }

    .interesting-course-arrow {
        margin-right: .75rem;
    }

    /* News */
    .section.section-news {
        padding-top: 2rem !important;
    }
}

/* Tablet portrait lớn / Mobile landscape */
@media screen and (max-width: 769px) {

    /* CSS cho màn hình <= 768px */
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* TEAM */
    .team-swiper {
        margin-left: 60px;
        margin-right: 60px;
        padding-bottom: 2rem;
    }

    /* NEWS */
    .custom-news-section {
        flex-direction: column;
    }

    .main-post {
        width: 100%;
    }

    .sub-posts {
        width: 100%;
    }
}

/* Mobile landscape / Phablet */
@media screen and (max-width: 577px) {

    /* CSS cho màn hình <= 576px */
    .courses-grid {
        grid-template-columns: 1fr;
    }

    /* ABOUT */

    .section.section-about {
        padding-bottom: 2rem !important;
    }

    .section-about .about-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .section-about::before {
        bottom: auto !important;
        width: 100%;
        height: 65%;

        border-bottom-right-radius: 0;
    }
}

/* Mobile IP 14Pro Max */
@media screen and (max-width: 431px) {

    /* CSS cho màn hình <= 431px */
    /* COMMON */
    .main-title {
        font-size: 1.75rem !important;
    }

    .section.section-about {
        padding-top: 4rem !important;
    }

    .section.section-course-coming,
    .section.section-team,
    .section.section-course {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    .section.section-news {
        padding-top: 0rem !important;
        padding-bottom: 4rem !important;
    }

    /* BANNER */
    .section-banner .text-box.banner-layer {
        width: 85% !important;
        left: 8%;
        bottom: 5%;
    }

    .section-banner .text-box.banner-layer .banner__content {
        text-align: justify !important;
    }

    /* TEAM */
    .team-swiper {
        margin-left: 70px;
        margin-right: 70px;
        padding-bottom: 6.5rem;
    }

    .team-swiper .swiper-slide {
        height: 100%;
    }

    /* COURSE Interest */
    .course__content,
    .interesting-courses-wrapper {
        padding-left: 1rem;
        padding-right: 1rem;
    }

}

/* Mobile portrait lớn (iPhone 6/7/8 Plus) */
@media screen and (max-width: 415px) {

    /* CSS cho màn hình <= 414px */
    /* BANNER */
    .section-banner .text-box.banner-layer {
        left: 10%;
        bottom: 10%;
    }
}

/* Mobile portrait trung bình (iPhone X/11 Pro) */
@media screen and (max-width: 391px) {

    /* CSS cho màn hình <= 390px */
    /* COMMON */
    .main-title {
        font-size: 1.5rem !important;
    }

    /* BANNER */
    .section-banner .text-box.banner-layer {
        width: 95% !important;
        left: 3%;
        bottom: 0;
    }

}

/* Mobile portrait nhỏ (iPhone SE, Android nhỏ) */
@media screen and (max-width: 376px) {
    /* CSS cho màn hình <= 375px */
}

.interesting-courses-swiper .swiper-wrapper {
    width: 100%;
    overflow: visible;
}