﻿:root {
    --primary: #87C66D;
    --secondary: #5A8F4E;
    --accent: #A5D68A;
    --light: #F8F9FA;
    --dark: #212529;
}

main {
    background-color: var(--primary);
    padding-bottom: 100px;
}

footer {
    box-shadow: 0 -40px 0 0 var(--primary);
}

.articles-container {
    display: grid;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    perspective: 1000px;
}

.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotateY(0);
    }

    50% {
        transform: translateY(-10px) rotateY(5deg);
    }
}

@keyframes cardHover {
    0% {
        transform: translateY(0) rotateX(0);
    }

    100% {
        transform: translateY(-10px) rotateX(5deg);
    }
}

.article-card {
    border-radius: 15px;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100%;
    background: white;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-style: preserve-3d;
/*    opacity: 0;
*/    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: calc(var(--order) * 0.1s);
}

    .article-card:hover {
        transform: translateY(-10px) rotateX(5deg);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
        border-color: rgba(255, 255, 255, 0.6);
    }

    .article-card a {
        text-decoration: none;
        color: inherit;
    }

.article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

    .article-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--secondary);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
    animation: float 4s ease-in-out infinite;
}

.article-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    flex-grow: 1;
    transform: translateZ(20px);
}

    .article-info h3 {
        margin: 0;
        font-size: 1.3rem;
        color: var(--dark);
        transition: color 0.3s;
    }

.article-card:hover .article-info h3 {
    color: var(--secondary);
}

.article-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #777;
}

.article-date {
    display: flex;
    align-items: center;
}

    .article-date i {
        margin-left: 5px;
    }

.article-readtime {
    display: flex;
    align-items: center;
}



/* دکمه مشاهده بیشتر */
.read-more {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background-color: var(--secondary);
    color: white !important;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s;
    align-self: flex-start;
}

.article-card:hover .read-more {
    background-color: var(--secondary);
    transform: translateX(5px);
}

/* هدر صفحه */
.page-header {
    text-align: center;
    padding: 20px 0;
    color: white;
}

    .page-header h1 {
        font-size: 2.5rem;
        margin-bottom: 20px;
        text-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
        animation: fadeInUp 1s ease-out;
    }

    .page-header p {
        font-size: 1.2rem;
        max-width: 700px;
        margin: 0 auto;
        animation: fadeInUp 1s ease-out 0.3s forwards;
        opacity: 0;
    }

/* ریسپانسیو */
@media (max-width: 768px) {
    .article-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }
}












.error-container {
    max-width: 600px;
    padding: 2rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out forwards;
}

.error-icon {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1;
}

.error-container h1 {
    color: var(--secondary);
    font-size: 3rem;
    margin: 0.5rem 0;
}

.error-container h2 {
    color: var(--dark);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.error-container p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text);
}

.btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin: 1rem 0;
}

    .btn:hover {
        background-color: var(--secondary);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

.suggestions {
    margin-top: 2rem;
    text-align: right;
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

    .suggestions h3 {
        color: var(--secondary);
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .suggestions ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
    }

    .suggestions li {
        margin: 0.8rem 0;
    }

    .suggestions a {
        color: var(--primary);
        text-decoration: none;
        transition: color 0.2s ease;
        font-size: 1rem;
        display: block;
        padding: 0.3rem 0;
    }

        .suggestions a:hover {
            color: var(--secondary);
            text-decoration: underline;
        }




/* صفحه‌بندی */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 50px 0;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray);
    cursor: pointer;
    transition: var(--transition);
    background: var(--accent);
    color: white;
}

    .page-btn:hover, .page-btn.active {
        border-color: var(--accent);
        background: white;
        color: black;
}

/* ریسپانسیو */
@media (max-width: 768px) {
     .articles-title {
         font-size: 2rem;
     }

     .articles-container {
         grid-template-columns: 1fr;
     }
 }