/*
Theme Name: رنگین (Rangin)
Theme URI: https://example.com/rangin
Author: Rangin
Author URI: https://example.com
Description: قالب رنگارنگ و راست‌به‌چین وردپرس با فونت ایران‌سنس، اعداد فارسی، تقویم شمسی، طرح‌های رنگی آماده، تغییر رنگ برای بازدیدکننده، حالت شب و استایل‌های متنوع دکمه از بخش شخصی‌سازی.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rangin
Tags: rtl-language-support, custom-colors, custom-menu, custom-logo, featured-images, threaded-comments, blog, two-columns
*/

/* =====================================================================
   فونت ایران‌سنس
   فایل‌های فونت را در assets/fonts/ قرار دهید (راهنما: assets/fonts/README.txt)
   ===================================================================== */
@font-face {
	font-family: "IRANSans";
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: local("IRANSans Light"), url("assets/fonts/IRANSansWeb_Light.woff2") format("woff2"), url("assets/fonts/IRANSansWeb_Light.woff") format("woff");
}
@font-face {
	font-family: "IRANSans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: local("IRANSans"), url("assets/fonts/IRANSansWeb.woff2") format("woff2"), url("assets/fonts/IRANSansWeb.woff") format("woff");
}
@font-face {
	font-family: "IRANSans";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: local("IRANSans Medium"), url("assets/fonts/IRANSansWeb_Medium.woff2") format("woff2"), url("assets/fonts/IRANSansWeb_Medium.woff") format("woff");
}
@font-face {
	font-family: "IRANSans";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: local("IRANSans Bold"), url("assets/fonts/IRANSansWeb_Bold.woff2") format("woff2"), url("assets/fonts/IRANSansWeb_Bold.woff") format("woff");
}

/* =====================================================================
   متغیرها (رنگ‌ها از بخش شخصی‌سازی وردپرس بازنویسی می‌شوند)
   ===================================================================== */
:root {
	--primary: #0ea5e9;
	--primary-dark: #0b84ba;
	--primary-rgb: 14, 165, 233;
	--secondary: #6366f1;
	--accent: #f59e0b;

	--bg: #f4f6fb;
	--surface: #ffffff;
	--text: #1f2937;
	--muted: #6b7280;
	--border: #e5e7eb;
	--footer-bg: #111827;

	--radius: 14px;
	--btn-radius: 10px;
	--shadow: 0 6px 24px rgba(15, 23, 42, 0.07);
	--font: "IRANSans", "Vazirmatn", "Vazir", Tahoma, "Segoe UI", sans-serif;
}

html[data-mode="dark"] {
	--bg: #0f172a;
	--surface: #1e293b;
	--text: #e5e7eb;
	--muted: #94a3b8;
	--border: #334155;
	--shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

/* =====================================================================
   پایه
   ===================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 2;
	color: var(--text);
	background: var(--bg);
	text-align: right;
	transition: background 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font);
	font-weight: 700;
	line-height: 1.6;
	margin: 0 0 0.6em;
}

p { margin: 0 0 1.2em; }

a {
	color: var(--primary);
	text-decoration: none;
	transition: color 0.2s;
}
a:hover { color: var(--secondary); }

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

ul, ol { padding-inline-start: 1.4em; }

.container {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 20px;
}

.screen-reader-text,
.skip-link:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	position: fixed;
	top: 8px;
	right: 8px;
	z-index: 1000;
	padding: 10px 18px;
	background: var(--surface);
	border-radius: 8px;
}

::selection { background: var(--primary); color: #fff; }

/* =====================================================================
   دکمه‌ها (استایل از بخش شخصی‌سازی → «استایل دکمه‌ها»)
   ===================================================================== */
:is(.btn, button[type="submit"], input[type="submit"], .search-submit, .wp-block-button__link, .wp-element-button, .comment-reply-link, .more-link) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	padding: 0.55em 1.5em;
	font-family: var(--font);
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.8;
	color: #fff;
	background: var(--primary);
	border: 2px solid var(--primary);
	margin: 6px 0;
	border-radius: var(--btn-radius);
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.15s, background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
}
/* دکمه‌هایی که کنار هم یا زیر هم قرار می‌گیرند فاصله داشته باشند */
.btn + .btn,
.wp-block-button__link + .wp-block-button__link { margin-inline-start: 10px; }
.wp-block-buttons { gap: 14px; margin-block: 1.2em; }
.wp-block-buttons > .wp-block-button { margin: 0; }
.wp-block-buttons .wp-block-button__link { margin: 0; }
.search-form .search-submit,
.card-body .btn,
.comment-reply-link,
.mode-toggle { margin-block: 0; }
.btn-style-3d .btn,
.btn-style-3d button[type="submit"],
.btn-style-3d input[type="submit"],
.btn-style-3d .wp-block-button__link { margin-bottom: 12px; }
.btn-style-3d .search-form .search-submit { margin-bottom: 5px; }
.notice .btn { margin-top: 14px; }
.comment-form .form-submit { margin-top: 18px; }
:is(.btn, button[type="submit"], input[type="submit"], .search-submit, .wp-block-button__link, .wp-element-button, .comment-reply-link, .more-link):hover {
	background: var(--primary-dark);
	border-color: var(--primary-dark);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.35);
}
.btn-sm { padding: 0.25em 1.1em; font-size: 0.85rem; }

