/* =========================================================
   کارت‌های "چرا ما"
   ========================================================= */
.car-types2 .item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 310px;
    border-radius: 12px;
    padding: 30px 25px;
    overflow: hidden;
    transition: background-color 0.3s ease, transform 0.3s ease;
    background-color: var(--bs-link-color);
}

    .car-types2 .item a {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        height: 100%;
        text-decoration: none;
        z-index: 2;
    }

    /* ---------- آیکون: بک‌گراند + آیکون وسط روی هم ---------- */
    .car-types2 .item .why-icon {
        position: relative;
        display: block;
        width: 90px;
        height: 90px;
        margin-bottom: 18px;
        flex-shrink: 0;
    }

        .car-types2 .item .why-icon img {
            position: absolute;
            top: 50%;
            left: 50%;
            display: block;
            object-fit: contain;
            border-radius: 0;
        }

            /* لایه‌ی زیرین: بک‌گراند و حلقه (می‌چرخد) */
            .car-types2 .item .why-icon img:first-child {
                width: 100%;
                height: 100%;
                z-index: 0;
                transform: translate(-50%, -50%) rotate(0deg);
                transform-origin: center center;
                will-change: transform;
            }

            /* لایه‌ی بالایی: آیکون وسط (ثابت می‌ماند) */
            .car-types2 .item .why-icon img:last-child {
                width: 52%;
                height: 52%;
                z-index: 1;
                transform: translate(-50%, -50%);
            }

    /* ---------- هاور ---------- */
    .car-types2 .item:hover {
        background-color: #6c6c6c94;
        transform: translateY(-5px);
    }

        /* فقط بک‌گراند آیکون می‌چرخد */
        .car-types2 .item:hover .why-icon img:first-child {
            animation: why-spin 6s linear infinite;
        }

        .car-types2 .item:hover p {
            color: #ffffff;
        }

@keyframes why-spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* احترام به کاربرانی که انیمیشن را غیرفعال کرده‌اند */
@media (prefers-reduced-motion: reduce) {
    .car-types2 .item:hover .why-icon img:first-child {
        animation: none;
    }
}

/* ---------- متن ---------- */
.car-types2 .item h5,
.car-types2 .item h6 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.car-types2 .item h5 {
    font-size: 18px;
}

.car-types2 .item p {
    color: #ffffff;
    text-align: justify;
    font-size: 15px;
    margin: 0;
    transition: color 0.3s ease;
}

/* ---------- آیکون بزرگ پس‌زمینه‌ی کارت ---------- */
.car-types2 .item .bg-icon {
    position: absolute;
    bottom: -20px;
    inset-inline-end: -20px;
    z-index: 1;
    opacity: 0.08;
    pointer-events: none;
}

    .car-types2 .item .bg-icon img {
        width: 100px;
        height: 100px;
        object-fit: contain;
        display: block;
    }

/* =========================================================
   نوار شمارنده‌ها
   ========================================================= */
.counter-bar-wrapper {
    display: flex;
    justify-content: center;
}

.counter-bar.brdr {
    display: flex;
    align-items: stretch;
    padding: 15px 15px;
    background-color: var(--bs-link-color);
    border-radius: 60px;
    position: relative;
    width: 100%;
    max-width: 700px;
}

