/* =====================================
   KIAPIC THEME - SEARCH PAGE
   ===================================== */

.kiapic-search-page {
    width: 1200px;
    max-width: 100%;
    margin: 25px auto;
    padding: 15px;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

/* عنوان صفحه */

.kiapic-search-header {
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #f5f5f5;
    border-right: 5px solid #6b1200;
    border-radius: 4px;
}

.kiapic-search-title {
    margin: 0 0 10px;
    color: #333;
    font-size: 22px;
    font-weight: 700;
}

.kiapic-search-info {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    color: #777;
    font-size: 12px;
}

.kiapic-search-info strong {
    color: #6b1200;
}

/* چیدمان اصلی */

.kiapic-search-layout {
    display: grid;
    grid-template-columns: minmax(0, 850px) 300px;
    gap: 20px;
    align-items: start;
}

/* ستون نتایج */

.kiapic-search-results {
    min-width: 0;
}

/* کارت هر خبر */

.kiapic-search-item {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.kiapic-search-item:hover {
    border-color: #b98a80;
}

/* تصویر خبر */

.kiapic-search-image {
    display: block;
    flex: 0 0 180px;
    width: 180px;
    height: 125px;
    overflow: hidden;
    border-radius: 4px;
    background: #eee;
}

.kiapic-search-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kiapic-search-no-image {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 12px;
}

/* محتوای خبر */

.kiapic-search-content {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
}

/* دسته بندی */

.kiapic-search-category {
    margin-bottom: 5px;
}

.kiapic-search-category a {
    color: #8b1a0e;
    font-size: 11px;
    text-decoration: none;
}

/* عنوان خبر */

.kiapic-search-item-title {
    margin: 0 0 7px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.9;
}

.kiapic-search-item-title a {
    color: #222;
    text-decoration: none;
}

.kiapic-search-item-title a:hover {
    color: #6b1200;
}

/* تاریخ */

.kiapic-search-date {
    margin-bottom: 7px;
    color: #999;
    font-size: 11px;
}

/* خلاصه */

.kiapic-search-excerpt {
    margin-bottom: 8px;
    color: #666;
    font-size: 12px;
    line-height: 1.9;
}

/* ادامه خبر */

.kiapic-search-more {
    margin-top: auto;
    color: #6b1200;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.kiapic-search-more:hover {
    color: #a52a2a;
}

/* ستون کناری */

.kiapic-search-sidebar {
    min-width: 0;
}

.kiapic-search-sidebar-box {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.kiapic-search-sidebar-title {
    margin: 0 0 15px;
    padding: 8px 10px;
    background: #6b1200;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

/* اخبار ستون کناری */

.kiapic-search-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.kiapic-search-sidebar-item:last-child {
    border-bottom: 0;
}

.kiapic-search-sidebar-image {
    flex: 0 0 75px;
    width: 75px;
    height: 60px;
    overflow: hidden;
}

.kiapic-search-sidebar-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kiapic-search-sidebar-item h3 {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.9;
}

.kiapic-search-sidebar-item h3 a {
    color: #333;
    text-decoration: none;
}

.kiapic-search-sidebar-item h3 a:hover {
    color: #6b1200;
}

/* صفحه بندی */

.kiapic-search-pagination {
    margin: 25px 0;
    text-align: center;
}

.kiapic-search-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.kiapic-search-pagination .page-numbers {
    display: inline-block;
    min-width: 35px;
    padding: 8px 12px;
    background: #f3f3f3;
    border-radius: 4px;
    color: #444;
    font-size: 12px;
    text-decoration: none;
}

.kiapic-search-pagination .page-numbers.current {
    background: #6b1200;
    color: #fff;
}

.kiapic-search-pagination .page-numbers:hover:not(.current) {
    background: #e5e5e5;
}

/* نتیجه پیدا نشد */

.kiapic-search-empty {
    padding: 40px 20px;
    background: #f7f7f7;
    border: 1px solid #eee;
    border-radius: 6px;
    text-align: center;
}

.kiapic-search-empty h2 {
    color: #6b1200;
    font-size: 20px;
}

.kiapic-search-empty p {
    color: #666;
    font-size: 13px;
    line-height: 2;
}

/* تبلت */

@media (max-width: 900px) {

    .kiapic-search-layout {
        grid-template-columns: minmax(0, 1fr) 260px;
    }

    .kiapic-search-image {
        flex-basis: 140px;
        width: 140px;
        height: 110px;
    }

}

/* موبایل */

@media (max-width: 650px) {

    .kiapic-search-layout {
        grid-template-columns: 1fr;
    }

    .kiapic-search-item {
        gap: 10px;
        padding: 10px;
    }

    .kiapic-search-image {
        flex-basis: 110px;
        width: 110px;
        height: 100px;
    }

    .kiapic-search-item-title {
        font-size: 13px;
    }

    .kiapic-search-excerpt {
        font-size: 11px;
    }

}