/* =========================================================
   News Media Pro — Main Stylesheet
   Colors are driven by CSS custom properties set inline via
   the Customizer (see inc/customizer.php: nmp_customizer_css_vars).
   ========================================================= */

:root {
	--nmp-primary: #b30000;
	--nmp-secondary: #111111;
	--nmp-header-bg: #ffffff;
	--nmp-body-bg: #ffffff;
	--nmp-text: #1a1a1a;
	--nmp-link: #b30000;
	--nmp-category: #b30000;
	--nmp-container: 1280px;
	--nmp-border: #e5e5e5;
	--nmp-muted: #6b6b6b;
	--nmp-card-radius: 6px;
}

/* ---------- Base ---------- */
body {
	background: var(--nmp-body-bg);
	color: var(--nmp-text);
	line-height: 1.55;
}
a { color: var(--nmp-link); transition: opacity .15s ease; }
a:hover { opacity: .8; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; margin: 0 0 .5em; color: var(--nmp-secondary); }
.screen-reader-text {
	position: absolute !important;
	clip: rect(1px,1px,1px,1px);
	width: 1px; height: 1px; overflow: hidden;
}
.nmp-skip-link {
	position: absolute; left: -9999px; top: 0; background: #fff; color: #000; padding: 10px 16px; z-index: 10000;
}
.nmp-skip-link:focus { left: 10px; top: 10px; }

.nmp-container {
	max-width: var(--nmp-container);
	margin: 0 auto;
	padding: 0 20px;
}

.nmp-section { padding: 32px 0; border-bottom: 1px solid var(--nmp-border); }
.nmp-section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; border-bottom: 3px solid var(--nmp-primary); padding-bottom: 8px; }
.nmp-section-heading h2 { margin: 0; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .02em; }
.nmp-view-all { font-size: .85rem; font-weight: 600; white-space: nowrap; }

/* ---------- Top Bar ---------- */
.nmp-topbar { background: var(--nmp-secondary); color: #fff; font-size: .8rem; }
.nmp-topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; flex-wrap: wrap; gap: 8px; }
.nmp-topbar-left, .nmp-topbar-right { display: flex; align-items: center; gap: 16px; }
.nmp-topbar a { color: #fff; }
.nmp-topbar-trending { font-weight: 700; color: var(--nmp-primary); }
.nmp-topbar-menu { display: flex; gap: 12px; }
.nmp-social-icons { display: flex; gap: 10px; }
.nmp-social-icons a { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.12); font-size: .75rem; }

/* ---------- Header ---------- */
.nmp-masthead { background: var(--nmp-header-bg); padding: 16px 0; border-bottom: 1px solid var(--nmp-border); }
.nmp-masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nmp-site-branding img { max-height: 70px; width: auto; }
.nmp-site-title { font-size: 1.8rem; font-weight: 800; color: var(--nmp-secondary); letter-spacing: -.01em; }
.nmp-site-tagline { margin: 2px 0 0; font-size: .8rem; color: var(--nmp-muted); }
.nmp-header-ad { flex: 1; text-align: center; }
.nmp-header-actions { display: flex; align-items: center; gap: 14px; }
.nmp-search-toggle, .nmp-menu-toggle { background: none; border: none; cursor: pointer; padding: 6px; }
.nmp-hamburger, .nmp-hamburger::before, .nmp-hamburger::after {
	display: block; width: 24px; height: 2px; background: var(--nmp-secondary); position: relative;
}
.nmp-hamburger::before, .nmp-hamburger::after { content: ""; position: absolute; left: 0; }
.nmp-hamburger::before { top: -7px; }
.nmp-hamburger::after { top: 7px; }
.nmp-menu-toggle { display: none; }

.nmp-icon-search::before { content: "\1F50D"; }
.nmp-icon-eye::before { content: "\1F441"; font-size: .85em; }

