/*
Theme Name:  Newspress Pro
Theme URI:   https://example.com/newspress-pro
Author:      Nilesh Khodke
Description: Multi-niche WordPress theme — News, Magazine, Blog, Tech. Fully customizer-controlled. Multisite ready. RankMath compatible. Block editor supported.
Version:     2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License:     GNU General Public License v2 or later
Text Domain: newspress-pro
*/

/* ============================================================
   CSS CUSTOM PROPERTIES (set by Customizer via wp_add_inline_style)
   These are the defaults — Customizer overrides them dynamically
   ============================================================ */
:root {
	--color-primary:       #d62828;
	--color-primary-dark:  #b01f1f;
	--color-header-bg:     #ffffff;
	--color-header-text:   #111111;
	--color-footer-bg:     #111111;
	--color-footer-text:   #ffffff;
	--color-body-bg:       #f7f7f7;
	--color-body-text:     #111111;
	--color-muted:         #666666;
	--color-border:        #eeeeee;
	--color-card-bg:       #ffffff;
	--color-sidebar-bg:    #fafafa;

	--font-family:         "Inter", system-ui, -apple-system, sans-serif;
	--font-size-base:      16px;
	--font-size-sm:        13px;
	--font-size-lg:        18px;
	--font-size-xl:        22px;
	--font-size-2xl:       28px;
	--font-size-3xl:       34px;

	--line-height-body:    1.75;
	--line-height-heading: 1.3;

	--radius-sm:    6px;
	--radius-md:    10px;
	--radius-lg:    14px;
	--radius-full:  999px;

	--shadow-card:  0 2px 8px rgba(0,0,0,.06);
	--shadow-hover: 0 10px 28px rgba(0,0,0,.10);

	--header-height:   64px;
	--logo-height:     50px;
	--container-max:   1200px;
	--sidebar-width:   320px;
	--gap:             20px;
	--grid-cols:       4;

	--transition: 0.22s ease;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
	font-family:     var(--font-family);
	font-size:       var(--font-size-base);
	line-height:     var(--line-height-body);
	color:           var(--color-body-text);
	background:      var(--color-body-bg);
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4, h5, h6 {
	line-height: var(--line-height-heading);
	font-weight: 700;
	color: var(--color-body-text);
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0,0,0,0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -40px; left: 0;
	padding: 8px 16px;
	background: var(--color-primary);
	color: #fff;
	z-index: 10000;
	transition: top var(--transition);
}
.skip-link:focus { top: 0; }

:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 3px;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: 16px;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
	background: #f4f4f4;
	font-size: var(--font-size-sm);
	padding-block: 5px;
	border-bottom: 1px solid var(--color-border);
}
.top-bar ul { display: flex; gap: 16px; flex-wrap: wrap; }
.top-bar a { color: #444; }
.top-bar a:hover { color: var(--color-primary); }

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
	background: var(--color-header-bg);
	color: var(--color-header-text);
	border-bottom: 1px solid var(--color-border);
	box-shadow: 0 2px 6px rgba(0,0,0,.04);
	z-index: 900;
}
.site-header.is-sticky {
	position: sticky;
	top: 0;
}

.header-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-block: 10px;
}

/* Logo */
.logo a { display: inline-flex; align-items: center; }
.logo img,
.logo .custom-logo { height: var(--logo-height); width: auto; }
.logo .site-name {
	font-size: var(--font-size-xl);
	font-weight: 800;
	color: var(--color-header-text);
	letter-spacing: -0.02em;
}

/* Desktop search */
.desktop-search-box { flex: 1; max-width: 360px; margin-left: auto; }

.header-search-form { position: relative; width: 100%; }

.header-search-form input[type="search"] {
	width: 100%;
	height: 42px;
	padding: 0 14px 0 40px;
	border: 1px solid #ddd;
	border-radius: var(--radius-md);
	background: #f9f9f9;
	font-size: 14px;
	color: var(--color-body-text);
	transition: border-color var(--transition), background var(--transition);
}
.header-search-form input[type="search"]:focus {
	border-color: var(--color-primary);
	background: #fff;
	outline: none;
}

