/*
Theme Name: SmartMag Child
Theme URI: https://yaransoft.com/
Description: Child theme for SmartMag
Author: Jumah Mohammadi
Author URI: https://yaransoft.com/
Template: smart-mag
Version: 1.1.0
Text Domain: smart-mag-child
*/


/*
|--------------------------------------------------------------------------
| Ava Featured Category — Magazine List Style
|--------------------------------------------------------------------------
*/

.avafc-wrapper {
    direction: rtl;
    width: 100%;
    max-width: 1100px;
    margin: 50px auto;
    padding: 0 20px;
}

.avafc-header {
    position: relative;
    margin-bottom: 35px;
    padding: 25px 30px;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            #7a0928 0%,
            #a40d3d 100%
        );
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(122, 9, 40, 0.2);
}

.avafc-header::before {
    position: absolute;
    top: -80px;
    left: -50px;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    content: "";
}

.avafc-header::after {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 160px;
    height: 4px;
    background: linear-gradient(
        90deg,
        #c4933b,
        #f2d58a
    );
    content: "";
}

.avafc-heading {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.6;
}

.avafc-category-description {
    position: relative;
    z-index: 2;
    max-width: 750px;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 2;
}

.avafc-category-description p {
    margin: 0;
}

/*
|--------------------------------------------------------------------------
| فهرست نوشته‌ها
|--------------------------------------------------------------------------
*/

.avafc-grid {
    display: flex;
    flex-direction: column;
    gap: 22px;
    counter-reset: ava-featured-post;
}

.avafc-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(240px, 320px) 1fr;
    min-height: 225px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee8e3;
    border-radius: 16px;
    box-shadow: 0 6px 25px rgba(48, 25, 33, 0.07);
    counter-increment: ava-featured-post;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.avafc-card:hover {
    border-color: rgba(164, 13, 61, 0.25);
    box-shadow: 0 15px 40px rgba(85, 20, 40, 0.13);
    transform: translateY(-4px);
}

/*
|--------------------------------------------------------------------------
| تصویر نوشته
|--------------------------------------------------------------------------
*/

.avafc-image {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 225px;
    overflow: hidden;
    background: #f5f1ee;
}

.avafc-image::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(122, 9, 40, 0.12),
        transparent 60%
    );
    content: "";
    opacity: 0;
    transition: opacity 0.3s ease;
}

.avafc-card:hover .avafc-image::after {
    opacity: 1;
}

.avafc-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 225px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.avafc-card:hover .avafc-image img {
    transform: scale(1.06);
}

.avafc-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8d0d30;
    background:
        linear-gradient(
            135deg,
            #fff8eb,
            #ead3a4
        );
    font-size: 23px;
    font-weight: 800;
    text-decoration: none;
}

/*
|--------------------------------------------------------------------------
| محتوای نوشته
|--------------------------------------------------------------------------
*/

.avafc-content {
    position: relative;
    display: flex;
    padding: 25px 30px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

/* شماره نوشته */


.avafc-date {
    position: relative;
    margin-bottom: 10px;
    padding-right: 18px;
    color: #a17d45;
    font-size: 13px;
    font-weight: 500;
}

.avafc-date::before {
    position: absolute;
    top: 50%;
    right: 0;
    width: 9px;
    height: 9px;
    background: #c4933b;
    border-radius: 50%;
    content: "";
    transform: translateY(-50%);
}

.avafc-title {
    position: relative;
    z-index: 2;
    margin: 0 0 10px;
    padding: 0;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.7;
}

.avafc-title a {
    color: #272127;
    text-decoration: none;
    transition: color 0.2s ease;
}

.avafc-title a:hover {
    color: #970d38;
}

.avafc-excerpt {
    position: relative;
    z-index: 2;
    margin-bottom: 18px;
    color: #706970;
    font-size: 14px;
    line-height: 2;
}

.avafc-more {
    position: relative;
    display: inline-flex;
    min-height: 38px;
    padding: 7px 18px;
    align-items: center;
    justify-content: center;
    color: #8d0d30;
    background: #fff4f7;
    border: 1px solid rgba(141, 13, 48, 0.15);
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition:
        color 0.25s ease,
        background 0.25s ease,
        padding 0.25s ease;
}

.avafc-more::after {
    margin-right: 8px;
    content: "←";
    font-size: 16px;
    transition: transform 0.25s ease;
}

.avafc-more:hover {
    padding-right: 22px;
    color: #fff;
    background: #8d0d30;
    border-color: #8d0d30;
}

.avafc-more:hover::after {
    transform: translateX(-4px);
}

/*
|--------------------------------------------------------------------------
| صفحه‌بندی
|--------------------------------------------------------------------------
*/

.avafc-pagination {
    margin-top: 40px;
}

.avafc-pagination ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.avafc-pagination li {
    margin: 0;
    padding: 0;
}

.avafc-pagination a,
.avafc-pagination span {
    display: flex;
    min-width: 42px;
    height: 42px;
    padding: 0 13px;
    align-items: center;
    justify-content: center;
    color: #7a0928;
    background: #fff;
    border: 1px solid #e8ded8;
    border-radius: 10px;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(60, 30, 40, 0.05);
    transition: all 0.2s ease;
}

.avafc-pagination a:hover,
.avafc-pagination .current {
    color: #fff;
    background: #8d0d30;
    border-color: #8d0d30;
    box-shadow: 0 5px 15px rgba(141, 13, 48, 0.25);
    transform: translateY(-2px);
}

/*
|--------------------------------------------------------------------------
| پیام‌ها
|--------------------------------------------------------------------------
*/

.avafc-message {
    direction: rtl;
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    color: #6d4c00;
    text-align: center;
    background: #fff8df;
    border: 1px solid #eedc9d;
    border-radius: 12px;
}

/*
|--------------------------------------------------------------------------
| تبلت
|--------------------------------------------------------------------------
*/

@media (max-width: 850px) {
    .avafc-card {
        grid-template-columns: 240px 1fr;
    }

    .avafc-content {
        padding: 22px;
    }

    .avafc-title {
        font-size: 20px;
    }

    .avafc-content::before {
        font-size: 45px;
    }
}

/*
|--------------------------------------------------------------------------
| موبایل
|--------------------------------------------------------------------------
*/

@media (max-width: 650px) {
    .avafc-wrapper {
        margin: 30px auto;
        padding: 0 14px;
    }

    .avafc-header {
        padding: 22px;
        border-radius: 13px;
    }

    .avafc-heading {
        font-size: 25px;
    }

    .avafc-card {
        display: block;
        min-height: auto;
        border-radius: 14px;
    }

    .avafc-image,
    .avafc-image img {
        height: 220px;
        min-height: 220px;
    }

    .avafc-content {
        padding: 22px;
    }

    .avafc-content::before {
        top: 17px;
        left: 17px;
        font-size: 42px;
    }

    .avafc-title {
        padding-left: 30px;
        font-size: 19px;
    }

    .avafc-excerpt {
        font-size: 13px;
        line-height: 1.9;
    }
}

/*
|--------------------------------------------------------------------------
| موبایل کوچک
|--------------------------------------------------------------------------
*/

@media (max-width: 400px) {
    .avafc-image,
    .avafc-image img {
        height: 190px;
        min-height: 190px;
    }

    .avafc-content {
        padding: 19px;
    }

    .avafc-heading {
        font-size: 22px;
    }
}