/* ============================================================
   روزنامه دیجیتال (نسخه PDF) — newspaper.php
   ============================================================ */

/* فونت را همین‌جا بارگذاری می‌کنیم تا نسخهٔ PDF به فونت سیستم موبایل وابسته نباشد. */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: block;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.np-body {
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    background: #e8e6e1;
    color: #1c1c1c;
    line-height: 1.8;
    font-size: 14px;
}

/* ---------- نوار ابزار (چاپ نمی‌شود) ---------- */
.np-toolbar {
    background: #14336b;
    color: #fff;
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.np-toolbar-in {
    max-width: 1060px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.np-nav { display: flex; gap: 8px; flex-wrap: wrap; }

.np-btn {
    display: inline-block;
    background: #ffffff22;
    border: 1px solid #ffffff55;
    color: #fff;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12.5px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: background .2s;
}

.np-btn:hover { background: #ffffff44; }
.np-btn-accent { background: #d32f2f; border-color: #d32f2f; }
.np-btn-accent:hover { background: #b91c1c; }
.np-btn-print { background: #16a34a; border-color: #16a34a; }
.np-btn-print:hover { background: #15803d; }

.np-hint { max-width: 1060px; margin: 6px auto 0; font-size: 11.5px; color: #ffffffaa; }

/* ---------- برگ روزنامه ---------- */
.np-sheet {
    max-width: 1060px;
    margin: 26px auto;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .18);
    padding: 42px 46px 34px;
}

.np-masthead {
    text-align: center;
    border-bottom: 3px double #222;
    padding-bottom: 14px;
    margin-bottom: 26px;
}

.np-name {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: .5px;
    color: #111;
}

.np-tagline { font-size: 13px; color: #555; margin-top: 2px; }

.np-date-line {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 12.5px;
    color: #444;
    border-top: 1px solid #ddd;
    padding-top: 8px;
}

/* ---------- خبر اصلی ---------- */
.np-lead {
    border-bottom: 1px solid #ccc;
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.np-lead-img img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    display: block;
    margin-bottom: 14px;
}

.np-lead-title { font-size: 25px; font-weight: 800; line-height: 1.6; margin: 8px 0; }
.np-lead-title a { color: inherit; text-decoration: none; }
.np-lead-title a:hover { color: #d32f2f; }
.np-lead-excerpt { font-size: 14px; color: #333; }
.np-lead-meta { font-size: 12px; color: #777; margin-top: 8px; }

.np-cat {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: #d32f2f;
    margin-bottom: 4px;
}

/* ---------- ستون اخبار ---------- */
.np-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.np-item { border-bottom: 1px solid #eee; padding-bottom: 16px; }

.np-item-img img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    margin-bottom: 8px;
}

.np-item-title { font-size: 15px; font-weight: 700; line-height: 1.7; }
.np-item-title a { color: inherit; text-decoration: none; }
.np-item-title a:hover { color: #d32f2f; }
.np-item-excerpt { font-size: 12.5px; color: #444; margin-top: 4px; }
.np-item-meta { font-size: 11.5px; color: #888; margin-top: 6px; display: flex; gap: 12px; }
.np-item-meta .np-cat { margin: 0; }

.np-empty { text-align: center; padding: 60px 0; color: #666; }
.np-empty .np-btn { color: #14336b; border-color: #14336b; background: #fff; margin-top: 10px; }

.np-foot {
    margin-top: 30px;
    padding-top: 12px;
    border-top: 2px solid #222;
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: #555;
}

/* ---------- نسخه‌های قبلی ---------- */
.np-archive {
    max-width: 1060px;
    margin: 0 auto 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 18px 22px;
}

.np-archive h3 { font-size: 15px; margin-bottom: 10px; color: #14336b; }
.np-archive ul { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; }
.np-archive a {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
}
.np-archive a:hover { background: #eef3fb; color: #14336b; }
.np-arch-count { font-size: 11.5px; color: #888; }

/* ---------- چاپ ---------- */
@page { size: A4; margin: 14mm 12mm; }

@media print {
    html,
    body.np-body,
    body.np-body * {
        font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    }
    body.np-body { background: #fff; font-size: 12px; }
    .no-print { display: none !important; }
    .np-sheet { box-shadow: none; margin: 0; max-width: none; padding: 0; }
    .np-name { font-size: 32px; }
    .np-lead-title { font-size: 21px; }
    .np-grid { gap: 14px; }
    .np-item-img img { height: 110px; }
    .np-item-excerpt { display: none; }
    a { color: inherit; text-decoration: none; }
}

@media (max-width: 800px) {
    .np-sheet { padding: 24px 18px; }
    .np-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .np-date-line { flex-direction: column; gap: 4px; }
    .np-name { font-size: 30px; }
}

@media (max-width: 520px) {
    .np-grid { grid-template-columns: 1fr; }
}