.header-search-icon-btn {
	position: absolute;
	top: 50%; left: 10px;
	transform: translateY(-50%);
	width: 24px; height: 24px;
	border: 0; background: transparent; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
	color: #888; z-index: 2;
}
.header-search-icon-btn:hover { color: var(--color-primary); }

/* Mobile buttons */
.mobile-header-right {
	display: none;
	align-items: center;
	gap: 8px;
}

.mobile-search-toggle,
.menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px; height: 42px;
	padding: 0;
	border: 1px solid #ddd;
	border-radius: var(--radius-md);
	background: #fff;
	color: var(--color-body-text);
}
.mobile-search-toggle:hover,
.menu-toggle:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* Mobile search bar */
.mobile-search-bar {
	border-top: 1px solid var(--color-border);
	background: #fff;
}
.mobile-search-bar[hidden] { display: none; }
.mobile-search-bar:not([hidden]) { display: block; }
.mobile-search-inner { padding-block: 12px; }
.mobile-search-bar .header-search-form input[type="search"] {
	height: 44px;
	background: #fff;
}

/* Primary menu */
.primary-menu {
	border-top: 1px solid var(--color-border);
}
.primary-menu ul {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	padding-block: 4px;
}
.primary-menu li { position: relative; }
.primary-menu a {
	display: block;
	padding: 6px 12px;
	font-size: 14px;
	font-weight: 500;
	color: var(--color-header-text);
	border-radius: var(--radius-sm);
}
.primary-menu a:hover,
.primary-menu .current-menu-item > a { color: var(--color-primary); }

/* Dropdown */
.primary-menu ul ul {
	display: none;
	position: absolute;
	top: 100%; left: 0;
	min-width: 200px;
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-hover);
	padding: 6px;
	z-index: 500;
	flex-direction: column;
	gap: 2px;
}
.primary-menu li:hover > ul,
.primary-menu li:focus-within > ul { display: flex; }
.primary-menu ul ul a { font-size: 13px; white-space: nowrap; }

/* ============================================================
   BREAKING NEWS TICKER
   ============================================================ */
.breaking-news-bar {
	background: var(--color-primary);
	color: #fff;
	padding-block: 8px;
	overflow: hidden;
}
.breaking-news-bar .container {
	display: flex;
	align-items: center;
	gap: 14px;
}
.breaking-label {
	flex-shrink: 0;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	background: rgba(0,0,0,.25);
	padding: 3px 10px;
	border-radius: var(--radius-full);
}
.breaking-ticker { overflow: hidden; flex: 1; }
.ticker-list {
	display: flex;
	gap: 40px;
	animation: ticker-scroll 30s linear infinite;
	white-space: nowrap;
}
.ticker-list:hover { animation-play-state: paused; }
.ticker-list li { flex-shrink: 0; }
.ticker-list a { color: #fff; font-size: 13px; font-weight: 500; }
.ticker-list a:hover { text-decoration: underline; }

@keyframes ticker-scroll {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

/* ============================================================
   GRID
   ============================================================ */
.grid {
	display: grid;
	grid-template-columns: repeat(var(--grid-cols), 1fr);
	gap: var(--gap);
}

@media (max-width: 1023px) { .grid { --grid-cols: 2; } }
@media (max-width: 599px)  { .grid { --grid-cols: 1; } }

/* ============================================================
   POST CARD
   ============================================================ */
.post-card {
	background: var(--color-card-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-card);
	transition: transform var(--transition), box-shadow var(--transition);
	display: flex;
	flex-direction: column;
}
.post-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-hover);
}

.post-card > a:first-child { /* image link */
	display: block;
	position: relative;
	overflow: hidden;
	aspect-ratio: 16/9;
	background: #eee;
}
.post-card > a:first-child img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.post-card:hover > a:first-child img { transform: scale(1.04); }

.post-card-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; }

.post-card-title {
	font-size: 16px;
	line-height: 1.45;
	font-weight: 700;
	margin-bottom: 8px;
	flex: 1;
}
.post-card-title a { color: var(--color-body-text); }
.post-card-title a:hover { color: var(--color-primary); }

