/* --- Cấu trúc cơ bản --- */
.sticky-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}
.scrolling-column, .sticky-column {
    position: relative;
}

/* --- Tỷ lệ cột --- */
.ratio-30-70 .scrolling-column { width: 30%; }
.ratio-30-70 .sticky-column { width: 70%; }
.ratio-40-60 .scrolling-column { width: 40%; }
.ratio-40-60 .sticky-column { width: 60%; }
.ratio-50-50 .scrolling-column { width: 50%; }
.ratio-50-50 .sticky-column { width: 50%; }
.ratio-60-40 .scrolling-column { width: 60%; }
.ratio-60-40 .sticky-column { width: 40%; }
.ratio-70-30 .scrolling-column { width: 70%; }
.ratio-70-30 .sticky-column { width: 30%; }

/* --- Đảo vị trí cột --- */
.sticky-left .scrolling-column { order: 2; }
.sticky-left .sticky-column { order: 1; }
.sticky-right .scrolling-column { order: 1; }
.sticky-right .sticky-column { order: 2; }

/* --- Hiệu ứng Sticky --- */
.sticky-column {
    position: -webkit-sticky;
    position: sticky;
    top: 30vh;
}

/* --- Nội dung cuộn --- */
.sticky-text-item {
    min-height: 70vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.sticky-text-item h2 {
    font-size: 32px;
    margin-bottom: 20px;
}
.sticky-text-item .content-wrapper p {
    font-size: 16px;
    line-height: 1.6;
}
.sticky-text-item .sticky-button {
    display: inline-block;
    margin-top: 5px;
    padding: 8px 25px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    align-self: flex-start;
    transition: background-color 0.3s ease;
}
.sticky-text-item .sticky-button:hover {
    background-color: #005a87;
}

/* --- Hình ảnh dính --- */
.sticky-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
}
.sticky-image-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
    border-radius: 8px;
}
.sticky-image-item.is-active {
    opacity: 1;
}

/* --- Responsive cho điện thoại --- */
@media (max-width: 768px) {
    .sticky-wrapper {
        flex-direction: column;
    }
    .scrolling-column {
        width: 100% !important;
        order: unset !important;
    }
    .sticky-text-item {
        min-height: auto;
    }
    
    /* Xóa bỏ hoàn toàn định dạng cũ dùng pseudo-element */
    .sticky-text-item::before,
    .sticky-text-item::after {
        display: none;
    }
    
    /* ĐỊNH DẠNG MỚI: Dành cho các ảnh đã được JS di chuyển */
    .mobile-moved-image {
        display: block !important;
        position: relative !important;
        opacity: 1 !important;
        width: 100%;
        height: auto; /* Giữ tỷ lệ ảnh gốc */
        object-fit: contain; /* Đảm bảo ảnh không bị bóp méo, cắt xén */
        margin-top: 20px; /* Khoảng cách với text ở trên */
        margin-bottom: 40px; /* Khoảng cách với khối text tiếp theo */
        border-radius: 8px;
    }
}

/* --- CSS Cho Phần Đánh Số Item --- */
.sticky-item-counter {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.sticky-item-counter .dot {
    width: 10px;
    height: 10px;
    background-color: #9b2c9b;
    border-radius: 50%;
    margin-right: 12px;
}
.sticky-item-counter .number {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1;
}