/* ─── Article Card ─────────────────────────── */
.article-card {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
}

.article-card h1,
.article-card h2,
.article-card h3 {
    color: #0f172a;
    margin: 30px 0 20px;
    border-bottom: 2px solid rgba(72, 72, 72, 0.1);
    padding-bottom: 10px;
}

.article-card p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-align: justify;
}


/* ─── RTL News Border ───────────────────────── */
.rtl .news-card {
    border-left: none;
    border-right: 4px solid #484848;
}
.article-summary {
    background: #f8f8f8;
    border-left: 4px solid #007bff;
    padding: 14px 18px;
    margin: 20px 0;
    line-height: 1.9;
    font-size: 1.05rem;
    color: #333;
}

/* برای فارسی که RTL هست */
html[dir="rtl"] .article-summary {
    border-left: none;
    border-right: 4px solid #007bff;
}


/* ─── News Section Glass UI ─────────────────── */
.news-section {
    max-width: 1200px;
    width: 100%;
    margin: 16px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: stretch;
}


/* ─── News Card ─────────────────────────────── */
.news-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #484848;
    display: flex;
    flex-direction: column;
    height: 100%;
    will-change: transform;
}

.news-card p {
    flex-grow: 1;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 16px;
    line-height: 1.7;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.18);
    border-color: #959595;
}

.news-date {
    color: #484848;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.news-card h3 {
    font-size: 17px;
    color: #0f172a;
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.5;
}

.read-more {
    color: #484848;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: color 0.3s;
}

.read-more:hover {
    color: #1e40af;
}



.img {
    max-width: 100%;
    height: auto;
    border: #484848 solid 2px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.2);
}


.article-image img {
    max-width: 100%;
    height: auto;
    border: #484848 solid 2px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.2);
}

.katex-display {
    direction: ltr !important;
    text-align: left !important;
    margin: 1em 0;
}

/* ─── Responsive (Mobile ≤768px) ─────────────── */
@media (max-width:768px) {

    /* تغییر واقعی: فقط کاهش سایز فونت */

    .news-card h2 {
        text-align: center;
        font-size: 18px;
        line-height: 1.6;
        font-weight: 800;
    }

    .article-card h1 {
        font-size: 20px;
        text-align: center;
    }

    .article-card h2 {
        font-size: 18px;
        text-align: center;
    }

    .news-section {
        display: flex;
        justify-content: center;
    }

    .article-card p {
        font-size: 12px;
    }

    .news-section {
        display: flex;
        justify-content: center;
    }

    .article-image img {
        max-width: 100%;
        height: auto;
        border: #484848 solid 1px;
        border-radius: 10px;
        margin-bottom: 20px;
        box-shadow: 0 4px 30px rgba(59, 130, 246, 0.2);
    }

}