.dm-ms {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 720px;
    overflow: hidden;
    background: #111;
    direction: rtl;
}

.dm-ms-stage,
.dm-ms-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.dm-ms-slide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .55s ease, visibility .55s ease;
}

.dm-ms-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

/* بک‌گراند تمام صفحه بلرشده */
.dm-ms-bg-blur {
    position: absolute;
    inset: -80px;
    z-index: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    filter: blur(250px);
    transform: scale(1.18);
}

/* لایه مشکی روی بک‌گراند بلر */
.dm-ms-bg-black {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.6);
}

/* قاب اصلی کاور بزرگ */
.dm-ms-card {
position: absolute;
    z-index: 3;
    top: 90px;
    right: 56px;
    left: 56px;
    bottom: 60px;
    border-radius: 18px;
    overflow: hidden;
    background: rgb(255 255 255 / 10%);
    border: 3px solid transparent;
}

/* عکس واضح داخل قاب */
.dm-ms-card-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

/* گرادیانت داخل قاب از پایین راست به مرکز */
.dm-ms-card-gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:linear-gradient(90deg, transparent, rgb(18 18 18 / 0%) 48%, #121212);
}

/* محتوای سمت راست پایین داخل قاب */
.dm-ms-content {
    position: absolute;
    z-index: 5;
    right: 56px;
    bottom: 56px;
    width: min(420px, 42vw);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    color: #fff;
}

.dm-ms-logo {
    display: block;
    max-height: 80px;
    max-width: 270px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: right center;
    margin: 0 0 24px;
}

.dm-ms-title {
margin: 0 0 40px;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    line-height: 20px;
}

