/**
 * استایل فرانت‌اند اخبار مپنا
 * رنگ‌های پیش‌فرض برند: --mapna-red: #c4161c, --mapna-gray: #6d6e71, --mapna-blue: #00377b
 */
.mapna-news-wrapper {
    --mapna-red: #c4161c;
    --mapna-gray: #6d6e71;
    --mapna-blue: #00377b;
    direction: rtl;
    font-family: inherit;
}

/* ===== تب‌ها ===== */
.mapna-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 3px solid var(--mapna-red);
    margin-bottom: 20px;
    padding: 0;
}
.mapna-tab {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 600;
    color: var(--mapna-gray);
    cursor: pointer;
    transition: all .2s ease;
}
.mapna-tab:hover {
    background: #ebebeb;
    color: var(--mapna-blue);
}
.mapna-tab.active {
    background: var(--mapna-red);
    border-color: var(--mapna-red);
    color: #fff;
}

/* ===== فیلترها ===== */
.mapna-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 20px;
}
.mapna-filter-field {
    flex: 1 1 160px;
    min-width: 140px;
}
.mapna-filter-field input,
.mapna-filter-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}
.mapna-filter-submit {
    width: 100%;
    background: var(--mapna-blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s ease;
}
.mapna-filter-submit:hover {
    background: var(--mapna-red);
}

/* ===== لودینگ ===== */
.mapna-loading {
    text-align: center;
    padding: 50px 20px;
    color: var(--mapna-gray);
    font-size: 15px;
}
.mapna-loading::after {
    content: '';
    display: block;
    width: 34px;
    height: 34px;
    margin: 14px auto 0;
    border: 3px solid #eee;
    border-top-color: var(--mapna-red);
    border-radius: 50%;
    animation: mapna-spin 1s linear infinite;
}
@keyframes mapna-spin {
    to { transform: rotate(360deg); }
}
.mapna-no-results {
    text-align: center;
    padding: 45px 20px;
    color: var(--mapna-gray);
    background: #fafafa;
    border-radius: 8px;
}

/* ===== لایوت گزینه (ترکیبی) ===== */
.mapna-featured-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* خبر ویژه */
.mapna-hero .mapna-card {
    height: 100%;
}
.mapna-hero .mapna-card-thumb img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    display: block;
}
.mapna-hero .mapna-card-body {
    padding: 18px;
    background: #fff;
}
.mapna-hero .mapna-card-title {
    font-size: 20px;
    line-height: 1.5;
}
.mapna-hero .mapna-card-excerpt {
    color: var(--mapna-gray);
    font-size: 14px;
    line-height: 1.8;
    margin: 10px 0;
}

/* لیست کنار خبر ویژه */
.mapna-featured-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== لیست ساده ===== */
.mapna-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mapna-list-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.mapna-list-item:hover {
    border-color: var(--mapna-red);
    box-shadow: 0 3px 12px rgba(0,0,0,.07);
}
.mapna-list-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    text-decoration: none !important;
    color: inherit;
}
.mapna-list-thumb img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}
.mapna-list-title {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 6px;
    color: #222;
    font-weight: 600;
}
.mapna-list-date {
    font-size: 12px;
    color: var(--mapna-gray);
}

/* ===== گرید کارت‌ها ===== */
.mapna-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.mapna-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.mapna-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.mapna-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0,0,0,.1);
}
.mapna-card-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
}
.mapna-card-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.mapna-card-no-thumb {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f0f0, #e4e4e4);
    color: var(--mapna-gray);
    font-size: 13px;
}
.mapna-card-body {
    padding: 14px 16px;
}
.mapna-card-title {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 8px;
    color: #222;
    font-weight: 700;
}
.mapna-card:hover .mapna-card-title {
    color: var(--mapna-red);
}
.mapna-card-excerpt {
    font-size: 13px;
    color: var(--mapna-gray);
    line-height: 1.8;
}
.mapna-card-date {
    display: inline-block;
    font-size: 12px;
    color: #999;
    border-right: 3px solid var(--mapna-red);
    padding-right: 8px;
}

/* ===== بخش‌های دسته‌بندی در گزینه ===== */
.mapna-category-section {
    margin-top: 34px;
}
.mapna-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-right: 4px solid var(--mapna-red);
    padding-right: 12px;
    margin-bottom: 16px;
}
.mapna-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--mapna-blue);
    margin: 0;
}
.mapna-section-more {
    font-size: 13px;
    color: var(--mapna-red);
    text-decoration: none;
}
.mapna-section-more:hover {
    text-decoration: underline;
}

/* ===== صفحه‌بندی ===== */
.mapna-pagination {
    margin-top: 28px;
    text-align: center;
}
.mapna-load-more {
    background: var(--mapna-red);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 42px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.mapna-load-more:hover {
    background: var(--mapna-blue);
    transform: translateY(-2px);
}
.mapna-load-more:disabled {
    background: var(--mapna-gray);
    cursor: not-allowed;
    transform: none;
}
.mapna-page-numbers {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.mapna-page-numbers button {
    min-width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s ease;
}
.mapna-page-numbers button:hover {
    border-color: var(--mapna-red);
    color: var(--mapna-red);
}
.mapna-page-numbers button.current {
    background: var(--mapna-red);
    border-color: var(--mapna-red);
    color: #fff;
}
.mapna-page-numbers button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 992px) {
    .mapna-featured-layout {
        grid-template-columns: 1fr;
    }
    .mapna-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .mapna-hero .mapna-card-thumb img {
        height: 260px;
    }
}
@media (max-width: 576px) {
    .mapna-grid,
    .mapna-grid-compact {
        grid-template-columns: 1fr;
    }
    .mapna-tab {
        padding: 8px 14px;
        font-size: 13px;
    }
    .mapna-hero .mapna-card-thumb img {
        height: 200px;
    }
    .mapna-list-thumb img {
        width: 70px;
        height: 56px;
    }
}
