/* article.css */

/* Reset و پایه */
body, html {
    margin: 0;
    padding: 0;
    font-family: "Tahoma", sans-serif;
    overflow-x: hidden;
    overflow-y: scroll !important;
}

.sj-spa-main {
    height: unset !important;
    ;
    overflow: auto;
}

/* ==== Article Hero (بالای صفحه‌ی لیست مقالات) ==== */
.sj-article-hero {
    width: min(1100px, calc(100% - 32px));
    margin: 100px auto 26px;
    padding: 48px 28px;
    border-radius: 24px;
    background: linear-gradient(135deg, #fff7f4 0%, #fff 55%, #fff1ee 100%);
    border: 1px solid rgba(180, 70, 95, 0.12);
    box-shadow: 0 18px 45px rgba(80, 10, 25, 0.12);
    text-align: center;
}

    .sj-article-hero span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 16px;
        border-radius: 999px;
        background: rgba(176, 0, 32, 0.1);
        color: #b00020;
        font-weight: 800;
        letter-spacing: .5px;
        font-size: 13px;
        margin-bottom: 14px;
    }

    .sj-article-hero h1 {
        margin: 0 0 14px;
        color: #2b1519;
        font-size: clamp(24px, 4vw, 40px);
        line-height: 1.5;
        font-weight: 900;
    }

    .sj-article-hero p {
        color: #6d4a52;
        max-width: 700px;
        margin: 0 auto 22px;
        line-height: 2;
        font-size: 15px;
    }

.sj-article-hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

    .sj-article-hero-actions a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0 22px;
        border-radius: 999px;
        background: #b00020;
        color: #fff;
        text-decoration: none;
        font-weight: 800;
        box-shadow: 0 12px 24px rgba(80, 10, 25, 0.18);
    }

        .sj-article-hero-actions a:nth-child(2) {
            background: #fff;
            color: #b00020;
            border: 1px solid rgba(180, 70, 95, 0.2);
            box-shadow: none;
        }

@media (max-width: 768px) {
    .sj-article-hero {
        margin-top: 90px;
        padding: 32px 20px;
    }
}

/* ==== Article List ==== */
.sj-article-list-section {
    display: block;
    padding: 10px 5vw 60px;
    box-sizing: border-box;
    position: relative;
    height: auto;
}

.sj-article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
}

.sj-article-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(80,10,25,0.12);
    border: 1px solid rgba(180,70,95,0.12);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .sj-article-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 24px 50px rgba(80,10,25,0.15);
    }

.sj-article-card-image {
    display: block;
    width: 100%;
    height: 210px;
    overflow: hidden;
    background: #f4e1e5;
}

    .sj-article-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.sj-article-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.sj-article-meta {
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #9b6670;
}

.sj-article-card h2 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #2b1519;
}

    .sj-article-card h2 a {
        text-decoration: none;
        color: inherit;
    }

.sj-article-card p {
    font-size: 15px;
    line-height: 2;
    color: #6d4a52;
    margin-bottom: 18px;
}

.sj-article-readmore {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    background: #b00020;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

    .sj-article-readmore:hover {
        background: #800018;
        transform: translateX(3px);
    }

/* Pagination */
.sj-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px auto 0;
}

    .sj-pagination a {
        display: inline-flex;
        width: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: #fff;
        color: #b00020;
        text-decoration: none;
        box-shadow: 0 8px 25px rgba(80,10,25,0.1);
    }

        .sj-pagination a.active {
            background: #b00020;
            color: #fff;
        }

/* ==== Article Detail ==== */
.sj-article-detail {
    max-width: 900px;
    margin: 30px auto 80px;
    padding: 20px;
    background-color: #fff7f8;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    direction: rtl;
    position: relative;
}

.sj-article-detail-header {
    margin-bottom: 20px;
}

.sj-back-link {
    display: inline-block;
    margin-bottom: 12px;
    text-decoration: none;
    color: #b00020;
    font-weight: bold;
}

    .sj-back-link:hover {
        text-decoration: underline;
    }

.sj-article-detail-header span {
    display: block;
    font-size: 13px;
    color: #9b6670;
    margin-bottom: 6px;
}

.sj-article-detail-header h1 {
    font-size: 26px;
    color: #da0000;
    margin: 0 0 12px;
}

