/* ============================================================
   HINDI E-NEWSPAPER PRINT STYLESHEET
   Professional real-newspaper layout (A4 print-ready)
   Black + Red theme | Serif Hindi typography
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Devanagari:wght@400;600;700;900&family=Noto+Sans+Devanagari:wght@400;500;600;700;800;900&display=swap');

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

body {
    background: #e8e4dc;
    font-family: 'Noto Serif Devanagari', 'Georgia', serif;
    color: #1a1a1a;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ─── Print Button ─── */
#print {
    max-width: 780px;
    margin: 0 auto;
    text-align: right;
    padding: 12px 15px;
}

#print a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #b80000;
    color: #fff;
    text-decoration: none;
    padding: 10px 24px;
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

#print a:hover {
    background: #900;
}

#print a img {
    filter: brightness(10);
    height: 20px;
    width: 20px;
}

/* ─── Newspaper Page ─── */
.printpage {
    max-width: 780px;
    margin: 0 auto 30px;
    background: #fff;
    border: 2px solid #111;
    position: relative;
}

/* ─── Top Red Strip ─── */
.np-top-strip {
    background: #b80000;
    height: 5px;
}

/* ─── Masthead / Logo Header ─── */
.np-masthead {
    text-align: center;
    padding: 18px 30px 12px;
    border-bottom: 3px solid #111;
}

.np-masthead img {
    max-height: 70px;
    width: auto;
    display: block;
    margin: 0 auto 4px;
}

.np-masthead .np-tagline {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 13px;
    color: #b80000;
    font-weight: 700;
    letter-spacing: 2px;
}

/* ─── Edition Bar ─── */
.np-edition-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 30px;
    border-bottom: 1px solid #333;
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 12px;
    color: #555;
    background: #faf8f4;
}

.np-edition-bar .np-date {
    font-weight: 600;
    color: #333;
}

.np-edition-bar .np-page-label {
    font-style: italic;
    color: #999;
}

/* ─── Main Headline ─── */
.np-headline {
    padding: 20px 30px 14px;
    border-bottom: 2px solid #111;
}

.np-headline h1 {
    font-family: 'Noto Sans Devanagari', serif;
    font-size: 30px;
    font-weight: 900;
    color: #111;
    line-height: 1.35;
    margin: 0;
}

/* ─── Red Breaking Strip (Subheadline) ─── */
.np-breaking-strip {
    background: #b80000;
    padding: 10px 30px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.np-breaking-strip p {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.4;
}

/* ─── Author / Date ─── */
.np-byline {
    padding: 8px 30px;
    border-bottom: 1px solid #ddd;
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.np-byline .np-author {
    font-weight: 600;
    color: #333;
}

.np-byline .np-author strong {
    color: #b80000;
}

.np-byline .np-source {
    font-style: italic;
    color: #999;
    font-size: 11px;
}

/* ─── Two-Column News Layout ─── */
.np-body {
    padding: 20px 30px 10px;
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

.np-body-text {
    flex: 1;
    min-width: 0;
}

.np-body-image {
    flex: 0 0 280px;
    max-width: 280px;
}

.np-body-image img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #ccc;
}

.np-body-image .np-caption {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 10px;
    color: #999;
    text-align: center;
    margin-top: 4px;
    font-style: italic;
}

/* ─── News Content Typography ─── */
.np-body-text,
.np-continuation {
    font-family: 'Noto Serif Devanagari', 'Georgia', serif;
    font-size: 14.5px;
    line-height: 1.85;
    color: #222;
    text-align: justify;
}

.np-body-text p,
.np-continuation p {
    margin-bottom: 10px;
}

.np-body-text h2,
.np-body-text h3,
.np-body-text h4,
.np-body-text strong,
.np-continuation h2,
.np-continuation h3,
.np-continuation h4,
.np-continuation strong {
    font-family: 'Noto Sans Devanagari', sans-serif;
    color: #111;
}

.np-body-text h2,
.np-continuation h2 {
    font-size: 18px;
    font-weight: 800;
    margin: 16px 0 6px;
    padding-bottom: 4px;
    border-bottom: 2px solid #b80000;
    display: inline-block;
}

.np-body-text h3,
.np-body-text h4,
.np-continuation h3,
.np-continuation h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 14px 0 4px;
}

/* Reporter byline styling removed – uniform paragraph rendering */

/* Drop cap removed – user prefers normal text size */

/* CKEditor inline images inside news body */
.np-body-text img,
.np-continuation img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px auto;
    border: 1px solid #ddd;
}

/* ─── CKEditor Video Embeds (figure.media / iframes) ─── */
.np-body-text figure.media,
.np-continuation figure.media {
    max-width: 100%;
    margin: 14px 0;
    border: 1px solid #ddd;
    background: #000;
    overflow: hidden;
}

.np-body-text figure.media [data-oembed-url],
.np-continuation figure.media [data-oembed-url] {
    position: relative;
    width: 100%;
}

.np-body-text figure.media iframe,
.np-continuation figure.media iframe {
    display: block;
    max-width: 100%;
}

