/*
Theme Name: Lumen News
Theme URI: https://example.com/lumen-news
Author: Your Name
Author URI: https://example.com
Description: Lightweight universal news / magazine / blog theme. Clean, fast homepage and a full news-portal style single post layout with sticky trending sidebar, reading progress bar, share bar, author box, related posts and Article schema. No jQuery, no external fonts, colorful light design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lumen
Tags: blog, news, two-columns, right-sidebar, custom-logo, custom-menu, custom-colors, featured-images, threaded-comments, translation-ready
*/

:root {
	--accent: #5b2ee6;
	--bg: #f6f7fb;
	--surface: #ffffff;
	--text: #16172b;
	--muted: #5d6178;
	--border: #e5e7ef;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(20, 20, 50, .05), 0 6px 20px rgba(20, 20, 50, .06);
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--serif: Georgia, Cambria, "Times New Roman", serif;
	--c0: #e8445a; --c1: #1f8fff; --c2: #0fb37f; --c3: #ff8a1f; --c4: #9b3dff; --c5: #e0379b;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; word-wrap: normal !important; }
.skip-link:focus { clip: auto; width: auto; height: auto; z-index: 999; background: #fff; padding: 8px 12px; left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.site-title { font-weight: 800; font-size: 24px; letter-spacing: -.02em; margin: 0; line-height: 1; }
.site-title a { background: linear-gradient(90deg, var(--accent), var(--c5)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.custom-logo { max-height: 44px; width: auto; }
.main-nav { flex: 1; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--muted); }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-cat > a { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.main-nav .sub-menu { position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: none; flex-direction: column; z-index: 60; }
.main-nav .sub-menu a { border-radius: 8px; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.mobile-search { display: none; }
.search-form { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 0 4px 0 14px; }
.search-form label { flex: 1; }
.search-field { border: 0; background: transparent; padding: 9px 0; font: inherit; font-size: 14px; width: 100%; min-width: 150px; outline: 0; color: var(--text); }
.search-submit { border: 0; background: var(--accent); color: #fff; border-radius: 999px; width: 32px; height: 32px; cursor: pointer; display: grid; place-items: center; flex: none; }
.menu-toggle { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 40px; border: 1px solid var(--border); background: #fff; border-radius: 10px; cursor: pointer; padding: 0 10px; }
.menu-toggle .bar { display: block; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Common ---------- */
.cat-badge { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--c0); }
.cat-badge.c1 { color: var(--c1); } .cat-badge.c2 { color: var(--c2); } .cat-badge.c3 { color: var(--c3); } .cat-badge.c4 { color: var(--c4); } .cat-badge.c5 { color: var(--c5); }
.cat-badge:hover { text-decoration: underline; }
.meta { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.thumb-placeholder { display: block; width: 100%; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--c1), var(--c4)); }
.thumb-placeholder.c0 { background: linear-gradient(135deg, var(--c0), var(--c3)); }
.thumb-placeholder.c2 { background: linear-gradient(135deg, var(--c2), var(--c1)); }
.thumb-placeholder.c3 { background: linear-gradient(135deg, var(--c3), var(--c5)); }
.thumb-placeholder.c4 { background: linear-gradient(135deg, var(--c4), var(--c5)); }
.thumb-placeholder.c5 { background: linear-gradient(135deg, var(--c5), var(--c0)); }
.section-head { display: flex; align-items: center; gap: 14px; margin: 36px 0 18px; }
.section-head h2, .section-head h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
.section-head::after { content: ""; flex: 1; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--c1), var(--c2), transparent); }
.archive-desc { color: var(--muted); margin: -8px 0 20px; }

/* ---------- Homepage ---------- */
.home-hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; margin: 28px 0 8px; }
.hero-main { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-main img, .hero-main .thumb-placeholder { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-body { padding: 20px 24px 24px; }
.hero-body h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.18; letter-spacing: -.02em; margin: 8px 0 10px; }
.hero-excerpt { color: var(--muted); margin: 0 0 12px; font-size: 16.5px; }
.hero-side { display: flex; flex-direction: column; gap: 14px; }
.mini-card { display: flex; gap: 14px; background: var(--surface); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); align-items: flex-start; }
.mini-thumb { flex: none; width: 112px; border-radius: 8px; overflow: hidden; }
.mini-thumb img, .mini-thumb .thumb-placeholder { width: 112px; height: 80px; object-fit: cover; aspect-ratio: auto; }
.mini-card h3 { font-size: 15.5px; line-height: 1.35; margin: 3px 0 6px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20,20,50,.06), 0 14px 30px rgba(20,20,50,.1); }
.card-thumb img, .card-thumb .thumb-placeholder { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 18px; line-height: 1.3; margin: 0; letter-spacing: -.01em; }
.card-excerpt { color: var(--muted); font-size: 14.5px; margin: 0; flex: 1; }
.pagination, .posts-navigation { margin: 40px 0 60px; }
.nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.page-numbers { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 14px; }
.page-numbers.current { background: var(--accent); color: #fff; border-color: var(--accent); }
.no-results { background: var(--surface); border-radius: var(--radius); padding: 40px; text-align: center; margin: 40px 0; box-shadow: var(--shadow); }
.no-results .search-form { max-width: 420px; margin: 20px auto 0; }

/* ---------- Single post (news-portal layout) ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--c5), var(--c3)); }
.single-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; margin-top: 28px; margin-bottom: 56px; }
.single-article { background: var(--surface); border-radius: var(--radius); padding: 36px 48px 40px; box-shadow: var(--shadow); min-width: 0; }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs span { margin: 0 6px; opacity: .5; }
.entry-title { font-size: clamp(28px, 4vw, 42px); line-height: 1.14; letter-spacing: -.025em; margin: 10px 0 12px; font-weight: 800; }
.entry-dek { font-size: 19px; color: var(--muted); line-height: 1.5; margin: 0 0 20px; }
.byline { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.byline .avatar { border-radius: 50%; width: 44px; height: 44px; }
.byline-text { display: flex; flex-direction: column; line-height: 1.35; }
.byline .author { font-weight: 700; font-size: 15px; }
.byline .author a { color: var(--accent); }
.byline .when { font-size: 13px; color: var(--muted); }
.share { margin-left: auto; display: flex; gap: 8px; }
.share a, .share button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); background: #fff; color: var(--text); cursor: pointer; padding: 0; position: relative; transition: background .15s, color .15s, border-color .15s; }
.share a:hover, .share button:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.share svg { width: 16px; height: 16px; fill: currentColor; }
.copy-link.copied::after { content: "Copied!"; position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.entry-figure { margin: 24px 0 28px; }
.entry-figure img { width: 100%; border-radius: 12px; }
.entry-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.entry-content { font-family: var(--serif); font-size: 19px; line-height: 1.75; max-width: 720px; overflow-wrap: break-word; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.3em; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: var(--sans); line-height: 1.3; letter-spacing: -.01em; margin: 1.8em 0 .6em; }
.entry-content h2 { font-size: 26px; }
.entry-content h3 { font-size: 21px; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content blockquote { border-left: 4px solid var(--accent); margin: 1.6em 0; padding: .3em 0 .3em 1.2em; font-size: 21px; font-style: italic; color: #2b2d45; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.entry-content li { margin-bottom: .45em; }
.entry-content li::marker { color: var(--accent); font-weight: 700; }
.entry-content img { border-radius: 10px; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption, .wp-caption-text { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 6px; }
.entry-content table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; margin: 0 0 1.3em; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--bg); }
.entry-content pre { background: #1e1f33; color: #f1f1f8; padding: 16px; border-radius: 10px; overflow: auto; font-size: 14px; }
.entry-content code { font-size: .88em; }
.entry-content .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.4em; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-footer { margin-top: 32px; }
.post-tags a { display: inline-block; background: var(--bg); border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px; font-size: 13px; margin: 0 6px 8px 0; font-weight: 600; }
.share-row { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-top: 12px; font-weight: 700; font-size: 14px; }
.author-box { display: flex; gap: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, #fff), color-mix(in srgb, var(--c1) 6%, #fff)); border-radius: 12px; padding: 20px; margin: 28px 0 8px; }
.author-box .avatar { border-radius: 50%; flex: none; }
.author-box h3 { margin: 0 0 4px; font-size: 17px; }
.author-box p { margin: 0; color: var(--muted); font-size: 15px; }
.related .post-grid { gap: 18px; }
.related .card { box-shadow: none; border: 1px solid var(--border); }
.related .card-title { font-size: 16px; }
.related .card-excerpt { display: none; }
.single-sidebar { min-width: 0; }
.single-sidebar .trending { position: sticky; top: 88px; }
.admin-bar .single-sidebar .trending { top: 120px; }
.widget { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 24px; }
.widget-title { font-size: 13px; text-transform: uppercase; letter-spacing: .09em; margin: 0 0 12px; color: var(--accent); font-weight: 800; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.widget ul li:last-child { border: 0; }
.trending ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.trending li { counter-increment: t; display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.trending li:last-child { border: 0; padding-bottom: 0; }
.trending li::before { content: counter(t); font-size: 28px; font-weight: 800; line-height: 1; min-width: 22px; color: var(--c0); }
.trending li:nth-child(2)::before { color: var(--c3); }
.trending li:nth-child(3)::before { color: var(--c2); }
.trending li:nth-child(4)::before { color: var(--c1); }
.trending li:nth-child(5)::before { color: var(--c4); }
.trending a { font-weight: 700; font-size: 15px; line-height: 1.35; display: block; margin-bottom: 4px; }

/* ---------- Pages / comments ---------- */
.page-wrap { max-width: 860px; margin: 28px auto 56px; }
.page-wrap .single-article .entry-content { max-width: none; }
.comments-area { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.comments-title, .comment-reply-title { font-size: 20px; margin: 0 0 16px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 24px; }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.comment-author .avatar { border-radius: 50%; }
.comment-metadata { font-size: 12px; color: var(--muted); margin: 2px 0 8px 50px; }
.comment-content { margin-left: 50px; }
.reply { margin-left: 50px; font-size: 13px; font-weight: 700; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font: inherit; background: var(--bg); }
.comment-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.comment-form .submit, .button { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 11px 22px; font-weight: 700; cursor: pointer; font: inherit; font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 36px 0 28px; margin-top: 40px; }
.footer-widgets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.footer-widgets .widget { box-shadow: none; padding: 0; background: transparent; }
.footer-bottom { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 20px; }
.footer-brand { font-weight: 800; font-size: 18px; margin: 0; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.copyright { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.single-wrap { grid-template-columns: minmax(0, 1fr); }
	.single-sidebar .trending { position: static; }
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.home-hero { grid-template-columns: 1fr; }
	.hero-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.single-article { padding: 32px; }
}
@media (max-width: 860px) {
	.menu-toggle { display: flex; }
	.header-search { display: none; }
	.site-branding { flex: 1; }
	.main-nav { position: fixed; top: 64px; left: 0; right: 0; bottom: 0; background: var(--surface); padding: 16px; transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto; z-index: 70; }
	.admin-bar .main-nav { top: 110px; }
	.main-nav.is-open { transform: none; }
	.main-nav ul { flex-direction: column; }
	.main-nav a { font-size: 17px; padding: 12px 14px; border-radius: 10px; }
	.main-nav .sub-menu { position: static; display: flex; box-shadow: none; border: 0; padding: 0 0 0 14px; }
	.mobile-search { display: block; margin-top: 16px; }
	body.nav-open { overflow: hidden; }
	.footer-widgets { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.post-grid, .hero-side { grid-template-columns: minmax(0, 1fr); }
	.single-wrap { margin-top: 0; padding: 0; gap: 24px; }
	.single-sidebar { padding: 0 16px; }
	.single-article { padding: 22px 18px 28px; border-radius: 0; box-shadow: none; }
	.entry-content { font-size: 18px; }
	.share { margin-left: 0; width: 100%; }
	.hero-body { padding: 16px 18px 20px; }
	.author-box { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
