﻿* {
    box-sizing: border-box;
}

body {
 /*  background: #808080;*/ 
}

.wrapper {
    display: flex !important;
    position: relative !important;
    width: 100%;
    min-height: 400px;
    max-height:100%;    
    overflow: hidden;
}

.itemslider {
    position: relative !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 5px;
    z-index: 8;
    flex-direction: column;
}
.itemverticalslider {
    position: relative !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 5px;
    z-index: 8;
    flex-direction: column;
}
/*div.wrapper > ul {
    position: relative !important;
    display: flex !important;
    top: 50%;
    width: 100%;
    height: 100%;*/
    /* left: 50%;
            margin-left: -400px;
        margin-top: -130px;*/
    /*         grid-template-columns: 1fr 1fr 1fr 1fr;
        grid-gap: 10px;
        background-color: #2196F3;*/
    /*padding: 5px;
    z-index: 9;
}*/

ul.itemslider > li {
    list-style-type: none;
    position: absolute;
    top: 0;
    padding: 5px;
    min-height: 285px;
    /*height: 100%!important;
    opacity: 0;*/
    padding-top: 5px;
    text-align: center;
    transition: 1s opacity;
    overflow: hidden;
    z-index: 10;
    align-self: center;
}
 .deactive  {
    opacity: 0;
    visibility:hidden;
    z-index:0;
}
.active {
    opacity: 1;
    visibility: visible;
    z-index:10;
}
@media (max-width: 768px) {
    .wrapper {
        overflow: visible !important;
        min-height: auto !important;
        flex-wrap: wrap !important;
        container-type: inline-size;
    }

    .itemslider, .itemverticalslider {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        height: auto !important;
        position: relative !important;
    }

    ul.itemslider > li {
        position: relative !important;
        width: 95% !important;
        max-width: 95% !important;
        margin: 10px auto !important;
        left: auto !important;
        top: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 10 !important;
        min-height: 250px !important;
    }

        /* مخفی کردن کارت‌های غیرفعال در موبایل */
        ul.itemslider > li.deactive {
            display: none !important;
        }
    /* Container queries برای صفحات بسیار کوچک */
    @container (max-width: 400px) {
        ul.itemslider > li {
            width: 100% !important;
            max-width: 100% !important;
            margin: 5px auto !important;
        }
    }

    @container (max-width: 300px) {
        ul.itemslider > li {
            min-height: 200px !important;
            padding: 2px !important;
        }
    }
}
/*p {
    font-family: sans-serif;
    font-size: 13px;
    color: #646566;
    line-height: 1.5em;
}

strong {
    color: #4800ff;
    font-weight: 700;
    font-size: 60px;
    line-height: 100px;
}
*/
/* برای اطمینان از نمایش صحیح در تمام مرورگرها */
@media screen and (-webkit-min-device-pixel-ratio:0) and (max-width: 768px) {
    .itemslider, .itemverticalslider {
        -webkit-align-items: center !important;
        align-items: center !important;
    }

    ul.itemslider > li {
        -webkit-align-self: center !important;
        align-self: center !important;
    }
}