/*
Theme Name: TechQor Lite Theme
Theme URI: https://techqor.com
Description: Ultra-lightweight, SEO-focused Genesis child theme for modern tech blogs.
Author: Krishna Sharma
Author URI: https://techqor.com
Version: 1.0.0
Template: genesis
Text Domain: techqor-lite
*/

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

body {
 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
 background:#fff; color:#111; line-height:1.7;
}

.wrap,.header-inner,.footer-inner{max-width:1200px;margin:auto;padding:0 20px;}
.site-header{border-bottom:1px solid #e5e7eb;background:#fff;}


/* ==================================================
   PRO TYPOGRAPHY SYSTEM (SINGLE POST)
================================================== */

/* Limit reading width for articles */
.single .entry-content {
	max-width: 740px;
	margin-left: auto;
	margin-right: auto;
	font-size: 1.05rem;
}

/* Headings spacing for long content */
.single .entry-content h2 {
	margin-top: 2.2em;
	margin-bottom: 0.8em;
	font-size: 1.6rem;
}

.single .entry-content h3 {
	margin-top: 1.8em;
	margin-bottom: 0.6em;
	font-size: 1.3rem;
}

/* Paragraph readability */
.single .entry-content p {
	margin-bottom: 1.4em;
}

/* Lists */
.single .entry-content ul,
.single .entry-content ol {
	margin: 1.2em 0 1.6em 1.4em;
}

.single .entry-content li {
	margin-bottom: 0.6em;
}

/* Inline code */
.single .entry-content code {
	background: #f3f4f6;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.95em;
}

/* Code blocks */
.single .entry-content pre {
	background: #0f172a;
	color: #e5e7eb;
	padding: 16px;
	overflow-x: auto;
	border-radius: 6px;
	margin: 1.6em 0;
	font-size: 0.95rem;
	line-height: 1.6;
}

.single .entry-content pre code {
	background: none;
	padding: 0;
	color: inherit;
}




/* ==================================================
   PRO AUTO TABLE OF CONTENTS (TOC)
================================================== */

.techqor-toc {
	border: 1px solid #e5e7eb;
	background: #f9fafb;
	padding: 16px 18px;
	margin: 2em auto;
	max-width: 740px;
	border-radius: 6px;
}

.techqor-toc-title {
	font-weight: 600;
	margin-bottom: 10px;
	font-size: 0.95rem;
}

.techqor-toc ul {
	list-style: none;
	padding-left: 0;
}

.techqor-toc li {
	margin-bottom: 6px;
	font-size: 0.95rem;
}

.techqor-toc li ul {
	margin-left: 14px;
	margin-top: 6px;
}

.techqor-toc a {
	color: #2563eb;
	text-decoration: none;
}



/* Mobile collapsible */
@media (max-width: 768px) {
	.techqor-toc {
		cursor: pointer;
	}

	.techqor-toc ul {
		display: none;
	}

	.techqor-toc.active ul {
		display: block;
		margin-top: 10px;
	}
}



/* ==================================================
   PRO DARK MODE (CSS VARIABLES)
================================================== */

:root {
	--bg: #ffffff;
	--text: #111111;
	--border: #e5e7eb;
	--card: #f9fafb;
	--link: #2563eb;
	--code-bg: #0f172a;
	--code-text: #e5e7eb;
}

body.dark-mode {
	--bg: #0b1220;
	--text: #e5e7eb;
	--border: #1f2937;
	--card: #111827;
	--link: #60a5fa;
	--code-bg: #020617;
	--code-text: #e5e7eb;
}

/* Apply variables */
body {
	background: var(--bg);
	color: var(--text);
}

.site-header,
.site-footer,
.archive .entry,
.techqor-toc {
	background: var(--card);
	border-color: var(--border);
}

a { color: var(--link); }

.single .entry-content pre {
	background: var(--code-bg);
	color: var(--code-text);
}

/* Dark mode button */
.dark-mode-toggle {
	background: none;
	border: none;
	font-size: 1.2rem;
	cursor: pointer;
	margin-left: 10px;
}


/* ==================================================
   PRO AUTHOR BOX (EEAT)
================================================== */

.techqor-author-box {
	max-width: 740px;
	margin: 3em auto 0;
	padding: 20px;
	display: flex;
	gap: 16px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--card);
}

.techqor-author-avatar img {
	border-radius: 50%;
	width: 72px;
	height: 72px;
}

.techqor-author-content {
	flex: 1;
}

