/*
Theme Name: دلاری
Theme URI: https://xn----omcq3abbkf3og50m.com
Author: دلاری
Description: پوسته اختصاصی و مجله‌ای سایت دلاری برای محتوای فریلنسری و کسب درآمد ارزی. اسلایدر صفحه اصلی، بخش‌های مجله‌ای، پنل تنظیمات کامل، متادیتای سئوی سمانتیک (Schema.org، Open Graph)، راست‌به‌چپ و واکنش‌گرا.
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: dolari
*/

/* -------------------------------------------------------------
   Design tokens
------------------------------------------------------------- */
:root {
	--bg: #f6f7f4;
	--bg-elevated: #ffffff;
	--text: #191d1a;
	--text-muted: #61675f;
	--border: #e6e7e1;
	--primary: #0e6b52;
	--accent: #c9971c;
	--primary-dark: color-mix(in srgb, var(--primary) 78%, black);
	--primary-tint: color-mix(in srgb, var(--primary) 10%, white);
	--accent-tint: color-mix(in srgb, var(--accent) 16%, white);
	--radius-sm: 8px;
	--radius: 14px;
	--radius-lg: 20px;
	--shadow: 0 1px 2px rgba(20, 25, 20, 0.04), 0 8px 24px rgba(20, 25, 20, 0.06);
	--shadow-hover: 0 4px 10px rgba(20, 25, 20, 0.06), 0 16px 36px rgba(20, 25, 20, 0.1);
	--container: 1180px;
	--content-width: 760px;
	--font: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #12140f;
		--bg-elevated: #191d17;
		--text: #eef0ea;
		--text-muted: #a2a89a;
		--border: #2a2e26;
		--primary-tint: color-mix(in srgb, var(--primary) 18%, black);
		--accent-tint: color-mix(in srgb, var(--accent) 20%, black);
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
		--shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.35), 0 16px 36px rgba(0, 0, 0, 0.45);
	}
}

/* -------------------------------------------------------------
   Reset & base
------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.85;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
ul, ol { padding-inline-start: 1.4em; }
h1, h2, h3, h4, h5, h6 { line-height: 1.4; font-weight: 700; margin: 1.6em 0 0.6em; }
table { width: 100%; border-collapse: collapse; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link { top: -60px; left: 12px; z-index: 999; position: fixed; background: var(--primary); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); transition: top .2s; }
.skip-link:focus { top: 12px; width: auto; height: auto; clip: auto; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* -------------------------------------------------------------
   Header
------------------------------------------------------------- */
.site-header {
	position: sticky; top: 0; z-index: 40;
	background: var(--bg-elevated);
	border-bottom: 1px solid var(--border);
	transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: var(--shadow); }
.header-inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; padding: 14px 24px;
}
.site-branding { display: flex; flex-direction: column; gap: 2px; }
.site-title { margin: 0; font-size: 22px; }
.site-title a { color: var(--text); font-weight: 800; letter-spacing: -0.01em; }
.site-title a:hover { color: var(--primary); }
.site-description { margin: 0; font-size: 13px; color: var(--text-muted); }
.custom-logo { max-height: 44px; width: auto; }

.main-navigation ul {
	display: flex; align-items: center; gap: 4px;
	list-style: none; margin: 0; padding: 0;
}
.main-navigation a {
	position: relative; display: block; padding: 10px 14px; border-radius: var(--radius-sm);
	color: var(--text); font-weight: 600; font-size: 15px;
}
.main-navigation a::after {
	content: ""; position: absolute; right: 14px; left: 14px; bottom: 5px; height: 2px;
	background: var(--primary); border-radius: 2px; transform: scaleX(0); transition: transform .2s;
}
.main-navigation a:hover, .main-navigation .current-menu-item > a { color: var(--primary-dark); }
.main-navigation a:hover::after, .main-navigation .current-menu-item > a::after { transform: scaleX(1); }
.main-navigation ul ul {
	position: absolute; flex-direction: column; background: var(--bg-elevated);
	box-shadow: var(--shadow); border-radius: var(--radius-sm); padding: 8px;
	min-width: 200px; opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: .15s; z-index: 10;
}
.main-navigation li { position: relative; }
.main-navigation li:hover > ul { opacity: 1; visibility: visible; transform: translateY(0); }

.menu-toggle {
	display: none; flex-direction: column; justify-content: center; gap: 5px;
	width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm);
	background: var(--bg-elevated); cursor: pointer;
}
.menu-toggle span { width: 18px; height: 2px; background: var(--text); margin: 0 auto; }

