/*
Theme Name: Universal News for GeneratePress
Theme URI: https://example.com/universal-news-gp
Description: A fast, image-optional universal news child theme for GeneratePress 3.6.1. Includes category-controlled homepage blocks, boxed spacing, a full-width homepage and an optional category-driven post sidebar.
Author: Universal News
Version: 1.1.0
Template: generatepress
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: universal-news-gp
Tags: news, blog, custom-logo, custom-menu, featured-images, right-sidebar, translation-ready
*/

:root {
	--unbgp-accent: #c9182b;
	--unbgp-dark: #101820;
	--unbgp-muted: #5c6673;
	--unbgp-border: #dfe3e8;
	--unbgp-soft: #f4f6f8;
	--unbgp-card: #ffffff;
	--unbgp-radius: 8px;
	--unbgp-content-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	background: var(--unbgp-soft);
	color: var(--unbgp-dark);
	font-family: -apple-system, BlinkMacSystemFont, "Noto Sans Kannada", "Noto Sans", "Segoe UI", Arial, sans-serif;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

a { text-underline-offset: .16em; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
	outline: 3px solid #1769d2;
	outline-offset: 3px;
}

.grid-container { max-width: var(--unbgp-content-width); }

.site-header {
	border-bottom: 1px solid var(--unbgp-border);
	background: #fff;
}

.inside-header {
	min-height: 116px;
	padding: 22px 20px;
}

.site-logo .header-image {
	display: block;
	width: auto;
	max-width: min(420px, 72vw);
	max-height: 72px;
}

.site-branding .main-title {
	font-size: clamp(1.65rem, 3vw, 2.35rem);
	font-weight: 800;
	letter-spacing: -.035em;
}

.site-branding .site-description { color: var(--unbgp-muted); }

.main-navigation {
	border-bottom: 1px solid var(--unbgp-border);
	background: #fff;
}

.main-navigation .inside-navigation {
	max-width: var(--unbgp-content-width);
	padding-inline: 20px;
}

.main-navigation .main-nav ul li a,
.menu-toggle,
.main-navigation .menu-bar-item > a {
	color: var(--unbgp-dark);
	font-weight: 750;
	line-height: 52px;
}

.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li:focus-within > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
	background: transparent;
	color: var(--unbgp-accent);
}

.site-content { padding: 24px 20px 42px; }

.unbgp-home-content {
	width: 100%;
	max-width: none;
}

.unbgp-auto-lead {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(280px, .9fr);
	gap: 20px;
	align-items: stretch;
}

.unbgp-auto-lead.is-single { grid-template-columns: 1fr; }

.unbgp-lead-card,
.unbgp-stack-card,
.unbgp-section-card,
.unbgp-single-sidebar-box,
.single .inside-article,
.page .inside-article,
.archive .inside-article,
.search .inside-article {
	border: 1px solid var(--unbgp-border);
	border-radius: var(--unbgp-radius);
	background: var(--unbgp-card);
	box-shadow: 0 2px 8px rgba(16, 24, 32, .045);
}

.unbgp-lead-card {
	min-height: 300px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(24px, 4vw, 48px);
	border-top: 5px solid var(--unbgp-accent);
}

.unbgp-auto-lead.is-single .unbgp-lead-card { min-height: 220px; }

.unbgp-lead-title {
	max-width: 820px;
	margin: .55rem 0 .85rem;
	font-size: clamp(2rem, 4.2vw, 3.65rem);
	line-height: 1.08;
	letter-spacing: -.04em;
}

.unbgp-lead-title a,
.unbgp-stack-card h2 a,
.unbgp-auto-story h3 a,
.unbgp-single-sidebar-box h3 a {
	color: var(--unbgp-dark);
	text-decoration: none;
}

.unbgp-lead-title a:hover,
.unbgp-stack-card h2 a:hover,
.unbgp-auto-story h3 a:hover,
.unbgp-single-sidebar-box h3 a:hover { color: var(--unbgp-accent); }

.unbgp-lead-excerpt {
	max-width: 700px;
	margin: 0 0 1rem;
	color: var(--unbgp-muted);
	font-size: 1.05rem;
}

.unbgp-lead-stack { display: grid; gap: 12px; }

.unbgp-stack-card {
	padding: 16px 18px;
	border-left: 4px solid var(--unbgp-dark);
}

.unbgp-stack-card:hover { border-left-color: var(--unbgp-accent); }