.post-badge {
	position: absolute;
	top: 10px; left: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #fff;
	border-radius: var(--radius-full);
}
.post-badge.new       { background: var(--color-primary); }
.post-badge.trending  { background: #111; }

/* ============================================================
   POST META
   ============================================================ */
.post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	font-size: var(--font-size-sm);
	color: var(--color-muted);
}
.post-meta a { color: var(--color-muted); }
.post-meta a:hover { color: var(--color-primary); }
.post-meta span + span::before {
	content: "•";
	margin-right: 12px;
	color: #ccc;
}

/* ============================================================
   LAYOUT: 2-COLUMN
   ============================================================ */
.layout-2col {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
	gap: 28px;
	align-items: start;
	padding-block: 20px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
	background: var(--color-sidebar-bg);
	border-radius: var(--radius-lg);
	padding: 0;
	position: sticky;
	top: calc(var(--header-height) + 12px);
	max-height: calc(100vh - var(--header-height) - 24px);
	overflow-y: auto;
	overflow-x: hidden;
}

.widget {
	background: var(--color-card-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: 18px;
	margin-bottom: 16px;
}
.widget:last-child { margin-bottom: 0; }

.widget-title {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--color-primary);
	color: var(--color-body-text);
}

.widget ul li {
	padding: 6px 0;
	border-bottom: 1px solid var(--color-border);
	font-size: 14px;
}
.widget ul li:last-child { border-bottom: 0; padding-bottom: 0; }
.widget ul a:hover { color: var(--color-primary); }

/* ============================================================
   ARCHIVE / CATEGORY
   ============================================================ */
.archive-layout {
	display: grid;
	gap: 28px;
	align-items: start;
	padding-block: 20px;
}
.archive-layout.has-sidebar {
	grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
}
.archive-layout-full { grid-template-columns: 1fr; }

.archive-content { min-width: 0; }

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

.archive-title {
	font-size: var(--font-size-2xl);
	font-weight: 800;
	color: var(--color-body-text);
	margin-bottom: 6px;
}
.archive-description {
	font-size: 15px;
	color: var(--color-muted);
	line-height: 1.7;
}

/* Archive grid overrides */
.archive-layout.has-sidebar .archive-grid {
	grid-template-columns: repeat(3, 1fr);
}
.archive-layout-full .archive-grid {
	grid-template-columns: repeat(4, 1fr);
}

/* ============================================================
   HOME SECTIONS
   ============================================================ */
.home-section { margin-bottom: 36px; padding-block-start: 4px; }

