/*
Theme Name: MiniMag 2026
Theme URI: http://localhost/pbn2026/pbn3/
Author: Codex
Description: Lightweight modern editorial WordPress theme for PBN news and magazine sites.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: minimag-2026
*/

:root {
	--bg: #ffffff;
	--bg-soft: #f7f7f7;
	--text: #111111;
	--muted: #666666;
	--border: #e5e5e5;
	--accent: #e53935;
	--footer-bg: #081a2b;
	--footer-text: rgba(255, 255, 255, 0.9);
	--footer-muted: rgba(255, 255, 255, 0.62);
	--finance: #1e7f4f;
	--technology: #2d67c8;
	--sports: #1f7a43;
	--games: #7552c7;
	--society: #d7792f;
	--lifestyle: #d46b9c;
	--container: 1280px;
	--radius: 18px;
	--shadow: 0 10px 30px rgba(8, 26, 43, 0.06);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.7;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	color: var(--accent);
}

button,
input,
textarea {
	font: inherit;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.site-shell {
	min-height: 100vh;
}

.container {
	width: min(calc(100% - 32px), var(--container));
	margin: 0 auto;
}

.site-topbar {
	background: var(--bg-soft);
	border-bottom: 1px solid var(--border);
	font-size: 0.84rem;
	color: var(--muted);
}

.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 9px 0;
}

.topbar-links,
.topbar-social {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
}

.topbar-social a,
.follow-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 999px;
	background: rgba(8, 26, 43, 0.06);
	font-size: 0.82rem;
	font-weight: 700;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}

.header-inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 18px;
	padding: 18px 0;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.custom-logo-link img {
	max-height: 48px;
	width: auto;
}

.site-title {
	margin: 0;
	font-size: 1.3rem;
	font-weight: 800;
	letter-spacing: -0.03em;
}

.site-title a {
	color: var(--text);
}

.site-description {
	margin: 3px 0 0;
	font-size: 0.86rem;
	color: var(--muted);
}

.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--bg);
	cursor: pointer;
}

.nav-toggle svg,
.header-icon svg {
	width: 18px;
	height: 18px;
}

.primary-nav {
	min-width: 0;
}

.primary-menu,
.footer-menu,
.footer-category-links,
.footer-partner-links,
.social-follow-list,
.popular-list,
.list-card-meta,
.utility-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.primary-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 20px;
}

.primary-menu a {
	font-size: 0.96rem;
	color: var(--muted);
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.header-icon,
.button-ghost,
.button-primary,
.newsletter-button,
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--bg);
}

.button-primary,
.newsletter-button,
.pagination .current {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.site-main {
	padding: 28px 0 44px;
}

.block-card,
.hero-card,
.post-list-card,
.sidebar-block,
.category-card,
.single-card,
.archive-header,
.not-found-card,
.page-card,
.widget {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
	box-shadow: var(--shadow);
}

.block-card,
.sidebar-block,
.archive-header,
.not-found-card,
.page-card,
.single-card,
.widget {
	padding: 22px;
}

.section-heading,
.archive-title,
.single-title,
.page-title {
	margin: 0 0 14px;
	line-height: 1.16;
	letter-spacing: -0.03em;
}

.section-heading {
	font-size: 1.35rem;
}

.archive-title,
.single-title,
.page-title {
	font-size: clamp(1.9rem, 2.8vw, 3rem);
}

.section-subtitle,
.archive-description,
.single-meta,
.post-card-excerpt,
.popular-date,
.newsletter-copy,
.footer-copy,
.footer-contact,
.footer-about,
.muted {
	color: var(--muted);
}

.front-layout {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.hero-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.95fr);
	gap: 22px;
}

.hero-stack {
	display: grid;
	gap: 22px;
}

.hero-card {
	position: relative;
	min-height: 280px;
	overflow: hidden;
	color: #fff;
	background: #081a2b;
}

.hero-card-large {
	min-height: 520px;
}

.hero-card-small {
	min-height: 248px;
}