.techqor-author-name {
	font-weight: 600;
	margin-bottom: 4px;
}

.techqor-author-bio {
	font-size: 0.95rem;
	line-height: 1.6;
	margin-bottom: 8px;
}

.techqor-author-links a {
	margin-right: 10px;
	font-size: 0.9rem;
	color: var(--link);
}

@media (max-width: 600px) {
	.techqor-author-box {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
}


/* ==================================================
   PRO ADVANCED CODE BLOCKS
================================================== */

.techqor-code-wrap {
	position: relative;
	margin: 1.8em 0;
}

.techqor-code-lang {
	position: absolute;
	top: 8px;
	left: 12px;
	font-size: 0.75rem;
	color: #cbd5f5;
	opacity: 0.85;
}

.techqor-copy-btn {
	position: absolute;
	top: 6px;
	right: 8px;
	font-size: 0.75rem;
	padding: 4px 8px;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	background: rgba(255,255,255,0.08);
	color: #e5e7eb;
}

.techqor-copy-btn:hover {
	background: rgba(255,255,255,0.16);
}



/* ==================================================
   FINAL STICKY HEADER (CSS ONLY – GUARANTEED)
================================================== */

/* Desktop only */
@media (min-width: 769px) {

	.site-header:not(.mobile-header) {
		position: sticky;
		top: 0;
		z-index: 9999;
	}

}



/* Prevent content jump (header height + progress bar) */
body.has-sticky-header {
	padding-top: 67px; /* 64px header + 3px progress bar */
}



/* Inner container */
.header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	height: 64px;

	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

/* Branding */
.site-branding {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.site-branding img {
	max-height: 34px;
	width: auto;
	display: block;
}

/* ==================================================
   DESKTOP NAVIGATION
================================================== */

.primary-navigation {
	display: flex;
	align-items: center;
	flex: 1;
	justify-content: flex-end;
}

.primary-navigation ul {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 28px;
}

.primary-navigation li {
	position: relative;
}


/* ==================================================
   DESKTOP MENU HOVER (NO UNDERLINE – PREMIUM)
================================================== */

.primary-navigation a {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--text);
	padding: 6px 10px;
	border-radius: 6px;

	transition:
		color 0.2s ease,
		background-color 0.2s ease,
		transform 0.15s ease;
}

/* Hover + keyboard focus */
.primary-navigation a:hover,
.primary-navigation a:focus-visible {
	color: var(--link);
	background-color: rgba(37, 99, 235, 0.08);
	transform: translateY(-1px);
	text-decoration: none;
}

/* Active menu item */
.primary-navigation .current-menu-item > a,
.primary-navigation .current-menu-ancestor > a {
	color: var(--link);
	background-color: rgba(37, 99, 235, 0.12);
}

/* ==================================================
   HEADER ACTIONS (SEARCH + DARK)
================================================== */

.header-search-toggle,
.dark-mode-toggle {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.1rem;
	color: var(--text);
	padding: 6px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.header-search-toggle:hover,
.dark-mode-toggle:hover {
	color: var(--link);
}

/* Keep icons on right */
.site-header .header-inner > button,
.site-header .header-inner > .dark-mode-toggle {
	flex-shrink: 0;
}



/* ==================================================
   HEADER VISIBILITY FIX (DESKTOP vs MOBILE)
================================================== */

/* Desktop: hide mobile header completely */
@media (min-width: 769px) {
	.site-header.mobile-header {
		display: none;
	}
}

/* Mobile: hide desktop header */
@media (max-width: 768px) {
	.site-header:not(.mobile-header) {
		display: none;
	}
}





/* ==================================================
   GENESIS CONTENT + SIDEBAR LAYOUT FIX
================================================== */

.content-sidebar-wrap {
	display: flex;
	align-items: flex-start;
	gap: 32px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
}

.content {
	flex: 1;
	min-width: 0;
}

.sidebar-primary {
	width: 300px;
	flex-shrink: 0;
}


@media (max-width: 768px) {

	.content-sidebar-wrap {
		flex-direction: column;
	}

	.sidebar-primary {
		width: 100%;
	}
}



/* ==================================================
   DESKTOP SUBMENU + ARROW (PREMIUM MICRO-ANIMATION)
================================================== */

/* ---------- Parent menu ---------- */
.primary-navigation li {
	position: relative;
}

/* Parent link spacing */
.primary-navigation li.menu-item-has-children > a {
	position: relative;
	padding-right: 26px; /* space for arrow */
}

/* ---------- Arrow (Chevron Style) ---------- */
.primary-navigation li.menu-item-has-children > a::after {
	content: "⌄"; /* cleaner than ▾ */
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%) rotate(0deg);
	font-size: 0.7rem;
	opacity: 0.6;

	transition:
		transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
		opacity 0.25s ease;
}

/* Arrow rotate on hover / focus */
.primary-navigation li.menu-item-has-children:hover > a::after,
.primary-navigation li.menu-item-has-children:focus-within > a::after,
.primary-navigation li.current-menu-ancestor > a::after {
	transform: translateY(-50%) rotate(180deg);
	opacity: 1;
}

/* ---------- Submenu base ---------- */
.primary-navigation ul ul {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	min-width: 220px;

	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 10px;
	box-shadow: 0 16px 40px rgba(0,0,0,0.08);

	padding: 10px 0;
	z-index: 999;

	/* Animation start state */
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);

	transition:
		opacity 0.25s ease,
		transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
		visibility 0.25s ease;
}

