/* ============================================================
   NEWS — Wireframe editorial grid
   ============================================================ */

.news-section {
    padding: 70px 0;
    position: relative;
    z-index: 1;

    /* گرادیان و رنگ‌های هاور — دقیقاً هم‌رنگ گرادیان تیتر سکشن (#hl-1 → #hl-2) */
    --news-grad: linear-gradient(100deg, var(--hl-1, var(--accent)), var(--hl-2, var(--accent)));
    --news-line: color-mix(in srgb, var(--hl-2, var(--accent)) 32%, transparent);
    --news-soft: color-mix(in srgb, var(--hl-2, var(--accent)) 55%, transparent);
    --news-tint: color-mix(in srgb, var(--hl-2, var(--accent)) 10%, transparent);
}

/* ====== عنوان داخل کادر خط‌کشی ====== */
#news .section-header {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 34px !important;
    padding: 22px 32px !important;
    position: relative !important;
    text-align: center !important;
    overflow: visible !important;
}

#news .section-header::before {
    content: '' !important;
    position: absolute !important;
    left: calc(-1 * var(--line-ext)) !important;
    right: calc(-1 * var(--line-ext)) !important;
    top: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    border: 0 !important;
    border-top: 1px solid var(--line-strong) !important;
    border-bottom: 1px solid var(--line-strong) !important;
    background: none !important;
    pointer-events: none;
}

#news .section-header::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    border: 0 !important;
    border-left: 1px solid var(--line-strong) !important;
    border-right: 1px solid var(--line-strong) !important;
    background: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

#news .section-header h2 {
    margin: 0 0 6px !important;
    font-size: 2rem !important;
}

#news .section-header p {
    margin: 0 auto !important;
    font-size: .82rem !important;
}

/* ====== شبکه اخبار بدون پس‌زمینه، فقط خط ====== */
.news-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    margin-top: 0;
    background: transparent;
    border: 0;
}

/* دو خط عمودی چپ و راست شبکه */
.news-grid::before,
.news-grid::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--line-px);
    z-index: 3;
    pointer-events: none;
}

.news-grid::before { left: 0; }
.news-grid::after  { right: 0; }

/* ====== خبر شاخص (سمت چپ) ====== */
.news-featured {
    position: relative;
    padding: 30px 32px 26px;
    border-right: 1px solid var(--line-strong);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: background 0.3s ease;
}

.news-featured:hover {
    background: rgba(255, 255, 255, 0.012);
}

[data-theme="light"] .news-featured:hover {
    background: rgba(0, 0, 0, 0.015);
}

/* خط افقی بالای ستون شاخص — تا لبه صفحه */
.news-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(-1 * var(--line-ext));
    right: calc(-1 * var(--line-ext));
    height: 1px;
    background: var(--line-px);
    z-index: 2;
    pointer-events: none;
}

/* خط افقی پایین ستون شاخص — تا لبه صفحه */
.news-featured::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: calc(-1 * var(--line-ext));
    right: calc(-1 * var(--line-ext));
    height: 1px;
    background: var(--line-px);
    z-index: 2;
    pointer-events: none;
}

/* گرافیک خبر اصلی — بدون پرکردن پس‌زمینه */
.news-feat-graphic {
    width: 100%;
    height: 210px;
    background: transparent;
    border: 1px solid var(--line-strong);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* خطوط داخل گرافیک */
.nfg-lines {
    position: absolute;
    inset: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0.5;
}

.nfg-lines span {
    height: 2px;
    width: 100%;
    background: var(--line-px);
}

.nfg-lines span:nth-child(1) { width: 82%; }
.nfg-lines span:nth-child(2) { width: 64%; }
.nfg-lines span:nth-child(3) { width: 90%; }
.nfg-lines span:nth-child(4) { width: 52%; }
.nfg-lines span:nth-child(5) { width: 74%; }
.nfg-lines span:nth-child(6) { width: 44%; }

.nfg-lines span:nth-child(odd) {
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--hl-1, var(--accent)) 45%, transparent),
        color-mix(in srgb, var(--hl-2, var(--accent)) 45%, transparent));
}

