﻿:root {
    --primary-color: #4a6bff;
    --secondary-color: #f8f9fa;
    --accent-color: #ff6b6b;
    --text-color: #333;
    --light-text: #777;
}
section {
    margin-top: 70px;
}
body {
    font-family: 'IRANSans', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.articles-header {
    text-align: center;
    padding: 60px 0 40px;
    background-color: var(--secondary-color);
    background-image: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)), url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
}

    .articles-header h1 {

        font-size: 2.5rem;
        margin-bottom: 15px;
        color: var(--primary-color);
    }

    .articles-header p {
        font-size: 1.1rem;
        color: var(--light-text);
        max-width: 700px;
        margin: 0 auto;
    }

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 60px 0;
}

.article-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .article-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    }

.article-img {
    height: 200px;
    overflow: hidden;
}

    .article-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.article-card:hover .article-img img {
    transform: scale(1.1);
}

.article-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

    .article-content h3 {
        font-size: 1.4rem;
        margin-bottom: 15px;
        color: var(--primary-color);
    }

    .article-content p {
        color: var(--light-text);
        margin-bottom: 20px;
        flex-grow: 1;
    }

.article-meta {
    display: flex;
    justify-content: space-between;
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.article-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

    .article-link:hover {
        background-color: var(--accent-color);
    }

.categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.category-btn {
    padding: 8px 16px;
    background-color: #fff;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .category-btn:hover, .category-btn.active {
        background-color: var(--primary-color);
        color: white;
    }

/* دکمه افزودن مقاله */
.add-article-btn {
    position: fixed;
    left: 30px;
    bottom: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    border: none;
    outline: none;
}
#AddText{
    margin-bottom:5.5px;
}

    .add-article-btn:hover {
        background-color: var(--accent-color);
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    }

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .articles-header {
        padding: 40px 0 20px;
    }

        .articles-header h1 {
            font-size: 2rem;
        }

    .add-article-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        left: 20px;
        bottom: 20px;
    }
}
