/* =========================================================
   SLIDER FRAME FIX V10.10
   - Prev/Next desktop: ±125px
   - Bỏ nền đen mờ .cas-img
   - Khóa ảnh thật vào lòng khung, không tràn cạnh dưới
   - Khung PNG luôn phủ trên cùng
   ========================================================= */

/* ---------- Tất cả breakpoint ---------- */
.his-cas2 .cas-img {
    position: relative !important;
    width: 100% !important;

    /* Tỷ lệ gần đúng của khung_slide.png */
    aspect-ratio: 1081 / 635 !important;

    padding: 0 !important;
    box-sizing: border-box !important;

    overflow: hidden !important;

    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
}

/*
 * Ảnh thật nằm hoàn toàn trong vùng lòng khung.
 * Dùng absolute thay vì width/height 100% + padding,
 * nên không thể tràn xuống dưới khung.
 */
.his-cas2 .cas-img > img {
    position: absolute !important;
    z-index: 1 !important;

    top: 7.5% !important;
    right: 8.5% !important;
    bottom: 8.5% !important;
    left: 8.5% !important;

    width: auto !important;
    height: auto !important;
    max-width: none !important;

    object-fit: cover !important;
    object-position: center center !important;

    margin: 0 !important;
    display: block !important;
}

/*
 * Vì img absolute có top/right/bottom/left,
 * ép kích thước theo đúng vùng inset.
 */
.his-cas2 .cas-img > img {
    width: calc(100% - 17%) !important;
    height: calc(100% - 16%) !important;
}

/* Bỏ lớp tối inset cũ */
.his-cas2 .cas-img::before {
    content: none !important;
    display: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Khung luôn nằm trên ảnh */
.his-cas2 .cas-img::after {
    content: "" !important;
    display: block !important;

    position: absolute !important;
    z-index: 5 !important;
    inset: 0 !important;

    pointer-events: none !important;

    background: url(../images/khung_slide.png) no-repeat center center !important;
    background-size: 100% 100% !important;
}

/* Card không tự cắt viền khung ngoài */
.his-cas2 .cas {
    overflow: visible !important;
}

/* ---------- Desktop ---------- */
@media (min-width: 992px) {
    .his-cas2 .prev {
        left: -125px !important;
    }

    .his-cas2 .next {
        right: -125px !important;
    }
}

/* ---------- Tablet/Mobile ----------
   Nới lòng ảnh nhẹ hơn để frame không chiếm quá nhiều diện tích */
@media (max-width: 991.98px) {
    .his-cas2 .cas-img > img {
        top: 7% !important;
        right: 8% !important;
        bottom: 8% !important;
        left: 8% !important;

        width: calc(100% - 16%) !important;
        height: calc(100% - 15%) !important;
    }
}