@media (max-width: 820px) {
	.menu-toggle { display: flex; }
	.main-navigation { width: 100%; display: none; order: 3; }
	.main-navigation.is-open { display: block; }
	.main-navigation ul { flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 0; }
	.main-navigation a::after { display: none; }
	.main-navigation ul ul { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; margin-inline-start: 12px; }
	.header-inner { flex-wrap: wrap; }
}

/* -------------------------------------------------------------
   Layout
------------------------------------------------------------- */
.site-main { padding: 0 0 72px; }
.primary-content.full-width { max-width: var(--content-width); margin: 0 auto; padding-top: 40px; }
.primary-content:not(.full-width) { padding-top: 40px; }

/* -------------------------------------------------------------
   Magazine section framework
------------------------------------------------------------- */
.magazine-section { padding: 44px 0; }
.magazine-section:nth-of-type(even) { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: 21px; position: relative; padding-inline-start: 14px; }
.section-heading h2::before { content: ""; position: absolute; inset-inline-start: 0; top: 4px; bottom: 4px; width: 4px; background: var(--primary); border-radius: 4px; }
.section-more { font-size: 14px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.section-more:hover { color: var(--primary-dark); }

/* -------------------------------------------------------------
   Hero slider
------------------------------------------------------------- */
.hero-slider {
	position: relative; overflow: hidden; height: min(66vh, 500px); min-height: 340px;
}
.hero-slider-track { position: relative; width: 100%; height: 100%; }
.hero-slide {
	position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease;
	display: flex; align-items: flex-end;
}
.hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero-slide-media {
	position: absolute; inset: 0; overflow: hidden;
	background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.hero-slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide-overlay {
	position: absolute; inset: 0;
	background: linear-gradient(0deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.3) 55%, rgba(0,0,0,.12) 100%);
}
.hero-slide-content { position: relative; z-index: 2; padding: 40px clamp(20px, 6vw, 64px); max-width: 720px; color: #fff; }
.hero-slide-cat {
	display: inline-block; background: var(--accent); color: #221a05; font-size: 12px; font-weight: 800;
	padding: 5px 14px; border-radius: 999px; margin-bottom: 14px;
}
.hero-slide-title { margin: 0 0 12px; font-size: clamp(22px, 3.4vw, 36px); }
.hero-slide-title a { color: #fff; }
.hero-slide-excerpt { color: rgba(255,255,255,.85); margin: 0 0 20px; font-size: 15.5px; max-width: 560px; }
.hero-slide-btn { background: #fff; color: var(--primary-dark) !important; }
.hero-slide-btn:hover { background: var(--accent); color: #221a05 !important; }

.hero-nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
	width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
	background: rgba(0,0,0,.35); color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center;
	backdrop-filter: blur(2px); transition: background .15s;
}
.hero-nav:hover { background: rgba(0,0,0,.6); }
.hero-prev { right: 18px; }
.hero-next { left: 18px; }

.hero-dots { position: absolute; bottom: 18px; inset-inline-start: 0; inset-inline-end: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.hero-dot { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,.45); cursor: pointer; padding: 0; transition: .15s; }
.hero-dot.is-active { background: #fff; width: 22px; border-radius: 5px; }

@media (max-width: 640px) {
	.hero-nav { display: none; }
	.hero-slider { height: 400px; }
}

/* -------------------------------------------------------------
   Featured (lead + list)
------------------------------------------------------------- */
.featured-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: start; }
.featured-lead-thumb {
	position: relative; display: block; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark)); margin-bottom: 16px;
}
.featured-lead-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-lead-title { margin: 0 0 8px; font-size: 24px; }
.featured-lead-title a { color: var(--text); }
.featured-lead-title a:hover { color: var(--primary); }
.featured-lead-excerpt { color: var(--text-muted); margin: 0 0 10px; }

.featured-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.featured-list li { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.featured-list li:last-child { border-bottom: none; padding-bottom: 0; }
.featured-list-thumb {
	position: relative; flex: 0 0 84px; width: 84px; height: 64px; border-radius: var(--radius-sm); overflow: hidden;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark)); display: flex; align-items: center; justify-content: center; color: #fff;
}
.featured-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-list-body h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; line-height: 1.5; }
.featured-list-body h3 a { color: var(--text); }
.featured-list-body h3 a:hover { color: var(--primary); }
.featured-list-date { display: block; font-size: 12.5px; color: var(--text-muted); }

