/*
Theme Name: INDbook Lite
Theme URI: https://www.indbook.net
Author: Rupesh K
Description: Ultra-lightweight, PageSpeed-first WordPress theme built for Hindi/English blogs. Zero web-font requests by default, no jQuery, no render-blocking CSS beyond this file, CLS-safe ad slots, native lazy-loading images.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: indbook-lite
*/

/* ---------- 1. Reset (minimal, not a full normalize) ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
	margin: 0;
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI",
		"Noto Sans Devanagari", "Mangal", Roboto, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.7;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
ul, ol { padding-left: 1.3em; }
table { width: 100%; border-collapse: collapse; }

/* ---------- 2. Design tokens ---------- */
:root {
	--ink: #17213B;        /* deep indigo-ink, primary text */
	--ink-soft: #4A5470;   /* secondary text / meta */
	--bg: #FBFAF8;         /* warm off-white page bg */
	--surface: #FFFFFF;    /* card / content surface */
	--accent: #C4501C;     /* vermilion-orange — links, CTAs */
	--accent-2: #0F6E5C;   /* deep teal — tags, secondary accent */
	--border: #E7E2D8;
	--radius: 10px;
	--maxw: 760px;
	--maxw-wide: 1080px;
}

/* ---------- 3. Layout shell ---------- */
.site-wrap { max-width: var(--maxw-wide); margin: 0 auto; padding: 0 18px; }
.content-wrap { max-width: var(--maxw); margin: 0 auto; }

.skip-link {
	position: absolute; left: -9999px; top: 0; background: var(--ink);
	color: #fff; padding: 10px 16px; z-index: 999; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* ---------- 4. Header ---------- */
.site-header {
	border-bottom: 1px solid var(--border);
	background: var(--surface);
}
.site-header-inner {
	display: flex; align-items: center; justify-content: space-between;
	padding: 14px 0; gap: 16px;
}
.site-branding { display: flex; align-items: center; gap: 10px; }
.site-title {
	font-size: 22px; font-weight: 800; margin: 0; letter-spacing: -0.01em;
	color: var(--ink);
}
.site-title a { color: inherit; text-decoration: none; }
.custom-logo { max-height: 40px; width: auto; }

.primary-nav ul {
	list-style: none; margin: 0; padding: 0; display: flex; gap: 22px;
}
.primary-nav a { color: var(--ink); font-weight: 600; font-size: 15px; }
.primary-nav a:hover { color: var(--accent); text-decoration: none; }

.menu-toggle {
	display: none; background: none; border: 2px solid var(--border);
	border-radius: 8px; padding: 8px 10px; font-size: 20px; line-height: 1;
	color: var(--ink); cursor: pointer;
}

@media (max-width: 720px) {
	.site-header-inner { flex-wrap: wrap; justify-content: space-between; }
	.menu-toggle { display: block; }
	.primary-nav { display: none; width: 100%; }
	.primary-nav.is-open { display: block; }
	.primary-nav ul { flex-direction: column; align-items: center; gap: 0; padding: 10px 0; }
	.primary-nav a { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); text-align: center; }
	.site-title { margin-left: 4px; }
}

/* ---------- 5. Article typography ---------- */
.entry-header { max-width: var(--maxw); margin: 28px auto 6px; padding: 0 18px; }
.entry-title { font-size: clamp(24px, 4.2vw, 34px); line-height: 1.3; margin: 0 0 10px; color: var(--ink); font-weight: 800; }
.entry-meta { color: var(--ink-soft); font-size: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.entry-meta a { color: var(--ink-soft); }

.entry-content { font-size: 17px; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { font-size: 24px; margin-top: 1.7em; color: var(--ink); font-weight: 800; }
.entry-content h3 { font-size: 20px; margin-top: 1.5em; color: var(--ink); font-weight: 700; }
.entry-content blockquote {
	margin: 0; padding: 14px 18px; border-left: 4px solid var(--accent);
	background: #FAF3EC; border-radius: 0 8px 8px 0; color: var(--ink-soft);
}
.entry-content img { border-radius: var(--radius); }
.entry-content figcaption { font-size: 13px; color: var(--ink-soft); text-align: center; margin-top: 6px; }
.entry-content code { background: #F1EEE7; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.entry-content table { font-size: 15px; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.entry-content th { background: #F4F1EA; }

.tags-links a {
	display: inline-block; background: #EAF4F1; color: var(--accent-2);
	font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
	margin: 3px 4px 3px 0;
}

/* ---------- 6. Post list / archive cards ---------- */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.post-card {
	display: grid; grid-template-columns: 130px 1fr; gap: 14px;
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius); padding: 12px; align-items: center;
}
.post-card-thumb img { border-radius: 8px; aspect-ratio: 4/3; object-fit: cover; }
.post-card-title { font-size: 18px; margin: 0 0 6px; font-weight: 700; }
.post-card-title a { color: var(--ink); }
.post-card-excerpt { color: var(--ink-soft); font-size: 14.5px; margin: 0; }
@media (max-width: 480px) {
	.post-card { grid-template-columns: 90px 1fr; }
	.post-card-title { font-size: 16px; }
}

/* ---------- 7. Ad slots — reserved space to prevent CLS ---------- */
/* Every ad wrapper reserves height BEFORE the ad script runs, so nothing jumps. */
.ad-slot {
	margin: 1.6em auto; max-width: var(--maxw);
	display: flex; align-items: center; justify-content: center;
	background: #F4F1EA; border: 1px dashed var(--border); border-radius: 8px;
	overflow: hidden;
}
.ad-slot::before { content: "Advertisement"; position: absolute; font-size: 10px; color: var(--ink-soft); opacity: 0; }
.ad-slot--in-article { min-height: 280px; }
.ad-slot--leaderboard { min-height: 100px; }
.ad-slot--sidebar { min-height: 250px; }

/* ---------- 8. Sidebar / widgets ---------- */
.layout-2col { display: grid; grid-template-columns: 1fr; gap: 30px; max-width: var(--maxw-wide); margin: 0 auto; padding: 0 18px; }
@media (min-width: 960px) {
	.layout-2col.has-sidebar { grid-template-columns: minmax(0,var(--maxw)) 300px; }
}
.widget { margin-bottom: 26px; }
.widget-title { font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); margin: 0 0 10px; }

/* ---------- 9. Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 50px; padding: 30px 0; color: var(--ink-soft); font-size: 14px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 20px; margin-bottom: 20px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 16px; text-align: center; }

/* ---------- 10. Pagination ---------- */
.pagination { display: flex; gap: 8px; flex-wrap: wrap; margin: 30px auto; max-width: var(--maxw); padding: 0 18px; }
.pagination a, .pagination span {
	padding: 8px 13px; border: 1px solid var(--border); border-radius: 6px; color: var(--ink);
}
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- 11. Utility ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }