﻿
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s ease-in-out;
    z-index: 999999;
}
.software-title {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    /* گرادیانت رنگی زیبا */
    background: linear-gradient(45deg, #ff416c, #ff4b2b, #083E89);
    background-size: 300%;
    /* استفاده از پس‌زمینه گرادیانت به عنوان رنگ متن */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* انیمیشن تغییر مکان گرادیانت */
    animation: gradientShift 3s ease infinite, shadowPulse 3s ease-in-out infinite;
}

/* انیمیشن تغییر مکان گرادیانت */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* انیمیشن پالس سایه */
@keyframes shadowPulse {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 65, 108, 0.7), 0 0 20px rgba(255, 75, 43, 0.5);
    }

    50% {
        text-shadow: 0 0 20px rgba(255, 65, 108, 1), 0 0 30px rgba(255, 75, 43, 1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.popup-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.popup-content .box {
        width: 180px;
        height: 260px;
        background: linear-gradient(135deg, #37474f, #455a64);
        color: white;
        padding: 15px;
        text-align: center;
        border-radius: 15px;
        transition: box-shadow 0.5s, background 0.5s;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow: hidden;
        position: relative;
    }

.popup-content .box::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }

.popup-content .box:hover::before {
        opacity: 1;
    }

.popup-content .box:hover {
        background: linear-gradient(135deg, #ff6a00, #ee0979);
        box-shadow: 0 25px 50px rgba(255, 75, 43, 0.9);
    }

.popup-content .box img {
        width: 100%;
        border-radius: 15px;
        transition: transform 0.4s;
    }

.popup-content .box:hover img {
        transform: scale(1.1);
    }

.popup-content .box:hover p {
        transform: scale(1.2);
    }

.popup-content .box p {
        margin-top: auto;
        text-align: center;
        font-size: 16px;
        font-weight: bold;
        opacity: 0.9;
        transition: transform 0.4s;
    }

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 35px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s, color 0.3s;
}

    .close-btn:hover {
        transform: scale(1.5) rotate(90deg);
        color: #ff4b2b;
    }
/* برای صفحه‌های کوچکتر */
@media screen and (max-width: 768px) {
    .popup-content {
        grid-template-columns: repeat(2, 1fr) !important; /* دو ستون */
        gap: 20px;
        max-height: 100vh;
        overflow-y: scroll;
    }

    /* تنظیمات برای جعبه‌ها */
    .popup-content .box {
            width: 100%; /* هر باکس تمام فضای ستون را بگیرد */
            height: auto;
            max-width: 300px; /* حداکثر عرض */
            margin: 0 auto; /* در صورت وجود تنها یک آیتم، وسط چین شود */
        }

    .popup-content .box img {
            width: 70px !important;
            margin: 0 auto;
        }
    .popup-content .box p {
            margin-top: 20px;
        }
    .software-title {
        font-size: 20px;
        top: 50px;
    }
}
@media screen and (max-width: 480px) {
    .popup-content {
        grid-template-columns: 1fr !important; /* دو ستون */
        gap: 20px;
        max-height: 100vh;
        overflow-y: scroll;
    }
    .software-title {
        font-size: 20px;
        top: 50px;
    }
}