.counter-bar .counter-col {
    float: right;
    width: 33.33%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .counter-bar .counter-col.c1,
    .counter-bar .counter-col.c2 {
        border-left: 1px solid #3a3a3a;
    }

.counter-bar .counter-item {
    text-align: center;
    padding: 5px 10px;
}

    .counter-bar .counter-item .counter-number {
        color: #ffffff;
        font-size: 30px;
        font-weight: 800;
        margin-bottom: 2px;
        line-height: 1.1;
    }

    .counter-bar .counter-item p {
        color: #ffffff;
        font-size: 15px;
        margin-bottom: 0;
        white-space: nowrap;
    }

@media (max-width: 576px) {
    .counter-bar.brdr {
        border-radius: 20px;
        flex-wrap: wrap;
    }

    .counter-bar .counter-col {
        width: 100%;
        border-left: none !important;
        border-bottom: 1px solid #3a3a3a;
        padding: 10px 0;
    }

        .counter-bar .counter-col:last-child {
            border-bottom: none;
        }
}

/* =========================================================
   سوییچ دارک/لایت
   ========================================================= */
.switch-box {
    position: fixed;
    z-index: 999;
    right: 95px;
    bottom: 45px;
}

    .switch-box .switch {
        position: relative;
        display: inline-block;
        width: 60px;
        height: 34px;
    }

        .switch-box .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

    .switch-box input:checked + .slider {
        background-color: #0073c8;
    }

    .switch-box .slider.round {
        border-radius: 50px;
    }

    .switch-box .slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #0073c8;
        transition: 0.4s;
    }

    .switch-box input:checked + .slider:before {
        transform: translateX(24px);
        background: white url(https://i.ibb.co/7JfqXxB/sunny.png);
        background-repeat: no-repeat;
        background-position: center;
    }

    .switch-box .slider.round:before {
        border-radius: 50%;
    }

    .switch-box .slider:before {
        position: absolute;
        content: "";
        height: 30px;
        width: 30px;
        left: 2.5px;
        top: 0;
        bottom: 0;
        margin: auto 0;
        transition: 0.4s;
        box-shadow: 0 0px 15px #2020203d;
        background: white url(https://i.ibb.co/FxzBYR9/night.png);
        background-repeat: no-repeat;
        background-position: center;
    }

/* =========================================================
   حالت دارک
   ========================================================= */
body[data-theme="dark"] {
    background-color: #121212;
    color: #e0e0e0;
}

    body[data-theme="dark"] section {
        background-color: #121212 !important;
        color: #e0e0e0;
    }

    body[data-theme="dark"] .navbar,
    body[data-theme="dark"] .footer {
        background-color: #1a1a1a !important;
    }

    body[data-theme="dark"] .item,
    body[data-theme="dark"] .widget,
    body[data-theme="dark"] .counter-item {
        background-color: #1e1e1e !important;
        color: #e0e0e0 !important;
    }

    body[data-theme="dark"] .section-title,
    body[data-theme="dark"] .section-subtitle,
    body[data-theme="dark"] h1,
    body[data-theme="dark"] h2,
    body[data-theme="dark"] h3,
    body[data-theme="dark"] h4,
    body[data-theme="dark"] h5,
    body[data-theme="dark"] h6,
    body[data-theme="dark"] p {
        color: #e0e0e0 !important;
    }
.video-modal .modal-content {
    background: #000;
    border-radius: 12px;
    overflow: visible;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    position: relative;
}

.video-modal .modal-body {
    border-radius: 12px;
    overflow: hidden;
}

.video-modal .modal-dialog {
    max-width: 900px;
}

.video-modal .ratio iframe,
.video-modal .ratio video {
    width: 100%;
    height: 100%;
    border: 0;
}


.video-modal-close {
    position: absolute;
    top: -18px;
    inset-inline-end: -18px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #1b1b1b;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
    cursor: pointer;
    z-index: 10;
    padding: 0;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

    .video-modal-close:hover {
        background: #e63946;
        color: #fff;
        transform: scale(1.08) rotate(90deg);
    }

    .video-modal-close:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(230, 57, 70, .35);
    }

@media (max-width: 576px) {
    .video-modal-close {
        top: -14px;
        inset-inline-end: -8px;
        width: 34px;
        height: 34px;
    }
}

.video-modal .modal-content {
    background: #000;
    border-radius: 12px;
    overflow: visible;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    position: relative;
}

.video-modal .modal-body {
    border-radius: 12px;
    overflow: hidden;
}

.video-modal .modal-dialog {
    max-width: 900px;
}

.video-modal .ratio iframe,
.video-modal .ratio video {
    width: 100%;
    height: 100%;
    border: 0;
}


.video-modal-close {
    position: absolute;
    top: -18px;
    inset-inline-end: -18px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #1b1b1b;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
    cursor: pointer;
    z-index: 10;
    padding: 0;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

    .video-modal-close:hover {
        background: #e63946;
        color: #fff;
        transform: scale(1.08) rotate(90deg);
    }

    .video-modal-close:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(230, 57, 70, .35);
    }

@media (max-width: 576px) {
    .video-modal-close {
        top: -14px;
        inset-inline-end: -8px;
        width: 34px;
        height: 34px;
    }
}

.about-has-wave {
    --wave-h: clamp(80px, 12vw, 180px);
    --about-wave-color: var(--bs-link-color);
    position: relative;
    overflow: hidden;
    padding-bottom: calc(var(--wave-h) + 20px);
}

.about-wave {
    position: absolute;
    inset: auto 0 -1px 0;
    height: var(--wave-h);
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
}

    .about-wave .wave-layer {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 200%;
        height: 100%;
        fill: var(--about-wave-color);
        will-change: transform;
    }

    .about-wave .wave-1 {
        opacity: .25;
        animation: about-wave-move 22s linear infinite;
    }

    .about-wave .wave-2 {
        opacity: .5;
        height: 85%;
        animation: about-wave-move 15s linear infinite reverse;
    }

    .about-wave .wave-3 {
        opacity: 1;
        height: 65%;
        animation: about-wave-move 10s linear infinite;
    }

@keyframes about-wave-move {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .about-wave .wave-layer {
        animation: none;
    }
}

/* حالت دارک */
body[data-theme="dark"] .about-wave {
    --about-wave-color: #1e1e1e;
}