﻿
/* =========================
   AV IMAGE VIDEO SLIDER
========================= */
.av-slider {
    width: 100%;
    height: 460px;
    position: relative;
    overflow: hidden;
    direction: ltr;
    background: #17252d;
    box-sizing: border-box;
    margin-top: 6%;
}

.av-slider *,
.av-slider *::before,
.av-slider *::after {
    box-sizing: border-box;
}

.av-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

/* اسلایدها */

.av-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .7s ease;
}

    /* اسلاید فعال */

    .av-slide.av-active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        z-index: 2;
    }

/* تصویر و ویدیو */

.av-image,
.av-video {
    width: 100%;
    height: 100%;
    min-width: 0;
    position: relative;
    overflow: hidden;
    background: #222;
    border-radius: 10px;
}

    /* تصویر */

    .av-image img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        transition: transform 1s ease;
    }

.av-slide.av-active .av-image img {
    transform: scale(1.02);
}

/* ویدیو */

.av-video video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* نوشته روی تصویر */

.av-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 35px 30px;
    direction: rtl;
    text-align: right;
    color: #fff;
    background: linear-gradient( to top, rgba(0,0,0,.85), rgba(0,0,0,.2), transparent );
}

    .av-caption span {
        display: inline-block;
        color: #8fe0b9;
        font-size: 14px;
        margin-bottom: 10px;
    }

    .av-caption h2 {
        color: #fff;
        font-size: 25px;
        font-weight: 800;
        line-height: 1.8;
        margin: 0 0 10px;
    }

    .av-caption p {
        color: #eee;
        font-size: 14px;
        line-height: 2;
        margin: 0 0 18px;
    }

    .av-caption a {
        display: inline-block;
        padding: 11px 25px;
        border-radius: 6px;
        background: #16845d;
        color: #fff;
        text-decoration: none;
        font-size: 14px;
        transition: .3s;
    }

        .av-caption a:hover {
            background: #fff;
            color: #16845d;
        }

/* فلش های اسلایدر */

.av-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    color: #16845d;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: .3s;
}

    .av-arrow:hover {
        background: #16845d;
        color: #fff;
    }

.av-next {
    right: 15px;
}

.av-prev {
    left: 15px;
}

/* نقاط پایین اسلایدر */

.av-dots {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .av-dots button {
        width: 9px;
        height: 9px;
        padding: 0;
        border: none;
        border-radius: 20px;
        background: rgba(255,255,255,.6);
        cursor: pointer;
        transition: .3s;
    }

        .av-dots button.av-dot-active {
            width: 27px;
            background: #16845d;
        }

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {

    .av-slider {
        height: 600px;
        border-radius: 10px;
    }

    .av-slide {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 8px;
    }

    .av-image,
    .av-video {
        border-radius: 8px;
    }

    .av-caption {
        padding: 20px;
    }

        .av-caption h2 {
            font-size: 19px;
        }

        .av-caption p {
            font-size: 12px;
        }

        .av-caption a {
            padding: 9px 18px;
            font-size: 12px;
        }

    .av-arrow {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .av-next {
        right: 8px;
    }

    .av-prev {
        left: 8px;
    }
}

@media (max-width: 400px) {

    .av-slider {
        height: 520px;
    }

    .av-caption h2 {
        font-size: 17px;
    }
}


