@font-face {
    font-family: IRANSans;
    src: url(../fonts/IRANSansWeb.woff2) format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}


body {
    font-family: 'IRANSans', Tahoma, Arial, sans-serif;
    background-color: #f9f9fb;
    color: #333;
    direction: rtl;
    padding: 20px;
    margin: 0;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

/* فرم جستجو و فیلتر */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

.input-search,
.select-category,
.input-date {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    min-width: 200px;
    transition: border-color 0.3s ease;
    font-family: 'IRANSans'
}

.input-search:focus,
.select-category:focus,
.input-date:focus {
    border-color: #1b1b1b;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
}

.btn-submit {
    background-color: #000000;
    border: none;
    color: white;
    font-size: 16px;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: 'IRANSans'
}

.btn-submit:hover {
    background-color: #1b1b1b;
}

/* لیست اخبار */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    display: flex;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    min-height: 130px;
    align-items: anchor-center;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.news-image {
    width: 200px;
    /* height: 130px; */
    flex-shrink: 0;
    margin: 0px 19px 0px 11px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 10px;
}

.news-content {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.news-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2980b9;
    transition: color 0.3s ease;
}

.news-item:hover .news-title {
    color: #1c5980;
}

.news-meta {
    font-size: 14px;
    color: #95a5a6;
    margin-bottom: 12px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.news-date,
.news-category {
    background-color: #ecf0f1;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.news-description {
    font-size: 16px;
    line-height: 1.4;
    color: #555;
}

.news-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* یا cover اگر بخواهید تصویر فضای دایو را پر کند */
    display: block;
}

/* پیغام نبود خبر */
.no-news {
    text-align: center;
    font-size: 18px;
    color: #888;
}

.news-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* یا cover اگر بخواهید تصویر فضای دایو را پر کند */
    display: block;
}

.news-content {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-height: 130px;
    /* ارتفاع ثابت */
}

/* صفحه بندی */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    flex-wrap: wrap;
    font-size: 16px;
}

.page-link {
    background-color: #3498db;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.page-link:hover {
    background-color: #2980b9;
}

.current-page {
    color: #666;
    padding: 8px 16px;
}

@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-height: auto;
        /* در موبایل ارتفاع خودکار */
    }

    .news-image {
        width: 100%;
        height: auto;
        border-radius: 10px 10px 0 0;
        background-color: transparent;
    }

    .news-image img {
        object-fit: cover;
    }

    .news-content {
        padding: 15px 15px 25px;
        min-height: auto;
    }

    .news-meta {
        justify-content: center;
    }
}