/* آیکون وسط گرافیک */
.nfg-icon {
    position: relative;
    z-index: 2;
    font-size: 2.4rem;
    color: var(--text-muted);
    opacity: 0.45;
    transition: color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.news-featured:hover .nfg-icon {
    background-image: var(--news-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    opacity: 1;
    transform: translateY(-2px);
}

/* متادیتای خبر */
.news-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.news-tag {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    background-image: var(--news-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    border: 1px solid var(--news-line);
    padding: 3px 8px;
    line-height: 1.2;
    text-transform: uppercase;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.news-featured:hover .news-tag,
.news-item:hover .news-tag {
    border-color: var(--news-soft);
    background-color: var(--news-tint);
}

.news-title {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.news-featured:hover .news-title,
.news-item:hover .news-title {
    background-image: var(--news-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.news-desc {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--text);
    opacity: 0.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* لینک Read More — خطی، بدون فونت کنسول */
.news-read-more {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background-image: var(--news-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-bottom: 4px;
    position: relative;
    transition: opacity 0.3s ease;
}

.news-read-more::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--news-grad);
    transform: scaleX(0.25);
    transform-origin: left;
    opacity: 0.5;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.news-featured:hover .news-read-more::after {
    background: var(--news-grad);
    transform: scaleX(1);
    opacity: 1;
}

.news-read-more i {
    font-size: 0.62rem;
    background-image: var(--news-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s ease;
}

.news-featured:hover .news-read-more i {
    transform: translateX(4px);
}

/* ====== لیست اخبار سمت راست ====== */
.news-list {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* خط افقی بالای ستون لیست — تا لبه صفحه */
.news-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(-1 * var(--line-ext));
    right: calc(-1 * var(--line-ext));
    height: 1px;
    background: var(--line-px);
    z-index: 2;
    pointer-events: none;
}

.news-item {
    position: relative;
    padding: 24px 28px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    transition: background 0.3s ease;
}

.news-item:last-child {
    border-bottom: none;
}

/* خط پایین هر آیتم — تا لبه‌ی صفحه در سمت راست */
.news-item:last-child::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: calc(-1 * var(--line-ext));
    height: 1px;
    background: var(--line-px);
    pointer-events: none;
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.012);
}

[data-theme="light"] .news-item:hover {
    background: rgba(0, 0, 0, 0.015);
}

.news-item .news-title {
    font-size: 1rem;
    line-height: 1.4;
    letter-spacing: -0.2px;
    margin-bottom: 4px;
}

.news-item .news-desc {
    font-size: 0.8rem;
    line-height: 1.65;
    margin-bottom: 0;
    -webkit-line-clamp: 2;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .news-grid { grid-template-columns: 1fr; }

    .news-grid::before,
    .news-grid::after { display: none; }

    .news-featured {
        border-right: none;
        border-bottom: 1px solid var(--line-strong);
        padding: 24px;
    }

    .news-feat-graphic { height: 180px; }

    .news-list::before {
        top: -1px;
        left: -1200px;
        right: -1200px;
    }

    .news-item:last-child::after {
        left: -1200px;
    }
}

@media (max-width: 768px) {
    .news-section { padding: 55px 0; }

    #news .section-header {
        margin-bottom: 28px !important;
        padding: 18px 16px !important;
    }

    #news .section-header h2 { font-size: 1.45rem !important; }

    #news .section-header::before {
        left: -1200px !important;
        right: -1200px !important;
    }

    #news .section-header p { font-size: .78rem !important; }

    .news-featured::before,
    .news-featured::after {
        left: -1200px;
        right: -1200px;
    }
}

@media (max-width: 480px) {
    .news-section { padding: 45px 0; }

    #news .section-header { padding: 16px 14px !important; }
    #news .section-header h2 { font-size: 1.2rem !important; }

    .news-featured { padding: 20px 14px; }
    .news-feat-graphic { height: 150px; }

    .news-title { font-size: 1.2rem; }
    .news-desc { font-size: 0.85rem; }

    .news-item { padding: 18px 14px; }
    .news-item .news-title { font-size: 0.95rem; }
    .news-item .news-desc { font-size: 0.8rem; }
}