.home-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 16px;
}
.section-title {
	font-size: var(--font-size-xl);
	font-weight: 800;
	color: var(--color-body-text);
	position: relative;
	padding-left: 14px;
}
.section-title::before {
	content: "";
	position: absolute;
	left: 0; top: 10%; bottom: 10%;
	width: 4px;
	background: var(--color-primary);
	border-radius: 2px;
}
.section-link {
	font-size: 13px;
	font-weight: 600;
	color: var(--color-primary);
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.section-link:hover { text-decoration: underline; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-content-area { min-width: 0; padding-block: 20px; }

.single-post-layout { max-width: 860px; }

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

.single-title {
	font-size: var(--font-size-3xl);
	font-weight: 800;
	line-height: 1.2;
	color: var(--color-body-text);
	margin-bottom: 14px;
}
.single-excerpt {
	font-size: 17px;
	line-height: 1.7;
	color: #444;
	padding-left: 14px;
	border-left: 3px solid var(--color-primary);
	margin-bottom: 16px;
}
.single-featured-image { margin-block: 20px 26px; }
.single-featured-image img { border-radius: var(--radius-lg); width: 100%; }

/* ── Content typography ── */
.entry-content,
.single-content {
	font-size: 18px;
	line-height: 1.85;
	color: #222;
	word-break: break-word;
	overflow-wrap: break-word;
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child  { margin-bottom: 0; }
.entry-content p   { margin-bottom: 20px; }
.entry-content h2  { font-size: 28px;  margin: 36px 0 16px; color: var(--color-body-text); }
.entry-content h3  { font-size: 22px;  margin: 28px 0 14px; color: var(--color-body-text); border-left: none; padding-left: 0; }
.entry-content h4  { font-size: 18px;  margin: 24px 0 12px; }
.entry-content ul  { list-style: disc;    margin: 0 0 20px 22px; }
.entry-content ol  { list-style: decimal; margin: 0 0 20px 22px; }
.entry-content li  { margin-bottom: 10px; line-height: 1.8; }
.entry-content a   { text-decoration: underline; text-underline-offset: 3px; color: var(--color-primary); }
.entry-content a:hover { color: var(--color-primary-dark); }

.entry-content blockquote {
	margin: 28px 0;
	padding: 18px 20px;
	border-left: 4px solid var(--color-primary);
	background: #fef5f5;
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	font-style: italic;
	font-size: 17px;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content figure  { margin: 28px 0; }
.entry-content img     { border-radius: var(--radius-md); max-width: 100%; height: auto; }
.entry-content figcaption,
.entry-content .wp-caption-text {
	font-size: 13px; color: #888; text-align: center; margin-top: 8px;
}

.entry-content table {
	width: 100%; border-collapse: collapse; margin: 24px 0;
	display: block; overflow-x: auto;
}
.entry-content th,
.entry-content td { border: 1px solid #ddd; padding: 10px 14px; text-align: left; font-size: 15px; }
.entry-content th { background: #f5f5f5; font-weight: 700; }

.entry-content pre {
	max-width: 100%; overflow-x: auto;
	padding: 16px 18px;
	background: #1e1e1e; color: #d4d4d4;
	border-radius: var(--radius-md);
	font-size: 14px; line-height: 1.6;
}
.entry-content code {
	background: #f4f4f4; padding: 2px 6px; border-radius: 4px; font-size: .9em;
}
.entry-content pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

/* ── Gutenberg blocks ── */
.entry-content .wp-block-image,
.entry-content .wp-block-embed,
.entry-content .wp-block-gallery,
.entry-content .wp-block-table { margin-block: 28px; }

.entry-content .alignwide  { margin-inline: -40px; }
.entry-content .alignfull  { margin-inline: calc(50% - 50vw); }
.entry-content .alignleft  { float: left; margin: 8px 20px 8px 0; }
.entry-content .alignright { float: right; margin: 8px 0 8px 20px; }
.entry-content .aligncenter { margin-inline: auto; }

/* ── Block colors ── */
.has-primary-color    { color: var(--color-primary) !important; }
.has-primary-background-color { background-color: var(--color-primary) !important; }
.has-dark-color       { color: #111 !important; }
.has-dark-background-color    { background-color: #111 !important; }
.has-white-color      { color: #fff !important; }
.has-white-background-color   { background-color: #fff !important; }
.has-light-color      { color: #f7f7f7 !important; }
.has-light-background-color   { background-color: #f7f7f7 !important; }

/* ============================================================
   POST TAGS
   ============================================================ */
.post-tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.post-tags a {
	display: inline-flex;
	padding: 5px 12px;
	font-size: 13px;
	background: #f0f0f0;
	border-radius: var(--radius-full);
	color: #444;
}
.post-tags a:hover { background: var(--color-primary); color: #fff; }

/* ============================================================
   SHARE BUTTONS
   ============================================================ */
.share-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 20px;
}
.share-buttons a {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border-radius: var(--radius-md);
	font-size: 13px;
	font-weight: 600;
	color: #fff;
	transition: opacity var(--transition), transform var(--transition);
}
.share-buttons a:hover { opacity: .88; transform: translateY(-1px); }
.share-wa     { background: #25d366; }
.share-fb     { background: #1877f2; }
.share-x      { background: #000;    }
.share-reddit { background: #ff4500; }
.share-email  { background: #555;    }

/* ============================================================
   AUTHOR BOX
   ============================================================ */
.author-box {
	display: flex;
	gap: 18px;
	padding: 20px;
	background: var(--color-card-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	margin-top: 28px;
}
.author-img img { border-radius: 50%; flex-shrink: 0; }
.author-info h4 { font-size: 16px; margin-bottom: 4px; }
.author-info h4 a:hover { color: var(--color-primary); }
.author-info p { font-size: 14px; color: var(--color-muted); margin-bottom: 10px; }
.author-link { font-size: 13px; color: var(--color-primary); font-weight: 600; }

.author-social-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 8px; }
.social-btn {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: var(--radius-sm);
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	transition: opacity var(--transition);
}
.social-btn:hover { opacity: .85; }
.social-btn.fb { background: #1877f2; }
.social-btn.x  { background: #000; }
.social-btn.ig { background: #e4405f; }
.social-btn.ln { background: #0077b5; }
.social-btn.yt { background: #ff0000; }

/* Author page */
.author-page-box { margin-bottom: 28px; padding: 28px; }
.author-name { font-size: var(--font-size-2xl); font-weight: 800; margin-bottom: 8px; }

/* ============================================================
   RELATED POSTS
   ============================================================ */
.related-posts-wrap { margin-block: 36px; }
.related-title {
	font-size: var(--font-size-xl);
	font-weight: 800;
	margin-bottom: 18px;
	padding-left: 14px;
	border-left: 4px solid var(--color-primary);
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin-bottom: 14px;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
}
.breadcrumb a { color: #888; }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .current { color: var(--color-body-text); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { margin-top: 28px; text-align: center; }
.pagination ul {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	list-style: none;
	justify-content: center;
}
.pagination a,
.pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding-inline: 8px;
	border-radius: var(--radius-md);
	font-size: 14px;
	font-weight: 500;
	background: var(--color-card-bg);
	border: 1px solid var(--color-border);
	color: var(--color-body-text);
	transition: background var(--transition), color var(--transition);
}
.pagination span.current {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: #fff;
}
.pagination a:hover {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: #fff;
}

/* ============================================================
   NO RESULTS
   ============================================================ */
.no-results {
	padding: 32px;
	background: var(--color-card-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
}
.no-results h2 { font-size: 22px; margin-bottom: 8px; }
.no-results p  { color: var(--color-muted); }

/* ============================================================
   SEARCH FORM
   ============================================================ */
.search-form { width: 100%; }
.search-form-group { position: relative; }
.search-field {
	width: 100%;
	height: 48px;
	padding: 0 16px 0 44px;
	border: 1px solid #ddd;
	border-radius: var(--radius-md);
	font-size: 15px;
	background: #fff;
	transition: border-color var(--transition);
}
.search-field:focus { border-color: var(--color-primary); outline: none; }

.search-form-icon-btn {
	position: absolute;
	top: 50%; left: 12px;
	transform: translateY(-50%);
	width: 24px; height: 24px;
	border: 0; background: transparent; padding: 0;
	color: #888;
	display: inline-flex; align-items: center; justify-content: center;
}

.search-form-wrap { max-width: 600px; margin-top: 16px; }

/* ============================================================
   AD BOX
   ============================================================ */
.ad-box {
	background: #f0f0f0;
	text-align: center;
	padding: 20px;
	border-radius: var(--radius-md);
	font-size: 14px;
	color: #888;
	margin-block: 20px;
}
.ad-in-content { clear: both; }

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404-wrap { padding-block: 32px; }

.error-404-box {
	max-width: 680px;
	margin: 0 auto 36px;
	padding: 40px 28px;
	text-align: center;
	background: var(--color-card-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
}
.error-code {
	display: block;
	font-size: 72px;
	font-weight: 900;
	color: var(--color-primary);
	line-height: 1;
	margin-bottom: 12px;
	letter-spacing: -0.04em;
}
.error-title { font-size: var(--font-size-2xl); margin-bottom: 10px; }
.error-text  { color: var(--color-muted); max-width: 480px; margin-inline: auto; margin-bottom: 24px; }
.error-search { max-width: 480px; margin-inline: auto; margin-bottom: 16px; }
.error-home-btn {
	display: inline-flex;
	align-items: center;
	padding: 12px 24px;
	background: var(--color-primary);
	color: #fff;
	border-radius: var(--radius-md);
	font-weight: 600;
	font-size: 15px;
}
.error-home-btn:hover { background: var(--color-primary-dark); }
.error-latest-posts h2 { font-size: var(--font-size-xl); font-weight: 800; margin-bottom: 18px; }

/* ============================================================
   FOOTER WIDGETS
   ============================================================ */
.footer-widgets {
	background: #1a1a1a;
	padding-block: 40px;
}
.footer-widget-grid {
	display: grid;
	gap: 28px;
}
.footer-cols-1 { grid-template-columns: 1fr; }
.footer-cols-2 { grid-template-columns: repeat(2, 1fr); }
.footer-cols-3 { grid-template-columns: repeat(3, 1fr); }
.footer-cols-4 { grid-template-columns: repeat(4, 1fr); }

.footer-widgets .widget {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	color: #ccc;
}
.footer-widgets .widget-title {
	color: #fff;
	border-color: var(--color-primary);
	font-size: 15px;
}
.footer-widgets .widget ul li { border-color: #2a2a2a; }
.footer-widgets .widget a { color: #aaa; }
.footer-widgets .widget a:hover { color: #fff; }

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
	background: var(--color-footer-bg);
	color: var(--color-footer-text);
	padding-block: 20px;
}
.footer-menu ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 20px;
	margin-bottom: 12px;
}
.footer-menu a { color: #aaa; font-size: 14px; }
.footer-menu a:hover { color: #fff; }
.footer-credit { text-align: center; font-size: 13px; color: #888; }

/* ============================================================
   RESPONSIVE EMBEDS Niche chat GPT code hai
   ============================================================ */
   .wp-block-embed {
	margin-top: 0 !important;
}

.wp-block-embed-youtube.wp-embed-responsive .wp-block-embed__wrapper:before {
	content: none !important;
	display: none !important;
	padding-top: 0 !important;
}
/*.responsive-video-embed {
	position: relative; width: 100%;
	padding-bottom: 56.25%; height: 0; overflow: hidden;
	border-radius: var(--radius-md); margin-block: 24px;
}
.responsive-video-embed iframe,
.responsive-video-embed embed,
.responsive-video-embed video {
	position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.responsive-embed-wrap { max-width: 100%; margin-block: 20px; }
.responsive-embed-wrap iframe { max-width: 100%; }

.wp-block-embed { margin-block: 28px; }
.wp-block-embed__wrapper,
.wp-block-embed iframe { max-width: 100%; }

/* ============================================================
   MOBILE RESPONSIVENESS
   ============================================================ */
@media (max-width: 1023px) {
	:root { --sidebar-width: 280px; }

	.archive-layout.has-sidebar {
		grid-template-columns: 1fr;
	}
	.archive-layout.has-sidebar .archive-grid,
	.archive-layout-full .archive-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.layout-2col { grid-template-columns: 1fr; }
	.sidebar { position: static; max-height: none; overflow: visible; }
}

@media (max-width: 767px) {
	:root {
		--font-size-base: 15px;
		--gap: 14px;
	}

	.desktop-search-box { display: none; }
	.mobile-header-right { display: flex; }

	.primary-menu { display: none; }
	.primary-menu.is-open { display: block; }
	.primary-menu.is-open ul {
		flex-direction: column;
		gap: 2px;
		padding-block: 8px;
	}
	.primary-menu.is-open ul ul {
		display: none;
		position: static;
		box-shadow: none;
		border: 0;
		padding-left: 16px;
	}

	.single-title { font-size: 24px; }
	.entry-content { font-size: 16px; }
	.entry-content h2 { font-size: 22px; }
	.entry-content h3 { font-size: 18px; }
	.entry-content .alignwide,
	.entry-content .alignfull { margin-inline: 0; }

	.author-box { flex-direction: column; }

	.share-buttons a { flex: 1 1 auto; justify-content: center; }

	.footer-widget-grid {
		grid-template-columns: 1fr !important;
	}
	.footer-menu ul { flex-direction: column; align-items: center; }

	.error-code { font-size: 56px; }
	.error-title { font-size: 22px; }

	.archive-title { font-size: 22px; }

	.breaking-news-bar .container { gap: 8px; }
}

@media (max-width: 479px) {
	.archive-layout.has-sidebar .archive-grid,
	.archive-layout-full .archive-grid {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 768px) {
	.mobile-header-right,
	.mobile-search-bar { display: none !important; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
	.site-header, .site-footer, .sidebar,
	.share-buttons, .author-social-buttons,
	.breaking-news-bar, .ad-box, .pagination,
	.related-posts-wrap { display: none !important; }

	.layout-2col,
	.archive-layout { grid-template-columns: 1fr !important; }
	body { font-size: 12pt; color: #000; }
	a[href]::after { content: " (" attr(href) ")"; }
}
