/*
Theme Name: Samachar Lite
Description: Lightweight Hindi/English news theme. Share buttons (WhatsApp, Facebook, X, Telegram, LinkedIn, Email, Copy link), Open Graph tags for WhatsApp thumbnail previews, NewsArticle schema, and Elementor / Elementor Theme Builder compatible.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: samachar
*/

:root {
	--sam-red: #c8102e;
	--sam-red-dark: #9d0c23;
	--sam-ink: #111;
	--sam-text: #222;
	--sam-muted: #666;
	--sam-line: #e5e5e5;
	--sam-bg: #fff;
	--sam-soft: #f6f6f6;
	--sam-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--sam-bg);
	color: var(--sam-text);
	font-family: 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 17px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--sam-ink); text-decoration: none; }
a:hover, a:focus { color: var(--sam-red); }
h1, h2, h3, h4 { color: var(--sam-ink); line-height: 1.4; margin: 0 0 .5em; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; background: #fff; padding: 8px 14px; z-index: 100000; top: 6px; left: 6px;
}
.container { width: 100%; max-width: var(--sam-max); margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.topbar { background: var(--sam-soft); border-bottom: 1px solid var(--sam-line); font-size: 14px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; flex-wrap: wrap; }
.topbar-date { color: var(--sam-muted); }
.search-form { display: flex; margin: 0; }
.search-form input[type="search"] {
	border: 1px solid var(--sam-line); border-right: 0; padding: 5px 10px; font: inherit; font-size: 14px; min-width: 0; width: 180px;
}
.search-form button {
	border: 0; background: var(--sam-red); color: #fff; padding: 5px 14px; font: inherit; font-size: 14px; cursor: pointer;
}
.brand { padding: 18px 0; text-align: center; }
.site-title { font-size: clamp(28px, 5vw, 44px); font-weight: 700; color: var(--sam-ink); letter-spacing: -.5px; }
.custom-logo { max-height: 80px; width: auto; }
.main-nav { border-top: 3px solid var(--sam-ink); border-bottom: 2px solid var(--sam-red); background: #fff; position: relative; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 11px 14px; font-weight: 600; font-size: 16px; }
.main-nav li:hover > a, .main-nav .current-menu-item > a, .main-nav .current-cat > a { color: var(--sam-red); }
.main-nav .sub-menu {
	display: none; position: absolute; top: 100%; left: 0; min-width: 200px; background: #fff;
	border: 1px solid var(--sam-line); border-top: 2px solid var(--sam-red); z-index: 50; flex-direction: column; box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.nav-toggle {
	display: none; background: none; border: 0; font: inherit; font-weight: 700; padding: 10px 0; cursor: pointer; color: var(--sam-ink);
}

/* ---------- Ticker ---------- */
.ticker { background: #fff; border-bottom: 1px solid var(--sam-line); }
.ticker-inner { display: flex; align-items: center; gap: 12px; height: 42px; overflow: hidden; }
.ticker-label {
	background: var(--sam-red); color: #fff; font-weight: 700; font-size: 14px; padding: 4px 12px; white-space: nowrap; flex: none;
}
.ticker-track { overflow: hidden; flex: 1; min-width: 0; }
.ticker-list { display: flex; width: max-content; animation: sam-marquee 60s linear infinite; }
.ticker-track:hover .ticker-list { animation-play-state: paused; }
.ticker-group { display: flex; margin: 0; padding: 0; list-style: none; }
.ticker-group li { white-space: nowrap; padding-right: 36px; font-size: 15px; }
.ticker-group li::before { content: "\25CF"; color: var(--sam-red); font-size: 9px; margin-right: 8px; vertical-align: middle; }
@keyframes sam-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.ticker-list { animation: none; }
	.ticker-track { overflow-x: auto; }
}

/* ---------- Layout ---------- */
.site-main { min-width: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding-top: 24px; padding-bottom: 32px; }
.sec-title {
	font-size: 22px; font-weight: 700; margin: 0 0 16px; padding-left: 10px; border-left: 5px solid var(--sam-red); line-height: 1.2;
}
.sec-title a { color: inherit; }
.section { margin-bottom: 32px; }

/* ---------- Cards ---------- */
.thumb { display: block; position: relative; aspect-ratio: 16 / 9; background: #e9e9e9; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-label { display: inline-block; color: var(--sam-red); font-size: 13px; font-weight: 700; line-height: 1.2; margin-bottom: 4px; }
.card-title { font-size: 18px; margin: 0 0 4px; }
.card-date { font-size: 13px; color: var(--sam-muted); }

.card-v .card-body { padding-top: 10px; }
.card-h, .card-side { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: start; }
.card-h { padding: 14px 0; border-bottom: 1px solid var(--sam-line); }
.card-h .card-title { font-size: 19px; }
.card-side { grid-template-columns: 110px 1fr; padding-bottom: 12px; border-bottom: 1px solid var(--sam-line); }
.card-side .card-title { font-size: 16px; }

.hero { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; margin-bottom: 28px; }
.card-hero { position: relative; }
.card-hero .thumb { aspect-ratio: 16 / 10; }
.card-hero .card-body {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 18px 16px;
	background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
}
.card-hero .card-title { font-size: clamp(20px, 3vw, 30px); }
.card-hero .card-title a { color: #fff; }
.card-hero .cat-label { background: var(--sam-red); color: #fff; padding: 2px 8px; }
.hero-side { display: grid; gap: 12px; align-content: start; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-4 .card-title { font-size: 16px; }

/* ---------- Single ---------- */
.breadcrumbs { font-size: 14px; color: var(--sam-muted); margin-bottom: 10px; }
.breadcrumbs a { color: var(--sam-muted); }
.breadcrumbs span.sep { margin: 0 6px; }
.entry-title { font-size: clamp(26px, 4vw, 38px); font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.entry-meta { font-size: 14px; color: var(--sam-muted); margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--sam-line); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.entry-thumb { margin: 0 0 20px; }
.entry-thumb img { width: 100%; height: auto; display: block; }
.entry-thumb figcaption { font-size: 13px; color: var(--sam-muted); padding-top: 4px; }
.entry-content { font-size: 18px; line-height: 1.85; overflow-wrap: break-word; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content a { color: var(--sam-red); text-decoration: underline; }
.entry-content img { height: auto; }
.entry-content figure { margin: 0 0 1.2em; }
.entry-content figcaption, .wp-element-caption { font-size: 14px; color: var(--sam-muted); text-align: center; }
.entry-content blockquote {
	margin: 1.4em 0; padding: 4px 18px; border-left: 4px solid var(--sam-red); background: var(--sam-soft); font-style: italic;
}
.entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--sam-line); padding: 8px 10px; }
.entry-content iframe { border: 0; }
.entry-content .wp-block-embed__wrapper { position: relative; }
.entry-content .wp-block-embed-youtube iframe, .entry-content iframe[src*="youtube"] { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.wp-caption { max-width: 100%; }
.alignleft { float: left; margin: 0 16px 8px 0; }
.alignright { float: right; margin: 0 0 8px 16px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.tags { margin: 18px 0; font-size: 14px; }
.tags a { display: inline-block; background: var(--sam-soft); padding: 2px 10px; margin: 0 4px 6px 0; border-radius: 3px; }

/* ---------- Share box ---------- */
.share-box { margin: 28px 0; padding: 16px; background: var(--sam-soft); border-top: 3px solid var(--sam-red); }
.share-label { display: block; font-weight: 700; margin-bottom: 10px; color: var(--sam-ink); }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
	display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; border: 0; border-radius: 4px;
	font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; color: #fff !important; text-decoration: none !important; cursor: pointer;
}
.share-btn[hidden] { display: none; }
.share-btn:hover, .share-btn:focus { opacity: .88; color: #fff; }
.share-whatsapp { background: #25d366; }
.share-facebook { background: #1877f2; }
.share-x { background: #000; }
.share-telegram { background: #229ed9; }
.share-linkedin { background: #0a66c2; }
.share-email { background: #6b6b6b; }
.share-copy { background: #444; }
.share-native { background: var(--sam-red); }
@media (max-width: 600px) {
	.share-whatsapp { flex: 1 1 100%; font-size: 17px; padding: 12px; }
}

/* ---------- Related / pagination ---------- */
.related { margin-top: 32px; }
.pagination { margin: 26px 0 0; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers { padding: 6px 13px; border: 1px solid var(--sam-line); font-size: 15px; }
.pagination .page-numbers.current { background: var(--sam-red); border-color: var(--sam-red); color: #fff; }
.archive-head { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--sam-ink); }
.archive-head h1 { font-size: 30px; margin: 0; }
.archive-desc { color: var(--sam-muted); margin-top: 6px; }

/* ---------- Sidebar ---------- */
.sidebar .widget, .sidebar .sidebar-block { margin-bottom: 28px; }
.sidebar .widget-title { font-size: 20px; padding-left: 10px; border-left: 5px solid var(--sam-red); margin-bottom: 14px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 8px 0; border-bottom: 1px solid var(--sam-line); }

/* ---------- Footer ---------- */
.site-footer { background: #111; color: #cfcfcf; margin-top: 20px; padding: 28px 0 22px; font-size: 15px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #ff6b81; }
.footer-menu { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-copy { margin: 0; color: #9a9a9a; }

/* ---------- Elementor pages ---------- */
.sam-elementor .site-main, .sam-page-elementor { max-width: none; padding: 0; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.layout { grid-template-columns: 1fr; }
	.hero { grid-template-columns: 1fr; }
	.grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
	body { font-size: 16px; }
	.nav-toggle { display: block; }
	.main-nav ul { display: none; flex-direction: column; }
	.main-nav ul.is-open { display: flex; }
	.main-nav .sub-menu { position: static; display: flex; box-shadow: none; border: 0; padding-left: 14px; }
	.card-h { grid-template-columns: 110px 1fr; }
	.card-h .card-title { font-size: 17px; }
	.entry-content { font-size: 17px; }
	.search-form input[type="search"] { width: 130px; }
}
@media print {
	.topbar, .ticker, .main-nav, .share-box, .sidebar, .site-footer, .related { display: none !important; }
}
