/*
Theme Name: Gitook Theme
Theme URI: https://example.com/gitook
Author: You
Author URI: https://example.com
Description: A RTL Persian theme converted from the Gitook static project.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: gitook
*/

/* Hide WordPress admin bar for non-admin users only */
#wpadminbar {
	display: none !important;
}

body.admin-bar #wpadminbar {
	display: none !important;
}

body.admin-bar {
	padding-top: 0 !important;
}

/* Show admin bar for administrators */
body.admin-bar.administrator #wpadminbar {
	display: block !important;
}

body.admin-bar.administrator {
	padding-top: 32px !important;
}

/* Print Button Styles */
.post-actions {
	margin: 2rem 0;
	text-align: center;
}

.btn-print {
	background: linear-gradient(135deg, #28a745, #20c997);
	color: #fff;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.btn-print:hover {
	background: linear-gradient(135deg, #218838, #1e7e34);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-print i {
	margin-left: 0.5rem;
}

/* Video Box Styles */
.video-box-container {
	margin: 2rem 0;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	transition: all 0.3s ease;
}

.video-box-container:hover {
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
	transform: translateY(-2px);
}

.video-title-box {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	padding: 1.5rem 2rem;
	text-align: center;
	position: relative;
}

.video-title-box::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
	z-index: 1;
}

.video-title {
	color: #fff;
	font-size: 1.5rem;
	font-weight: 600;
	margin: 0;
	position: relative;
	z-index: 2;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	line-height: 1.4;
}

.video-wrapper {
	padding: 0;
	background: #000;
}

.video-responsive {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 aspect ratio */
	height: 0;
	overflow: hidden;
}

.video-responsive iframe,
.video-responsive video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}

/* Multiple Video Items */
.video-item {
	margin-bottom: 2rem;
}

.video-item:last-child {
	margin-bottom: 0;
}