/* ---------- Submenu show ---------- */
.primary-navigation li:hover > ul,
.primary-navigation li:focus-within > ul {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* ---------- Submenu items ---------- */
.primary-navigation ul ul li {
	width: 100%;
}

.primary-navigation ul ul a {
	display: block;
	padding: 10px 16px;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--text);
	border-radius: 6px;

	transition:
		background-color 0.2s ease,
		color 0.2s ease,
		transform 0.2s ease;
}

/* Submenu hover */
.primary-navigation ul ul a:hover,
.primary-navigation ul ul a:focus-visible {
	background-color: rgba(37, 99, 235, 0.08);
	color: var(--link);
	transform: translateX(2px);
}

/* Disable underline logic completely */
.primary-navigation ul ul a::after {
	display: none;
}



/* ==================================================
   GLOBAL UNDERLINE REMOVAL (ENTIRE THEME)
================================================== */

/* Remove underline everywhere */
a,
a:hover,
a:focus,
a:focus-visible,
a:active,
a:visited {
	text-decoration: none !important;
}

/* Extra safety for navigation */
.primary-navigation a,
.primary-navigation a:hover,
.primary-navigation a:focus-visible,
.primary-navigation ul ul a {
	text-decoration: none !important;
}

/* Content area links (posts/pages) */
.entry-content a,
.entry-content a:hover,
.entry-content a:focus-visible {
	text-decoration: none !important;
}

/* TOC links */
.techqor-toc a {
	text-decoration: none !important;
}

/* ==================================================
   STICKY HEADER SHADOW (EXTRA LIGHT – PREMIUM)
================================================== */

/* Default: no shadow */
.site-header {
	box-shadow: none;
	transition: box-shadow 0.25s ease;
}

/* Desktop only */
@media (min-width: 769px) {

	.site-header:not(.mobile-header) {
		position: sticky;
		top: 0;
		z-index: 9999;

		/* Very light shadow */
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	}

	/* Dark mode – still subtle */
	body.dark-mode .site-header:not(.mobile-header) {
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
	}
}

/* ==================================================
   MOBILE HEADER (LEFT MENU • CENTER LOGO • RIGHT ICONS)
================================================== */

@media (max-width: 768px) {

	/* Mobile header base */
	.site-header.mobile-header {
		display: block;
		position: relative;
		z-index: 9999;
		background: var(--bg);
		border-bottom: 1px solid var(--border);
	}

	.site-header.mobile-header .header-inner {
		height: 56px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 14px;
		position: relative;
	}

	/* LEFT: Hamburger */
	.menu-toggle {
		background: none;
		border: none;
		font-size: 1.4rem;
		cursor: pointer;
		color: var(--text);
		z-index: 2;
	}

	/* CENTER: Logo (true center) */
	.site-header.mobile-header .site-branding {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		display: flex;
		align-items: center;
	}

	.site-header.mobile-header .site-branding img {
		max-height: 30px;
		width: auto;
	}

	/* RIGHT: Search + Dark mode */
	.mobile-header-actions {
		display: flex;
		align-items: center;
		gap: 10px;
		z-index: 2;
	}

	.mobile-header-actions button {
		background: none;
		border: none;
		cursor: pointer;
		color: var(--text);
		font-size: 1.1rem;
		padding: 6px;
	}

	.mobile-header-actions button:hover {
		color: var(--link);
	}
}
