* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: tahoma;
    background: white;
}


/* ======================= */

.articles-header {
    width: 75%;
    margin: 70px auto;
    text-align: center;
}

.articles-header h1 {
    color: #1c4eb4;
    font-size: 47px;
    margin-bottom: 30px;
    font-family: 'B ROYA';
}

.articles-header p {
    font-size: 18px;
    line-height: 2.2;
    color: #444;
    text-align: justify;
    font-family: 'IRANSansWeb', 'B ROYA';
}



/* ======================= */

.articles-library {
    width: 90%;
    max-width: 1450px;
    margin: auto;
}



/* 4 x 5 */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}



/* Card */

.article-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #d9e4ff;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    transition: .3s
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, .12);
}

.article-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.article-card h3 {
    padding: 16px;
    text-align: center;
    color: #23478f;
    font-size: 22px;
    font-family: 'B TITR';
}



/* ======================= */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 70px 0;
}

.pagination button {

    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: #1c4eb4;
    color: white;
    font-size: 20px;
}

.pagination span {
    font-size: 18px;
    color: #23478f;
}

/* ===================================
        Tablet (3 cards per row)
=================================== */

@media (max-width: 1000px) {

    .articles-header {
        width: 90%;
    }

    .articles-header h1 {
        font-size: 36px;
    }

    .articles-header p {
        font-size: 17px;
        line-height: 2;
    }

    .articles-library {
        width: 95%;
    }

    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .article-card h3 {
        padding: 10px;
        text-align: center;
        color: #23478f;
        font-size: 19px;
    }

}


/* ===================================
        Mobile (2 cards per row)
=================================== */

@media (max-width: 762px) {

    .articles-header {
        width: 85%;
        margin: 50px auto;
    }

    .articles-header h1 {
        font-size: 30px;
        margin-bottom: 20px;
    }

    .articles-header p {
        font-size: 16px;
        line-height: 1.9;
    }

    .articles-library {
        width: 92%;
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .article-card h3 {
        font-size: 18px;
        padding: 12px 10px;
        line-height: 1.6;
    }

    .pagination {
        gap: 18px;
        margin: 50px 0;
    }

    .pagination button {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .pagination span {
        font-size: 16px;
    }

    .article-card h3 {
        padding: 5px;
        text-align: center;
        color: #23478f;
        font-size: 18px;
    }

}