.sj-article-detail-meta span {
    display: inline-block;
    margin-right: 15px;
    font-size: 13px;
    color: #9b6670;
}

.sj-article-detail-header p {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
}

.sj-article-detail-image {
    margin: 20px 0;
    overflow: hidden;
    border-radius: 12px;
}

    .sj-article-detail-image img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
    }

.sj-article-content h2 {
    font-size: 22px;
    color: #00655E;
    margin-bottom: 12px;
}

.sj-article-content p {
    font-size: 16px;
    line-height: 2;
    color: #555;
    margin-bottom: 18px;
}

.sj-article-cta-box {
    margin-top: 30px;
    padding: 20px;
    background-color: #ffe3e8;
    border-radius: 12px;
    text-align: center;
}

    .sj-article-cta-box h2 {
        font-size: 20px;
        margin-bottom: 10px;
        color: #b00020;
    }

    .sj-article-cta-box p {
        font-size: 16px;
        margin-bottom: 12px;
        color: #333;
    }

    .sj-article-cta-box a {
        display: inline-block;
        padding: 10px 20px;
        background-color: #b00020;
        color: #fff;
        border-radius: 50px;
        text-decoration: none;
        font-weight: bold;
        transition: background-color 0.2s ease;
    }

        .sj-article-cta-box a:hover {
            background-color: #800018;
        }

/* Related articles */
.sj-related-articles {
    margin: 50px 0;
}

    .sj-related-articles .sj-section-title {
        margin-bottom: 24px;
    }

    .sj-related-articles .sj-article-grid.compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

/* Responsive */
@media (max-width: 992px) {
    .sj-article-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sj-related-articles .sj-article-grid.compact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sj-article-list-section {
        padding: 60px 18px 40px;
    }

    .sj-article-grid {
        grid-template-columns: 1fr;
    }

    .sj-article-detail {
        margin: 20px;
        padding: 15px;
    }

    .sj-article-detail-header h1 {
        font-size: 22px;
    }

    .sj-article-content h2 {
        font-size: 20px;
    }
}
/* ===========================
   Related Articles
=========================== */

.sj-related-articles {
    max-width: 1200px;
    margin: 70px auto;
    padding: 0 20px;
    position: relative;
}

.sj-section-title {
    text-align: center;
    margin-bottom: 40px;
}

    .sj-section-title span {
        display: block;
        font-size: 14px;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: #B30217;
        margin-bottom: 10px;
    }

    .sj-section-title h2 {
        font-size: 22px;
        font-weight: 700;
        color: #fff;
        margin: 0;
    }

.sj-article-grid.compact {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 30px;
}

    .sj-article-grid.compact .sj-article-card {
        background: #fff;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(0,0,0,.08);
        transition: .3s;
        border: 1px solid #eee;
    }

        .sj-article-grid.compact .sj-article-card:hover {
            transform: translateY(-6px);
            box-shadow: 0 15px 40px rgba(0,0,0,.12);
        }

    .sj-article-grid.compact .sj-article-card-image {
        display: block;
        height: 220px;
        overflow: hidden;
    }

        .sj-article-grid.compact .sj-article-card-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: .4s;
        }

    .sj-article-grid.compact .sj-article-card:hover img {
        transform: scale(1.05);
    }

    .sj-article-grid.compact .sj-article-card-body {
        padding: 20px;
    }

    .sj-article-grid.compact h2 {
        margin: 0 0 12px;
        line-height: 1.7;
        font-size: 18px;
    }

        .sj-article-grid.compact h2 a {
            color: #222;
            text-decoration: none;
        }

    .sj-article-grid.compact p {
        margin: 0;
        color: #666;
        line-height: 1.9;
        font-size: 14px;
    }

/* Tablet */

@media(max-width:992px) {

    .sj-article-grid.compact {
        grid-template-columns: repeat(2,1fr);
    }
}

/* Mobile */

@media(max-width:768px) {

    .sj-article-grid.compact {
        grid-template-columns: 1fr;
    }

    .sj-section-title h2 {
        font-size: 26px;
    }
}

