/*
Theme Name: Iranjoman Blog
Theme URI: https://www.iranjoman.com/blog/
Author: Iranjoman
Description: قالب اختصاصی بلاگ ایران انجمن. راست‌چین، فارسی، بدون وابستگی به هیچ افزونه‌ای. طراحی‌شده برای مقاله‌های بلند با تمرکز کامل روی خوانایی.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iranjoman-blog
Tags: blog, rtl-language-support, custom-menu, featured-images, translation-ready
*/

@font-face {
	font-family: "Vazir";
	src: url("../../uploads/2022/02/vazir.woff") format("woff");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

:root {
	--ij-accent: #0f6e56;
	--ij-accent-soft: #e1f5ee;
	--ij-page: #fcfcfa;
	--ij-card: #ffffff;
	--ij-border: #e4e2da;
	--ij-text: #1a1a18;
	--ij-body: #2c2c2a;
	--ij-muted: #5f5e5a;
	--ij-faint: #888780;
	--ij-radius: 10px;
	--ij-wrap: 1120px;
	--ij-read: 720px;
}

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

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

body {
	margin: 0;
	background: var(--ij-page);
	color: var(--ij-body);
	font-family: Vazir, Vazirmatn, "IRANSans", Tahoma, sans-serif;
	font-size: 16px;
	line-height: 2.15;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--ij-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3, h4 { color: var(--ij-text); line-height: 1.85; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0 0 1.15em; }

.ij-wrap { max-width: var(--ij-wrap); margin: 0 auto; padding: 0 20px; }

.screen-reader-text {
	position: absolute; width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.ij-skip:focus {
	position: fixed; inset-inline-start: 12px; top: 12px; z-index: 100;
	background: var(--ij-card); color: var(--ij-accent);
	padding: 10px 16px; border-radius: var(--ij-radius); width: auto; height: auto; clip: auto;
}

/* ---------- header ---------- */

.ij-header { background: var(--ij-accent); }
.ij-header-inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 20px; min-height: 64px; flex-wrap: wrap;
}
.ij-brand { color: #fff; font-size: 18px; font-weight: 700; }
.ij-brand:hover { text-decoration: none; }
.ij-brand span { font-weight: 400; opacity: .75; }
.ij-brand img { max-height: 40px; width: auto; }

.ij-nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; flex-wrap: wrap; }
.ij-nav a { color: #9fe1cb; font-size: 14px; }
.ij-nav a:hover, .ij-nav .current-menu-item > a { color: #fff; text-decoration: none; }

.ij-search-form { display: flex; }
.ij-search-form input[type="search"] {
	border: 0; border-radius: var(--ij-radius); padding: 7px 12px;
	font: inherit; font-size: 13px; background: rgba(255,255,255,.15); color: #fff; width: 150px;
}
.ij-search-form input[type="search"]::placeholder { color: #9fe1cb; }
.ij-search-form input[type="search"]:focus { outline: 2px solid #9fe1cb; background: rgba(255,255,255,.25); }
.ij-search-form button { display: none; }

/* ---------- listing ---------- */

.ij-main { padding: 34px 0 60px; }

.ij-page-head { margin-bottom: 26px; }
.ij-page-head h1 { margin-bottom: 4px; }
.ij-page-head p { color: var(--ij-muted); font-size: 14px; margin: 0; }

.ij-cat {
	display: inline-block; background: var(--ij-accent-soft); color: var(--ij-accent);
	font-size: 12px; padding: 3px 11px; border-radius: 20px; margin-bottom: 8px;
}
.ij-cat:hover { text-decoration: none; opacity: .8; }

.ij-meta { color: var(--ij-faint); font-size: 12.5px; }

.ij-feature {
	display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 22px;
	background: var(--ij-card); border: 1px solid var(--ij-border);
	border-radius: var(--ij-radius); padding: 18px; margin-bottom: 26px;
}
.ij-feature .ij-thumb { height: 100%; min-height: 190px; }
.ij-feature h2 { font-size: 24px; margin-bottom: 8px; }
.ij-feature h2 a { color: inherit; }
.ij-feature p { color: var(--ij-muted); font-size: 14px; margin-bottom: 10px; }

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

.ij-card {
	background: var(--ij-card); border: 1px solid var(--ij-border);
	border-radius: var(--ij-radius); overflow: hidden;
	display: flex; flex-direction: column;
}
.ij-card .ij-thumb { height: 165px; }
.ij-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.ij-card h2 { font-size: 16px; margin-bottom: 8px; }
.ij-card h2 a { color: inherit; }
.ij-card p { color: var(--ij-muted); font-size: 13px; line-height: 2; margin-bottom: 10px; }
.ij-card .ij-meta { margin-top: auto; }

.ij-thumb { display: block; background: #eeece5; overflow: hidden; }
.ij-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ij-thumb--empty { display: flex; align-items: center; justify-content: center; color: #b4b2a9; font-size: 13px; }

/* ---------- single ---------- */

.ij-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; background: transparent; z-index: 50; }
.ij-progress span { display: block; height: 3px; width: 0; background: var(--ij-accent); }

.ij-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 40px; align-items: start; }

.ij-article-head { margin-bottom: 20px; }
.ij-article-head h1 { font-size: 30px; margin-bottom: 10px; }
.ij-article-head .ij-meta { border-bottom: 1px solid var(--ij-border); padding-bottom: 16px; }

.ij-hero { border-radius: var(--ij-radius); overflow: hidden; margin-bottom: 24px; }

.ij-content { max-width: var(--ij-read); font-size: 16px; line-height: 2.15; color: var(--ij-body); }
.ij-content h2 { font-size: 21px; margin-top: 1.9em; }
.ij-content h3 { font-size: 18px; margin-top: 1.6em; }
.ij-content img { border-radius: var(--ij-radius); margin: 1.4em 0; }
.ij-content ul, .ij-content ol { padding-inline-start: 1.5em; margin: 0 0 1.15em; }
.ij-content li { margin-bottom: .45em; }
.ij-content blockquote {
	margin: 1.5em 0; padding: 12px 18px; background: #f4f7f5;
	border-inline-start: 3px solid var(--ij-accent); color: var(--ij-accent);
	border-radius: 0; font-size: 15px;
}
.ij-content blockquote p:last-child { margin-bottom: 0; }
.ij-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 14px; }
.ij-content th, .ij-content td { border: 1px solid var(--ij-border); padding: 9px 12px; text-align: start; }
.ij-content th { background: #f4f7f5; font-weight: 700; }
.ij-content code { background: #f1efe8; padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.ij-content pre { background: #f1efe8; padding: 14px; border-radius: var(--ij-radius); overflow-x: auto; direction: ltr; text-align: left; }

.ij-anchor-offset { scroll-margin-top: 24px; }

/* ---------- toc ---------- */

.ij-toc { position: sticky; top: 24px; border-inline-start: 1px solid var(--ij-border); padding-inline-start: 18px; }
.ij-toc-title { font-size: 12px; color: var(--ij-faint); margin-bottom: 12px; }
.ij-toc ul { list-style: none; margin: 0; padding: 0; font-size: 13.5px; line-height: 2; }
.ij-toc li a {
	display: block; color: var(--ij-muted);
	border-inline-start: 2px solid transparent; padding-inline-start: 10px; margin-inline-start: -19px;
}
.ij-toc li a:hover { color: var(--ij-text); text-decoration: none; }
.ij-toc li.is-active > a { color: var(--ij-accent); border-inline-start-color: var(--ij-accent); }
.ij-toc li.lvl-3 a { padding-inline-start: 22px; font-size: 12.5px; }

/* ---------- tags, related, pagination ---------- */

.ij-tags { margin: 30px 0 0; padding-top: 20px; border-top: 1px solid var(--ij-border); }
.ij-tags a {
	display: inline-block; font-size: 12.5px; color: var(--ij-muted);
	border: 1px solid var(--ij-border); border-radius: 20px; padding: 3px 12px; margin: 0 0 8px 8px;
}
.ij-tags a:hover { color: var(--ij-accent); border-color: var(--ij-accent); text-decoration: none; }

.ij-related { margin-top: 44px; }
.ij-related h2 { font-size: 19px; margin-bottom: 18px; }

.ij-pagination { margin-top: 34px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ij-pagination .page-numbers {
	display: inline-block; min-width: 38px; text-align: center;
	padding: 6px 12px; border: 1px solid var(--ij-border); border-radius: var(--ij-radius);
	background: var(--ij-card); color: var(--ij-muted); font-size: 14px;
}
.ij-pagination .page-numbers:hover { border-color: var(--ij-accent); color: var(--ij-accent); text-decoration: none; }
.ij-pagination .page-numbers.current { background: var(--ij-accent); border-color: var(--ij-accent); color: #fff; }

/* ---------- comments ---------- */

.ij-comments { margin-top: 44px; max-width: var(--ij-read); }
.ij-comments h2 { font-size: 19px; }
.ij-comments ol { list-style: none; margin: 0; padding: 0; }
.ij-comments .comment-body {
	background: var(--ij-card); border: 1px solid var(--ij-border);
	border-radius: var(--ij-radius); padding: 14px 18px; margin-bottom: 14px;
}
.ij-comments .children { padding-inline-start: 26px; }
.ij-comments input[type="text"], .ij-comments input[type="email"], .ij-comments input[type="url"], .ij-comments textarea {
	width: 100%; font: inherit; font-size: 14px; padding: 9px 12px;
	border: 1px solid var(--ij-border); border-radius: var(--ij-radius); background: var(--ij-card);
}
.ij-comments input:focus, .ij-comments textarea:focus { outline: 2px solid var(--ij-accent); border-color: transparent; }
.ij-comments .submit {
	background: var(--ij-accent); color: #fff; border: 0; font: inherit; font-size: 14px;
	padding: 10px 22px; border-radius: var(--ij-radius); cursor: pointer;
}

/* ---------- footer ---------- */

.ij-footer { background: var(--ij-accent); color: #9fe1cb; margin-top: 50px; padding: 26px 0; font-size: 13.5px; }
.ij-footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.ij-footer a { color: #fff; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
	.ij-article-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.ij-toc { position: static; border-inline-start: 0; padding-inline-start: 0;
		border: 1px solid var(--ij-border); border-radius: var(--ij-radius); padding: 14px 16px; }
	.ij-toc li a { margin-inline-start: 0; border-inline-start: 0; padding-inline-start: 0; }
	.ij-toc li.is-active > a { border-inline-start: 0; }
	.ij-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
	body { font-size: 15.5px; }
	.ij-header-inner { min-height: 0; padding: 12px 0; }
	.ij-feature { grid-template-columns: minmax(0, 1fr); }
	.ij-feature .ij-thumb { min-height: 190px; }
	.ij-grid { grid-template-columns: minmax(0, 1fr); }
	.ij-article-head h1, h1 { font-size: 24px; }
	.ij-search-form input[type="search"] { width: 120px; }
}
