/*
Theme Name: Bangla News Theme
Theme URI: https://example.com/
Author: Custom
Description: A fast, mobile-first Bengali news theme with breaking-news ticker, lead-story homepage, automatic category blocks, most-read list, ad slots, share buttons and built-in technical SEO (meta tags, canonical, Open Graph, NewsArticle and BreadcrumbList schema). Steps aside automatically if Yoast, Rank Math, AIOSEO or SEOPress is active.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bangla-news-theme
Tags: news, blog, one-column, two-columns, custom-logo, custom-menu, featured-images, translation-ready, threaded-comments
*/

:root {
	--c-text: #1f2430;
	--c-muted: #5d6475;
	--c-bg: #ffffff;
	--c-soft: #f4f6fa;
	--c-border: #e3e7ee;
	--c-accent: #c8102e;
	--c-accent-dark: #a00d25;
	--radius: 10px;
	--wrap: 1120px;
	--read: 740px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", "Nirmala UI", "Vrinda", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.75;
	color: var(--c-text);
	background: var(--c-bg);
}

img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--c-accent-dark); }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; z-index: 100000;
	left: 8px; top: 8px; padding: 10px 16px; background: #fff; color: #000;
	box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { border-bottom: 1px solid var(--c-border); background: #fff; position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.site-title { margin: 0; font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.site-title a { color: var(--c-text); text-decoration: none; }
.site-description { margin: 0; font-size: .8rem; color: var(--c-muted); line-height: 1.3; }
.custom-logo { max-height: 44px; width: auto; }

.nav-toggle {
	display: none; background: none; border: 1px solid var(--c-border); border-radius: 8px;
	padding: 8px 12px; font-size: 1rem; cursor: pointer; color: var(--c-text);
}
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { display: block; padding: 10px 12px; color: var(--c-text); text-decoration: none; border-radius: 8px; font-weight: 500; }
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--c-soft); color: var(--c-accent); }

@media (max-width: 760px) {
	.nav-toggle { display: inline-block; }
	.main-nav { display: none; width: 100%; }
	.main-nav.is-open { display: block; }
	.header-inner { flex-wrap: wrap; padding: 10px 0; }
	.main-nav ul { flex-direction: column; }
}

/* Layout */
.site-content { padding: 28px 0 56px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 960px) {
	.layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 300px; }
}

/* Breadcrumbs */
.breadcrumbs { font-size: .88rem; color: var(--c-muted); margin: 0 0 18px; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--c-muted); }
.breadcrumbs a { color: var(--c-muted); }