/* ===== Articles page: search, featured, popular, CTA band, TOC, share ===== */
.sj-article-search { width: min(1100px, calc(100% - 32px)); margin: 0 auto 22px; display: flex; gap: 10px; }
.sj-article-search input { flex: 1; padding: 14px 20px; border-radius: 999px; border: 1px solid rgba(180,70,95,.25); font: inherit; background: #fff; transition: box-shadow .25s; }
.sj-article-search input:focus { outline: none; box-shadow: 0 0 0 4px rgba(217,47,118,.18); }
.sj-article-search button { padding: 0 26px; border: 0; border-radius: 999px; background: #b00020; color: #fff; font-weight: 800; cursor: pointer; }

.sj-article-featured { width: min(1100px, calc(100% - 32px)); margin: 0 auto 28px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; border-radius: 28px; overflow: hidden;
    background: #fff; border: 1px solid rgba(180,70,95,.14); box-shadow: 0 22px 55px rgba(80,10,25,.14); text-decoration: none; color: inherit; transition: transform .35s, box-shadow .35s; }
.sj-article-featured:hover { transform: translateY(-4px); box-shadow: 0 30px 70px rgba(80,10,25,.2); }
.sj-article-featured img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; display: block; }
.sj-article-featured > div { padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.sj-article-featured h2 { margin: 0; font-size: 26px; line-height: 1.6; }
.sj-article-featured p { margin: 0; color: #5b4d58; line-height: 1.9; }
.sj-article-featured small { color: #8a7a86; }
.sj-article-featured b { color: #b00020; }
.sj-article-tag { align-self: flex-start; padding: 4px 14px; border-radius: 999px; background: rgba(176,0,32,.1); color: #b00020; font-weight: 800; font-size: 12px; }

.sj-article-popular { width: min(1100px, calc(100% - 32px)); margin: 34px auto 0; padding: 26px; border-radius: 24px; background: #fff7f4; border: 1px solid rgba(180,70,95,.12); }
.sj-article-popular h2 { margin: 0 0 12px; font-size: 20px; }
.sj-article-popular ol { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; }
.sj-article-popular li a { color: #2b2233; font-weight: 700; text-decoration: none; }
.sj-article-popular li a:hover { color: #b00020; }
.sj-article-popular small { margin-inline-start: 10px; color: #8a7a86; }

.sj-article-band { width: min(1100px, calc(100% - 32px)); margin: 34px auto 70px; padding: 30px; border-radius: 26px; color: #fff;
    background: linear-gradient(135deg, #7d0a44, #d92f76); display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.sj-article-band > div { flex: 1 1 300px; }
.sj-article-band h2 { margin: 0 0 6px; font-size: 22px; }
.sj-article-band p { margin: 0; opacity: .92; }
.sj-article-band a { padding: 12px 24px; border-radius: 999px; background: #fff; color: #a80c4c; font-weight: 800; text-decoration: none; }
.sj-article-band a.alt { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); }

.sj-article-toc { max-width: 820px; margin: 0 auto 26px; padding: 18px 22px; border-radius: 20px; background: #fff7f4; border: 1px solid rgba(180,70,95,.14); }
.sj-article-toc[hidden] { display: none; }
.sj-article-toc b { display: block; margin-bottom: 8px; }
.sj-article-toc ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; }
.sj-article-toc li.sub { margin-inline-start: 18px; list-style: circle; }
.sj-article-toc a { color: #2b2233; text-decoration: none; }
.sj-article-toc a:hover { color: #b00020; }

.sj-article-share { max-width: 820px; margin: 26px auto 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sj-article-share a, .sj-article-share button { padding: 8px 18px; border-radius: 999px; border: 1px solid rgba(180,70,95,.3); background: #fff; color: #b00020; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.sj-article-share a:hover, .sj-article-share button:hover { background: #b00020; color: #fff; }

@media (max-width: 800px) {
    .sj-article-featured { grid-template-columns: 1fr; }
    .sj-article-featured img { min-height: 200px; max-height: 260px; }
    .sj-article-featured > div { padding: 20px; }
    .sj-article-search { flex-wrap: nowrap; }
    .sj-article-band { padding: 22px; margin-bottom: 130px; }
}

/* صفحه‌های محتوایی: پس‌زمینه‌ی روشن؛ گرادیان تیره‌ی layout روی محتوا نیفتد */
.sj-spa-main { background: #fffafc; }
.sj-spa-main::before { display: none !important; }
body { background: #fffafc; }
@media (max-width: 900px) {
    .sj-article-list-section, .sj-article-detail { padding-bottom: 120px; }
}