/* گوشه‌گرد (پیش‌فرض) */
.btn-style-rounded { --btn-radius: 10px; }
/* کپسولی */
.btn-style-pill { --btn-radius: 999px; }
/* گوشه‌تیز */
.btn-style-square { --btn-radius: 0; }

/* توخالی */
.btn-style-outline :is(.btn, button[type="submit"], input[type="submit"], .search-submit, .wp-block-button__link, .wp-element-button, .comment-reply-link, .more-link) {
	background: transparent;
	color: var(--primary);
}
.btn-style-outline :is(.btn, button[type="submit"], input[type="submit"], .search-submit, .wp-block-button__link, .wp-element-button, .comment-reply-link, .more-link):hover {
	background: var(--primary);
	color: #fff;
}

/* گرادیانی */
.btn-style-gradient :is(.btn, button[type="submit"], input[type="submit"], .search-submit, .wp-block-button__link, .wp-element-button, .comment-reply-link, .more-link) {
	background: linear-gradient(135deg, var(--primary), var(--secondary));
	border-color: transparent;
	--btn-radius: 12px;
}
.btn-style-gradient :is(.btn, button[type="submit"], input[type="submit"], .search-submit, .wp-block-button__link, .wp-element-button, .comment-reply-link, .more-link):hover {
	background: linear-gradient(135deg, var(--secondary), var(--primary));
	border-color: transparent;
}

/* ملایم */
.btn-style-soft :is(.btn, button[type="submit"], input[type="submit"], .search-submit, .wp-block-button__link, .wp-element-button, .comment-reply-link, .more-link) {
	background: rgba(var(--primary-rgb), 0.12);
	border-color: transparent;
	color: var(--primary);
}
.btn-style-soft :is(.btn, button[type="submit"], input[type="submit"], .search-submit, .wp-block-button__link, .wp-element-button, .comment-reply-link, .more-link):hover {
	background: var(--primary);
	color: #fff;
}

/* سه‌بعدی */
.btn-style-3d :is(.btn, button[type="submit"], input[type="submit"], .search-submit, .wp-block-button__link, .wp-element-button, .comment-reply-link, .more-link) {
	box-shadow: 0 5px 0 var(--primary-dark);
	--btn-radius: 12px;
}
.btn-style-3d :is(.btn, button[type="submit"], input[type="submit"], .search-submit, .wp-block-button__link, .wp-element-button, .comment-reply-link, .more-link):hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 0 var(--primary-dark);
}
.btn-style-3d :is(.btn, button[type="submit"], input[type="submit"], .search-submit, .wp-block-button__link, .wp-element-button, .comment-reply-link, .more-link):active {
	transform: translateY(4px);
	box-shadow: 0 1px 0 var(--primary-dark);
}

