/*
Theme Name:   Kannada Vidhya Lite
Theme URI:    https://kannadavidhya.com/
Description:  Simple, fast news theme for ಕನ್ನಡ ವಿದ್ಯಾ. White header, yellow menu, clean article page, related stories and dark footer. No JavaScript and no web fonts.
Author:       Kannada Vidhya
Version:      3.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain:  kannada-vidhya-lite
*/

/* ---------- Colors (change here) ---------- */
:root {
	--yellow: #ffd200;
	--red: #c4161c;
	--maroon: #7a0000;
	--ink: #111111;
	--text: #222222;
	--muted: #5f6368;
	--line: #e2e2e2;
	--bg: #f4f4f4;
	--card: #ffffff;
	--footer: #202124;
	--font: "Noto Sans Kannada", "Tunga", "Nirmala UI", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.75 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.wrap { max-width: 1100px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.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; z-index: 100; background: #fff; padding: 8px 12px; top: 8px; left: 8px; }

/* ---------- Header ---------- */
.site-header { background: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 0px); }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header .wrap { display: flex; align-items: center; min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 1.75rem; line-height: 1; color: var(--ink); }
.logo b { background: var(--red); color: #fff; padding: 5px 9px 8px; border: 2px solid var(--ink); font-weight: 800; }
.custom-logo { max-height: 58px; width: auto; }

/* ---------- Yellow menu (scrolls sideways on phones) ---------- */
.site-nav { background: var(--yellow); box-shadow: 0 2px 4px rgba(0, 0, 0, .12); }
.site-nav ul { list-style: none; margin: 0 auto; padding: 0 6px; max-width: 1100px; display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.site-nav ul::-webkit-scrollbar { display: none; }
.site-nav li { flex: none; }
.site-nav a { display: block; padding: 11px 14px; font-weight: 800; font-size: 1.0625rem; color: var(--ink); white-space: nowrap; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current-cat > a { background: var(--ink); color: var(--yellow); }
.site-nav .sub-menu { display: none; }

/* ---------- Layout ---------- */
.site-main { padding-top: 16px; padding-bottom: 8px; }
.sec { margin-bottom: 26px; }
.sec-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.3rem; font-weight: 700; color: var(--ink); line-height: 1.4; }
.sec-title::before { content: ""; flex: none; width: 10px; height: 20px; background: var(--yellow); }
.sec-title .more { margin-left: auto; font-size: .9rem; font-weight: 700; color: var(--red); white-space: nowrap; }

/* ---------- Post cards ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 18px; } }
.post-card { display: block; min-width: 0; }
.thumb { display: block; aspect-ratio: 16 / 9; max-width: 100%; background: #d9d9d9; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .thumb { margin-bottom: 8px; }
.post-card h3 { margin: 0; font-size: 1.0625rem; line-height: 1.55; font-weight: 800; color: var(--ink); }
.post-card:hover h3 { color: var(--red); }

/* Lead story */
.lead { display: grid; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 24px; }
.lead .txt { padding: 0 16px 16px; }
.lead h2 { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.45; font-weight: 800; color: var(--ink); }
.lead p { margin: 0; color: var(--muted); font-size: 1rem; }
.lead:hover h2 { color: var(--red); }
@media (min-width: 768px) {
	.lead { grid-template-columns: 1.3fr 1fr; align-items: center; gap: 0; }
	.lead .txt { padding: 20px 24px; }
	.lead h2 { font-size: 1.75rem; }
}

/* Yellow block (Related Stories / home sections) */
.yellow { background: var(--yellow); padding: 18px 16px 22px; margin: 0 -16px 26px; }
.yellow .sec-title { font-weight: 500; font-size: 1.6rem; }
.yellow .sec-title::before { display: none; }
.yellow .sec-title .more { color: var(--ink); text-decoration: underline; }
.yellow .post-card:hover h3 { color: var(--ink); text-decoration: underline; }
@media (min-width: 768px) { .yellow { margin-left: 0; margin-right: 0; border-radius: 6px; padding: 20px 22px 24px; } }

/* ---------- Article ---------- */
.article { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 16px; margin-bottom: 24px; max-width: 820px; margin-left: auto; margin-right: auto; }
@media (min-width: 768px) { .article { padding: 24px 32px; } }
.crumbs { font-size: .95rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a:hover { color: var(--red); }
.entry-title { margin: 0 0 12px; font-size: 1.75rem; line-height: 1.45; font-weight: 800; color: var(--ink); }
@media (min-width: 768px) { .entry-title { font-size: 2.1rem; } }
.dek { margin: 0 0 14px; padding-left: 14px; color: var(--muted); font-size: 1.15rem; line-height: 1.7; border-left: 4px solid transparent; border-image: linear-gradient(var(--red), var(--yellow)) 1; }
.byline { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: .95rem; color: var(--muted); margin-bottom: 14px; }
.byline a { color: var(--text); }

.featured { margin: 0 -16px 16px; }
.featured img { width: 100%; }
.featured figcaption { font-size: .85rem; color: var(--muted); padding: 6px 16px 0; }
@media (min-width: 768px) { .featured { margin-left: 0; margin-right: 0; } }

.entry-content { font-size: 1.125rem; line-height: 1.85; overflow-wrap: break-word; }
.entry-content > * { margin-top: 0; margin-bottom: 1.1em; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--ink); font-weight: 800; line-height: 1.45; margin-top: 1.4em; margin-bottom: .6em; }
.entry-content h2 { font-size: 1.4rem; }
.entry-content h3 { font-size: 1.2rem; }
.entry-content a { color: var(--red); text-decoration: underline; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content blockquote { margin-left: 0; margin-right: 0; padding: .6em 1em; border-left: 4px solid var(--yellow); background: #fffbe6; }
.entry-content table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 1rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.entry-content th { background: #fff6c7; }
.entry-content figcaption, .wp-caption-text { font-size: .85rem; color: var(--muted); text-align: center; }
.entry-content iframe { max-width: 100%; }
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.tags a { background: #f1f1f1; border-radius: 4px; padding: 2px 10px; font-size: .875rem; }
.tags a:hover { background: var(--yellow); }

/* Author box */
.author-box { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 22px; background: #fafafa; }
.author-box img { border-radius: 50%; flex: none; }
.author-box h4 { margin: 0 0 2px; font-size: 1rem; color: var(--ink); }
.author-box p { margin: 0; font-size: .95rem; color: var(--muted); line-height: 1.7; }
.author-box .more { color: var(--ink); font-size: 1.05rem; white-space: nowrap; }

/* ---------- Archive, pages, search ---------- */
.page-head { margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 1.5rem; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.page-head h1::before { content: ""; width: 10px; height: 24px; background: var(--yellow); }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.empty { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 20px; }
.search-form { display: flex; gap: 8px; margin-top: 12px; }
.search-form label { flex: 1; }
.search-field { width: 100%; padding: 10px 12px; font: inherit; border: 1px solid #ccc; border-radius: 4px; }
.search-submit, .comment-form input[type="submit"] { background: var(--ink); color: var(--yellow); border: 0; border-radius: 4px; padding: 10px 16px; font: 700 1rem var(--font); cursor: pointer; }

.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0 26px; }
.page-numbers { display: inline-block; padding: 6px 12px; background: #fff; border: 1px solid var(--line); border-radius: 4px; font-weight: 700; }
.page-numbers.current, a.page-numbers:hover { background: var(--ink); color: var(--yellow); border-color: var(--ink); }

/* Comments (only shown when open) */
.comments-area { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 16px; max-width: 820px; margin: 0 auto 24px; }
.comment-list { list-style: none; padding: 0; }
.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] { width: 100%; padding: 8px 10px; font: inherit; border: 1px solid #ccc; border-radius: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: #e8eaed; margin-top: 16px; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 16px; padding-top: 28px; padding-bottom: 30px; }
.f-about { grid-column: 1 / -1; }
@media (min-width: 900px) { .f-grid { grid-template-columns: 2fr 1fr 1fr; } .f-about { grid-column: auto; } }
.f-title { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 1.25rem; font-weight: 500; color: #fff; }
.f-title::before { content: ""; flex: none; width: 12px; height: 20px; background: var(--yellow); }
.f-about p { margin: 0 0 16px; padding-left: 24px; line-height: 1.75; }
.f-email { display: inline-block; margin-left: 24px; background: #fff; color: #111; padding: 6px 10px; font-size: 1rem; overflow-wrap: anywhere; }
.f-col ul { list-style: none; margin: 0; padding: 0 0 0 24px; display: grid; gap: 12px; }
.f-col a { color: #e8eaed; }
.f-col a:hover { color: var(--yellow); }
.f-bottom { background: var(--maroon); color: #fff; text-align: center; padding: 14px 16px; line-height: 1.8; }
.f-bottom p { margin: 0; }
@media (min-width: 768px) { .single .yellow { max-width: 820px; margin-left: auto; margin-right: auto; } }