/* Post cards */
.post-list { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.card-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { margin: 0; font-size: 1.15rem; line-height: 1.4; }
.card-title a { color: var(--c-text); text-decoration: none; }
.card-title a:hover { color: var(--c-accent); }
.card-excerpt { margin: 0; color: var(--c-muted); font-size: .95rem; line-height: 1.65; }

.meta { font-size: .85rem; color: var(--c-muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.meta a { color: var(--c-muted); }

.archive-header { margin-bottom: 24px; }
.archive-title { margin: 0 0 8px; font-size: 1.8rem; line-height: 1.3; }
.archive-desc { color: var(--c-muted); margin: 0; }

/* Single post */
.entry-header { margin-bottom: 20px; }
.entry-title { margin: 0 0 12px; font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.3; }
.entry-thumb { margin: 0 0 24px; }
.entry-thumb img { border-radius: var(--radius); display: block; width: 100%; }
.entry-content { max-width: var(--read); font-size: 1.05rem; }
.entry-content h2 { font-size: 1.6rem; line-height: 1.35; margin: 2.2em 0 .6em; scroll-margin-top: 84px; }
.entry-content h3 { font-size: 1.28rem; line-height: 1.4; margin: 1.8em 0 .5em; scroll-margin-top: 84px; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.2em; }
.entry-content blockquote { margin: 1.5em 0; padding: 4px 20px; border-left: 4px solid var(--c-accent); background: var(--c-soft); color: var(--c-muted); }
.entry-content table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--c-border); padding: 8px 12px; text-align: left; }
.entry-content img { border-radius: 6px; }
.entry-content pre { background: #111827; color: #e5e7eb; padding: 16px; border-radius: 8px; overflow-x: auto; }

.toc { background: var(--c-soft); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 28px; max-width: var(--read); }
.toc-title { margin: 0 0 8px; font-weight: 700; font-size: 1.05rem; }
.toc ol { margin: 0; padding-left: 20px; }
.toc ol ol { margin-top: 4px; }
.toc li { margin: 4px 0; }

.entry-footer { max-width: var(--read); margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--c-border); }
.tags a { display: inline-block; margin: 0 6px 6px 0; padding: 2px 12px; background: var(--c-soft); border-radius: 999px; font-size: .85rem; color: var(--c-muted); text-decoration: none; }
.tags a:hover { color: var(--c-accent); }

.author-box { display: flex; gap: 16px; align-items: flex-start; margin-top: 28px; padding: 18px; background: var(--c-soft); border-radius: var(--radius); max-width: var(--read); }
.author-box img { border-radius: 50%; }
.author-box h2 { margin: 0 0 4px; font-size: 1.05rem; }
.author-box p { margin: 0; color: var(--c-muted); font-size: .95rem; }

.related { margin-top: 48px; }
.related h2 { font-size: 1.4rem; margin: 0 0 16px; }

/* Sidebar & widgets */
.widget { margin-bottom: 28px; padding: 18px; border: 1px solid var(--c-border); border-radius: var(--radius); }
.widget-title { margin: 0 0 12px; font-size: 1.05rem; }
.widget ul { margin: 0; padding-left: 18px; }

/* Forms */
.search-form { display: flex; gap: 8px; }
.search-field { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: 8px; font: inherit; }
.button, .search-submit, .comment-form input[type="submit"] {
	background: var(--c-accent); color: #fff; border: 0; border-radius: 8px;
	padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer;
}
.button:hover, .search-submit:hover, .comment-form input[type="submit"]:hover { background: var(--c-accent-dark); color: #fff; }

/* Pagination */
.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--c-border); border-radius: 8px; text-decoration: none; color: var(--c-text); }
.pagination .page-numbers.current { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }

/* Comments */
.comments-area { max-width: var(--read); margin-top: 40px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 20px; }
.comment-body { padding: 14px 0; border-bottom: 1px solid var(--c-border); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: 8px; font: inherit;
}

/* Footer */
.site-footer { background: var(--c-soft); border-top: 1px solid var(--c-border); padding: 28px 0; font-size: .92rem; color: var(--c-muted); }
.footer-nav ul { list-style: none; margin: 0 0 12px; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: var(--c-muted); }

.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--c-muted); text-align: center; }

@media print {
	.site-header, .site-footer, .sidebar, .related, .comments-area, .toc { display: none; }
}


/* ==========================================================================
   News additions
   ========================================================================== */

