/*
Theme Name: NewsPress
Theme URI: https://example.com/newspress
Author: NewsPress
Author URI: https://example.com
Description: মোবাইল-রেসপন্সিভ বাংলা নিউজ থিম — প্রতিনিধি ব্যবস্থাপনা, প্রেস কার্ড ও ভিজিটিং কার্ড (প্রিন্টসহ), প্রতিনিধিদের খবর পাঠানো (ড্রাফট → অ্যাডমিন অনুমোদন), ফটো কার্ড + অটো ডাউনলোড, ভিডিও কার্ড, ৪ পাতার ই-পেপার (আপলোড + বিজ্ঞাপন সেকশন) ও ৪টি বিজ্ঞাপন স্লট। সাইটের নাম, লোগো ও রঙ বদলালেই যেকোনো নামে যেকোনো সাইটে চলবে।
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newspress
Tags: news, blog, responsive, custom-logo, featured-images, custom-menu
*/

:root {
    --np-primary: #b91c1c;
    --np-dark: #111111;
    --np-bg: #ffffff;
    --np-card: #ffffff;
    --np-text: #1a1a1a;
    --np-muted: #666666;
    --np-radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--np-bg);
    color: var(--np-text);
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', 'SolaimanLipi', sans-serif;
    font-size: 17px;
    line-height: 1.7;
}
a { color: var(--np-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font-family: inherit; font-size: 16px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #ccc; border-radius: 8px; background: #fff;
}
textarea { min-height: 160px; }
.np-btn {
    display: inline-block; background: var(--np-primary); color: #fff !important;
    border: 0; border-radius: 8px; padding: 10px 20px; cursor: pointer; font-weight: 700;
}
.np-btn:hover { opacity: .9; text-decoration: none; }
.np-btn-dark { background: var(--np-dark); }
.np-wrap { max-width: 1180px; margin: 0 auto; padding: 0 14px; }

/* ---------- Header ---------- */
.np-header { background: var(--np-dark); color: #fff; }
.np-masthead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; flex-wrap: wrap; }
.np-logo a { color: #fff; font-size: 32px; font-weight: 900; line-height: 1.2; }
.np-logo a:hover { text-decoration: none; }
.np-logo img { max-height: 92px; width: auto; max-width: 520px; }
.np-tagline { color: #ccc; font-size: 14px; margin: 0; }
.np-menu-btn { display: none; background: var(--np-primary); color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.np-nav { background: var(--np-primary); }
.np-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; }
.np-nav li a { display: block; color: #fff; padding: 10px 16px; font-weight: 700; }
.np-nav li a:hover { background: rgba(0,0,0,.2); text-decoration: none; }
.np-ticker { background: #fff; border-bottom: 2px solid var(--np-primary); overflow: hidden; display: flex; align-items: stretch; }
.np-ticker-label { background: var(--np-primary); color: #fff; font-weight: 800; padding: 8px 14px; white-space: nowrap; position: relative; z-index: 2; flex-shrink: 0; display: flex; align-items: center; }
.np-ticker-view { flex: 1; overflow: hidden; display: flex; align-items: center; }
.np-ticker-track { display: flex; align-items: center; gap: 32px; padding: 8px 14px; white-space: nowrap; width: max-content; animation: np-tick 40s linear infinite; }
.np-ticker-track a { color: var(--np-text); font-weight: 600; }
@keyframes np-tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Layout ---------- */
.np-layout { display: block; padding: 18px 0 30px; }
.np-main { min-width: 0; }
.np-sidebar { margin-top: 24px; }
.np-widget { background: var(--np-card); border-radius: var(--np-radius); padding: 16px; margin-bottom: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.np-widget h3 { margin: 0 0 10px; font-size: 19px; border-bottom: 2px solid var(--np-primary); padding-bottom: 6px; }
.np-widget ul { list-style: none; margin: 0; padding: 0; }
.np-widget li { border-bottom: 1px solid #eee; padding: 7px 0; }
.np-widget li:last-child { border-bottom: 0; }

/* ---------- Ads ---------- */
.np-ad { background: #fff; border: 1px dashed #bbb; border-radius: var(--np-radius); padding: 12px; margin: 18px 0; text-align: center; overflow: hidden; }
.np-ad-label { display: block; font-size: 12px; color: #999; letter-spacing: 1px; margin-bottom: 6px; }

/* ---------- Hero + grid ---------- */
.np-hero { background: var(--np-card); border-radius: var(--np-radius); overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 20px; }
.np-hero img { width: 100%; display: block; }
.np-hero-body { padding: 16px 18px 20px; }
.np-hero-body h2 { margin: 6px 0 8px; font-size: 27px; line-height: 1.4; }
.np-hero-body h2 a { color: var(--np-text); }
.np-cat { display: inline-block; background: var(--np-primary); color: #fff; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 20px; }
.np-cat a { color: #fff; }
.np-meta { color: var(--np-muted); font-size: 14px; }
.np-section-title { font-size: 22px; margin: 26px 0 14px; border-left: 5px solid var(--np-primary); padding-left: 10px; }
.np-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.np-card { background: var(--np-card); border-radius: var(--np-radius); overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); display: flex; flex-direction: column; }
.np-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.np-card-body { padding: 14px 16px 18px; }
.np-card-body h3 { margin: 6px 0 6px; font-size: 19px; line-height: 1.45; }
.np-card-body h3 a { color: var(--np-text); }
.np-card-body p { color: var(--np-muted); font-size: 15px; margin: 0; }
.np-pagination { margin: 26px 0; text-align: center; }
.np-pagination .page-numbers { display: inline-block; padding: 7px 14px; background: #fff; border-radius: 8px; margin: 2px; color: var(--np-text); }
.np-pagination .current { background: var(--np-primary); color: #fff; }

/* ---------- Article ---------- */
.np-article { background: var(--np-card); border-radius: var(--np-radius); padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.np-article h1 { font-size: 29px; line-height: 1.4; margin: 8px 0 10px; }
.np-article-img { width: 100%; border-radius: var(--np-radius); margin: 14px 0; }
.np-video { margin: 16px 0; }
.np-video video, .np-video iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--np-radius); }
.np-photocard-bar { margin: 20px 0; padding: 14px; background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--np-radius); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.np-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--np-dark); color: #fff; padding: 12px 22px; border-radius: 30px; font-weight: 700; z-index: 9999; box-shadow: 0 4px 16px rgba(0,0,0,.3); }

/* ---------- Correspondents ---------- */
.np-rep-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.np-rep-card { background: var(--np-card); border-radius: var(--np-radius); padding: 18px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.np-rep-card img { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; border: 3px solid var(--np-primary); }
.np-rep-card h3 { margin: 10px 0 2px; }
.np-rep-card p { margin: 2px 0; color: var(--np-muted); font-size: 15px; }
.np-rep-info { background: var(--np-card); border-radius: var(--np-radius); padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.np-rep-info table { width: 100%; border-collapse: collapse; }
.np-rep-info td { padding: 8px 6px; border-bottom: 1px solid #eee; vertical-align: top; }
.np-rep-info td:first-child { font-weight: 700; width: 150px; }

/* ---------- Press + visiting cards ---------- */
.np-idcards { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 22px 0; }
.np-press-card, .np-visiting-card { border-radius: 12px; padding: 22px; color: #fff; position: relative; overflow: hidden; }
.np-press-card { background: linear-gradient(135deg, #b91c1c, #450a0a); border: 3px solid #fbbf24; }
.np-visiting-card { background: linear-gradient(135deg, #111827, #374151); border: 3px solid #e5e7eb; }
.np-press-card h3, .np-visiting-card h3 { margin: 0 0 4px; font-size: 24px; }
.np-press-card .np-card-tag, .np-visiting-card .np-card-tag { display: inline-block; background: #fff; color: #111; font-weight: 800; font-size: 13px; padding: 2px 12px; border-radius: 20px; margin-bottom: 12px; }
.np-press-card p, .np-visiting-card p { margin: 3px 0; font-size: 15px; }
.np-idcards .np-btn { margin-top: 12px; }

/* ---------- Forms ---------- */
.np-form { background: var(--np-card); border-radius: var(--np-radius); padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.np-form p { margin: 0 0 14px; }
.np-form label { display: block; font-weight: 700; margin-bottom: 5px; }
.np-notice { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; }
.np-error { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; }

/* ---------- Footer ---------- */
.np-footer { background: var(--np-dark); color: #ccc; padding: 22px 0; text-align: center; font-size: 15px; }
.np-footer a { color: #fff; }

/* ---------- E-paper ---------- */
.np-epaper-sheet { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 26px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.np-epaper-masthead { text-align: center; border-bottom: 3px double #111; padding-bottom: 12px; margin-bottom: 18px; }
.np-epaper-masthead h2 { font-size: 38px; margin: 0; line-height: 1.2; }
.np-epaper-masthead p { margin: 2px 0; color: #555; }
.np-epaper-hero h3 { font-size: 27px; line-height: 1.4; margin: 0 0 10px; }
.np-epaper-hero h3 a { color: var(--np-text); }
.np-epaper-hero img { width: 100%; border-radius: 8px; }
.np-epaper-hero p { color: var(--np-muted); }
.np-epaper-story { display: flex; gap: 14px; border-top: 1px solid #eee; padding: 14px 0; }
.np-epaper-story img { width: 180px; height: 120px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.np-epaper-story h4 { margin: 0 0 4px; font-size: 19px; line-height: 1.45; }
.np-epaper-story h4 a { color: var(--np-text); }
.np-epaper-story p { margin: 0; color: var(--np-muted); font-size: 15px; }
.np-epaper-nav { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.np-epaper-nav select { width: auto; }
.np-epaper-pageimg { width: 100%; height: auto; display: block; border: 1px solid #ddd; border-radius: 8px; }
.np-epaper-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.np-epaper-thumbs { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 18px; }
.np-epaper-thumbs img { width: 120px; height: 160px; object-fit: cover; border: 2px solid #ddd; border-radius: 6px; }
.np-epaper-adsec { background: #fff; border: 1px dashed #bbb; border-radius: 8px; padding: 12px; text-align: center; margin: 18px 0; }
.np-epaper-adsec img { max-width: 100%; height: auto; }

/* ---------- Print: e-paper page only ---------- */
@media print {
    .np-header, .np-nav, .np-ticker, .np-sidebar, .np-footer, .np-epaper-nav, .np-epaper-actions, .np-epaper-thumbs, .np-epaper-adsec, .np-ad, .np-photocard-bar { display: none !important; }
    body { background: #fff; }
    .np-epaper-sheet { box-shadow: none; border: 0; padding: 0; }
}

@media (max-width: 767px) {
    .np-menu-btn { display: inline-block; }
    .np-nav { display: none; }
    .np-nav.np-open { display: block; }
    .np-nav ul { flex-direction: column; }
    .np-logo a { font-size: 26px; }
    .np-logo img { max-height: 64px; max-width: 300px; }
    .np-hero-body h2 { font-size: 22px; }
    .np-article h1 { font-size: 23px; }
    .np-epaper-story { flex-direction: column; }
    .np-epaper-story img { width: 100%; height: auto; }
    .np-epaper-masthead h2 { font-size: 30px; }
    .np-epaper-sheet { padding: 16px; }
}
@media (min-width: 768px) {
    .np-grid { grid-template-columns: 1fr 1fr; }
    .np-rep-grid { grid-template-columns: 1fr 1fr; }
    .np-idcards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
    .np-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
    .np-sidebar { margin-top: 0; }
    .np-grid { grid-template-columns: 1fr 1fr 1fr; }
    .np-rep-grid { grid-template-columns: 1fr 1fr 1fr; }
}
