.wrapper {
    width: 90%;
    margin: 0 auto;
    max-width: 1200px;
}

.cols {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    direction: rtl;
}

.col {
    flex: 0 0 calc(25% - 1rem);
    margin: 0.5rem 0;
    cursor: pointer;
    min-width: 200px;
    transition: transform 0.3s ease; /* انیمیشن برای scale */
}

.col:hover {
    transform: scale(1.05); /* زوم کردن کارت */
}

.container {
    position: relative;
    width: 100%;
    height: 100%;
}

.front {
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    text-align: center;
    min-height: 200px;
    height: auto;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    position: relative;
    transition: background-image 0.3s ease, background-color 0.3s ease; /* انیمیشن برای تغییر بک‌گراند */
}

.col:hover .front {
    /*background-image: none !important;*/
    /*background-color: #333;*/
}

.front:after {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    content: '';
    display: block;
    opacity: 0.6;
    background-color: #00000015;
    border-radius: 10px;
    box-sizing: border-box;
    transition: opacity 0.3s ease; /* انیمیشن برای تغییر opacity */
}

.col:hover .front:after {
    opacity: 1; /* در حالت هاور، پس‌زمینه کاملاً تیره می‌شود */
    /*background-color: #333; !* هماهنگی با رنگ پس‌زمینه *!*/
}

.inner {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
    z-index: 2;
    direction: rtl;
}

.text-box {
    background: #ffffffa1; /* پس‌زمینه شیشه‌ای */
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2); /* کادر دور باکس */
    display: inline-block; /* ابعاد باکس متناسب با محتوا */
    text-align: center;
}

.col:hover .text-box {
    background: rgba(255, 255, 255, 0.9); /* در حالت هاور، پس‌زمینه متن سفیدتر و خواناتر */
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.front .inner p {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #141416; /* رنگ سفید برای خوانایی بهتر */
    text-align: center;
}

.front .inner p:after {
    content: '';
    width: 3rem;
    height: 2px;
    position: absolute;
    background: #8c8c8c;
    display: block;
    top: 80px;
    left: 0;
    right: 0;
    margin: 0 auto;
    bottom: -0.5rem;
}

.front .inner span {
    color: #0b0b0b; /* افزایش خوانایی */
    font-family: 'Vazir', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    text-align: center;
    display: block;
}

@media screen and (max-width: 992px) {
    .col {
        flex: 0 0 calc(33.333% - 1rem);
    }
}

@media screen and (max-width: 768px) {
    .col {
        flex: 0 0 calc(50% - 1rem);
    }
}

@media screen and (max-width: 576px) {
    .col {
        flex: 0 0 100%;
        margin: 0.5rem 0;
    }
}