.hero-card img,
.hero-placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero-placeholder {
	background: linear-gradient(135deg, #0b2440, #1e3a5c);
}

.hero-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(8, 26, 43, 0.08), rgba(8, 26, 43, 0.88));
}

.hero-content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 24px;
}

.hero-title {
	margin: 0 0 10px;
	font-size: clamp(1.4rem, 2vw, 2.5rem);
	line-height: 1.2;
}

.hero-card-small .hero-title {
	font-size: 1.24rem;
}

.hero-meta {
	margin: 0;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.9rem;
}

.badge {
	display: inline-flex;
	align-items: center;
	padding: 5px 10px;
	margin-bottom: 12px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1;
}

.badge-finance { background: rgba(30, 127, 79, 0.12); color: var(--finance); }
.badge-technology { background: rgba(45, 103, 200, 0.12); color: var(--technology); }
.badge-sports { background: rgba(31, 122, 67, 0.12); color: var(--sports); }
.badge-games { background: rgba(117, 82, 199, 0.12); color: var(--games); }
.badge-society { background: rgba(215, 121, 47, 0.12); color: var(--society); }
.badge-lifestyle { background: rgba(212, 107, 156, 0.14); color: var(--lifestyle); }
.badge-default { background: rgba(8, 26, 43, 0.08); color: var(--text); }

.latest-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 28px;
	align-items: start;
}

.post-list {
	display: grid;
	gap: 18px;
}

