/* ==== SLIDE LAYOUT ==== */
.isolate-slide-inner {
    display: flex;
    align-items: stretch;
    height: 100%;
}

.isolate-caption {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    box-sizing: border-box;
}

.isolate-image-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.isolate-image {
    flex: 1;
    display: flex;
}

.isolate-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==== RATIO ==== */
.ratio-50_50 .isolate-caption { flex: 1; }
.ratio-50_50 .isolate-image-wrapper { flex: 1; }

.ratio-70_30 .isolate-caption { flex: 0 0 30%; }
.ratio-70_30 .isolate-image-wrapper { flex: 0 0 70%; }

.ratio-80_20 .isolate-caption { flex: 0 0 20%; }
.ratio-80_20 .isolate-image-wrapper { flex: 0 0 80%; }

/* ==== POSITION CLASS ==== */
/* Text Left / Image Right (default) */
.position-left {
    flex-direction: row;
}

/* Text Right / Image Left */
.position-right {
    flex-direction: row-reverse;
}

/* ==== NAVIGATION ==== */
.isolate-nav {
    position: absolute;
    display: flex;
    gap: 8px;
    z-index: 10;
    bottom: 15px;
    left: 15px;
}

.isolate-nav .swiper-button-prev,
.isolate-nav .swiper-button-next {
    position: relative;
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.isolate-nav .swiper-button-prev::after,
.isolate-nav .swiper-button-next::after {
    font-size: 12px;
    color: #000;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
    .isolate-slide-inner {
        flex-direction: column !important;
    }
    .isolate-caption,
    .isolate-image-wrapper {
        flex: 1 1 auto;
        max-width: 100%;
    }
}

.isolate-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* khoảng cách chữ và icon */
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(to right, #AB6546 0%, #AB6546 100%);
    background-size: 200% auto;
    border-radius: 4px;
    text-decoration: none;
    transition: background-position 0.4s ease, color 0.3s ease;
    width: auto; /* chiều rộng theo nội dung */
}

.isolate-btn:hover {
    background-image: linear-gradient(to right, #AB6546 0%, #FE506C 100%);
    background-position: right center;
}

.isolate-btn svg {
    width: 14px;
    height: 14px;
    fill: #fff;
    transition: transform 0.3s ease;
}

.isolate-btn:hover svg {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .isolate-slide-inner {
        flex-direction: column !important;
        text-align: center;
    }
    .isolate-caption {
        order: 2;
        padding: 15px;
        width: 100%;
    }
    .isolate-image-wrapper {
        order: 1;
        width: 100%;
    }
    .isolate-image img {
        width: 100%;
        height: auto;
    }

    .isolate-caption h5 {
        font-size: 13px;
        margin-bottom: 6px;
    }
    .isolate-caption h2 {
        font-size: 22px;
        margin-bottom: 12px;
    }
    .isolate-caption p {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .isolate-btn {
        padding: 5px 8px;
    }
}

.isolate-image-wrapper .swiper-button-next, .isolate-image-wrapper .swiper-rtl .swiper-button-prev {
    right: -5px !important;
    left: auto;
}