.dm-ms-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.dm-ms-btn {
    min-height: 56px;
    padding: 16px 40px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none !important;
    white-space: nowrap;
    font-size: 18px;
    font-weight: 800;
    line-height: 24px;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.dm-ms-btn-primary {
    background: #fff;
    color: #111 !important;
	padding-left: 48px;
}

.dm-ms-btn-preview {
    background: rgba(255, 255, 255, 0.22);
    color: #fff !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}



/* فلش‌ها داخل محدوده قاب، سمت چپ پایین */
.dm-ms-nav {
    position: absolute;
    z-index: 10;
    left: 112px;
    bottom: 116px;
    display: flex;
    align-items: center;
    gap: 12px;
    direction: ltr;
}

.dm-ms-nav-btn {
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.60);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
	backdrop-filter: blur(10px);
    transition: background .2s ease, transform .2s ease;
}

span.dm-ms-nav-icon.dm-ms-nav-icon-next, span.dm-ms-nav-icon.dm-ms-nav-icon-prev{
	display:flex;
}
.fade-ms {
    width: 100%;
    height: 60px;
    background: linear-gradient(0deg, #121212, rgb(18 18 18 / 0%));
    display: flex;
    position: absolute;
    bottom: 0;
    z-index: 2;
}


/* تبلت */
@media (max-width: 1024px) {
    .dm-ms {
        min-height: 640px;
    }

    .dm-ms-card {
        top: 88px;
        right: 32px;
        left: 32px;
        bottom: 64px;
    }

    .dm-ms-content {
        right: 44px;
        bottom: 44px;
        width: min(420px, 62vw);
    }

    .dm-ms-nav {
        left: 76px;
        bottom: 108px;
    }

    .dm-ms-logo {
        max-height: 72px;
        max-width: 230px;
    }
}

/* موبایل */
@media (max-width: 767px) {
    .dm-ms {
        height: 100vh;
        min-height: 620px;
    }

    .dm-ms-bg-blur {
        inset: -40px;
        filter: blur(120px);
        transform: scale(1.15);
    }

    .dm-ms-card {
        top: 78px;
        right: 16px;
        left: 16px;
        bottom: 44px;
        border-radius: 16px;
    }

    .dm-ms-card-bg {
        background-position: center center;
    }

    .dm-ms-card-gradient {
        background: linear-gradient(180deg, transparent, rgb(18 18 18 / 0%) 48%, #121212);
    }

    .dm-ms-content {
        right: 24px;
        left: 24px;
        bottom: 36px;
        width: auto;
    }

    .dm-ms-logo {
        max-width: 190px;
        max-height: 55px;
        margin-bottom: 12px;
    }

    .dm-ms-title {
        font-size: 17px;
        margin-bottom: 24px;
    }

    .dm-ms-actions {
        gap: 8px;
        flex-wrap: wrap;
    }

    .dm-ms-btn {
    min-height: 52px;
        padding: 14px 28px 14px 36px;
        font-size: 15px;
    }

    .dm-ms-nav {
        display: none;
    }
}
@media (max-width: 767px) {
    .dm-ms {
        height: 100vh;
        min-height: 100vh;
    }

    .dm-ms-card {
        height: 585px;
        top: auto;
        right: 16px;
        left: 16px;
        bottom: 72px;
        border-radius: 16px;
    }

    .dm-ms-nav {
        display: none !important;
    }

    .dm-ms-dots {
        display: flex !important;		
        position: absolute;
        z-index: 12;
        left: 50%;
        bottom: 44px;
        transform: translateX(-50%);
        align-items: center;
        justify-content: center;
        gap: 8px;
        direction: ltr;
    }

    .dm-ms-dot {
        width: 8px;
        height: 8px;
        min-width: 8px;
        min-height: 8px;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.2);
        cursor: pointer;
    }

    .dm-ms-dot.is-active {
        background: rgba(255, 255, 255, 1);
    }

    .dm-ms-btn-preview {
        display: none !important;
    }
}




/* لینک شدن کل کارت اسلاید به صفحه اثر */
.dm-ms-card-link {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: block;
    text-decoration: none;
}

/* محتوا روی لینک قرار دارد ولی خودش کلیک را نمی‌گیرد */
.dm-ms-content {
    pointer-events: none;
}

/* فقط دکمه‌ها قابل کلیک مستقل هستند */
.dm-ms-actions {
    position: relative;
    z-index: 8;
    pointer-events: auto;
}

/* دات‌های موبایل؛ در دسکتاپ فعلاً مخفی */
.dm-ms-dots {
    display: none;
}



/* کاور کوچک فقط برای موبایل */
.dm-ms-mobile-cover {
    display: none;
}

@media (max-width: 767px) {
    .dm-ms-mobile-cover {
        position: absolute;
        z-index: 6;
        right: 24px;
        top: 24px;
        width: 104px;
        border-radius: 14px;
        overflow: hidden;
        box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
        background: rgba(255, 255, 255, 0.08);
        pointer-events: none;
    }

    .dm-ms-mobile-cover img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 2 / 3;
        object-fit: cover;
    }
}




/* FIX: Mobile small cover visibility */
.dm-ms-mobile-cover {
    display: none;
}
/* Mobile: use small cover as main card image */
.dm-ms-card-bg-mobile {
    display: none;
}

.dm-ms-mobile-cover {
    display: none !important;
}

@media (max-width: 767px) {
    /* کاور بزرگ داخل قاب در موبایل مخفی شود */
    .dm-ms-card-bg {
        display: none !important;
    }

    /* کاور کوچک، تصویر اصلی قاب موبایل شود */
    .dm-ms-card-bg-mobile {
        display: block !important;
        position: absolute !important;
        inset: 0 !important;
        z-index: 0 !important;
        background-repeat: no-repeat !important;
        background-size: cover !important;
        background-position: center center !important;
    }

    .dm-ms-card-gradient {
        z-index: 1 !important;
    }

    .dm-ms-card-link {
        z-index: 4 !important;
    }

    .dm-ms-content {
        z-index: 5 !important;
		align-items:center;
    }

    .dm-ms-actions {
        z-index: 6 !important;
    }
}