.unbgp-stack-card h2 {
	margin: .3rem 0 .6rem;
	font-size: clamp(1.02rem, 1.5vw, 1.22rem);
	line-height: 1.28;
}

.unbgp-home-sections {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin-top: 20px;
}

.unbgp-section-card { padding: clamp(18px, 2.5vw, 28px); }
.unbgp-section-card.is-wide { margin-top: 20px; }

.unbgp-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: .25rem;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--unbgp-dark);
}

.unbgp-section-head h2,
.unbgp-single-sidebar-box > h2 {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 9px;
	color: var(--unbgp-dark);
	font-size: clamp(1.3rem, 2vw, 1.7rem);
}

.unbgp-section-head h2::before,
.unbgp-single-sidebar-box > h2::before {
	content: "";
	width: 6px;
	height: 1.15em;
	flex: 0 0 6px;
	background: var(--unbgp-accent);
}

.unbgp-section-head > a {
	flex: 0 0 auto;
	color: var(--unbgp-muted);
	font-size: .78rem;
	font-weight: 750;
	text-decoration: none;
}

.unbgp-auto-story {
	padding: 15px 0;
	border-bottom: 1px solid var(--unbgp-border);
}

.unbgp-auto-story:last-child { border-bottom: 0; }

.unbgp-auto-story h3 {
	margin: .3rem 0 .55rem;
	font-size: clamp(1rem, 1.4vw, 1.17rem);
	line-height: 1.32;
}

.unbgp-auto-list.is-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 32px;
}

.unbgp-kicker {
	color: var(--unbgp-accent);
	font-size: .76rem;
	font-weight: 800;
	letter-spacing: .045em;
	text-decoration: none;
	text-transform: uppercase;
}

.unbgp-meta {
	color: var(--unbgp-muted);
	font-size: .76rem;
	letter-spacing: .025em;
	text-transform: uppercase;
}

.unbgp-empty-block {
	padding: 20px;
	border: 1px dashed #aeb6c0;
	border-radius: var(--unbgp-radius);
	background: #fff;
	color: var(--unbgp-muted);
}

/* Compact newspaper homepage blocks. The visual structure is fixed; editors
   only choose each block's name and category in the Customizer. */
.unbgp-newspaper-section {
	padding: clamp(18px, 2.5vw, 28px);
	border: 1px solid var(--unbgp-border);
	border-radius: var(--unbgp-radius);
	background: var(--unbgp-card);
	box-shadow: 0 2px 8px rgba(16, 24, 32, .04);
}

.unbgp-newspaper-section + .unbgp-newspaper-section,
.unbgp-compact-grid + .unbgp-newspaper-section,
.unbgp-newspaper-section + .unbgp-compact-grid { margin-top: 20px; }

.unbgp-newspaper-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 18px;
	padding-bottom: 9px;
	border-bottom: 1px solid #aeb5bd;
}

.unbgp-newspaper-head h2 {
	margin: 0;
	color: var(--unbgp-accent);
	font-size: .82rem;
	font-weight: 850;
	letter-spacing: .04em;
	line-height: 1.2;
	text-transform: uppercase;
}

.unbgp-newspaper-head a {
	color: var(--unbgp-muted);
	font-size: .74rem;
	font-weight: 750;
	text-decoration: none;
}

.unbgp-feature-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.45fr) minmax(260px, .8fr);
	gap: clamp(20px, 3vw, 34px);
	align-items: start;
}

.unbgp-feature-story {
	min-width: 0;
	padding-right: clamp(18px, 2.5vw, 30px);
	border-right: 1px solid var(--unbgp-border);
}

.unbgp-feature-story h1,
.unbgp-feature-story h3 {
	margin: .4rem 0 .7rem;
	line-height: 1.22;
	letter-spacing: -.025em;
}

.unbgp-feature-story h1 { font-size: clamp(1.7rem, 3.4vw, 3rem); }
.unbgp-feature-story h3 { font-size: clamp(1.3rem, 2.2vw, 2rem); }

.unbgp-feature-story h1 a,
.unbgp-feature-story h3 a,
.unbgp-headline-item h3 a,
.unbgp-compact-story h3 a {
	color: var(--unbgp-dark);
	text-decoration: none;
}

.unbgp-feature-story h1 a:hover,
.unbgp-feature-story h3 a:hover,
.unbgp-headline-item h3 a:hover,
.unbgp-compact-story h3 a:hover { color: var(--unbgp-accent); }