.video-item-title {
	font-size: 1.2rem;
	font-weight: 600;
	color: #333;
	margin: 0 0 1rem 0;
	padding: 0.75rem 1rem;
	background: linear-gradient(135deg, #f8f9fa, #e9ecef);
	border-radius: 8px;
	border-right: 4px solid #667eea;
}

/* TOC Anchor Positioning */
.toc-anchor {
	display: block;
	position: relative;
	top: -80px; /* Adjust this value based on your header height */
	visibility: hidden;
}

/* Video Box Responsive */
@media (max-width: 768px) {
	.video-title-box {
		padding: 1rem 1.5rem;
	}
	
	.video-title {
		font-size: 1.25rem;
	}
	
	.video-box-container {
		margin: 1.5rem 0;
		border-radius: 8px;
	}
}

@media (max-width: 480px) {
	.video-title-box {
		padding: 0.75rem 1rem;
	}
	
	.video-title {
		font-size: 1.1rem;
	}
}

/* Print Styles */
@media print {
	* {
	-webkit-print-color-adjust: exact !important;
	print-color-adjust: exact !important;
	}
	
	body {
		font-family: 'Times New Roman', serif !important;
		font-size: 12pt !important;
		line-height: 1.6 !important;
		color: #000 !important;
		background: #fff !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	
	/* Force hide admin bar completely */
	#wpadminbar,
	#wpadminbar *,
	body.admin-bar,
	body.admin-bar * {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		width: 0 !important;
		overflow: hidden !important;
	}
	
	/* Remove admin bar spacing */
	body.admin-bar {
		padding-top: 0 !important;
		margin-top: 0 !important;
	}
	
	/* Hide non-printable elements */
	.site-header,
	.site-footer,
	.sidebar,
	#wpadminbar,
	.post-actions,
	.post-navigation,
	.related-posts,
	.comments-section,
	.author-info-section,
	.download-section,
	.content-keywords,
	.breadcrumbs,
	.mobile-menu-toggle,
	.mobile-categories-menu,
	.main-nav,
	.header-menu-wrapper,
	.header-links-wrap,
	.auth-btn,
	.mobile-menu-toggle,
	.mobile-categories-menu,
	.main-content-wrapper,
	/* Additional sidebar and admin elements */
	#categoriesTree,
	.category-tree,
	.category-header,
	.category-children,
	.category-toggle,
	.toggle-all-btn,
	#toggleAllCategories,
	#categoriesPageToggleAll,
	#mobileCategoriesToggleAll,
	/* Admin bar and related elements */
	body.admin-bar,
	body.admin-bar *,
	/* Footer elements */
	footer,
	.site-footer,
	.footer-content,
	.footer-widgets,
	/* Any remaining navigation */
	nav,
	.menu,
	.menu-item,
	/* Table of contents */
	.table-of-contents,
	.toc-header,
	.toc-content,
	.toc-toggle,
	/* Video box */
	.video-box-container,
	.video-title-box,
	.video-wrapper,
	.video-responsive {
		display: none !important;
	}
	
	/* Print layout */
	.content-main,
	.content-main.full-width {
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	
	/* Post title */
	.single-post h1 {
		font-size: 18pt !important;
		font-weight: bold !important;
		margin: 0 0 1rem 0 !important;
		text-align: center !important;
		color: #000 !important;
	}
	
	/* Featured image */
	.single-featured-image {
		text-align: center !important;
		margin: 1rem 0 !important;
	}
	
	.single-featured-image img {
		max-width: 100% !important;
		height: auto !important;
		border: 1px solid #ccc !important;
	}
	
	/* Post content */
	.post-content {
		font-size: 12pt !important;
		line-height: 1.6 !important;
		text-align: justify !important;
		margin: 1rem 0 !important;
	}
	
	.post-content p {
		margin: 0.5rem 0 !important;
	}
	
	.post-content h1,
	.post-content h2,
	.post-content h3,
	.post-content h4,
	.post-content h5,
	.post-content h6 {
		font-weight: bold !important;
		margin: 1rem 0 0.5rem 0 !important;
		color: #000 !important;
	}
	
	.post-content h1 { font-size: 16pt !important; }
	.post-content h2 { font-size: 14pt !important; }
	.post-content h3 { font-size: 13pt !important; }
	.post-content h4 { font-size: 12pt !important; }
	.post-content h5 { font-size: 11pt !important; }
	.post-content h6 { font-size: 10pt !important; }
	
	/* Post meta */
	.post-meta {
		text-align: center !important;
		font-size: 10pt !important;
		margin: 1rem 0 !important;
		color: #666 !important;
		border-top: 1px solid #ccc !important;
		padding-top: 0.5rem !important;
	}
	
	/* Images in content */
	.post-content img {
		max-width: 100% !important;
		height: auto !important;
		display: block !important;
		margin: 0.5rem auto !important;
	}
	
	/* Links */
	.post-content a {
		color: #000 !important;
		text-decoration: underline !important;
	}
	
	/* Lists */
	.post-content ul,
	.post-content ol {
		margin: 0.5rem 0 !important;
		padding-right: 1.5rem !important;
	}
	
	.post-content li {
		margin: 0.25rem 0 !important;
	}
	
	/* Tables */
	.post-content table {
		width: 100% !important;
		border-collapse: collapse !important;
		margin: 1rem 0 !important;
	}
	
	.post-content th,
	.post-content td {
		border: 1px solid #000 !important;
		padding: 0.25rem !important;
		text-align: right !important;
	}
	
	.post-content th {
		background: #f0f0f0 !important;
		font-weight: bold !important;
	}
	
	/* Page breaks */
	.post-content h1,
	.post-content h2,
	.post-content h3 {
		page-break-after: avoid !important;
	}
	
	.post-content p,
	.post-content li {
		page-break-inside: avoid !important;
	}
}

/* Base */
body { 
	direction: rtl; 
	text-align: right; 
	font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
	margin: 0;
	padding: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* Ensure proper layout for full-width content - Complete rewrite */
body.has-full-width-content {
	display: block !important;
	overflow-x: hidden !important;
	min-height: 100vh !important;
}

body.has-full-width-content .site-header {
	position: relative !important;
	z-index: 9998 !important;
}

body.has-full-width-content .site-footer {
	position: relative !important;
	margin-top: 8rem !important;
	clear: both !important;
	display: block !important;
	z-index: 2 !important;
}

/* Force proper layout structure */
body.has-full-width-content .main-content-wrapper {
	display: none !important;
}

body.has-full-width-content .content-main.full-width {
	display: block !important;
	width: 100% !important;
	max-width: 1200px !important;
	margin: 0 auto !important;
	margin-bottom: 8rem !important;
	position: relative !important;
	z-index: 1 !important;
}

/* Ensure footer positioning */
body.has-full-width-content .site-footer {
	margin-top: 5rem !important;
	position: relative !important;
	clear: both !important;
	display: block !important;
}

/* Force layout structure */
body.has-full-width-content {
	display: block !important;
}

body.has-full-width-content .content-main.full-width {
	display: block !important;
	width: 100% !important;
	max-width: 1000px !important;
	margin: 0 auto !important;
	margin-bottom: 5rem !important;
}
.site-header { 
	background: #ffffff; 
	border-bottom: 1px solid #eee; 
	position: sticky; 
	top: 0; 
	z-index: 9998; 
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	overflow: visible !important;
}
.header-container { 
	max-width: 1200px; 
	margin: 0 auto; 
	padding: 1rem; 
	display: flex; 
	align-items: center; 
	justify-content: space-between; 
	gap: 1rem;
}

.site-branding {
	order: 1;
}

.main-nav {
	order: 2;
	flex: 1;
	text-align: center;
}

.header-actions-left {
	order: 3;
}

/* Site Branding */
.site-branding {
	flex-shrink: 0;
	min-width: 0;
}

.site-title {
	font-size: 1.8rem;
	font-weight: bold;
	color: #333;
	text-decoration: none;
	transition: color 0.3s ease;
	white-space: nowrap;
}

.site-title:hover {
	color: #007cba;
}

.site-logo {
	display: block;
	text-decoration: none;
}

.site-logo img {
	max-height: 60px;
	width: auto;
	max-width: 200px;
	object-fit: contain;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-shrink: 0;
}

/* Move search/dark/auth away from logo: group to opposite side */
@media (min-width: 769px) {
	.header-container {
		justify-content: space-between;
	}
	/* Keep logo at start, push actions to far end */
	.site-branding { order: 1; }
	.main-nav { order: 2; }
	.header-actions-left { order: 3; margin-right: auto; }
}

.auth-buttons {
	display: flex;
	gap: 0.75rem;
}

.auth-btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 500;
	font-size: 0.9rem;
	transition: all 0.3s ease;
}

/* Unified auth button states */
.auth-btn.state-guest { background: #16a34a; color: #fff; border: 0; }
.auth-btn.state-guest:hover { background: #15803d; color: #fff; }
.auth-btn.state-logged-in { background: #dc2626; color: #fff; border: 0; }
.auth-btn.state-logged-in:hover { background: #b91c1c; color: #fff; }

/* Single auth button styles */
.single-auth-btn.state-guest {
	background: #16a34a;
	color: #fff;
	border: 0;
	text-decoration: none;
	transition: all 0.3s ease;
}

.single-auth-btn.state-guest:hover {
	background: #15803d;
	color: #fff;
	text-decoration: none;
}

.single-auth-btn.state-logged-in {
	background: #dc2626;
	color: #fff;
	border: 0;
	text-decoration: none;
	transition: all 0.3s ease;
}

.single-auth-btn.state-logged-in:hover {
	background: #b91c1c;
	color: #fff;
	text-decoration: none;
}

.mobile-single-auth-btn.state-guest {
	background: #16a34a;
	color: #fff;
	border: 0;
	text-decoration: none;
	transition: all 0.3s ease;
}

.mobile-single-auth-btn.state-guest:hover {
	background: #15803d;
	color: #fff;
	text-decoration: none;
}

.mobile-single-auth-btn.state-logged-in {
	background: #dc2626;
	color: #fff;
	border: 0;
	text-decoration: none;
	transition: all 0.3s ease;
}

.mobile-single-auth-btn.state-logged-in:hover {
	background: #b91c1c;
	color: #fff;
	text-decoration: none;
}

/* Login and Register buttons - styles handled by theme */

.user-menu {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.user-greeting {
	color: #374151;
	font-weight: 500;
	font-size: 0.9rem;
}

.user-dashboard,
.user-logout {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 500;
	font-size: 0.9rem;
	transition: all 0.3s ease;
}

.user-dashboard {
	background: #10b981;
	color: white;
	border: 2px solid #10b981;
}

.user-dashboard:hover {

	background: #059669;
	border-color: #059669;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.user-logout {
	background: #ef4444;
	color: white;
	border: 2px solid #ef4444;
}

.user-logout:hover {
	background: #dc2626;
	border-color: #dc2626;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.site-title { 
	font-weight: 800; 
	color: #111; 
	text-decoration: none; 
	font-size: 2rem;
	background: linear-gradient(135deg, #1a73e8, #8b5cf6);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	text-shadow: 0 2px 4px rgba(0,0,0,0.1);
	transition: all 0.3s ease;
}

/* Logo Optimization */
.custom-logo-link {
	display: inline-block;
	transition: all 0.3s ease;
}

.custom-logo-link:hover {
	transform: scale(1.05);
}

.custom-logo {
	max-height: 60px;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: all 0.3s ease;
}

/* Fallback for when logo is not set */
.site-title:not(.custom-logo-link) {
	background: linear-gradient(135deg, #1a73e8, #8b5cf6);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* Logo responsive adjustments */
@media (max-width: 768px) {
	.custom-logo {
		max-height: 50px;
	}
	
	.site-title {
		font-size: 1.5rem;
	}
}

/* 2 columns on tablets */
@media (max-width: 1024px) {
	body.archive #contentGrid,
	body.category #contentGrid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

/* 1 column on small screens */
@media (max-width: 640px) {
	body.archive #contentGrid,
	body.category #contentGrid {
		grid-template-columns: 1fr !important;
	}
}
.main-nav { 
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	min-width: 0;
	overflow: visible !important;
	position: relative;
	z-index: 9999;
}

.main-nav .menu { 
	display: flex; 
	gap: 1rem; 
	list-style: none; 
	margin: 0; 
	padding: 0; 
	flex-wrap: wrap;
	max-width: 100%;
	overflow: visible;
}
.header-links-wrap {
	background: linear-gradient(135deg, #eef2ff, #e0f2fe);
	border: 1px solid #dbeafe;
	border-radius: 12px;
	padding: 0.5rem 0.75rem;
	box-shadow: 0 6px 18px rgba(30, 64, 175, 0.08);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	max-width: 100%;
	overflow: visible; /* allow dropdowns to escape wrapper */
}

/* Ensure two rows stack nicely when both menus exist */
.header-links-wrap > ul.menu.extra-links {
	flex: 1 1 100%;
	justify-content: center;
	margin-bottom: 0.5rem;
}
.header-links-wrap > ul.menu:not(.extra-links) {
	flex: 1 1 100%;
	justify-content: center;
}

/* Style customizer extra links as buttons - smaller height */
.header-links-wrap .extra-links li a.extra-link-btn {
	background: linear-gradient(135deg, #1a73e8, #3b82f6);
	color: #fff;
	padding: 0.35rem 0.75rem;
	border-radius: 6px;
	text-decoration: none;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(26, 115, 232, 0.2);
	font-size: 0.9rem;
	line-height: 1.2;
}
.header-links-wrap .extra-links li a.extra-link-btn:hover {
	background: linear-gradient(135deg, #0d47a1, #2563eb);
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

@media (min-width: 1025px) {
	/* On desktop: first row for extra links, second row for primary menu */
	.header-links-wrap > ul.menu.extra-links { flex: 0 0 100%; margin-bottom: 0.5rem; }
	.header-links-wrap > ul.menu:not(.extra-links) { flex: 0 0 100%; }
}

@media (max-width: 768px) {
	.header-links-wrap { display: none; }
}
.main-nav .menu a { 
	text-decoration: none; 
	color: #333; 
	padding: 0.5rem 1rem;
	border-radius: 6px;
	transition: all 0.3s ease;
}

/* Dropdown menus */
.main-nav .menu li { position: relative; }
.main-nav .menu .sub-menu { 
	display: none; 
	position: absolute; 
	right: 0; 
	top: 100%; 
	background: #fff; 
	border: 1px solid #e5e7eb; 
	border-radius: 8px; 
	min-width: 200px; 
	padding: 0.5rem 0; 
	box-shadow: 0 8px 20px rgba(0,0,0,0.08);
	z-index: 99999;
	overflow: visible;
}
.main-nav .menu .sub-menu li { 
	list-style: none; 
	position: relative;
}
.main-nav .menu .sub-menu a { 
	display: block; 
	padding: 0.5rem 1rem; 
	color: #111; 
	border-radius: 0;
	transition: all 0.3s ease;
}
.main-nav .menu .sub-menu a:hover {
	background: #f8fafc;
	color: #1a73e8;
}
.main-nav .menu > li:hover > .sub-menu { 
	display: block !important; 
}
.main-nav .menu li.open > .sub-menu { 
	display: block !important; 
}

/* Nested submenus */
.main-nav .menu .sub-menu .sub-menu {
	position: absolute;
	right: 100%;
	top: 0;
	z-index: 10000;
}


/* Responsive header for many menu items */
@media (max-width: 1024px) {
	.header-links-wrap {
		flex-wrap: wrap;
		gap: 0.25rem 0.5rem;
	}
	
	.main-nav .menu {
		gap: 0.5rem;
		flex-wrap: wrap;
	}
	
	.main-nav .menu a {
		padding: 0.4rem 0.8rem;
		font-size: 0.9rem;
	}
}

@media (max-width: 768px) {
  .main-nav .menu { gap: 0.25rem; }
  .main-nav .menu .sub-menu { position: static; border: 0; box-shadow: none; padding: 0; }
  /* Hide desktop nav on mobile – rely on two toggle buttons instead */
  .main-nav { display: none; }
  .header-container { justify-content: space-between; }
  
  /* Hide auth buttons on mobile - they'll be in mobile menu */
  .header-actions {
    display: none;
  }
}

/* Mobile nav drawer */
.mobile-nav { position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(2px); display: none; z-index: 10000; }
.mobile-nav.active { display: block; }
.mobile-nav-panel { position: absolute; right: 0; top: 0; height: 100%; width: 85%; max-width: 360px; background: #fff; box-shadow: -8px 0 24px rgba(0,0,0,.15); display: flex; flex-direction: column; }
.mobile-nav-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid #eee; }
.mobile-nav-title { font-weight: 700; color: #1a73e8; }
.mobile-nav-close { background: #ef4444; color: #fff; border: 0; border-radius: 6px; padding: .5rem; cursor: pointer; }
.mobile-nav-menu { padding: .5rem 0; overflow: auto; }
.mobile-nav-menu .menu { list-style: none; margin: 0; padding: 0; }
.mobile-nav-menu .menu > li > a { display: block; padding: .75rem 1rem; color: #111; text-decoration: none; }
.mobile-nav-menu .sub-menu { display: none; padding: 0; }
.mobile-nav-menu li.open > .sub-menu { display: block; }
.mobile-nav-menu .sub-menu a { padding: .6rem 1.25rem; display: block; color: #374151; }

/* Mobile Auth Section */
.mobile-auth-section {
	padding: 1rem;
	border-top: 1px solid #e5e7eb;
	margin-top: 1rem;
}

.mobile-auth-buttons {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.mobile-auth-btn {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.3s ease;
	text-align: center;
	justify-content: center;
}

/* Unified mobile auth button states */
.mobile-auth-btn.state-guest { background: #16a34a; color: #fff; border: 0; }
.mobile-auth-btn.state-guest:hover { background: #15803d; color: #fff; }
.mobile-auth-btn.state-logged-in { background: #dc2626; color: #fff; border: 0; }
.mobile-auth-btn.state-logged-in:hover { background: #b91c1c; color: #fff; }

/* Mobile auth buttons - styles handled by theme */

.mobile-user-info {
	text-align: center;
}

.mobile-user-greeting {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
	color: #374151;
	font-weight: 500;
}

.mobile-user-greeting i {
	font-size: 1.5rem;
	color: #1a73e8;
}

.mobile-user-actions {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.mobile-user-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.3s ease;
}

.mobile-dashboard-btn {
	background: #10b981;
	color: white;
	border: 2px solid #10b981;
}

.mobile-dashboard-btn:hover {
	background: #059669;
	border-color: #059669;
}

.mobile-logout-btn {
	background: #ef4444;
	color: white;
	border: 2px solid #ef4444;
}

.mobile-logout-btn:hover {
	background: #dc2626;
	border-color: #dc2626;
}

@media (min-width: 769px) {
  .mobile-menu-toggle#mobileNavToggle { display: none; }
}

.main-layout,
.main-content-wrapper { 
	width: 1200px; 
	max-width: 100%;
	margin: 1rem auto; 
	padding: 0 1rem; 
	display: grid; 
	grid-template-columns: 450px 1fr; 
	gap: 1.5rem; 
	flex: 1;
	min-height: calc(100vh - 200px);
}
.categories-sidebar { 
	background: #fff; 
	border: 1px solid #eee; 
	border-radius: 8px; 
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	height: fit-content;
}
.sidebar-ad-block { padding: 0.75rem 1rem; border-bottom: 1px solid #eee; }
.sidebar-ad-block img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.sidebar-ad-block a { color: #1a73e8; text-decoration: none; }

.sidebar-title { 
	margin: 0; 
	padding: 1rem; 
	border-bottom: 1px solid #eee; 
	font-size: 1.1rem; 
	font-weight: 700;
	color: #1a73e8;
	background: linear-gradient(135deg, #f8fafc, #e2e8f0);
	text-align: center;
}

/* Widgets */
.widget { padding: 1rem; border-top: 1px solid #eee; }
.widget:first-of-type { border-top: 0; }
.widget-title { margin: 0 0 .75rem 0; font-size: 1rem; color: #0f172a; font-weight: 700; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: .4rem 0; border-bottom: 1px dashed #eee; }
.widget ul li:last-child { border-bottom: 0; }
.widget a { color: #374151; text-decoration: none; }
.widget a:hover { color: #1a73e8; }

/* Table of Contents */
.table-of-contents {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	margin: 1.5rem 0;
	overflow: hidden;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Ensure TOC appears at the beginning of content */
.post-content .table-of-contents:first-child,
.page-content .table-of-contents:first-child {
	margin-top: 0;
	margin-bottom: 2rem;
}

/* Smooth scrolling with offset for headings */
html {
	scroll-behavior: smooth;
}

/* Offset for TOC anchor links to show headings properly */
h1[id^="toc-"], h2[id^="toc-"], h3[id^="toc-"], h4[id^="toc-"], h5[id^="toc-"], h6[id^="toc-"] {
	scroll-margin-top: 80px;
}

.toc-header {
	background: #e3f2fd;
	color: #1a237e;
	padding: 0.75rem 1rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	transition: background-color 0.3s ease;
	width: 100%;
}

.toc-header:hover {
	background: #bbdefb;
}

.toc-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: #1a237e;
}

.toc-toggle {
	background: none;
	border: none;
	color: #1a237e;
	font-size: 0.9rem;
	cursor: pointer;
	padding: 0.25rem;
	transition: transform 0.3s ease;
}

.toc-toggle i {
	transition: transform 0.3s ease;
}

.toc-content {
	padding: 1rem;
	display: none;
	transition: all 0.3s ease;
}

.toc-content.expanded {
	display: block;
}

.toc-content.expanded + .toc-header .toc-toggle i {
	transform: rotate(180deg);
}

.toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.toc-list ul {
	list-style: none;
	margin: 0;
	padding: 0;
	padding-right: 1rem;
}

.toc-list li {
	margin: 0.25rem 0;
}

.toc-list a {
	color: #374151;
	text-decoration: none;
	font-size: 0.9rem;
	line-height: 1.4;
	display: block;
	padding: 0.25rem 0;
	transition: color 0.2s ease;
}

.toc-list a:hover {
	color: #1a73e8;
}

.toc-list a:before {
	content: "•";
	color: #1a73e8;
	margin-left: 0.5rem;
	font-weight: bold;
}

/* Full-width content - Restored width */
.content-main.full-width {
	width: 100% !important;
	max-width: 1000px !important;
	margin: 0 auto !important;
	padding: 2rem 1rem !important;
	display: block !important;
	position: relative !important;
	overflow: visible !important;
	margin-bottom: 8rem !important;
	clear: both !important;
	min-height: 60vh !important;
}

.content-main.full-width .single-post,
.content-main.full-width .page-content {
	position: relative !important;
	z-index: 1 !important;
	padding-bottom: 2rem !important;
	width: 100% !important;
}

.content-main.full-width .comments-section {
	margin-top: 2rem !important;
	clear: both !important;
}

/* Footer positioning for full-width layouts */
.content-main.full-width + .site-footer,
.content-main.full-width ~ .site-footer {
	margin-top: 8rem !important;
	position: relative !important;
	z-index: 2 !important;
	clear: both !important;
	display: block !important;
}

/* Force proper layout structure */
body.has-full-width-content {
	display: block !important;
	overflow-x: hidden !important;
}

body.has-full-width-content .main-content-wrapper {
	display: none !important;
}

body.has-full-width-content .content-main.full-width {
	display: block !important;
	width: 100% !important;
	max-width: 1000px !important;
	margin: 0 auto !important;
	margin-bottom: 5rem !important;
}

body.has-full-width-content .site-footer {
	position: relative !important;
	margin-top: 5rem !important;
	clear: both !important;
	display: block !important;
}

/* Additional spacing fixes */
.content-main.full-width:after {
	content: '';
	display: block;
	height: 3rem;
	clear: both;
}

/* Ensure content doesn't overlap */
.content-main.full-width {
	position: relative !important;
	z-index: 1 !important;
}

.content-main.full-width + .site-footer {
	position: relative !important;
	z-index: 2 !important;
	margin-top: 5rem !important;
	clear: both !important;
	display: block !important;
}

/* Additional force fixes */
.content-main.full-width {
	display: block !important;
	width: 100% !important;
	max-width: 1000px !important;
	margin: 0 auto !important;
	margin-bottom: 5rem !important;
	clear: both !important;
	overflow: visible !important;
}

.content-main.full-width + .site-footer,
.content-main.full-width ~ .site-footer {
	display: block !important;
	position: relative !important;
	margin-top: 5rem !important;
	clear: both !important;
	z-index: 2 !important;
}

/* Force body layout */
body.has-full-width-content {
	display: block !important;
	overflow-x: hidden !important;
}

body.has-full-width-content .main-content-wrapper {
	display: none !important;
}

body.has-full-width-content .content-main.full-width {
	display: block !important;
}

body.has-full-width-content .site-footer {
	display: block !important;
	margin-top: 5rem !important;
	clear: both !important;
	position: relative !important;
	z-index: 2 !important;
}

/* Final footer positioning fix */
body.has-full-width-content .site-footer {
	margin-top: 5rem !important;
	clear: both !important;
	position: relative !important;
	display: block !important;
	z-index: 2 !important;
}

/* Ensure footer is always at bottom */
.content-main.full-width:last-of-type + .site-footer {
	margin-top: 5rem !important;
	clear: both !important;
	position: relative !important;
	display: block !important;
	z-index: 2 !important;
}

/* Mobile responsive fixes for full-width - Complete rewrite */
@media (max-width: 768px) {
	.content-main.full-width {
		padding: 0 0.5rem !important;
		margin-bottom: 4rem !important;
	}
	
	.content-main.full-width .single-post,
	.content-main.full-width .page-content {
		margin-bottom: 2rem !important;
	}
	
	.content-main.full-width .comments-section {
		margin-top: 1.5rem !important;
	}
	
	body.has-full-width-content .content-main.full-width {
		padding: 0 0.5rem !important;
		margin-bottom: 4rem !important;
	}
	
	body.has-full-width-content .site-footer {
		margin-top: 4rem !important;
	}
	
	.content-main.full-width + .site-footer,
	.content-main.full-width ~ .site-footer {
		margin-top: 4rem !important;
	}
}

/* Header mobile layout adjustments: move logo to opposite side and add mobile search button alignment */
@media (max-width: 768px) {
	.header-container {
		flex-direction: row-reverse;
	}
	.site-branding { order: 2; }
	.mobile-menu-toggle#mobileNavToggle,
	.mobile-menu-toggle#mobileMenuToggle,
	.mobile-menu-toggle#mobileSearchToggle { order: 1; }
}

@media (max-width: 480px) {
	.header-container {
		flex-direction: row-reverse;
	}
	.site-branding { order: 2; }
	.mobile-menu-toggle#mobileNavToggle,
	.mobile-menu-toggle#mobileMenuToggle,
	.mobile-menu-toggle#mobileSearchToggle { order: 1; }
}

@media (max-width: 480px) {
	.content-main.full-width {
		padding: 0 0.25rem !important;
		margin-bottom: 3rem !important;
	}
	
	body.has-full-width-content .content-main.full-width {
		padding: 0 0.25rem !important;
		margin-bottom: 3rem !important;
	}
	
	body.has-full-width-content .site-footer {
		margin-top: 3rem !important;
	}
	
	.content-main.full-width + .site-footer,
	.content-main.full-width ~ .site-footer {
		margin-top: 3rem !important;
	}
}



/* Comments Section Styling */
.comments-section {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 2px solid #e5e7eb;
}

.comments-title {
	color: #1a73e8;
	font-size: 1.5rem;
	font-weight: 600;
	margin-bottom: 2rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.comments-title i {
	color: #1a73e8;
}

/* Collapsible Comments Header */
.comments-header {
	margin-bottom: 1.5rem;
}

.comments-toggle {
	background: linear-gradient(135deg, #1a73e8, #8b5cf6);
	color: white;
	border: none;
	padding: 1rem 1.5rem;
	border-radius: 12px;
	font-size: 1.1rem;
	font-weight: 600;
	font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2);
}

.comments-toggle:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(26, 115, 232, 0.3);
}

.comments-count-text {
	flex: 1;
	text-align: right;
	font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.toggle-icon {
	transition: transform 0.3s ease;
}

.comments-content {
	transition: all 0.3s ease;
}

.comments-count {
	color: #374151;
	font-size: 1.1rem;
	font-weight: 500;
	margin-bottom: 1.5rem;
}

.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-item {
	margin-bottom: 2rem;
}

.comment-body {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 1.5rem;
	transition: all 0.3s ease;
}

.comment-body:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.comment-meta {
	margin-bottom: 1rem;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 0.5rem;
}

.comment-avatar {
	border-radius: 50%;
	border: 3px solid #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comment-author-info {
	flex: 1;
}

.comment-author-info .fn {
	font-weight: 600;
	color: #1a73e8;
	text-decoration: none;
	font-style: normal;
}

.comment-date {
	color: #6b7280;
	font-size: 0.9rem;
	display: block;
	margin-top: 0.25rem;
}

.comment-content {
	color: #374151;
	line-height: 1.6;
	margin-bottom: 1rem;
}

.comment-actions {
	display: flex;
	gap: 1rem;
	align-items: center;
}

.reply-link,
.edit-link {
	color: #1a73e8;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	transition: color 0.3s ease;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.reply-link:hover,
.edit-link:hover {
	color: #0d47a1;
}

.comment-awaiting-moderation {
	background: #fef3c7;
	color: #92400e;
	padding: 0.5rem 1rem;
	border-radius: 6px;
	font-size: 0.9rem;
	margin-top: 0.5rem;
}

/* Comment Form Styling */
.comment-form {
	background: #ffffff;
	border: 2px solid #e5e7eb;
	border-radius: 12px;
	padding: 2rem;
	margin-top: 2rem;
}

.reply-title {
	color: #1a73e8;
	font-size: 1.3rem;
	font-weight: 600;
	margin-bottom: 1.5rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.comment-form-author,
.comment-form-email,
.comment-form-url,
.comment-form-comment {
	margin-bottom: 1.5rem;
}

.comment-form label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: #374151;
}

.comment-form input,
.comment-form textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	font-size: 1rem;
	transition: all 0.3s ease;
	background: #f8fafc;
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: #1a73e8;
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.comment-form textarea {
	resize: vertical;
	min-height: 120px;
}

.submit-comment-btn {
	background: #1e3a8a !important;
	color: white !important;
	border: none !important;
	padding: 1rem 2rem !important;
	border-radius: 10px !important;
	font-size: 1.1rem !important;
	font-weight: 600 !important;
	font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
	cursor: pointer !important;
	transition: all 0.3s ease !important;
	display: inline-block !important;
	text-align: center !important;
	box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3) !important;
}

.submit-comment-btn:hover {
	background: #1e40af !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 8px 20px rgba(30, 58, 138, 0.4) !important;
}

.required {
	color: #ef4444;
}

/* Form Info Styling */
.form-info {
	background: #f0f9ff;
	border: 1px solid #0ea5e9;
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 1.5rem;
}

.form-info p {
	color: #0369a1;
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.5;
}

/* Reset Password Button */
.reset-submit {
	background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

.reset-submit:hover {
	background: linear-gradient(135deg, #d97706, #b45309) !important;
	box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4) !important;
}

/* Auth Messages */
.auth-message {
	padding: 1rem 1.5rem;
	border-radius: 10px;
	margin-bottom: 2rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-weight: 500;
	animation: slideIn 0.3s ease;
}

.auth-message-success {
	background: #d1fae5;
	color: #065f46;
	border: 1px solid #10b981;
}

.auth-message-error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #ef4444;
}

.auth-message i {
	font-size: 1.2rem;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Comment Navigation */
.comment-navigation {
	display: flex;
	justify-content: space-between;
	margin: 2rem 0;
}

.comment-navigation a {
	color: #1a73e8;
	text-decoration: none;
	font-weight: 500;
	padding: 0.5rem 1rem;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	transition: all 0.3s ease;
}

.comment-navigation a:hover {
	background: #1a73e8;
	color: white;
	border-color: #1a73e8;
}

.no-comments {
	text-align: center;
	color: #6b7280;
	font-style: italic;
	padding: 2rem;
	background: #f8fafc;
	border-radius: 8px;
}

/* Nested Comments */
.comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
	margin-right: 2rem;
	margin-top: 1rem;
}

.comment-list .children .comment-body {
	background: #ffffff;
	border-left: 3px solid #1a73e8;
}

/* Mobile Responsive Comments */
@media (max-width: 768px) {
	.comment-form {
		padding: 1.5rem;
	}
	
	.comment-author {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
	
	.comment-actions {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
	
	.comment-list .children {
		margin-right: 1rem;
	}
}

/* Login Page Styling */
.login-page-wrapper {
	min-height: 100vh;
	background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
}

.login-container {
	background: white;
	border-radius: 20px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
	padding: 2rem;
	max-width: 500px;
	width: 100%;
	position: relative;
	overflow: hidden;
}

.login-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #1a73e8, #8b5cf6, #ec4899);
}

.login-header {
	text-align: center;
	margin-bottom: 2.5rem;
}

.login-logo {
	margin-bottom: 1rem;
}

.login-logo .custom-logo-link {
	display: inline-block;
}

.login-logo .custom-logo {
	max-height: 80px;
	width: auto;
}

.login-logo .site-title {
	font-size: 2.5rem;
	font-weight: 800;
	background: linear-gradient(135deg, #1a73e8, #8b5cf6);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin: 0;
}

.login-subtitle {
	color: #6b7280;
	font-size: 1.1rem;
	margin: 0;
}

.login-tabs {
	display: flex;
	background: #f3f4f6;
	border-radius: 12px;
	padding: 0.25rem;
	margin-bottom: 2rem;
}

.tab-btn {
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	padding: 0.75rem 1rem;
	border-radius: 10px;
	font-size: 1rem;
	font-weight: 700;
	color: #0f172a;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-family: inherit;
}

.tab-btn.active {
	background: var(--primary-color);
	color: #fff;
	border-color: transparent;
}

.tab-btn:hover:not(.active) {
	color: #374151;
}

.tab-content {
	display: none;
}

.tab-content.active {
	display: block;
}

.form-group {
	margin-bottom: 1.5rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: #374151;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.form-group label i {
	color: #1a73e8;
	width: 16px;
}

.form-group input {
	width: 100%;
	padding: 1rem;
	border: 2px solid #e5e7eb;
	border-radius: 10px;
	font-size: 1rem;
	transition: all 0.3s ease;
	background: #f9fafb;
}

.form-group input:focus {
	outline: none;
	border-color: #1a73e8;
	background: white;
	box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.password-input {
	position: relative;
}

.toggle-password {
	position: absolute;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #6b7280;
	cursor: pointer;
	padding: 0.25rem;
	transition: color 0.3s ease;
}

.toggle-password:hover {
	color: #1a73e8;
}

.form-options {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
	flex-wrap: wrap;
	gap: 1rem;
}

.remember-me,
.terms-checkbox {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	font-size: 0.9rem;
	color: #6b7280;
}

.remember-me input[type="checkbox"],
.terms-checkbox input[type="checkbox"] {
	width: auto;
	margin: 0;
}

.forgot-password {
	color: #1a73e8;
	text-decoration: none;
	font-size: 0.9rem;
	transition: color 0.3s ease;
}

.forgot-password:hover {
	color: #0d47a1;
	text-decoration: underline;
}

.submit-btn {
	width: 100%;
	background: linear-gradient(135deg, #1a73e8, #8b5cf6);
	color: white;
	border: none;
	padding: 1rem 2rem;
	border-radius: 10px;
	font-size: 1.1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
}

.submit-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(26, 115, 232, 0.3);
}

.login-footer {
	text-align: center;
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 1px solid #e5e7eb;
}

.login-footer p {
	color: #6b7280;
	font-size: 0.9rem;
	margin: 0;
}

/* Custom Checkbox Styling */
.checkmark {
	width: 18px;
	height: 18px;
	border: 2px solid #d1d5db;
	border-radius: 4px;
	display: inline-block;
	position: relative;
	transition: all 0.3s ease;
}

input[type="checkbox"]:checked + .checkmark {
	background: #1a73e8;
	border-color: #1a73e8;
}

input[type="checkbox"]:checked + .checkmark::after {
	content: '✓';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: white;
	font-size: 12px;
	font-weight: bold;
}

/* Mobile Responsive Login */
@media (max-width: 768px) {
	.login-container {
		padding: 2rem 1.5rem;
		margin: 1rem;
	}
	
	.login-logo .site-title {
		font-size: 2rem;
	}
	
	.form-options {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.tab-btn {
		padding: 0.75rem 1rem;
		font-size: 0.9rem;
	}
}

/* Breadcrumbs */
.breadcrumbs {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	padding: 0.5rem 0.75rem;
	margin-bottom: 1rem;
	font-size: 0.8rem;
	color: #64748b;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.breadcrumbs a {
	color: #475569;
	text-decoration: none;
	transition: color 0.2s ease;
}

.breadcrumbs a:hover {
	color: #1a73e8;
}

.breadcrumbs i {
	font-size: 0.7rem;
	color: #94a3b8;
}

.breadcrumbs span {
	color: #64748b;
	font-weight: 500;
}

/* Category tree */
.categories-tree { 
	padding: 0.25rem 0.25rem 0.5rem; 
}

.tree-controls {
	padding: 0.5rem 0.75rem 0.25rem;
	text-align: center;
}

.toggle-all-btn {
	background: #1a73e8;
	color: #fff;
	border: none;
	padding: 0.75rem 0.75rem;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-weight: 500;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.toggle-all-btn:hover {
	background: #0d47a1;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2);
}

.cat-link { 
	color: inherit; 
	text-decoration: none; 
	font-weight: 500; 
	transition: color 0.3s ease;
	flex: 1;
	word-wrap: break-word;
	overflow-wrap: break-word;
	min-width: 0;
	white-space: nowrap;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 1rem;
}
.category-item { 
	padding: 0; 
	margin-bottom: 0.15rem;
}
.category-header { 
	display: flex; 
	align-items: center; 
	gap: 0.5rem; 
	padding: 0.75rem 0.75rem; 
	cursor: pointer; 
	border-radius: 6px; 
	transition: all 0.3s ease;
	border: 1px solid transparent;
	width: 100%;
	min-width: 0;
	height: 60px;
	box-sizing: border-box;
}
.category-header:hover { 
	background: #f8fafc; 
	border-color: #e2e8f0;
	transform: translateX(-4px);
}
.category-header.active { 
	background: #eef6ff; 
	border-color: #bfdbfe;
}
.category-toggle { 
	width: 20px; 
	height: 20px; 
	display: inline-flex; 
	align-items: center; 
	justify-content: center; 
	transition: transform 0.3s ease;
}
.category-toggle i { 
	transition: transform .2s ease; 
	color: #6b7280;
}
.category-header:hover .category-toggle i {
	color: #1a73e8;
}
.category-children { 
	padding-right: 1rem; 
	max-height: 0; 
	overflow: hidden; 
	transition: max-height .25s ease; 
}
.category-children.expanded { 
	max-height: 2000px; 
}
.content-count { 
	margin-right: auto; 
	font-weight: 600; 
	font-size: .9rem; 
	padding: 0.25rem 0.5rem;
	border-radius: 12px;
	background: rgba(26, 115, 232, 0.1);
}

/* Cards */
.card-grid { 
	display: grid; 
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
	gap: 1.5rem; 
	max-width: 1000px;
	margin: 0 auto;
	padding: 2rem 1rem;
	justify-content: center;
	justify-items: center;
}
.card { 
	background: #fff; 
	border: 1px solid #eee; 
	border-radius: 12px; 
	overflow: hidden; 
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
}
.card:hover { 
	transform: translateY(-5px); 
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); 
}

/* Archive/category-only centering (safe override) */
body.archive #contentGrid,
body.category #contentGrid {
	margin-inline: auto;
	display: flex !important;
	flex-wrap: wrap;
	gap: 1.5rem 1.5rem;
	justify-content: center !important;
	/* Neutralize RTL so wrapping doesn't pack to the right edge */
	direction: ltr;
	/* Keep clear distance from footer */
	margin-bottom: 5rem;
	max-width: 1200px;
	/* Shrink-wrap to cards and center whole block */
	width: max-content;
	max-inline-size: 100%;
}

body.archive #contentGrid .card,
body.category #contentGrid .card {
	width: 300px;
	max-width: 100%;
	/* Restore RTL inside cards */
	direction: rtl;
}

/* Extra safeguard: apply same centering to the class hook in case ID differs */
body.archive .card-grid,
body.category .card-grid {
	max-width: 1200px;
	margin: 0 auto 5rem auto;
	display: flex !important;
	flex-wrap: wrap;
	justify-content: center !important;
	gap: 1.5rem 1.5rem;
	/* Shrink-wrap block to its cards */
	width: max-content;
	max-inline-size: 100%;
}

body.archive .card-grid .card,
body.category .card-grid .card {
	width: 300px;
	max-width: 100%;
}

/* Featured Image */
.card-image { width: 100%; height: 200px; overflow: hidden; position: relative; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.card:hover .card-image img { transform: scale(1.05); }

.card-content { 
	padding: 1rem; 
	flex: 1;
	display: flex;
	flex-direction: column;
}
.card-title { 
	margin: 0 0 .5rem 0; 
	font-size: 1.1rem; 
	flex: 1;
}
.card-title a { 
	color: #1a73e8; 
	text-decoration: none; 
	display: block;
}
.card-title a:hover { 
	color: #0d47a1; 
	text-decoration: none;
}
.card-text { 
	color: #555; 
	min-height: 48px; 
	flex: 1;
}
.card-meta { display: none; }
.card-actions { 
	margin-top: .75rem; 
	flex-shrink: 0;
}
.btn { 
	background: #1a73e8; 
	color: #fff; 
	border: 0; 
	padding: .5rem .75rem; 
	border-radius: 6px; 
	cursor: pointer; 
	text-decoration: none; 
	display: inline-block; 
	transition: background 0.3s ease;
	position: relative;
	z-index: 10;
	pointer-events: auto;
}
.btn:hover { 
	background: #0d47a1; 
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Show All Button */
.show-all-container { grid-column: 1 / -1; text-align: center; margin-top: 2rem; }
.show-all-btn { background: #1a73e8; color: #fff; padding: 1rem 2rem; border-radius: 6px; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; transition: all 0.3s ease; font-weight: 500; border: none; cursor: pointer; }
.show-all-btn:hover { background: #0d47a1; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }

/* Pre-footer buttons */
.pre-footer-buttons {
	background: linear-gradient(135deg, #f8fafc, #e2e8f0);
	border-top: 1px solid #cbd5e1;
	padding: 2rem 0;
	margin-top: 3rem;
}

.pre-footer-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.pre-footer-btn {
	padding: 1rem 2rem;
	border-radius: 8px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	transition: all 0.3s ease;
	font-weight: 600;
	border: none;
	cursor: pointer;
	font-size: 1rem;
	min-width: 200px;
	justify-content: center;
}

.btn-primary {
	background: linear-gradient(135deg, #1a73e8, #0d47a1);
	color: #fff;
	box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2);
}

.btn-primary:hover {
	background: linear-gradient(135deg, #0d47a1, #1a73e8);
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(26, 115, 232, 0.3);
}

.btn-secondary {
	background: linear-gradient(135deg, #10b981, #059669);
	color: #fff;
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-secondary:hover {
	background: linear-gradient(135deg, #059669, #10b981);
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

/* Content buttons */
.content-buttons {
	margin-top: 3rem;
	padding: 2rem;
	background: linear-gradient(135deg, #f8fafc, #e2e8f0);
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	text-align: center;
}

.content-buttons-container {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.content-btn {
	padding: 1rem 2rem;
	border-radius: 8px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	transition: all 0.3s ease;
	font-weight: 600;
	border: none;
	cursor: pointer;
	font-size: 1rem;
	min-width: 200px;
	justify-content: center;
}

/* Categories page styling */
.categories-page-wrapper {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

/* Archive page styling - make it full-width like single posts */
.archive-header {
	width: 100%;
	max-width: 1200px;
	margin: 1rem auto 2.5rem auto;
	padding: 1.5rem;
	background: linear-gradient(135deg, #f8fafc, #e2e8f0);
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	text-align: center;
}

#contentGrid {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto 3rem auto;
	padding: 2rem 1rem;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	justify-content: center;
	gap: 1.25rem 1.25rem;
}

/* Desktop: exactly 3 cards per row for category/archive pages */
@media (min-width: 1025px) {
	body.archive #contentGrid,
	body.category #contentGrid {
		grid-template-columns: repeat(3, 1fr) !important;
		max-width: 1200px !important;
		margin: 0 auto 3rem auto !important;
	}
}

/* Tablet: 2 cards per row */
@media (min-width: 641px) and (max-width: 1024px) {
	body.archive #contentGrid,
	body.category #contentGrid {
		grid-template-columns: repeat(2, 1fr) !important;
		max-width: 960px !important;
		margin: 0 auto 2rem auto !important;
	}
}

/* Mobile: 1 card per row */
@media (max-width: 640px) {
	body.archive #contentGrid,
	body.category #contentGrid {
		grid-template-columns: 1fr !important;
		max-width: 100% !important;
		padding: 0 1rem !important;
		margin: 0 auto 1.5rem auto !important;
	}
}

.categories-page-header {
	text-align: center;
	margin-bottom: 3rem;
	padding: 2rem;
	background: linear-gradient(135deg, #f8fafc, #e2e8f0);
	border: 1px solid #cbd5e1;
	border-radius: 12px;
}

.categories-page-title {
	margin: 0 0 1rem 0;
	color: #1e40af;
	font-size: 2.5rem;
	font-weight: 700;
}

.categories-page-description {
	margin: 0;
	color: #64748b;
	font-size: 1.1rem;
	line-height: 1.6;
}

.categories-page-content {
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
}

.categories-full-width {
	padding: 1rem;
}

.categories-full-tree {
	padding: 0.25rem 0.25rem 0.5rem;
}

.categories-full-tree .category-header {
	height: 60px;
	padding: 1rem 1rem;
	margin-bottom: 0.25rem;
}

.categories-full-tree .cat-link {
	font-size: 1rem;
}

.categories-full-tree .content-count {
	font-size: 1rem;
	padding: 0.3rem 0.6rem;
}

/* Footer */
.site-footer { 
	background: #0f172a; 
	color: #e5e7eb; 
	margin-top: auto;
	padding-top: 1rem;
}
.footer-content { 
	max-width: 1200px; 
	margin: 0 auto; 
	padding: 1rem; 
	display: grid; 
	grid-template-columns: 1fr 2fr; 
	gap: 2rem; 
}
.footer-links { 
	list-style: none; 
	padding: 0; 
	margin: 0; 
}
.footer-links a { 
	color: #e5e7eb; 
	text-decoration: none; 
	padding: 0.5rem 0;
	display: block;
	transition: color 0.3s ease;
}
.footer-links a:hover {
	color: #93c5fd;
}
.footer-description { 
	color: #cbd5e1; 
	text-align: justify; 
	line-height: 1.6; 
}
.footer-section h3 {
	color: #f8fafc;
	margin-bottom: 0.75rem;
	font-size: 1rem;
	font-weight: 600;
}

/* Footer bottom section */
.footer-bottom {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem;
	border-top: 1px solid #374151;
}

.social-media-section {
	text-align: center;
	margin-bottom: 1rem;
}

.social-links {
	display: flex;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: #374151;
	color: #e5e7eb;
	border-radius: 50%;
	text-decoration: none;
	transition: all 0.3s ease;
	font-size: 1.1rem;
}

.social-link:hover {
	background: #1a73e8;
	color: #fff;
	transform: translateY(-2px);
}

.footer-info-section {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	align-items: center;
}

.footer-text {
	color: #cbd5e1;
	font-size: 0.9rem;
	line-height: 1.5;
}

.footer-text a {
	color: #93c5fd;
	text-decoration: none;
}

.footer-text a:hover {
	color: #bfdbfe;
	text-decoration: underline;
}

.footer-email {
	text-align: left;
	color: #cbd5e1;
	font-size: 0.9rem;
}

.footer-email a {
	color: #93c5fd;
	text-decoration: none;
}

.footer-email a:hover {
	color: #bfdbfe;
}

.footer-email i {
	margin-left: 0.5rem;
	color: #6b7280;
}

/* Back to Top Button */
.back-to-top {
	position: fixed;
	bottom: 20px;
	left: 20px;
	width: 50px;
	height: 50px;
	background: #1a73e8;
	color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	z-index: 1000;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
	opacity: 1;
	visibility: visible;
}

.back-to-top:hover {
	background: #0d47a1;
	transform: translateY(-2px);
}

/* Notifications */
.notification {
	position: fixed;
	top: 20px;
	right: 20px;
	padding: 1rem 1.5rem;
	border-radius: 6px;
	color: #fff;
	z-index: 10000;
	font-weight: 500;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	opacity: 0;
	transform: translateX(100%);
	transition: all 0.3s ease;
}

.notification.show {
	opacity: 1;
	transform: translateX(0);
}

.notification-success { background: #28a745; }
.notification-error { background: #dc3545; }
.notification-info { background: #007bff; }

/* Pagination */
.wp-pagenavi {
	margin-top: 3rem;
	text-align: center;
	max-width: 1000px;
	margin-left: auto;
	margin-right: auto;
	padding: 2rem 1rem;
}

.pagination-container {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.wp-pagenavi a,
.wp-pagenavi span {
	display: inline-flex;
	align-items: center;
	padding: 0.75rem 1rem;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	text-decoration: none;
	color: #374151;
	transition: all 0.3s ease;
	font-weight: 500;
}

.wp-pagenavi a:hover {
	background: #1a73e8;
	color: #fff;
	border-color: #1a73e8;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2);
}

.wp-pagenavi .current {
	background: #1a73e8;
	color: #fff;
	border-color: #1a73e8;
}

/* 404 */
.not-found { text-align: center; padding: 3rem 1rem; }

/* Search page styling */
.search-header {
	background: linear-gradient(135deg, #f8fafc, #e2e8f0);
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 2rem;
	text-align: center;
}

.search-title {
	margin: 0 0 1rem 0;
	color: #1e40af;
	font-size: 1.5rem;
	font-weight: 700;
}

.search-title span {
	color: #1a73e8;
	font-weight: 600;
}

.search-count {
	color: #64748b;
	font-size: 1rem;
	margin-bottom: 1.5rem;
}

.search-form {
	margin-top: 1rem;
}

.search-input-group {
	display: flex;
	gap: 0.5rem;
	max-width: 500px;
	margin: 0 auto;
}

.search-input {
	flex: 1;
	padding: 0.75rem 1rem;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 1rem;
	background: #fff;
}

.search-input:focus {
	outline: none;
	border-color: #1a73e8;
	box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.search-submit {
	background: #1a73e8;
	color: #fff;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-weight: 500;
}

.search-submit:hover {
	background: #0d47a1;
	transform: translateY(-2px);
}

.search-suggestions {
	margin-top: 2rem;
	padding: 1.5rem;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
}

.search-suggestions h3 {
	margin: 0 0 1rem 0;
	color: #1e40af;
	font-size: 1.1rem;
	font-weight: 600;
}

.search-suggestions ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.search-suggestions li {
	padding: 0.5rem 0;
	color: #64748b;
	border-bottom: 1px solid #e2e8f0;
}

.search-suggestions li:last-child {
	border-bottom: none;
}

/* Footer description links */
.footer-description a { color: #93c5fd; text-decoration: underline; }
.footer-description a:hover { color: #bfdbfe; }

/* Author Info Section */
.author-info-section {
	margin-top: 2rem;
	padding: 1.5rem;
	background: linear-gradient(135deg, #f8fafc, #e2e8f0);
	border: 1px solid #cbd5e1;
	border-radius: 12px;
}

.author-info-title {
	margin: 0 0 1rem 0;
	color: #1e40af;
	font-size: 1.2rem;
	font-weight: 700;
	font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.author-info-content {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}

.author-avatar {
	flex-shrink: 0;
	width: 100px;
	height: 100px;
	border-radius: 50%;
	overflow: hidden;
	border: 4px solid #fff;
	box-shadow: 0 6px 20px rgba(0,0,0,0.15);
	background: linear-gradient(135deg, #f8fafc, #e2e8f0);
	display: flex;
	align-items: center;
	justify-content: center;
}

.author-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.author-avatar:before {
	content: '\f007';
	font-family: 'Font Awesome 5 Free';
	font-weight: 900;
	font-size: 2rem;
	color: #94a3b8;
	display: none;
}

.author-avatar:not(:has(img)):before {
	display: block;
}

.author-details {
	flex: 1;
}

.author-name {
	margin: 0 0 0.5rem 0;
	color: #1e293b;
	font-size: 1.1rem;
	font-weight: 600;
	font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.author-bio {
	margin: 0;
	color: #64748b;
	line-height: 1.6;
	font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Download Section */
.download-section {
	margin-top: 2rem;
	padding: 1.5rem;
	background: linear-gradient(135deg, #fef3c7, #fde68a);
	border: 1px solid #f59e0b;
	border-radius: 12px;
}

.download-title {
	margin: 0 0 1rem 0;
	color: #92400e;
	font-size: 1.2rem;
	font-weight: 700;
}

.download-description {
	margin-bottom: 1rem;
	color: #64748b;
	line-height: 1.5;
}

.download-files-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.download-file-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	background: rgba(255, 255, 255, 0.7);
	border-radius: 8px;
	border: 1px solid rgba(245, 158, 11, 0.3);
}

.download-file-info h4 {
	margin: 0;
	color: #1e293b;
	font-size: 1rem;
	font-weight: 600;
}

.btn-download {
	background: #f59e0b;
	color: #fff;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	transition: all 0.3s ease;
	font-weight: 500;
	white-space: nowrap;
	font-size: 0.9rem;
}

.btn-download:hover {
	background: #d97706;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Tags Styling */
.content-keywords {
	margin-top: 2rem;
	padding: 1rem;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
}

.content-keywords strong {
	color: #1e40af;
	font-weight: 600;
	margin-left: 0.5rem;
}

.content-keywords a {
	display: inline-block;
	margin: 0.25rem 0.5rem 0.25rem 0;
	padding: 0.25rem 0.75rem;
	background: #1a73e8;
	color: #fff;
	text-decoration: none;
	border-radius: 20px;
	font-size: 0.9rem;
	transition: all 0.3s ease;
}

.content-keywords a:hover {
	background: #0d47a1;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

/* Related posts */
.related-posts { 
	margin-top: 2rem; 
}
.related-posts h3 { 
	display: inline-block; 
	background: #eef6ff; 
	color: #0d47a1; 
	border: 1px solid #bfdbfe; 
	padding: .35rem .6rem; 
	border-radius: 8px; 
	font-weight: 700; 
	margin: 0 0 .75rem 0; 
}
.related-list { 
	display: flex; 
	flex-direction: column; 
	gap: 0.5rem; 
}
.related-item { 
	background: #fff; 
	border: 1px solid #e5e7eb; 
	border-radius: 8px; 
	transition: all 0.3s ease; 
}
.related-item:hover { 
	border-color: #1a73e8; 
	box-shadow: 0 2px 8px rgba(26, 115, 232, 0.1); 
	transform: translateX(-4px); 
}
.related-link { 
	display: flex; 
	align-items: center; 
	padding: 1rem; 
	text-decoration: none; 
	color: #374151; 
	transition: color 0.3s ease; 
}
.related-link:hover { 
	color: #1a73e8; 
}
.related-link i { 
	margin-left: 0.75rem; 
	color: #6b7280; 
	font-size: 0.9rem; 
	transition: color 0.3s ease; 
}
.related-link:hover i { 
	color: #1a73e8; 
}
.related-title { 
	font-weight: 500; 
	flex: 1; 
}

/* Post actions */
.post-actions {
	margin-top: 2rem;
	display: flex;
	gap: 1rem;
	justify-content: center;
}

.btn-print {
	background: #10b981;
	color: #fff;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	transition: all 0.3s ease;
	font-weight: 500;
}

.btn-print:hover {
	background: #059669;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-pdf {
	background: #ef4444;
	color: #fff;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	transition: all 0.3s ease;
	font-weight: 500;
}

.btn-pdf:hover {
	background: #dc2626;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Post navigation cards */
.post-navigation { 
	margin-top: 2rem; 
}
.post-navigation .nav-links { 
	display: grid; 
	grid-template-columns: 1fr auto 1fr; 
	gap: 1rem; 
	align-items: center;
}
.card-nav { 
	background: #fff; 
	border: 1px solid #eee; 
	border-radius: 10px; 
	padding: .75rem 1rem; 
	display: flex; 
	align-items: center; 
	justify-content: space-between; 
	text-decoration: none; 
	color: #111; 
	transition: transform .2s ease, box-shadow .2s ease; 
}
.card-nav:hover { 
	transform: translateY(-2px); 
	box-shadow: 0 8px 16px rgba(0,0,0,.08); 
}
.card-nav .nav-label { 
	color: #6b7280; 
	font-size: .9rem; 
}
.card-nav .nav-title { 
	color: #1a73e8; 
	font-weight: 600; 
}

.nav-center {
	display: flex;
	justify-content: center;
}

.nav-home {
	background: #f3f4f6;
	color: #374151;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 0.75rem 1rem;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	transition: all 0.3s ease;
	font-weight: 500;
}

.nav-home:hover {
	background: #e5e7eb;
	color: #1f2937;
	border-color: #9ca3af;
	transform: translateY(-2px);
}

/* Categories sidebar improvements */
.categories-tree .category-header { color: #0f172a; }
.categories-tree .category-children .category-header { color: #374151; }
.categories-tree .category-children .category-children .category-header { color: #6b7280; }
.category-header.active { background: #eef6ff; border-radius: 6px; }
.category-children { padding-right: 1rem; max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.category-children.expanded { max-height: 2000px; }
.content-count { color: #1a73e8; font-weight: 600; font-size: .9rem; margin-right: .25rem; }

/* Category level-based styling */
/* Level 1 - Main categories (Blue) */
.categories-tree > .category-item > .category-header {
	background: rgba(59, 130, 246, 0.1);
	border: 1px solid rgba(59, 130, 246, 0.2);
}

.categories-tree > .category-item > .category-header:hover {
	background: rgba(59, 130, 246, 0.15);
	border-color: rgba(59, 130, 246, 0.3);
}

.categories-tree > .category-item > .category-header .cat-link {
	color: #1e40af;
	font-weight: 600;
}

.categories-tree > .category-item > .category-header .content-count {
	background: rgba(59, 130, 246, 0.2);
	color: #1e40af;
}

/* Level 2 - Sub categories (Green) */
.categories-tree > .category-item > .category-children > .category-item > .category-header {
	background: rgba(16, 185, 129, 0.1);
	border: 1px solid rgba(16, 185, 129, 0.2);
	height: 52px;
}

.categories-tree > .category-item > .category-children > .category-item > .category-header:hover {
	background: rgba(16, 185, 129, 0.15);
	border-color: rgba(16, 185, 129, 0.3);
}

.categories-tree > .category-item > .category-children > .category-item > .category-header .cat-link {
	color: #047857;
	font-weight: 500;
	font-size: 0.95rem;
}

.categories-tree > .category-item > .category-children > .category-item > .category-header .content-count {
	background: rgba(16, 185, 129, 0.2);
	color: #047857;
}

/* Level 3 - Sub-sub categories (Purple) */
.categories-tree > .category-item > .category-children > .category-item > .category-children > .category-item > .category-header {
	background: rgba(139, 92, 246, 0.1);
	border: 1px solid rgba(139, 92, 246, 0.2);
	padding: 0.75rem 0.75rem;
	height: 52px;
}

.categories-tree > .category-item > .category-children > .category-item > .category-children > .category-item > .category-header:hover {
	background: rgba(139, 92, 246, 0.15);
	border-color: rgba(139, 92, 246, 0.3);
}

.categories-tree > .category-item > .category-children > .category-item > .category-children > .category-item > .category-header .cat-link {
	color: #7c3aed;
	font-weight: 500;
	font-size: 0.9rem;
}

.categories-tree > .category-item > .category-children > .category-item > .category-children > .category-item > .category-header .content-count {
	background: rgba(139, 92, 246, 0.2);
	color: #7c3aed;
}

/* Level 4+ - Deep categories (Orange) */
.categories-tree > .category-item > .category-children > .category-item > .category-children > .category-item > .category-children > .category-item > .category-header {
	background: rgba(245, 158, 11, 0.1);
	border: 1px solid rgba(245, 158, 11, 0.2);
	padding: 0.75rem 0.75rem;
	height: 52px;
}

.categories-tree > .category-item > .category-children > .category-item > .category-children > .category-item > .category-children > .category-item > .category-header:hover {
	background: rgba(245, 158, 11, 0.15);
	border-color: rgba(245, 158, 11, 0.3);
}

.categories-tree > .category-item > .category-children > .category-item > .category-children > .category-item > .category-children > .category-item > .category-header .cat-link {
	color: #d97706;
	font-weight: 500;
	font-size: 0.85rem;
}

.categories-tree > .category-item > .category-children > .category-item > .category-children > .category-item > .category-children > .category-item > .category-header .content-count {
	background: rgba(245, 158, 11, 0.2);
	color: #d97706;
}

/* Content Area */
.content-area {
	min-height: 500px;
	display: flex;
	flex-direction: column;
}

/* Additional improvements for category buttons */
.category-header {
	box-sizing: border-box;
}

.category-header .cat-link {
	hyphens: auto;
	-webkit-hyphens: auto;
	-ms-hyphens: auto;
}

/* Ensure proper spacing for long category names */
.category-children {
	padding-right: 0.75rem;
}

.category-children .category-header {
	margin-bottom: 0.15rem;
}

/* Site description */
.site-description {
	background: linear-gradient(135deg, #f8fafc, #e2e8f0);
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 2rem;
	text-align: center;
}

/* Archive header styling */
.archive-header {
	background: linear-gradient(135deg, #f8fafc, #e2e8f0);
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 2rem;
	text-align: center;
}

.archive-title {
	margin: 0 0 1rem 0;
	color: #1e40af;
	font-size: 2rem;
	font-weight: 700;
}

.archive-description {
	color: #64748b;
	font-size: 1rem;
	line-height: 1.6;
	margin-top: 1rem;
}

.description-content {
	font-size: 1.1rem;
	line-height: 1.6;
	color: #374151;
	font-weight: 500;
}

/* Hide meta on cards globally for cleaner look */
.card .card-meta { display: none !important; }

/* Mobile menu toggle button */
.mobile-menu-toggle {
	display: none;
	background: #1a73e8;
	color: #fff;
	border: none;
	padding: 0.75rem;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 1.1rem;
	box-shadow: 0 2px 8px rgba(26, 115, 232, 0.2);
}

.mobile-menu-toggle:hover {
	background: #0d47a1;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

/* Mobile categories menu */
.mobile-categories-menu {
	display: none;
	position: fixed;
	top: 0;
	right: 0;
	width: 100%;
	height: 100vh;
	background: rgba(0, 0, 0, 0.8);
	z-index: 10000;
	backdrop-filter: blur(5px);
}

.mobile-categories-menu.active {
	display: block;
}

.mobile-categories-header {
	background: #fff;
	padding: 1rem;
	border-bottom: 1px solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-categories-header h3 {
	margin: 0;
	color: #1a73e8;
	font-size: 1.2rem;
	font-weight: 700;
}

.mobile-categories-close {
	background: #ef4444;
	color: #fff;
	border: none;
	padding: 0.5rem;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 1.2rem;
}

.mobile-categories-close:hover {
	background: #dc2626;
}

.mobile-categories-content {
	background: #fff;
	height: calc(100vh - 80px);
	overflow-y: auto;
	padding: 1rem;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .main-layout,
  .main-content-wrapper { 
  	grid-template-columns: 1fr; 
  	gap: 1rem;
  	width: 100%;
  	margin: 0.5rem auto;
  	padding: 0 0.5rem;
  }
  
  .categories-sidebar { 
  	display: none; /* Hide sidebar on mobile */
  }
  .content-main { 
  	order: 1; 
  	width: 100%;
  }
  
  /* Option 1: Hide main content on mobile - show only header, sidebar, footer */
  /* Uncomment the lines below if you want to hide content on mobile */
  /*
  .content-main .site-description,
  .content-main .card-grid,
  .content-main .show-all-container {
  	display: none;
  }
  */
  
  /* Quick toggle: Uncomment the line below to hide content on mobile */
  /* .content-main { display: none; } */
  
  /* Option 2: Show content but make it responsive */
  .content-main .site-description {
  	margin-bottom: 1rem;
  	padding: 1rem;
  }
  
  .content-main .card-grid,
  #contentGrid {
  	grid-template-columns: 1fr;
  	gap: 1rem;
  	padding: 1rem 0.5rem;
  }
  
  .content-main .show-all-container {
  	margin-top: 1rem;
  }
  
  /* Pre-footer buttons mobile */
  .pre-footer-container {
  	flex-direction: column;
  	gap: 1rem;
  }
  
  .pre-footer-btn {
  	min-width: auto;
  	width: 100%;
  }
  
  /* Content buttons mobile */
  .content-buttons {
  	margin-top: 2rem;
  	padding: 1.5rem;
  }
  
  .content-buttons-container {
  	flex-direction: column;
  	gap: 1rem;
  }
  
  .content-btn {
  	min-width: auto;
  	width: 100%;
  }
  
  /* Categories page mobile */
  .categories-page-wrapper {
  	padding: 1rem 0.5rem;
  }
  
  .categories-page-header {
  	padding: 1.5rem;
  	margin-bottom: 2rem;
  }
  
  .categories-page-title {
  	font-size: 2rem;
  }
  
  .categories-full-width {
  	padding: 1rem;
  }
  
  .categories-full-tree .category-header {
  	height: 52px;
  	padding: 0.75rem 0.75rem;
  }
  
  /* Show mobile menu toggle */
  .mobile-menu-toggle {
  	display: block;
  }
  .content-area { order: 1; }
  .related-grid { grid-template-columns: 1fr; }
  .post-navigation .nav-links { 
  	grid-template-columns: 1fr; 
  	gap: 0.5rem;
  }
  .nav-center { order: -1; }
  .post-actions { 
  	flex-direction: column; 
  	align-items: center;
  }
  .footer-content { grid-template-columns: 1fr; }
  .footer-info-section { grid-template-columns: 1fr; text-align: center; }
  .footer-email { text-align: center; }
  .site-title { font-size: 1.5rem; }
  .header-container { padding: 0.75rem; }
  .pagination-container { 
  	flex-direction: column; 
  	gap: 0.5rem;
  }
  
  /* Author and Download sections responsive */
  .author-info-content {
  	flex-direction: column;
  	text-align: center;
  }
  
  .author-avatar {
  	align-self: center;
  }
  
  .download-file-item {
  	flex-direction: column;
  	text-align: center;
  }
  
  .download-file-action {
  	align-self: center;
  }
  
  /* Archive page responsive */
  .archive-header {
  	padding: 1rem;
  }
  
  .archive-title {
  	font-size: 1.5rem;
  	margin-bottom: 1rem;
  }
  
  .card-grid {
  	grid-template-columns: 1fr;
  	gap: 1rem;
  	padding: 0 1rem;
  }
  
  .card {
  	margin-bottom: 1rem;
  }
  
  /* Sidebar mobile improvements */
  .categories-sidebar {
  	margin: 0 1rem;
  }
  
  .category-header {
  	padding: 0.75rem 1rem;
  	height: 52px;
  }
  
  .cat-link {
  	font-size: 0.95rem;
  	white-space: nowrap;
  	overflow: hidden;
  	text-overflow: ellipsis;
  }
  
  .content-count {
  	font-size: 0.8rem;
  	padding: 0.2rem 0.4rem;
  }
  
  /* Mobile categories menu improvements */
  .mobile-categories-content .category-header {
  	padding: 0.75rem 1rem;
  }
  
  .mobile-categories-content .cat-link {
  	font-size: 1rem;
  }
  
  .mobile-categories-content .content-count {
  	font-size: 0.85rem;
  	padding: 0.25rem 0.5rem;
  }
  
  /* Archive page mobile improvements */
  .archive-header {
  	padding: 1rem;
  	margin: 0 auto 1.5rem auto;
  }
  
  .archive-title {
  	font-size: 1.5rem;
  }
  
  #contentGrid {
  	padding: 1rem 0.5rem;
  }
  
  /* Mobile toggle button improvements */
  .mobile-categories-content .tree-controls {
  	padding: 0.5rem 1rem 0.25rem;
  }
  
  .mobile-categories-content .toggle-all-btn {
  	padding: 0.75rem 0.75rem;
  }
  
  /* Mobile categories menu improvements */
  .mobile-categories-content .category-header {
  	padding: 0.75rem 1rem;
  }
  
  .mobile-categories-content .cat-link {
  	font-size: 1rem;
  }
  
  .mobile-categories-content .content-count {
  	font-size: 0.85rem;
  	padding: 0.25rem 0.5rem;
  }
  
  /* Archive page mobile improvements */
  .archive-header {
  	padding: 1rem;
  	margin: 0 auto 1.5rem auto;
  }
  
  .archive-title {
  	font-size: 1.5rem;
  }
  
  #contentGrid {
  	padding: 1rem 0.5rem;
  }
}

/* Performance optimizations */
* {
	box-sizing: border-box;
}

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

/* Smooth scrolling */
html {
	scroll-behavior: smooth;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
	outline: 2px solid #1a73e8;
	outline-offset: 2px;
}

/* Hover effects */
.site-title:hover {
	transform: scale(1.05);
	text-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.main-nav .menu a:hover {
	background: #f3f4f6;
	color: #1a73e8;
	transform: translateY(-2px);
}

/* Notification Styles */
.notification {
	position: fixed;
	top: 20px;
	right: 20px;
	padding: 1rem 1.5rem;
	border-radius: 8px;
	color: white;
	font-weight: 500;
	z-index: 1000;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.show {
	transform: translateX(0);
}

.notification-info {
	background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.notification-error {
	background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification-success {
	background: linear-gradient(135deg, #10b981, #059669);
}

.notification-warning {
	background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Back to top button */
.back-to-top {
	position: fixed;
	bottom: 30px;
	left: 30px;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: linear-gradient(135deg, #1e40af, #3b82f6);
	color: white;
	border: none;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
	z-index: 1000;
}

.back-to-top.visible {
	opacity: 1;
	visibility: visible;
}

.back-to-top:hover {
	background: linear-gradient(135deg, #1d4ed8, #2563eb);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

/* Loading state for buttons */
.btn.loading {
	opacity: 0.7;
	cursor: not-allowed;
}

.btn.loading:hover {
	transform: none;
	box-shadow: none;
}

/* Responsive improvements */
@media (max-width: 768px) {
	.post-header h1 {
		font-size: 2rem;
	}
	
	.post-meta {
		gap: 1rem;
	}
	
	.post-meta span {
		font-size: 0.9rem;
		padding: 0.4rem 0.8rem;
	}
	
	.breadcrumbs {
		flex-wrap: wrap;
		gap: 0.5rem;
	}
	
	.post-navigation .nav-links {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
	
	.card-nav {
		padding: 0.75rem 1rem;
	}
	
	.download-file-item {
		flex-direction: column;
		text-align: center;
		gap: 0.75rem;
	}
	
	.download-file-info h4 {
		max-width: none;
		white-space: normal;
	}
}

@media (max-width: 480px) {
	.post-header {
		padding: 1.5rem;
	}
	
	.post-header h1 {
		font-size: 1.75rem;
	}
	
	.post-meta {
		flex-direction: column;
		gap: 0.75rem;
	}
	
	.breadcrumbs {
		padding: 0.75rem 1rem;
		font-size: 0.85rem;
	}
	
	.post-navigation {
		padding: 1.5rem;
	}
	
	/* Extra small screen improvements */
	.categories-sidebar {
		margin: 0 0.5rem;
	}
	
	  .category-header {
  	padding: 0.5rem 0.75rem;
  	height: 52px;
  }
  
  .cat-link {
  	font-size: 0.9rem;
  	white-space: nowrap;
  	overflow: hidden;
  	text-overflow: ellipsis;
  }
	
	/* Mobile categories menu small screen improvements */
	.mobile-categories-content .category-header {
		padding: 0.5rem 0.75rem;
	}
	
	.mobile-categories-content .cat-link {
		font-size: 0.95rem;
	}
	
	/* Homepage mobile improvements */
	.main-layout,
	.main-content-wrapper {
		margin: 0.25rem auto;
		padding: 0 0.25rem;
	}
	
	.site-header {
		padding: 0.5rem 0;
	}
	
	.header-container {
		padding: 0.5rem;
	}
	
	.site-title {
		font-size: 1.25rem;
	}
	
	.site-logo img {
		max-height: 45px;
		max-width: 150px;
	}
	
	.archive-title {
		font-size: 1.25rem;
		padding: 0 1rem;
	}
	
	  .card-grid {
  	padding: 0 0.5rem;
  }
  
  /* Search page mobile improvements */
  .search-header {
  	padding: 1rem;
  }
  
  .search-title {
  	font-size: 1.25rem;
  }
  
  .search-input-group {
  	flex-direction: column;
  	gap: 0.5rem;
  }
  
  .search-input {
  	width: 100%;
  }
  
  .search-submit {
  	width: 100%;
  }
}

/* ========================================
   Advertisement Section Styles
   ======================================== */

.gitook-advertisement-section {
	margin: 2rem 0;
	padding: 1.5rem;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ads-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: #2c3e50;
	margin: 0 0 1.5rem 0;
	text-align: center;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid #e9ecef;
}

.ads-container {
	display: flex !important;
	gap: 1rem;
	flex-wrap: nowrap !important;
	width: 100% !important;
	align-items: stretch;
	overflow: hidden;
}

/* Single Column Layout */
.ads-layout-1 .ads-container {
	flex-direction: column;
}

.ads-layout-1 .ads-column {
	width: 100%;
}

/* Two Column Layout */
.ads-layout-2 .ads-container {
	display: flex !important;
	flex-direction: row !important;
	width: 100% !important;
	gap: 1rem !important;
	align-items: stretch !important;
}

.ads-layout-2 .ads-column {
	flex: 1 1 50% !important;
	width: 50% !important;
	max-width: 50% !important;
	min-width: 0 !important;
	box-sizing: border-box !important;
}

/* Three Column Layout */
.ads-layout-3 .ads-container {
	display: flex !important;
	flex-direction: row !important;
	width: 100% !important;
	gap: 1rem !important;
	align-items: stretch !important;
}

.ads-layout-3 .ads-column {
	flex: 1 1 33.333% !important;
	width: 33.333% !important;
	max-width: 33.333% !important;
	min-width: 0 !important;
	box-sizing: border-box !important;
}

.ads-column {
	padding: 1rem;
	background: #ffffff;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
	overflow: hidden;
}

.ads-column:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ads-column h4 {
	font-size: 1rem;
	font-weight: 600;
	color: #495057;
	margin: 0 0 0.75rem 0;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #e9ecef;
}

.ads-column p {
	font-size: 0.9rem;
	color: #6c757d;
	margin: 0.5rem 0;
	line-height: 1.5;
}

.ads-column img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	margin: 0.5rem 0;
}

.ads-column a {
	color: #007bff;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ads-column a:hover {
	color: #0056b3;
	text-decoration: underline;
}

/* Individual column shortcodes */
.gitook-ad-column {
	padding: 1rem;
	background: #ffffff;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	margin: 0.5rem 0;
}

.gitook-ad-column-1 {
	border-left: 4px solid #007bff;
}

.gitook-ad-column-2 {
	border-left: 4px solid #28a745;
}

.gitook-ad-column-3 {
	border-left: 4px solid #ffc107;
}

/* Force horizontal layout for desktop and tablet */
@media (min-width: 481px) {
	.ads-layout-2 .ads-container {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
	}
	
	.ads-layout-3 .ads-container {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
	}
	
	.ads-layout-2 .ads-column {
		flex: 1 1 50% !important;
		width: 50% !important;
		max-width: 50% !important;
	}
	
	.ads-layout-3 .ads-column {
		flex: 1 1 33.333% !important;
		width: 33.333% !important;
		max-width: 33.333% !important;
	}
}

/* Mobile Responsive */
@media (max-width: 480px) {
	.gitook-advertisement-section {
		margin: 1.5rem 0;
		padding: 1rem;
	}
	
	.ads-layout-2 .ads-container,
	.ads-layout-3 .ads-container {
		flex-direction: column !important;
		gap: 0.75rem !important;
	}
	
	.ads-layout-2 .ads-column,
	.ads-layout-3 .ads-column {
		flex: none !important;
		width: 100% !important;
		max-width: 100% !important;
	}
	
	.ads-title {
		font-size: 1.1rem;
		margin-bottom: 1rem;
	}
	
	.ads-column {
		padding: 0.75rem;
	}
}

/* ==============================
   Sidebar custom HTML block spacing
   ============================== */
.categories-sidebar .sidebar-ad-block {
	/* Make the card visually larger without changing inner font sizes */
	padding: 10px;
	margin-bottom: 12px;
	box-sizing: border-box;
	/* stretch to the sidebar edges (tweak values if needed) */
	width: calc(100% + 16px);
	margin-left: -8px;
	margin-right: -8px;
}

.categories-sidebar .sidebar-ad-block img {
	max-width: 100%;
	height: auto;
	display: block;
}