/* Print placeholder label (hidden on screen, shown on print) */
.np-body-text figure.media::after,
.np-continuation figure.media::after {
    display: none; /* hidden on screen */
}

.np-body-text blockquote,
.np-continuation blockquote {
    margin: 14px 0;
    padding: 12px 18px;
    border-left: 4px solid #b80000;
    background: #faf8f4;
    font-style: italic;
    color: #444;
}

/* ─── Continuation (Full-Width Below Two-Column) ─── */
.np-continuation {
    padding: 0 30px 20px;
    column-count: 2;
    column-gap: 28px;
    column-rule: 1px solid #ccc;
}

.np-continuation h2,
.np-continuation h3,
.np-continuation h4 {
    column-span: none;
    break-after: avoid;
}

/* ─── Decorative Divider ─── */
.np-divider {
    text-align: center;
    padding: 6px 30px;
    position: relative;
    margin: 0;
}

.np-divider::before {
    content: '';
    display: block;
    height: 1px;
    background: #aaa;
    position: absolute;
    left: 30px;
    right: 30px;
    top: 50%;
}

.np-divider span {
    background: #fff;
    padding: 0 12px;
    position: relative;
    z-index: 1;
    font-size: 14px;
    color: #b80000;
    letter-spacing: 6px;
}

/* ─── Footer ─── */
.np-footer {
    border-top: 3px solid #111;
    padding: 15px 30px;
    text-align: center;
    background: #faf8f4;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.np-footer img {
    max-height: 40px;
    width: auto;
    display: block;
    margin: 0 auto 6px;
}

.np-footer .np-copyright {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.np-footer .np-address {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 11px;
    color: #777;
    line-height: 1.6;
    margin-bottom: 2px;
}

.np-footer .np-contact {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 11px;
    color: #999;
}

.np-footer .np-contact a {
    color: #b80000;
    text-decoration: none;
}

/* ─── Bottom Red Strip ─── */
.np-bottom-strip {
    background: #b80000;
    height: 5px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}


/* ============================================================
   PRINT MEDIA STYLES (A4)
   ============================================================ */
@media print {
    @page {
        size: A4 portrait;
        margin: 10mm 8mm;
    }

    body {
        background: #fff !important;
        margin: 0;
        padding: 0;
    }

    #print {
        display: none !important;
    }

    .printpage {
        max-width: 100% !important;
        margin: 0 !important;
        border: 1px solid #333 !important;
        box-shadow: none !important;
    }

    .np-top-strip,
    .np-bottom-strip,
    .np-breaking-strip,
    .np-footer {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .np-headline h1 {
        font-size: 26px;
    }

    .np-breaking-strip p {
        font-size: 17px;
    }

    .np-body-text,
    .np-continuation {
        font-size: 13px;
        line-height: 1.7;
    }

    .np-body-image {
        flex: 0 0 240px;
        max-width: 240px;
    }

    .np-continuation {
        column-count: 2;
        column-gap: 20px;
    }

    /* Prevent bad page breaks */
    .np-masthead,
    .np-headline,
    .np-breaking-strip,
    .np-byline {
        page-break-inside: avoid;
    }

    .np-body {
        page-break-inside: avoid;
    }

    .np-body-text p,
    .np-continuation p {
        orphans: 3;
        widows: 3;
    }

    .np-footer {
        page-break-inside: avoid;
    }

    .np-body-text img,
    .np-continuation img {
        max-height: 250px;
        width: auto;
        margin: 8px auto;
    }

    /* Video embeds: hide iframe, show print-friendly placeholder */
    .np-body-text figure.media,
    .np-continuation figure.media {
        background: #f5f5f5 !important;
        border: 2px dashed #999 !important;
        padding: 18px;
        text-align: center;
        page-break-inside: avoid;
    }

    .np-body-text figure.media iframe,
    .np-continuation figure.media iframe {
        display: none !important;
    }

    .np-body-text figure.media [data-oembed-url],
    .np-continuation figure.media [data-oembed-url] {
        display: none !important;
    }

    .np-body-text figure.media::after,
    .np-continuation figure.media::after {
        display: block !important;
        content: '▶  वीडियो ऑनलाइन उपलब्ध है — विवरण के लिए वेबसाइट देखें';
        font-family: 'Noto Sans Devanagari', sans-serif;
        font-size: 12px;
        color: #666;
        font-weight: 600;
        padding: 8px;
    }
}


/* ─── Responsive Screen Preview ─── */
@media screen and (max-width: 600px) {
    .printpage {
        margin: 0;
        border-width: 1px;
    }

    .np-headline h1 {
        font-size: 22px;
    }

    .np-breaking-strip p {
        font-size: 16px;
    }

    .np-body {
        flex-direction: column;
    }

    .np-body-image {
        flex: none;
        max-width: 100%;
        order: -1;
    }

    .np-continuation {
        column-count: 1;
    }

    .np-edition-bar,
    .np-byline {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .np-headline,
    .np-body,
    .np-continuation {
        padding-left: 15px;
        padding-right: 15px;
    }
}