.unbgp-feature-media {
	overflow: hidden;
	margin-top: 16px;
	border-radius: max(2px, calc(var(--unbgp-radius) - 2px));
	aspect-ratio: 16 / 9;
	background: #e9edf1;
}

.unbgp-feature-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.unbgp-feature-excerpt {
	margin: .7rem 0 0;
	color: var(--unbgp-muted);
	font-size: .94rem;
	line-height: 1.55;
}

.unbgp-headline-list { min-width: 0; }

.unbgp-headline-item {
	padding: 0 0 13px;
	margin: 0 0 13px;
	border-bottom: 1px solid var(--unbgp-border);
}

.unbgp-headline-item:last-child {
	padding-bottom: 0;
	margin-bottom: 0;
	border-bottom: 0;
}

.unbgp-headline-item h3 {
	margin: .24rem 0 .4rem;
	font-size: clamp(.96rem, 1.25vw, 1.08rem);
	line-height: 1.3;
}

.unbgp-compact-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin-top: 20px;
}

.unbgp-compact-card { min-width: 0; }
.unbgp-compact-grid > .unbgp-newspaper-section { margin-top: 0; }

.unbgp-compact-story {
	padding: 0 0 13px;
	margin: 0 0 13px;
	border-bottom: 1px solid var(--unbgp-border);
}

.unbgp-compact-story:last-child {
	padding-bottom: 0;
	margin-bottom: 0;
	border-bottom: 0;
}

.unbgp-compact-story h3 {
	margin: .28rem 0 .45rem;
	font-size: clamp(.98rem, 1.4vw, 1.14rem);
	line-height: 1.34;
}

.single .site-content { align-items: flex-start; }

.single .inside-article { padding: clamp(24px, 4vw, 48px); }

.single .entry-title {
	font-size: clamp(2rem, 4vw, 3.35rem);
	line-height: 1.12;
	letter-spacing: -.035em;
}

.single .entry-meta { color: var(--unbgp-muted); }

.single .featured-image,
.single .post-image {
	overflow: hidden;
	aspect-ratio: 16 / 9;
	margin-top: 24px;
	background: #e9edf1;
}

.single .featured-image img,
.single .post-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.single .entry-content {
	font-size: clamp(1.05rem, 1.3vw, 1.18rem);
	line-height: 1.78;
}

.single .entry-content > * { max-width: 760px; }
.single .entry-content > .alignwide { max-width: 980px; }
.single .entry-content > .alignfull { max-width: none; }

.unbgp-author-box {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 16px;
	align-items: start;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid var(--unbgp-border);
}

.unbgp-author-box img { border-radius: 50%; }
.unbgp-author-box h2 { margin: 0 0 5px; font-size: 1.1rem; }
.unbgp-author-box p { margin: 0; color: var(--unbgp-muted); }

.unbgp-single-sidebar-box { padding: 20px; }
.unbgp-single-sidebar-box > h2 { margin-bottom: 4px; }

.unbgp-single-sidebar-box article {
	padding: 15px 0;
	border-bottom: 1px solid var(--unbgp-border);
}

.unbgp-single-sidebar-box article:last-child { border-bottom: 0; }

.unbgp-single-sidebar-box h3 {
	margin: .25rem 0 .5rem;
	font-size: 1rem;
	line-height: 1.32;
}

.widget-area .inside-right-sidebar { position: sticky; top: 20px; }

.site-footer { border-top: 4px solid var(--unbgp-accent); }
.site-info { background: var(--unbgp-dark); color: #fff; }
.site-info a { color: #fff; }

@media (max-width: 900px) {
	.unbgp-auto-lead,
	.unbgp-home-sections,
	.unbgp-feature-layout { grid-template-columns: 1fr; }
	.unbgp-lead-card { min-height: 240px; }
	.unbgp-feature-story { padding-right: 0; padding-bottom: 20px; border-right: 0; border-bottom: 1px solid var(--unbgp-border); }
	.widget-area .inside-right-sidebar { position: static; }
}

@media (max-width: 640px) {
	.inside-header { min-height: 92px; padding-block: 16px; }
	.site-content { padding: 16px 12px 30px; }
	.unbgp-auto-list.is-grid { grid-template-columns: 1fr; }
	.unbgp-compact-grid { grid-template-columns: 1fr; gap: 16px; }
	.unbgp-lead-card,
	.unbgp-section-card,
	.unbgp-newspaper-section,
	.single .inside-article { padding: 20px; }
	.unbgp-lead-title { font-size: clamp(1.8rem, 9vw, 2.65rem); }
	.unbgp-section-head { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