/* Top bar */
.topbar { background: #111827; color: #d1d5db; font-size: .82rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 34px; flex-wrap: wrap; }
.social { display: flex; gap: 14px; flex-wrap: wrap; }
.social a { color: inherit; text-decoration: none; }
.social a:hover { color: #fff; text-decoration: underline; }
.footer-social { margin-bottom: 12px; }
.footer-social a { color: var(--c-muted); }

.site-header { border-bottom: 3px solid var(--c-accent); }
.site-title { font-size: 1.6rem; }

/* Ticker */
.ticker { background: var(--c-soft); border-bottom: 1px solid var(--c-border); overflow: hidden; }
.ticker-inner { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.ticker-label { background: var(--c-accent); color: #fff; font-weight: 700; padding: 3px 12px; border-radius: 4px; font-size: .85rem; white-space: nowrap; flex-shrink: 0; }
.ticker-track { overflow: hidden; flex: 1; position: relative; }
.ticker-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 40px; white-space: nowrap; width: max-content; padding-left: 100%; animation: sbt-ticker 60s linear infinite; }
.ticker-list li + li::before { content: "•"; color: var(--c-accent); margin-right: 40px; }
.ticker-list a { color: var(--c-text); text-decoration: none; font-weight: 500; }
.ticker-list a:hover { color: var(--c-accent); }
.ticker-track:hover .ticker-list, .ticker-track:focus-within .ticker-list { animation-play-state: paused; }
@keyframes sbt-ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
	.ticker-list { animation: none; flex-wrap: wrap; white-space: normal; width: auto; padding-left: 0; gap: 8px 24px; }
	.ticker-track { overflow: visible; }
}

/* Homepage top */
.home-top { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); margin-bottom: 32px; }
@media (min-width: 860px) { .home-top { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }

.card-lead { display: flex; flex-direction: column; gap: 12px; }
.lead-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.lead-title { margin: 6px 0 8px; font-size: clamp(1.4rem, 3.4vw, 2rem); line-height: 1.35; }
.lead-title a { color: var(--c-text); text-decoration: none; }
.lead-title a:hover { color: var(--c-accent); }
.lead-excerpt { margin: 0 0 8px; color: var(--c-muted); }

.home-top-side { display: flex; flex-direction: column; }
.card-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--c-border); align-items: flex-start; }
.card-row:first-child { padding-top: 0; }
.card-row:last-child { border-bottom: 0; }
.row-thumb { flex: 0 0 96px; }
.row-thumb img { display: block; width: 96px; height: 72px; object-fit: cover; border-radius: 6px; }
.row-title { margin: 0 0 4px; font-size: 1rem; line-height: 1.45; font-weight: 600; }
.row-title a { color: var(--c-text); text-decoration: none; }
.row-title a:hover { color: var(--c-accent); }

/* Category label */
.cat-label { display: inline-block; align-self: flex-start; background: var(--c-accent); color: #fff; font-size: .78rem; font-weight: 700; padding: 1px 10px; border-radius: 4px; text-decoration: none; line-height: 1.7; }
.cat-label:hover { background: var(--c-accent-dark); color: #fff; }
.entry-header .cat-label { margin-bottom: 10px; }

/* Section blocks */
.block { margin-bottom: 40px; }
.block-title { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 18px; font-size: 1.35rem; border-bottom: 2px solid var(--c-border); }
.block-title > span { display: inline-block; padding-bottom: 6px; margin-bottom: -2px; border-bottom: 3px solid var(--c-accent); }
.block-title a { color: var(--c-text); text-decoration: none; }
.block-more { font-size: .88rem; font-weight: 500; color: var(--c-accent) !important; }
.cat-block { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .cat-block { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.cat-block-side { display: flex; flex-direction: column; }
.cat-block .card-row:first-child { padding-top: 0; }
.home-more { text-align: center; margin: 8px 0 0; }

/* Cards, news style */
.card-body .cat-label { margin-bottom: 2px; }
.card-title { font-size: 1.1rem; font-weight: 700; }

/* Most read */
.most-read ol { margin: 0; padding: 0; list-style: none; counter-reset: mr; }
.most-read li { counter-increment: mr; display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--c-border); }
.most-read li:last-child { border-bottom: 0; }
.most-read li::before { content: counter(mr); color: var(--c-accent); font-weight: 800; font-size: 1.3rem; line-height: 1.2; min-width: 1.2em; }
.most-read a { color: var(--c-text); text-decoration: none; font-weight: 600; line-height: 1.5; }
.most-read a:hover { color: var(--c-accent); }

/* Share */
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 20px; }
.share-label { font-size: .85rem; color: var(--c-muted); }
.share-btn { padding: 4px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: #fff; text-decoration: none; }
.share-wa { background: #1fa855; } .share-fb { background: #1877f2; } .share-x { background: #111; } .share-tg { background: #229ed9; }
.share-btn:hover { opacity: .88; color: #fff; }
.entry-footer .share { margin: 16px 0 0; }

/* Ads */
.ad-slot { margin: 20px auto; text-align: center; overflow: hidden; max-width: 100%; }
.ad-slot:not(:empty)::before { content: attr(aria-label); display: block; font-size: .7rem; color: var(--c-muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.ad-in-article { clear: both; }

/* News article body */
.entry-content { font-size: 1.1rem; line-height: 1.9; }
.entry-thumb figcaption { text-align: left; padding: 6px 2px 0; }
