﻿/* ============================================
                   استایل اختصاصی صفحه مقالات
                   ============================================ */

/* ---------- تنظیمات پایه ---------- */
.articles-page {
    background: linear-gradient(145deg, #f8fbfa 0%, #eaf1ee 100%);
    min-height: 100vh;
    padding: 2.5rem 0;
    font-family: 'Sahel', 'Tahoma', sans-serif;
}

/* ---------- هدر صفحه ---------- */
.articles-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

    .articles-header::after {
        content: '';
        position: absolute;
        bottom: -0.5rem;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        height: 4px;
        background: linear-gradient(90deg, #1f8a70, #46e6b0);
        border-radius: 4px;
    }

    .articles-header h1 {
        font-size: 2.5rem;
        font-weight: 700;
        color: #1a3d33;
        margin-bottom: 0.5rem;
        letter-spacing: -0.5px;
    }

        .articles-header h1 i {
            color: #1f8a70;
            margin-left: 0.5rem;
        }

    .articles-header p {
        color: #5a7a70;
        font-size: 1.1rem;
        max-width: 500px;
        margin: 0 auto;
    }

/* ---------- شبکه مقالات ---------- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ---------- کارت مقاله ---------- */
.article-card {
    background: #ffffff;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 30, 20, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .article-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 50px rgba(26, 138, 106, 0.15);
        border-color: rgba(31, 138, 112, 0.2);
    }

/* ---------- تصویر مقاله ---------- */
.article-image-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 62.5%; /* 16:10 Aspect Ratio */
    background: #f0f5f2;
}

    .article-image-wrapper img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
    }

.article-card:hover .article-image-wrapper img {
    transform: scale(1.05);
}

/* ---------- برچسب دسته‌بندی (اختیاری) ---------- */
.article-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(31, 138, 112, 0.9);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 0.25rem 1rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .article-badge i {
        font-size: 0.6rem;
    }

/* ---------- محتوای کارت ---------- */
.article-content {
    padding: 1.5rem 1.5rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ---------- متادیتا (تاریخ، نویسنده و ...) ---------- */
.article-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.05rem;
    color: #8aa89e;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

    .article-meta span {
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

    .article-meta i {
        font-size: 0.7rem;
        color: #1f8a70;
    }

/* ---------- عنوان مقاله ---------- */
.article-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a2e2a;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 3.4rem;
    text-align:center;
}

/* ---------- چکیده مقاله ---------- */
.article-excerpt {
    font-size: 1.2rem;
    color: #5a7a70;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align:justify;
}

/* ---------- فوتر کارت (لینک و آمار) ---------- */
.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.8rem;
    border-top: 1px solid #ecf3f0;
    margin-top: auto;
}

.article-stats {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1rem;
    color: #8aa89e;
}

    .article-stats span {
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

    .article-stats i {
        font-size: 0.7rem;
        color: #1f8a70;
    }

/* ---------- دکمه نمایش مقاله ---------- */
.article-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, #1f8a70, #136753);
    color: #fff;
    border-radius: 999px;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 138, 106, 0.25);
    border: none;
    cursor: pointer;
    font-family: 'Sahel', 'Tahoma', sans-serif;
}

    .article-link:hover {
        transform: translateX(-4px);
        box-shadow: 0 8px 25px rgba(26, 138, 106, 0.35);
        background: linear-gradient(135deg, #1a7a62, #0f5a4a);
        color: #fff;
        text-decoration: none;
    }

    .article-link i {
        font-size: 0.7rem;
        transition: transform 0.3s ease;
    }

    .article-link:hover i {
        transform: translateX(-4px);
    }

/* ---------- حالت خالی (بدون مقاله) ---------- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

    .empty-state i {
        font-size: 4rem;
        color: #c0d6ce;
        margin-bottom: 1rem;
    }

    .empty-state h3 {
        font-size: 1.5rem;
        color: #1a3d33;
        margin-bottom: 0.5rem;
    }

    .empty-state p {
        color: #7a9a8e;
        font-size: 1rem;
    }

/* ============================================
                   ریسپانسیو
                   ============================================ */

/* تبلت */
@media (max-width: 992px) {
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.5rem;
    }

    .articles-header h1 {
        font-size: 2rem;
    }
}

/* موبایل */
@media (max-width: 576px) {
    .articles-page {
        padding: 1.5rem 0;
    }

    .articles-header {
        margin-bottom: 2rem;
    }

        .articles-header h1 {
            font-size: 1.6rem;
        }

        .articles-header p {
            font-size: 0.9rem;
            padding: 0 1rem;
        }

        .articles-header::after {
            width: 60px;
            height: 3px;
        }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 0 0.8rem;
    }

    .article-card {
        border-radius: 1.2rem;
        max-width: 100%;
    }

    .article-image-wrapper {
        padding-top: 56.25%; /* 16:9 برای موبایل */
    }

    .article-content {
        padding: 1.2rem 1.2rem 1rem;
    }

    .article-title {
        font-size: 1rem;
        height: 2.8rem;
        -webkit-line-clamp: 2;
        text-align:center;
    }

    .article-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    .article-meta {
        font-size: 0.65rem;
        gap: 0.5rem;
    }

    .article-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .article-stats {
        justify-content: center;
        font-size: 0.7rem;
    }

    .article-link {
        justify-content: center;
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
    }

    .article-badge {
        top: 0.7rem;
        right: 0.7rem;
        font-size: 0.6rem;
        padding: 0.15rem 0.7rem;
    }
}

/* موبایل خیلی کوچک */
@media (max-width: 380px) {
    .articles-header h1 {
        font-size: 1.3rem;
    }

    .articles-grid {
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .article-content {
        padding: 1rem 1rem 0.8rem;
    }

    .article-title {
        font-size: 0.9rem;
        height: 2.4rem;
        text-align: center;
    }

    .article-excerpt {
        font-size: 0.75rem;
    }

    .article-link {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
    }
}