/* ---------- Primary Nav ---------- */
.nmp-primary-nav { background: var(--nmp-secondary); }
.nmp-nav-menu { display: flex; flex-wrap: wrap; }
.nmp-nav-menu li { position: relative; }
.nmp-nav-menu a { display: block; padding: 12px 16px; color: #fff; font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .02em; }
.nmp-nav-menu li:hover > a, .nmp-nav-menu li.current-menu-item > a { color: var(--nmp-primary); opacity: 1; }
.nmp-nav-menu ul { display: none; position: absolute; top: 100%; left: 0; background: var(--nmp-secondary); min-width: 200px; z-index: 100; box-shadow: 0 8px 16px rgba(0,0,0,.2); }
.nmp-nav-menu li:hover > ul { display: block; }
.nmp-nav-menu ul a { text-transform: none; padding: 10px 16px; }

body.nmp-sticky-header-on .nmp-primary-nav { position: sticky; top: 0; z-index: 500; }

/* ---------- Search Overlay ---------- */
.nmp-search-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 2000; padding-top: 12vh; }
.nmp-search-overlay .nmp-search-form { display: flex; max-width: 700px; margin: 0 auto; }
.nmp-search-field { flex: 1; padding: 16px; font-size: 1.3rem; border: none; border-bottom: 2px solid var(--nmp-primary); background: transparent; color: #fff; }
.nmp-search-field::placeholder { color: #999; }
.nmp-search-submit { background: var(--nmp-primary); border: none; color: #fff; padding: 0 24px; cursor: pointer; }
.nmp-search-close { position: absolute; top: 24px; right: 24px; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; }

/* ---------- Breaking Ticker ---------- */
.nmp-breaking-ticker { overflow: hidden; }
.nmp-ticker-inner { display: flex; align-items: center; gap: 16px; padding: 8px 0; }
.nmp-ticker-label { font-weight: 800; text-transform: uppercase; font-size: .78rem; background: rgba(0,0,0,.25); padding: 4px 10px; border-radius: 3px; white-space: nowrap; }
.nmp-ticker-track-wrap { overflow: hidden; flex: 1; }
.nmp-ticker-track { display: flex; gap: 40px; white-space: nowrap; animation: nmp-ticker-scroll 30s linear infinite; }
.nmp-ticker-track a { color: inherit; font-size: .88rem; font-weight: 600; }
@keyframes nmp-ticker-scroll {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}
.nmp-breaking-ticker:hover .nmp-ticker-track { animation-play-state: paused; }

/* ---------- Category Label ---------- */
.nmp-cat-label {
	position: absolute; top: 10px; left: 10px; color: #fff; font-size: .68rem; font-weight: 700;
	text-transform: uppercase; padding: 4px 10px; border-radius: 3px; letter-spacing: .03em;
}

/* ---------- Cards & Grids ---------- */
.nmp-grid { display: grid; gap: 24px; }
.nmp-grid-2 { grid-template-columns: repeat(2, 1fr); }
.nmp-grid-3 { grid-template-columns: repeat(3, 1fr); }
.nmp-grid-4 { grid-template-columns: repeat(4, 1fr); }

.nmp-card { position: relative; }
.nmp-card-thumb { position: relative; display: block; aspect-ratio: 16/10; overflow: hidden; border-radius: var(--nmp-card-radius); background: #f2f2f2; }
.nmp-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.nmp-card:hover .nmp-card-thumb img { transform: scale(1.05); }
.nmp-card-thumb-placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg,#eee,#ddd); }
.nmp-card-body { padding-top: 12px; }
.nmp-card-title { font-size: 1.05rem; margin: 0 0 8px; }
.nmp-card-title a { color: var(--nmp-secondary); }
.nmp-card-meta { display: flex; gap: 12px; align-items: center; font-size: .78rem; color: var(--nmp-muted); flex-wrap: wrap; }
.nmp-byline { font-weight: 600; }

/* List items (horizontal) */
.nmp-list-layout { display: flex; flex-direction: column; gap: 18px; }
.nmp-list-item { display: flex; gap: 16px; align-items: flex-start; }
.nmp-list-thumb { flex: 0 0 120px; aspect-ratio: 4/3; border-radius: var(--nmp-card-radius); overflow: hidden; display: block; background: #f2f2f2; }
.nmp-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nmp-list-body { flex: 1; }
.nmp-list-title { font-size: 1rem; margin: 0 0 6px; }

/* ---------- Hero Grid ---------- */
.nmp-hero-grid-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.nmp-hero-main .nmp-card-thumb { aspect-ratio: 16/10; }
.nmp-hero-title { font-size: 1.9rem; }
.nmp-hero-title a { color: var(--nmp-secondary); }
.nmp-hero-sub-title { font-size: 1rem; }
.nmp-hero-grid-inner > div:nth-child(2) { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-content: start; }
.nmp-hero-sub .nmp-card-thumb { aspect-ratio: 16/10; }

/* ---------- Category Section (featured + list) ---------- */
.nmp-category-section-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.nmp-category-section-inner .nmp-list-layout,
.nmp-category-section-inner > article:not(.nmp-card-featured) { }
.nmp-category-section-inner { grid-auto-flow: dense; }
.nmp-category-section-inner .nmp-card-featured { grid-row: span 4; }

/* ---------- Trending ---------- */
.nmp-trending-list { display: flex; flex-direction: column; gap: 16px; counter-reset: none; }
.nmp-trending-item { display: flex; align-items: center; gap: 14px; }
.nmp-trending-rank { font-size: 1.6rem; font-weight: 800; color: var(--nmp-border); width: 34px; flex-shrink: 0; text-align: center; }
.nmp-trending-thumb { flex: 0 0 70px; aspect-ratio: 1/1; border-radius: var(--nmp-card-radius); overflow: hidden; background: #f2f2f2; }
.nmp-trending-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nmp-trending-title { font-size: .95rem; margin: 0 0 4px; }
.nmp-view-count { font-size: .75rem; color: var(--nmp-muted); }

/* ---------- Video News ---------- */
.nmp-video-thumb { position: relative; display: block; aspect-ratio: 16/10; border-radius: var(--nmp-card-radius); overflow: hidden; background: #000; }
.nmp-video-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.nmp-play-button {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
	width: 56px; height: 56px; border-radius: 50%; background: rgba(179,0,0,.9); color: #fff;
	display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}

/* ---------- Load More ---------- */
.nmp-load-more-wrap { text-align: center; margin-top: 28px; }
.nmp-load-more-btn, .nmp-button {
	display: inline-block; background: var(--nmp-primary); color: #fff; border: none; padding: 12px 32px;
	font-weight: 700; text-transform: uppercase; font-size: .82rem; letter-spacing: .03em; border-radius: 4px; cursor: pointer;
}
.nmp-load-more-btn:hover, .nmp-button:hover { opacity: .88; }

/* ---------- Single Article ---------- */
.nmp-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: .8rem; color: var(--nmp-muted); padding: 14px 0; }
.nmp-breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; }
.nmp-single-layout.nmp-has-sidebar { display: grid; grid-template-columns: 2.2fr 1fr; gap: 40px; align-items: start; }
.nmp-article-title { font-size: 2.2rem; margin: 12px 0; }
.nmp-article-subtitle { font-size: 1.15rem; color: var(--nmp-muted); margin: 0 0 16px; }
.nmp-article-meta { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--nmp-border); border-bottom: 1px solid var(--nmp-border); margin-bottom: 20px; }
.nmp-author-avatar-link img { border-radius: 50%; }
.nmp-article-meta-sub { display: flex; gap: 14px; font-size: .8rem; color: var(--nmp-muted); flex-wrap: wrap; }
.nmp-article-featured-image { margin: 0 0 20px; }
.nmp-article-featured-image img { border-radius: var(--nmp-card-radius); width: 100%; }
.nmp-article-featured-image figcaption { font-size: .8rem; color: var(--nmp-muted); margin-top: 6px; }
.nmp-article-content { font-size: 1.08rem; line-height: 1.8; }
.nmp-article-content p { margin: 0 0 1.2em; }
.nmp-article-content img { border-radius: var(--nmp-card-radius); }
.nmp-article-content blockquote { border-left: 4px solid var(--nmp-primary); margin: 1.5em 0; padding: .5em 1.5em; font-style: italic; color: var(--nmp-muted); }
.nmp-article-content h2, .nmp-article-content h3 { margin-top: 1.6em; }

.nmp-share-buttons { display: flex; gap: 8px; margin: 20px 0; }
.nmp-share-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--nmp-secondary); color: #fff; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; }
.nmp-share-facebook { background: #1877f2; }
.nmp-share-whatsapp { background: #25d366; }
.nmp-share-x { background: #000; }
.nmp-share-linkedin { background: #0a66c2; }
.nmp-share-telegram { background: #0088cc; }

.nmp-article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.nmp-article-tags a { border: 1px solid var(--nmp-border); border-radius: 20px; padding: 5px 14px; font-size: .8rem; }

.nmp-author-box { display: flex; gap: 16px; background: #fafafa; border-radius: var(--nmp-card-radius); padding: 20px; margin: 28px 0; }
.nmp-author-box-avatar img { border-radius: 50%; }

.nmp-post-nav { display: flex; justify-content: space-between; gap: 20px; margin: 28px 0; border-top: 1px solid var(--nmp-border); padding-top: 20px; }
.nmp-post-nav a { display: block; }
.nmp-post-nav span { display: block; font-size: .75rem; text-transform: uppercase; color: var(--nmp-muted); margin-bottom: 4px; }
.nmp-post-nav-next { text-align: right; margin-left: auto; }

.nmp-related-posts { margin: 32px 0; }
.nmp-related-posts h2 { border-bottom: 3px solid var(--nmp-primary); padding-bottom: 8px; }

/* ---------- Comments ---------- */
.nmp-comments-area { margin-top: 40px; }
.nmp-comment-list { display: flex; flex-direction: column; gap: 20px; }

/* ---------- Footer ---------- */
.nmp-footer { background: var(--nmp-secondary); color: #ddd; margin-top: 40px; }
.nmp-footer h3, .nmp-footer h4 { color: #fff; }
.nmp-footer a { color: #ccc; }
.nmp-footer-columns { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 32px; padding: 48px 0; }
.nmp-footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.nmp-footer-about-text { font-size: .88rem; color: #aaa; margin: 12px 0; }
.nmp-footer-newsletter input[type="email"] { width: 100%; padding: 10px; margin-bottom: 8px; border: 1px solid #444; background: #1c1c1c; color: #fff; border-radius: 4px; }
.nmp-footer-bottom { border-top: 1px solid #2a2a2a; padding: 16px 0; }
.nmp-footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: .8rem; }
.nmp-legal-menu { display: flex; gap: 16px; }
.nmp-footer-widgets { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; padding-bottom: 24px; }

/* ---------- Ads ---------- */
.nmp-header-ad, .nmp-homepage-ad, .nmp-in-article-ad, .nmp-sidebar-ad, .nmp-footer-ad, .nmp-archive-ad {
	text-align: center; margin: 20px 0; overflow: hidden;
}

/* ---------- 404 ---------- */
.nmp-404-inner { text-align: center; padding: 80px 0; }
.nmp-404-code { font-size: 5rem; color: var(--nmp-primary); margin: 0; }
.nmp-404-trending { max-width: 500px; margin: 40px auto; text-align: left; }

/* ---------- Sidebar widgets ---------- */
.nmp-widget { margin-bottom: 32px; }
.nmp-widget-title { border-bottom: 3px solid var(--nmp-primary); padding-bottom: 8px; text-transform: uppercase; font-size: 1.1rem; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
	.nmp-grid-4 { grid-template-columns: repeat(2, 1fr); }
	.nmp-grid-3 { grid-template-columns: repeat(2, 1fr); }
	.nmp-footer-columns { grid-template-columns: 1fr 1fr; }
	.nmp-footer-widgets { grid-template-columns: repeat(2,1fr); }
	.nmp-single-layout.nmp-has-sidebar { grid-template-columns: 1fr; }
	.nmp-archive-layout.nmp-has-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 782px) {
	.nmp-menu-toggle { display: block; }
	.nmp-topbar-menu { display: none; }
	.nmp-primary-nav { display: none; position: fixed; top: 0; left: 0; width: 82%; max-width: 320px; height: 100%; background: var(--nmp-secondary); z-index: 1500; overflow-y: auto; }
	.nmp-primary-nav.nmp-nav-open { display: block; }
	.nmp-nav-menu { flex-direction: column; }
	.nmp-nav-menu ul { position: static; box-shadow: none; }
	.nmp-hero-grid-inner { grid-template-columns: 1fr; }
	.nmp-hero-grid-inner > div:nth-child(2) { grid-template-columns: 1fr 1fr; }
	.nmp-category-section-inner { grid-template-columns: 1fr; }
	.nmp-category-section-inner .nmp-card-featured { grid-row: auto; }
	.nmp-grid-3, .nmp-grid-4, .nmp-grid-2 { grid-template-columns: 1fr 1fr; }
	.nmp-footer-columns { grid-template-columns: 1fr; }
	.nmp-footer-widgets { grid-template-columns: 1fr; }
	.nmp-article-title { font-size: 1.6rem; }
	.nmp-site-title { font-size: 1.4rem; }
}

@media (max-width: 480px) {
	.nmp-grid-3, .nmp-grid-4, .nmp-grid-2 { grid-template-columns: 1fr; }
	.nmp-hero-grid-inner > div:nth-child(2) { grid-template-columns: 1fr; }
	.nmp-list-thumb { flex-basis: 90px; }
	.nmp-container { padding: 0 14px; }
	.nmp-masthead-inner { flex-wrap: wrap; }
	.nmp-topbar-inner { font-size: .72rem; }
	.nmp-post-nav { flex-direction: column; }
	.nmp-post-nav-next { text-align: left; margin-left: 0; }
}

/* Prevent horizontal overflow anywhere */
.nmp-site-content, .nmp-container, table, pre { max-width: 100%; }
table { overflow-x: auto; display: block; }