.post-list-card {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 20px;
	padding: 16px;
	overflow: hidden;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.post-list-card:hover,
.category-card:hover,
.sidebar-block:hover {
	border-color: #d8d8d8;
	transform: translateY(-1px);
}

.post-list-thumb,
.card-thumb-placeholder {
	width: 100%;
	height: 170px;
	object-fit: cover;
	border-radius: 14px;
	background: linear-gradient(135deg, #edf1f4, #dce3ea);
}

.post-card-title {
	margin: 0 0 8px;
	font-size: 1.24rem;
	line-height: 1.32;
}

.post-card-meta {
	margin: 0 0 8px;
	font-size: 0.88rem;
	color: var(--muted);
}

.post-card-excerpt {
	margin: 0;
	font-size: 0.95rem;
}

.sidebar-wrap {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.sidebar-title,
.widget-title {
	margin: 0 0 14px;
	font-size: 1rem;
	letter-spacing: -0.02em;
}

.social-follow-list,
.popular-list {
	display: grid;
	gap: 12px;
}

.follow-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid var(--border);
	border-radius: 14px;
	background: var(--bg-soft);
}

.follow-main {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.follow-name {
	display: block;
	font-weight: 700;
	line-height: 1.2;
}

.follow-subtitle {
	display: block;
	font-size: 0.82rem;
	color: var(--muted);
}

.newsletter-copy {
	margin: 0 0 14px;
	font-size: 0.93rem;
}

.newsletter-form {
	display: grid;
	gap: 10px;
}

.newsletter-field {
	width: 100%;
	min-height: 46px;
	padding: 0 14px;
	border: 1px solid var(--border);
	border-radius: 14px;
	background: var(--bg-soft);
}

.popular-item a {
	display: grid;
	grid-template-columns: 28px 72px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
}

.popular-rank {
	font-weight: 800;
	font-size: 1rem;
	color: var(--accent);
}

.popular-thumb,
.popular-thumb-placeholder {
	width: 72px;
	height: 58px;
	object-fit: cover;
	border-radius: 12px;
	background: linear-gradient(135deg, #edf1f4, #dce3ea);
}

.popular-title {
	display: block;
	font-weight: 700;
	line-height: 1.3;
}

.ad-box {
	padding: 18px;
	border-radius: 16px;
	background: linear-gradient(135deg, #081a2b, #163a5d);
	color: #fff;
}

.ad-box p {
	margin: 10px 0 0;
	color: rgba(255, 255, 255, 0.78);
}

.categories-section {
	display: grid;
	gap: 18px;
}

.category-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.category-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 22px;
}

.category-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: 16px;
	background: var(--bg-soft);
	font-size: 1.3rem;
}

.category-card h3 {
	margin: 0;
	font-size: 1.08rem;
}

.category-card p {
	margin: 0;
	color: var(--muted);
	font-size: 0.92rem;
}

.category-link {
	font-weight: 700;
}

.archive-layout,
.single-layout,
.page-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 28px;
	align-items: start;
}

.archive-header {
	margin-bottom: 22px;
}

.pagination {
	display: flex;
	justify-content: center;
	margin-top: 28px;
}

.pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.single-card {
	padding: 26px;
}

.single-header {
	margin-bottom: 20px;
}

.single-featured {
	margin-bottom: 22px;
}

.single-featured img {
	width: 100%;
	border-radius: 18px;
}

.single-content h2,
.single-content h3,
.single-content h4 {
	line-height: 1.28;
	letter-spacing: -0.02em;
}

.single-content blockquote {
	margin: 24px 0;
	padding: 18px 20px;
	border-left: 4px solid var(--accent);
	background: var(--bg-soft);
	border-radius: 0 16px 16px 0;
}

.single-content table {
	width: 100%;
	border-collapse: collapse;
}

.single-content th,
.single-content td {
	padding: 10px 12px;
	border: 1px solid var(--border);
}

.single-tags,
.single-post-nav,
.single-related {
	margin-top: 20px;
}

.single-tags-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.single-tags-cloud a {
	display: inline-flex;
	padding: 6px 11px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--bg-soft);
	font-size: 0.82rem;
	color: var(--muted);
}

.single-post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.single-post-nav-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.single-post-nav-next {
	text-align: right;
}

.single-post-nav-label,
.single-related-note {
	font-size: 0.82rem;
	color: var(--muted);
}

.single-post-nav-link a {
	font-weight: 700;
	line-height: 1.4;
}

.related-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.post-grid-card {
	overflow: hidden;
}

.post-grid-card .post-card-body {
	padding: 16px;
}

.post-grid-card h3 {
	margin: 0 0 8px;
	font-size: 1rem;
	line-height: 1.34;
}

.site-footer {
	margin-top: 10px;
	padding: 48px 0 36px;
	background: var(--footer-bg);
	color: var(--footer-text);
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.2fr 1fr 1fr 1fr;
	gap: 24px;
}

.footer-title {
	margin: 0 0 12px;
	font-size: 1rem;
	color: #fff;
}

.footer-about,
.footer-contact,
.footer-copy {
	color: var(--footer-muted);
}

.footer-menu,
.footer-category-links,
.footer-partner-links {
	display: grid;
	gap: 8px;
}

.footer-menu a,
.footer-category-links a,
.footer-partner-links a {
	color: var(--footer-muted);
}

.footer-bottom {
	margin-top: 28px;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	text-align: center;
}

@media (max-width: 1080px) {
	.hero-layout,
	.latest-layout,
	.archive-layout,
	.single-layout,
	.page-layout {
		grid-template-columns: 1fr;
	}

	.hero-card-large {
		min-height: 420px;
	}

	.footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.header-inner {
		grid-template-columns: auto 1fr auto auto;
	}

	.nav-toggle {
		display: inline-flex;
	}

	.primary-nav {
		display: none;
		grid-column: 1 / -1;
		padding-top: 8px;
	}

	.primary-nav.is-open {
		display: block;
	}

	.primary-menu {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}

	.hero-layout,
	.category-grid,
	.related-grid {
		grid-template-columns: 1fr;
	}

	.post-list-card {
		grid-template-columns: 1fr;
	}

	.post-list-thumb,
	.card-thumb-placeholder {
		height: 210px;
	}
}

@media (max-width: 680px) {
	.container {
		width: min(calc(100% - 24px), var(--container));
	}

	.topbar-inner,
	.header-actions,
	.topbar-links {
		flex-wrap: wrap;
	}

	.site-description,
	.button-primary span {
		display: none;
	}

	.single-post-nav,
	.footer-grid {
		grid-template-columns: 1fr;
	}

	.single-post-nav-next {
		text-align: left;
	}
}