@media (max-width: 780px) { .featured-grid { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------
   Popular
------------------------------------------------------------- */
.popular-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.popular-item { display: flex; gap: 14px; align-items: center; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.popular-rank { font-size: 22px; font-weight: 800; color: var(--primary); min-width: 30px; }
.popular-body h3 { margin: 0 0 4px; font-size: 14.5px; font-weight: 700; line-height: 1.5; }
.popular-body h3 a { color: var(--text); }
.popular-body h3 a:hover { color: var(--primary); }
.popular-meta { display: block; font-size: 12.5px; color: var(--text-muted); }

/* -------------------------------------------------------------
   SEO text block (homepage)
------------------------------------------------------------- */
.seo-text-section { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.seo-text-box { position: relative; max-width: var(--content-width); margin: 0 auto; }
.seo-text-box h2 { margin: 0 0 16px; font-size: 21px; text-align: center; }
.seo-text-box .seo-text-content { font-size: 16px; }
.seo-text-box.has-toggle .seo-text-content {
	max-height: 260px; overflow: hidden; position: relative;
}
.seo-text-box.has-toggle .seo-text-content::after {
	content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 70px;
	background: linear-gradient(0deg, var(--bg-elevated) 0%, transparent 100%); pointer-events: none;
}
.seo-text-box.has-toggle.is-expanded .seo-text-content { max-height: none; }
.seo-text-box.has-toggle.is-expanded .seo-text-content::after { display: none; }
.seo-text-toggle {
	display: block; margin: 18px auto 0; background: none; border: 1px solid var(--border);
	color: var(--primary); font-weight: 700; font-size: 14px; padding: 8px 22px; border-radius: 999px; cursor: pointer;
}
.seo-text-toggle:hover { border-color: var(--primary); background: var(--primary-tint); }

/* -------------------------------------------------------------
   Post grid & cards (used by category rows, archives, search, latest)
------------------------------------------------------------- */
.post-grid {
	display: grid; gap: 24px;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.post-card {
	background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
	overflow: hidden; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s;
	display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.post-card-thumb {
	position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden;
	background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover .post-card-thumb img { transform: scale(1.04); }
.post-card-placeholder {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	color: rgba(255,255,255,.85);
}
.post-card-placeholder.small { position: static; }
.post-card-category {
	position: absolute; top: 12px; inset-inline-start: 12px;
	background: rgba(0,0,0,.45); color: #fff; font-size: 12px; font-weight: 700;
	padding: 5px 12px; border-radius: 999px; backdrop-filter: blur(2px);
}
.post-card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card-title { margin: 0; font-size: 19px; line-height: 1.5; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--primary); }
.post-card-meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 10px; }
.post-card-excerpt { color: var(--text-muted); font-size: 15px; flex: 1; }
.post-card-more { font-weight: 700; font-size: 14px; color: var(--primary); margin-top: auto; }
.post-card-more:hover { color: var(--primary-dark); }

/* -------------------------------------------------------------
   Breadcrumbs
------------------------------------------------------------- */
.breadcrumbs { max-width: var(--content-width); margin: 0 auto 20px; }
.breadcrumbs ol {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
	list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--text-muted);
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 600; }
.breadcrumbs .breadcrumb-sep { opacity: .5; }
.site-main .primary-content:not(.full-width) .breadcrumbs { max-width: none; }

/* -------------------------------------------------------------
   Single post / page
------------------------------------------------------------- */
.single-post, .page-content-wrap { max-width: var(--content-width); margin: 0 auto; }
.entry-header { max-width: var(--content-width); margin: 0 auto 24px; text-align: center; }
.entry-category {
	display: inline-block; background: var(--accent-tint); color: var(--accent);
	font-size: 12px; font-weight: 800; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
.entry-title { font-size: clamp(26px, 4vw, 38px); margin: 0 0 16px; }
.entry-meta { color: var(--text-muted); font-size: 14px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.entry-sep { opacity: .5; }
.entry-thumb { max-width: 920px; margin: 0 auto 32px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }

.entry-content { font-size: 18px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: 24px; padding-top: 28px; margin-top: 40px; border-top: 1px solid var(--border); }
.entry-content h3 { font-size: 20px; color: var(--primary-dark); }
.entry-content p { margin: 0 0 20px; }
.entry-content ul, .entry-content ol { margin: 0 0 20px; }
.entry-content li { margin-bottom: 8px; }
.entry-content li::marker { color: var(--primary); }
.entry-content strong { color: var(--text); }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote {
	margin: 24px 0; padding: 16px 20px; border-inline-start: 4px solid var(--accent);
	background: var(--accent-tint); border-radius: var(--radius-sm); font-style: normal;
}
.entry-content table { margin: 20px 0; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); font-size: 15px; }
.entry-content th, .entry-content td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: start; }
.entry-content thead th { background: var(--primary); color: #fff; font-weight: 700; }
.entry-content tbody tr:nth-child(even) { background: var(--bg); }
.entry-content img { border-radius: var(--radius); margin: 8px 0; }

.entry-tags { max-width: var(--content-width); margin: 32px auto 0; display: flex; gap: 8px; flex-wrap: wrap; }
.entry-tags a {
	font-size: 13px; background: var(--bg); border: 1px solid var(--border);
	padding: 6px 12px; border-radius: 999px; color: var(--text-muted);
}
.entry-tags a:hover { border-color: var(--primary); color: var(--primary); }

.post-nav {
	max-width: var(--content-width); margin: 40px auto 0; padding-top: 24px; border-top: 1px solid var(--border);
	display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.post-nav a { font-weight: 700; max-width: 46%; }
.post-nav-next { margin-inline-start: auto; text-align: end; }

/* -------------------------------------------------------------
   Comments
------------------------------------------------------------- */
.comments-area { max-width: var(--content-width); margin: 48px auto 0; }
.comments-title { font-size: 22px; }
.comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.comment-list .comment-body {
	background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
	padding: 18px 20px; margin-bottom: 16px;
}
.comment-list .children { list-style: none; padding-inline-start: 28px; }
.comment-reply-title { font-size: 20px; }
.comment-form p { margin: 0 0 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
	background: var(--bg-elevated); color: var(--text); font-family: var(--font); font-size: 15px;
}
.comment-form textarea { min-height: 140px; }

/* -------------------------------------------------------------
   Buttons & forms
------------------------------------------------------------- */
.button, input[type="submit"], button[type="submit"] {
	display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
	background: var(--primary); color: #fff !important; border: none;
	padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 15px;
	transition: background .15s;
}
.button:hover, input[type="submit"]:hover, button[type="submit"]:hover { background: var(--primary-dark); }

.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
	flex: 1; padding: 12px 16px; border: 1px solid var(--border); border-radius: 999px;
	background: var(--bg-elevated); color: var(--text); font-family: var(--font);
}

/* -------------------------------------------------------------
   Archive / search / 404
------------------------------------------------------------- */
.archive-header { text-align: center; margin-bottom: 36px; }
.archive-title { font-size: 30px; margin: 0 0 8px; }
.archive-description { color: var(--text-muted); }
.no-results { text-align: center; padding: 40px 0; }
.error-404 { text-align: center; padding: 80px 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.error-404 h1 { font-size: 72px; color: var(--primary); margin: 0; }

/* -------------------------------------------------------------
   Pagination
------------------------------------------------------------- */
.pagination, .navigation.pagination {
	display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap;
}
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm);
	background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text); font-weight: 600;
}
.pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page-numbers:hover:not(.current) { border-color: var(--primary); color: var(--primary); }

/* -------------------------------------------------------------
   Footer
------------------------------------------------------------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: var(--bg-elevated); }
.footer-grid { display: grid; gap: 40px; padding: 56px 24px 40px; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; padding: 40px 24px 24px; } }
.footer-brand .footer-site-title { font-size: 20px; font-weight: 800; margin: 0 0 10px; }
.footer-brand .footer-site-title a { color: var(--text); }
.footer-about { color: var(--text-muted); font-size: 14px; max-width: 320px; margin: 0 0 18px; }
.footer-social { display: flex; gap: 10px; }
.social-icon {
	display: flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 50%; background: var(--bg);
	border: 1px solid var(--border); color: var(--text-muted);
	transition: .15s;
}
.social-icon:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.footer-col h3 { margin: 0 0 16px; font-size: 15px; }
.footer-menu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-menu-list a { color: var(--text-muted); font-size: 14.5px; }
.footer-menu-list a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 24px; }
.footer-bottom .container { display: flex; justify-content: center; }
.footer-bottom p { margin: 0; color: var(--text-muted); font-size: 13px; }
.footer-bottom a { color: var(--text-muted); font-weight: 700; }

/* -------------------------------------------------------------
   Alignment helpers (block editor)
------------------------------------------------------------- */
.alignwide { max-width: 1000px; margin-inline: auto; }
.alignfull { max-width: none; }