/* =====================================================================
   سربرگ
   ===================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.topbar {
	background: rgba(0, 0, 0, 0.22);
	color: #fff;
	font-size: 0.82rem;
}
.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 38px;
}
.mainbar {
	color: #fff;
}
.site-header {
	background: var(--header-bg, linear-gradient(135deg, var(--primary), var(--secondary)));
}
.mainbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 72px;
}

.site-title {
	display: block;
	color: #fff;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.4;
}
.site-title:hover { color: #fff; opacity: 0.9; }
.site-desc { margin: 0; font-size: 0.8rem; opacity: 0.85; line-height: 1.4; }
.custom-logo { max-height: 56px; width: auto; }

/* منو */
.primary-nav .menu {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.primary-nav a {
	display: block;
	padding: 6px 14px;
	color: #fff;
	font-weight: 500;
	font-size: 0.95rem;
	border-radius: 999px;
	transition: background 0.2s;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}
.primary-nav li { position: relative; }
.primary-nav .sub-menu,
.primary-nav .children {
	position: absolute;
	top: 100%;
	right: 0;
	min-width: 190px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: var(--surface);
	border-radius: 12px;
	box-shadow: var(--shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: all 0.2s;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:hover > .children,
.primary-nav li:focus-within > .sub-menu,
.primary-nav li:focus-within > .children {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.primary-nav .sub-menu a,
.primary-nav .children a { color: var(--text); border-radius: 8px; }
.primary-nav .sub-menu a:hover,
.primary-nav .children a:hover { background: rgba(var(--primary-rgb), 0.12); color: var(--primary); }
.primary-nav .sub-menu .sub-menu,
.primary-nav .children .children { top: 0; right: 100%; }

.nav-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	padding: 10px;
	background: rgba(255, 255, 255, 0.18);
	border: 0;
	border-radius: 10px;
	cursor: pointer;
}
.nav-toggle span {
	display: block;
	width: 22px;
	height: 2px;
	background: #fff;
	border-radius: 2px;
	transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* سوییچر رنگ */
.switcher { display: flex; align-items: center; gap: 8px; }
.swatch {
	width: 20px;
	height: 20px;
	padding: 0;
	background: linear-gradient(135deg, var(--sw) 50%, var(--sw2) 50%);
	border: 2px solid rgba(255, 255, 255, 0.6);
	border-radius: 50%;
	cursor: pointer;
	transition: transform 0.15s, border-color 0.15s;
}
.swatch:hover { transform: scale(1.2); }
.swatch.is-active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45); }
.mode-toggle {
	width: 28px;
	height: 28px;
	padding: 0;
	margin-inline-start: 4px;
	color: #fff;
	font-size: 16px;
	line-height: 1;
	background: rgba(255, 255, 255, 0.2);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}
.mode-toggle:hover { background: rgba(255, 255, 255, 0.35); }

/* =====================================================================
   چیدمان
   ===================================================================== */
.site-content { padding-block: 36px 56px; }

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

.page-header { margin-bottom: 28px; }
.page-title {
	display: inline-block;
	margin: 0;
	padding-bottom: 6px;
	font-size: 1.6rem;
	border-bottom: 4px solid var(--accent);
}
.archive-description { margin-top: 12px; color: var(--muted); }

/* =====================================================================
   کارت نوشته‌ها
   ===================================================================== */
.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}
.card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover {
	transform: translateY(-5px);
	box-shadow: 0 14px 34px rgba(var(--primary-rgb), 0.22);
}
.card-thumb {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.card-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s;
}
.card:hover .card-thumb img { transform: scale(1.07); }
.card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	padding: 18px 20px 22px;
}
.card-title { margin: 8px 0 4px; font-size: 1.1rem; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--primary); }
.card-excerpt { flex: 1; margin-bottom: 14px; color: var(--muted); font-size: 0.92rem; line-height: 1.9; }
.card-excerpt p { margin: 0; }

.badge {
	display: inline-block;
	padding: 0 12px;
	font-size: 0.78rem;
	font-weight: 500;
	line-height: 26px;
	color: #fff;
	background: var(--accent);
	border-radius: 999px;
}
.badge:hover { color: #fff; filter: brightness(0.92); }

.meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin-bottom: 8px;
	color: var(--muted);
	font-size: 0.82rem;
}
.meta a { color: var(--muted); }
.meta a:hover { color: var(--primary); }
.meta .sep { opacity: 0.5; }

/* =====================================================================
   نوشته و برگه
   ===================================================================== */
