﻿
/* categories.css */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.category-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

    .category-item:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 40px rgba(102, 126, 234, 0.15);
    }

.category-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

    .category-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
    }

.category-item:hover .category-image img {
    transform: scale(1.1);
}

.category-count {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    z-index: 2;
}

.count-number {
    font-size: 1.8rem;
    line-height: 1;
}

.count-label {
    font-size: 0.7rem;
    opacity: 0.9;
    margin-top: 2px;
}

.category-content {
    padding: 25px;
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 700;
    line-height: 1.4;
}

    .category-title a {
        color: inherit;
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .category-title a:hover {
            color: #667eea;
        }

.category-description {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 15px;
}

.latest-articles {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.latest-title {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-item {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .article-item:last-child {
        border-bottom: none;
    }

    .article-item i {
        color: #667eea;
        font-size: 14px;
    }

    .article-item a {
        color: #666;
        font-size: 14px;
        text-decoration: none;
        transition: color 0.3s ease;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

        .article-item a:hover {
            color: #667eea;
        }

.category-action {
    margin-top: 25px;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

    .view-all-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
        color: white;
    }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 15px;
    margin: 40px 0;
}

    .empty-state i {
        font-size: 4rem;
        color: #667eea;
        margin-bottom: 20px;
    }

    .empty-state h3 {
        color: #2c3e50;
        margin-bottom: 15px;
        font-size: 1.8rem;
    }

    .empty-state p {
        color: #666;
        margin-bottom: 25px;
        font-size: 1.1rem;
    }

/* انیمیشن‌ها */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-item {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

/* استایل‌های واکنش‌گرا */
@media (max-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 992px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }

    .category-image {
        height: 180px;
    }

    .category-content {
        padding: 20px;
    }

    .category-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .category-count {
        width: 60px;
        height: 60px;
        top: 15px;
        right: 15px;
    }

    .count-number {
        font-size: 1.5rem;
    }

    .empty-state {
        padding: 40px 15px;
    }

        .empty-state i {
            font-size: 3rem;
        }

        .empty-state h3 {
            font-size: 1.5rem;
        }
}

/* افکت شناور برای کارت‌ها */
.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.category-item:hover::before {
    transform: scaleX(1);
}


.category-page .single-news {
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.category-page .single-news:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.category-page .blog-img {
    position: relative;
    overflow: hidden;
    height: 250px;
}

    .category-page .blog-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.category-page .single-news:hover .blog-img img {
    transform: scale(1.1);
}

.category-page .dates {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    min-width: 60px;
}

    .category-page .dates span {
        display: block;
        font-size: 1.5rem;
        line-height: 1;
    }

    .category-page .dates small {
        font-size: 0.8rem;
        opacity: 0.9;
    }

.category-page .news-content-wrap {
    padding: 25px;
    background: white;
}

    .category-page .news-content-wrap ul {
        margin-bottom: 15px;
        padding: 0;
        list-style: none;
        display: flex;
    }

        .category-page .news-content-wrap ul li {
            margin-left: 15px;
        }

            .category-page .news-content-wrap ul li:first-child {
                margin-left: 0;
            }

            .category-page .news-content-wrap ul li a {
                color: #666;
                font-size: 0.9rem;
            }

                .category-page .news-content-wrap ul li a:hover {
                    color: #007bff;
                }

    .category-page .news-content-wrap h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
        line-height: 1.4;
        min-height: 55px;
    }

    .category-page .news-content-wrap p {
        color: #666;
        line-height: 1.6;
        margin-bottom: 20px;
        min-height: 80px;
    }

.category-page .read-more {
    color: #007bff;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

    .category-page .read-more:hover {
        color: #ff6b6b;
    }

    .category-page .read-more i {
        margin-right: 5px;
        transition: transform 0.3s ease;
    }

.category-page:hover .read-more i {
    transform: translateX(5px);
}


.category-card .blog-img {
    height: 250px;
    overflow: hidden;
}

    .category-card .blog-img img {
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.category-card:hover .blog-img img {
    transform: scale(1.1);
}

.category-badge {
    background: linear-gradient(135deg, #007bff, #6610f2);
    padding: 12px 15px;
    min-width: 70px;
}

    .category-badge span {
        font-size: 1.5rem;
        font-weight: bold;
    }

    .category-badge small {
        display: block;
        font-size: 0.8rem;
        opacity: 0.9;
    }

.sample-articles {
    border-top: 1px dashed #ddd;
    padding-top: 15px;
}

    .sample-articles h6 {
        color: #666;
        font-size: 0.9rem;
    }

    .sample-articles a {
        font-size: 0.85rem;
        transition: color 0.3s ease;
    }

        .sample-articles a:hover {
            color: #007bff !important;
            text-decoration: none;
        }

    .sample-articles i {
        font-size: 0.8rem;
        margin-left: 5px;
    }

