.home-news-box {
    padding: 26px 25px;
}

.news-box-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.news-box-heading h2,
.news-list-intro h2 {
    margin: 0;
    color: #0d47a1;
    font-family: 'IRANSansBlack', Tahoma, sans-serif !important;
    font-size: 1.45rem;
    letter-spacing: 0;
}

.news-list-intro {
    margin-bottom: 1.1rem;
}

.news-list-intro h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-list-intro p {
    margin: 0.35rem 0 0;
    color: #667085;
    font-family: 'IRANSans', Tahoma, sans-serif;
    line-height: 1.9;
}

.news-all-link {
    font-family: 'IRANSans', Tahoma, sans-serif !important;
    font-weight: 700;
    text-decoration: none;
}

.news-card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.news-card {
    min-width: 0;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(13, 71, 161, 0.2);
    border-radius: 8px;
    background-color: #f8fafc;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.news-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 0.45rem;
}

.news-card-title {
    min-width: 0;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.8;
}

.news-card-title-button {
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #153e75;
    font-family: 'IRANSansBlack', Tahoma, sans-serif !important;
    font-size: inherit;
    font-weight: 700;
    letter-spacing: 0;
    text-align: right;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.news-card-title-button:hover {
    color: #0a58ca;
}

.news-card-date {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.35rem;
    color: #667085;
    font-size: 0.86rem;
    white-space: nowrap;
}

.news-card-summary {
    display: -webkit-box;
    max-height: 3.8em;
    margin: 0 0 0.8rem;
    overflow: hidden;
    color: #374151;
    line-height: 1.9;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.news-card-view-button {
    border-width: 2px;
    font-family: 'IRANSans', Tahoma, sans-serif !important;
    font-weight: 700;
}

.news-card-title-button:focus-visible,
.news-card-view-button:focus-visible,
.news-all-link:focus-visible {
    border-radius: 4px;
    outline: 3px solid #f59e0b;
    outline-offset: 3px;
}

.news-empty-state {
    padding: 2rem 1rem;
    border: 1px dashed rgba(13, 71, 161, 0.3);
    border-radius: 8px;
    text-align: center;
}

.news-empty-state i {
    display: block;
    margin-bottom: 0.75rem;
    color: #0d47a1;
    font-size: 2rem;
}

.news-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 1.5rem;
}

.news-pagination .btn {
    border-width: 2px;
}

.news-detail-modal .modal-dialog {
    max-width: min(860px, calc(100vw - 2rem));
}

.news-detail-modal .modal-content {
    overflow: hidden;
    border: 2px solid rgba(13, 110, 253, 0.38);
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.news-detail-modal .modal-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 1rem;
    border-bottom-color: rgba(13, 71, 161, 0.16);
}

.news-detail-modal .modal-title {
    margin: 0;
    color: #0d47a1;
    font-family: 'IRANSansBlack', Tahoma, sans-serif !important;
    font-size: 1.35rem;
    line-height: 1.8;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.news-detail-modal .btn-close {
    margin: 0;
}

.news-modal-date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    color: #667085;
    font-size: 0.9rem;
}

.news-modal-body-content {
    color: #303846;
    font-size: 1.02rem;
    line-height: 2.1;
    overflow-wrap: anywhere;
}

.news-modal-body-content p:last-child {
    margin-bottom: 0;
}

.news-detail-modal .modal-footer {
    border-top-color: rgba(13, 71, 161, 0.16);
}

body.dark-mode .news-box-heading h2,
body.dark-mode .news-list-intro h2,
body.dark-mode .news-card-title-button,
body.dark-mode .news-empty-state i {
    color: #8ec5ff;
}

body.dark-mode .news-card {
    border-color: rgba(142, 197, 255, 0.3);
    background-color: #292b2f;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

body.dark-mode .news-card-summary,
body.dark-mode .news-list-intro p,
body.dark-mode .news-modal-body-content {
    color: #d1d5db;
}

body.dark-mode .news-card-date,
body.dark-mode .news-modal-date {
    color: #aeb8c5;
}

body.dark-mode .news-empty-state {
    border-color: rgba(142, 197, 255, 0.36);
}

body.dark-mode .news-detail-modal .modal-content {
    border-color: #6ea8fe;
    background-color: #202124;
    color: #e5e7eb;
}

body.dark-mode .news-detail-modal .modal-header,
body.dark-mode .news-detail-modal .modal-footer {
    border-color: rgba(142, 197, 255, 0.25);
}

body.dark-mode .news-detail-modal .modal-title {
    color: #8ec5ff;
}

body.dark-mode .news-detail-modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(180%);
}

@media (max-width: 576px) {
    .news-box-heading,
    .news-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .news-card-date {
        white-space: normal;
    }

    .news-card {
        padding: 0.95rem;
    }

    .news-card-view-button {
        width: 100%;
    }

    .news-detail-modal .modal-dialog {
        max-width: none;
        margin: 0.75rem;
    }

    .news-detail-modal .modal-title {
        font-size: 1.15rem;
    }
}