.entry {
	padding: 32px;
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.entry-title { margin: 10px 0 12px; font-size: 1.9rem; }
.entry-thumb { margin: 0 0 24px; }
.entry-thumb img { display: block; width: 100%; border-radius: var(--radius); }

.entry-content { font-size: 1.02rem; line-height: 2.1; }
.entry-content h2,
.entry-content h3,
.entry-content h4 { margin-top: 1.8em; }
.entry-content h2 { padding-inline-start: 14px; border-inline-start: 5px solid var(--primary); }
.entry-content a { text-decoration: underline; text-underline-offset: 4px; }
.entry-content blockquote {
	margin: 1.6em 0;
	padding: 16px 22px;
	background: rgba(var(--primary-rgb), 0.08);
	border-inline-start: 5px solid var(--secondary);
	border-radius: 0 var(--radius) var(--radius) 0;
}
.entry-content blockquote p:last-child { margin: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; }
.entry-content th,
.entry-content td { padding: 10px 14px; border: 1px solid var(--border); }
.entry-content th { background: rgba(var(--primary-rgb), 0.1); }
.entry-content pre,
.entry-content code {
	direction: ltr;
	text-align: left;
	font-family: Consolas, Menlo, monospace;
}
.entry-content pre {
	padding: 16px;
	overflow-x: auto;
	color: #e5e7eb;
	background: #0f172a;
	border-radius: 12px;
	line-height: 1.6;
}
.entry-content :not(pre) > code {
	padding: 2px 8px;
	background: rgba(var(--primary-rgb), 0.12);
	border-radius: 6px;
}
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption, .wp-block-image figcaption { color: var(--muted); font-size: 0.85rem; text-align: center; }
.page-links { margin-top: 1.5em; }

.entry-footer { margin-top: 28px; }
.tags span { color: var(--muted); }
.tags a {
	display: inline-block;
	margin: 0 4px 6px 0;
	padding: 0 14px;
	font-size: 0.85rem;
	line-height: 30px;
	color: var(--primary);
	background: rgba(var(--primary-rgb), 0.1);
	border-radius: 999px;
}
.tags a:hover { color: #fff; background: var(--primary); }

.author-box {
	display: flex;
	gap: 16px;
	align-items: center;
	margin-top: 28px;
	padding: 18px 20px;
	background: rgba(var(--primary-rgb), 0.07);
	border-radius: var(--radius);
}
.author-box img { border-radius: 50%; }
.author-box p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.post-navigation { margin-top: 28px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a {
	display: block;
	height: 100%;
	padding: 14px 18px;
	color: var(--text);
	border: 2px solid var(--border);
	border-radius: var(--radius);
	transition: border-color 0.2s, transform 0.2s;
}
.post-navigation a:hover { border-color: var(--primary); transform: translateY(-3px); }
.post-navigation .nav-next { text-align: left; }
.nav-label { display: block; color: var(--primary); font-size: 0.8rem; }
.nav-title { font-weight: 500; }

/* =====================================================================
   صفحه‌بندی
   ===================================================================== */
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.page-numbers {
	min-width: 42px;
	padding: 0 14px;
	color: var(--text);
	font-weight: 500;
	line-height: 42px;
	text-align: center;
	background: var(--surface);
	border-radius: var(--btn-radius);
	box-shadow: var(--shadow);
	transition: all 0.2s;
}
a.page-numbers:hover { color: #fff; background: var(--primary); }
.page-numbers.current { color: #fff; background: var(--primary); }

/* =====================================================================
   سایدبار و ویجت‌ها
   ===================================================================== */
.sidebar { position: sticky; top: 150px; }
.widget {
	margin-bottom: 24px;
	padding: 22px;
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.widget-title {
	position: relative;
	margin-bottom: 16px;
	padding-bottom: 10px;
	font-size: 1.05rem;
}
.widget-title::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: 46px;
	height: 4px;
	background: linear-gradient(90deg, var(--primary), var(--secondary));
	border-radius: 4px;
}
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.widget li:last-child { border: 0; }
.widget a { color: var(--text); }
.widget a:hover { color: var(--primary); }

/* فرم جستجو و فیلدها */
.search-form { display: flex; gap: 8px; }
input[type="text"], input[type="email"], input[type="url"], input[type="search"],
input[type="password"], input[type="number"], textarea, select {
	width: 100%;
	padding: 10px 14px;
	color: var(--text);
	font-family: var(--font);
	font-size: 0.95rem;
	background: var(--surface);
	border: 2px solid var(--border);
	border-radius: var(--btn-radius);
	transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
	outline: 0;
	border-color: var(--primary);
	box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15);
}
.search-form .search-field { flex: 1; min-width: 0; }

/* =====================================================================
   دیدگاه‌ها
   ===================================================================== */
.comments-area {
	margin-top: 32px;
	padding: 28px 32px;
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.comments-title { font-size: 1.2rem; }
.comment-list, .comment-list .children { margin: 0; padding: 0; list-style: none; }
.comment-list .children { margin-inline-start: 28px; }
.comment-body {
	margin-bottom: 16px;
	padding: 16px 18px;
	background: rgba(var(--primary-rgb), 0.05);
	border-radius: var(--radius);
}
.comment-author { display: flex; align-items: center; gap: 10px; }
.comment-author img { border-radius: 50%; }
.comment-author .fn { font-weight: 700; font-style: normal; }
.comment-author .says { display: none; }
.comment-metadata { margin: 4px 0 8px; font-size: 0.8rem; }
.comment-metadata a { color: var(--muted); }
.comment-form label { display: block; margin-bottom: 4px; font-size: 0.9rem; }
.comment-form p { margin-bottom: 14px; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: center; }
.comment-form-cookies-consent input { width: auto; }
.comment-form-cookies-consent label { margin: 0; }

/* =====================================================================
   پیام‌ها و ۴۰۴
   ===================================================================== */
.notice {
	padding: 40px 28px;
	text-align: center;
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.notice .search-form { max-width: 420px; margin: 20px auto; }
.big-404 {
	font-size: 6rem;
	font-weight: 700;
	line-height: 1.2;
	background: linear-gradient(135deg, var(--primary), var(--secondary));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* =====================================================================
   پابرگ
   ===================================================================== */
.site-footer { color: #cbd5e1; background: var(--footer-bg); }
.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 28px;
	padding-block: 44px 20px;
}
.site-footer .widget { padding: 0; background: none; box-shadow: none; }
.site-footer .widget-title { color: #fff; }
.site-footer .widget a { color: #cbd5e1; }
.site-footer .widget a:hover { color: var(--accent); }
.site-footer .widget li { border-color: rgba(255, 255, 255, 0.12); }

.footer-bottom { border-top: 4px solid transparent; border-image: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent)) 1; background: rgba(0, 0, 0, 0.25); }
.footer-bottom-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-block: 16px;
	font-size: 0.85rem;
}
.footer-menu { display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; }
.footer-menu a { color: #cbd5e1; }
.footer-menu a:hover { color: var(--accent); }

.to-top {
	position: fixed;
	bottom: 24px;
	left: 24px;
	z-index: 90;
	width: 46px;
	height: 46px;
	padding: 0;
	color: #fff;
	font-size: 20px;
	background: linear-gradient(135deg, var(--primary), var(--secondary));
	border: 0;
	border-radius: 50%;
	box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.4);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* =====================================================================
   واکنش‌گرا
   ===================================================================== */
@media (max-width: 960px) {
	.layout.with-sidebar { grid-template-columns: minmax(0, 1fr); }
	.sidebar { position: static; }
}

@media (max-width: 860px) {
	.nav-toggle { display: flex; }
	.mainbar-inner { flex-wrap: wrap; }
	.primary-nav {
		display: none;
		width: 100%;
		padding-bottom: 14px;
	}
	.primary-nav.is-open { display: block; }
	.primary-nav .menu { flex-direction: column; }
	.primary-nav a { border-radius: 10px; }
	.primary-nav .sub-menu,
	.primary-nav .children {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		background: rgba(255, 255, 255, 0.1);
		box-shadow: none;
	}
	.primary-nav .sub-menu a,
	.primary-nav .children a { color: #fff; }
}

@media (max-width: 600px) {
	.entry { padding: 20px; }
	.entry-title { font-size: 1.5rem; }
	.comments-area { padding: 20px; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.topbar-inner { justify-content: center; flex-wrap: wrap; padding-block: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
