/* ==========================================================================
   قالب‌های سایت — استایل سمت کاربر
   هماهنگ با پوستهٔ SmartTradePath (تیره، طلایی/قرمز، RTL، Vazirmatn)
   ========================================================================== */
.stpl-main {
	--stpl-bg: #0a0a0b;
	--stpl-card: #161618;
	--stpl-card-2: #1c1c1f;
	--stpl-border: #28282c;
	--stpl-red-600: #e63946;
	--stpl-red-500: #ef4453;
	--stpl-gold-400: #ffb020;
	--stpl-green: #1fce8c;
	--stpl-ink: #f2f2f4;
	--stpl-ink-soft: #9a9aa3;
	--stpl-ink-dim: #5f5f68;
	--stpl-radius: 16px;
	--stpl-radius-sm: 10px;
	--stpl-grad: linear-gradient(135deg, var(--stpl-gold-400), var(--stpl-red-600));

	color: var(--stpl-ink);
	font-family: 'Vazirmatn', 'IRANSans', Tahoma, sans-serif;
	line-height: 1.9;
	direction: rtl;
	text-align: right;
	background: var(--stpl-bg);
	padding: 28px 0 48px;
	min-height: 60vh;
}
.stpl-main * { box-sizing: border-box; }
.stpl-container { max-width: 1200px; margin: 0 auto; padding: 0 18px; }

/* ---- سربرگ صفحه ---- */
.stpl-page-head { margin-bottom: 26px; }
.stpl-page-title { font-size: 26px; font-weight: 800; margin: 0 0 10px; }
.stpl-page-underline { display: block; width: 88px; height: 4px; border-radius: 3px; background: var(--stpl-grad); }

/* ---- سربرگ بخش ---- */
.stpl-section { margin-bottom: 26px; }
.stpl-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.stpl-section-head > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.stpl-section-title { font-size: 18px; font-weight: 800; margin: 0; white-space: nowrap; }
.stpl-divider { flex: 1; height: 1px; background: linear-gradient(90deg, var(--stpl-border), transparent); min-width: 24px; }
.stpl-more-link { font-size: 12.5px; font-weight: 700; color: var(--stpl-gold-400); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.stpl-more-link i { font-size: 10px; }
.stpl-more-link:hover { color: var(--stpl-red-500); }
.stpl-empty { color: var(--stpl-ink-dim); font-size: 13px; padding: 24px 6px; text-align: center; }

/* ---- شبکهٔ بخش‌ها (ستون‌بندی ۱۲‌تایی) ---- */
.stpl-sections-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; align-items: start; }
.stpl-col { min-width: 0; }
.stpl-col-full     { grid-column: span 12; }
.stpl-col-twothird { grid-column: span 8; }
.stpl-col-half     { grid-column: span 6; }
.stpl-col-third    { grid-column: span 4; }

/* ==================== چیدمان کارت‌ها ==================== */
.stpl-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.stpl-card {
	display: flex; flex-direction: column; text-decoration: none; color: inherit;
	background: var(--stpl-card); border: 1px solid var(--stpl-border);
	border-radius: var(--stpl-radius); overflow: hidden; transition: transform .18s ease, border-color .18s ease;
}
.stpl-card:hover { transform: translateY(-3px); border-color: var(--stpl-gold-400); }
.stpl-card-thumb { display: block; width: 100%; aspect-ratio: 16 / 10; background-size: cover; background-position: center; background-color: var(--stpl-card-2); }
.stpl-card-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 7px; }
.stpl-card-title { font-size: 14.5px; font-weight: 800; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stpl-card-meta { font-size: 11px; color: var(--stpl-ink-soft); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stpl-card-meta i { color: var(--stpl-gold-400); }
.stpl-dot { color: var(--stpl-ink-dim); }
.stpl-card-excerpt { font-size: 12px; color: var(--stpl-ink-soft); line-height: 1.9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ==================== چیدمان فهرستی ==================== */
.stpl-list { display: flex; flex-direction: column; gap: 12px; }
.stpl-list-item {
	display: flex; gap: 13px; background: var(--stpl-card); border: 1px solid var(--stpl-border);
	border-radius: var(--stpl-radius-sm); padding: 12px; transition: border-color .18s ease;
}
.stpl-list-item:hover { border-color: var(--stpl-gold-400); }
.stpl-list-thumb { flex-shrink: 0; width: 96px; height: 74px; border-radius: 8px; background-size: cover; background-position: center; background-color: var(--stpl-card-2); }
.stpl-list-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.stpl-list-title { font-size: 14px; font-weight: 800; color: var(--stpl-ink); text-decoration: none; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stpl-list-title:hover { color: var(--stpl-gold-400); }
.stpl-list-meta { font-size: 10.5px; color: var(--stpl-ink-dim); }
.stpl-list-meta i { color: var(--stpl-gold-400); }
.stpl-list-excerpt { font-size: 12px; color: var(--stpl-ink-soft); margin: 0; line-height: 1.85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stpl-readmore { align-self: flex-start; font-size: 11.5px; font-weight: 700; color: var(--stpl-gold-400); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.stpl-readmore i { font-size: 9px; }
.stpl-readmore:hover { color: var(--stpl-red-500); }

/* ==================== چیدمان عناوین (اخبار) ==================== */
.stpl-titles { list-style: none; margin: 0; padding: 0; background: var(--stpl-card); border: 1px solid var(--stpl-border); border-radius: var(--stpl-radius-sm); }
.stpl-title-row { border-bottom: 1px solid var(--stpl-border); }
.stpl-title-row:last-child { border-bottom: none; }
.stpl-title-row a { display: flex; align-items: center; gap: 9px; padding: 11px 13px; text-decoration: none; color: var(--stpl-ink); transition: background .12s ease; }
.stpl-title-row a:hover { background: var(--stpl-card-2); }
.stpl-title-row a:hover .stpl-title-text { color: var(--stpl-gold-400); }
.stpl-chev { font-size: 9px; color: var(--stpl-gold-400); flex-shrink: 0; }
.stpl-title-text { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stpl-title-date { font-size: 10px; color: var(--stpl-ink-dim); flex-shrink: 0; }

/* ==================== دکمه‌ها ==================== */
.stpl-btn-solid {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
	background: var(--stpl-grad); color: #0a0a0b; font-weight: 800; font-family: inherit; font-size: 14px;
	border: none; border-radius: var(--stpl-radius-sm); padding: 12px 22px; text-decoration: none;
}
.stpl-btn-solid:hover { filter: brightness(1.06); }
.stpl-btn-ghost {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
	background: var(--stpl-card-2); color: var(--stpl-ink); font-weight: 700; font-family: inherit; font-size: 14px;
	border: 1px solid var(--stpl-border); border-radius: var(--stpl-radius-sm); padding: 12px 22px; text-decoration: none;
}
.stpl-btn-ghost:hover { border-color: var(--stpl-gold-400); }
.stpl-btn-full { width: 100%; }

/* ==================== تک‌نوشته ==================== */
.stpl-single-article { max-width: 820px; }
.stpl-single-cat { display: inline-block; font-size: 12px; font-weight: 800; color: var(--stpl-gold-400); text-decoration: none; margin-bottom: 10px; }
.stpl-single-title { font-size: 30px; font-weight: 900; line-height: 1.5; margin: 0 0 14px; }
.stpl-single-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--stpl-ink-soft); font-size: 12.5px; padding-bottom: 18px; border-bottom: 1px solid var(--stpl-border); }
.stpl-single-meta i { color: var(--stpl-gold-400); margin-left: 4px; }
.stpl-single-featured { margin: 22px 0; }
.stpl-single-featured img { width: 100%; height: auto; border-radius: var(--stpl-radius); display: block; }
.stpl-single-content { font-size: 15.5px; line-height: 2.15; color: #e7e7ea; }
.stpl-single-content p { margin: 0 0 18px; }
.stpl-single-content h2, .stpl-single-content h3 { font-weight: 800; margin: 28px 0 12px; }
.stpl-single-content a { color: var(--stpl-gold-400); }
.stpl-single-content img { max-width: 100%; height: auto; border-radius: var(--stpl-radius-sm); }
.stpl-single-content blockquote { border-right: 3px solid var(--stpl-gold-400); background: var(--stpl-card); margin: 18px 0; padding: 12px 16px; border-radius: 8px; color: var(--stpl-ink-soft); }
.stpl-single-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.stpl-single-tags i { color: var(--stpl-gold-400); }
.stpl-single-tags a { font-size: 12px; background: var(--stpl-card-2); border: 1px solid var(--stpl-border); border-radius: 20px; padding: 4px 12px; color: var(--stpl-ink-soft); text-decoration: none; }
.stpl-single-tags a:hover { border-color: var(--stpl-gold-400); color: var(--stpl-gold-400); }
.stpl-related { margin-top: 40px; }
.stpl-comments { margin-top: 40px; }

/* ==================== ۴۰۴ ==================== */
.stpl-404-inner { text-align: center; max-width: 720px; }
.stpl-404-glyph { font-size: 90px; font-weight: 900; line-height: 1; background: var(--stpl-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px; }
.stpl-404-title { font-size: 24px; font-weight: 800; margin: 0 0 10px; }
.stpl-404-text { color: var(--stpl-ink-soft); font-size: 14px; margin: 0 auto 22px; max-width: 520px; }
.stpl-404-search { display: flex; align-items: center; gap: 8px; max-width: 460px; margin: 0 auto 18px; background: var(--stpl-card); border: 1.5px solid var(--stpl-border); border-radius: var(--stpl-radius-sm); padding: 6px 6px 6px 14px; }
.stpl-404-search:focus-within { border-color: var(--stpl-gold-400); }
.stpl-404-search i { color: var(--stpl-ink-dim); }
.stpl-404-search input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--stpl-ink); font-family: inherit; font-size: 13px; text-align: right; }
.stpl-404-search button { background: var(--stpl-grad); color: #0a0a0b; border: none; border-radius: 8px; padding: 9px 16px; font-family: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.stpl-404-latest { margin-top: 42px; text-align: right; }

/* ==================== ورود / ثبت‌نام ==================== */
.stpl-auth-page { display: flex; align-items: flex-start; justify-content: center; }
.stpl-auth-card { width: 100%; max-width: 420px; background: var(--stpl-card); border: 1px solid var(--stpl-border); border-radius: var(--stpl-radius); padding: 26px 24px; margin-top: 10px; }
.stpl-auth-title { font-size: 18px; font-weight: 800; text-align: center; margin: 0 0 18px; }
.stpl-auth-hello { text-align: center; color: var(--stpl-ink-soft); }
.stpl-auth-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.stpl-auth-tabs { display: flex; background: var(--stpl-card-2); border: 1px solid var(--stpl-border); border-radius: var(--stpl-radius-sm); padding: 4px; margin-bottom: 20px; }
.stpl-auth-tab { flex: 1; cursor: pointer; background: none; border: none; border-radius: 7px; padding: 10px; font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--stpl-ink-soft); transition: background .15s ease, color .15s ease; }
.stpl-auth-tab.stpl-active { background: var(--stpl-grad); color: #0a0a0b; font-weight: 800; }

.stpl-auth-panel { display: none; }
.stpl-auth-panel.stpl-active { display: block; animation: stpl-fade .25s ease; }
@keyframes stpl-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.stpl-auth-form label,
.stpl-login-wrap label { display: block; font-size: 12.5px; color: var(--stpl-ink-soft); margin-bottom: 12px; font-weight: 600; }
.stpl-auth-form input,
.stpl-login-wrap input[type="text"],
.stpl-login-wrap input[type="password"] {
	width: 100%; margin-top: 6px; background: var(--stpl-card-2); border: 1.5px solid var(--stpl-border);
	border-radius: 9px; padding: 11px 13px; color: var(--stpl-ink); font-family: inherit; font-size: 13.5px; outline: none;
}
.stpl-auth-form input:focus,
.stpl-login-wrap input:focus { border-color: var(--stpl-gold-400); }
.stpl-login-wrap .login-remember { font-weight: 600; }
.stpl-login-wrap .login-remember label { display: flex; align-items: center; gap: 7px; }
.stpl-login-wrap .login-remember input { width: auto; margin: 0; }
.stpl-login-wrap .login-submit input,
.stpl-auth-form button[type="submit"] {
	width: 100%; margin-top: 6px; cursor: pointer; background: var(--stpl-grad); color: #0a0a0b;
	border: none; border-radius: var(--stpl-radius-sm); padding: 12px; font-family: inherit; font-weight: 800; font-size: 14px;
}
.stpl-login-wrap .login-submit input:hover,
.stpl-auth-form button[type="submit"]:hover { filter: brightness(1.06); }

.stpl-auth-links { margin-top: 16px; text-align: center; font-size: 12px; color: var(--stpl-ink-soft); display: flex; flex-direction: column; gap: 8px; }
.stpl-auth-links a { color: var(--stpl-gold-400); text-decoration: none; }
.stpl-auth-links a:hover { color: var(--stpl-red-500); }

.stpl-form-message { font-size: 12.5px; border-radius: 8px; margin-bottom: 4px; text-align: center; }
.stpl-form-message:not(:empty) { padding: 9px 12px; margin-bottom: 12px; }
.stpl-form-error { background: rgba(230,57,70,.12); color: #ff8088; border: 1px solid rgba(230,57,70,.35); }
.stpl-form-success { background: rgba(31,206,140,.12); color: #6ee7b7; border: 1px solid rgba(31,206,140,.35); }

/* ==================== نتایج جستجو ==================== */
.stpl-search-meta { color: var(--stpl-ink-soft); font-size: 12.5px; margin: 4px 0 0; }
.stpl-search-form { display: flex; align-items: center; gap: 8px; max-width: 460px; margin: 22px 0 30px; background: var(--stpl-card); border: 1.5px solid var(--stpl-border); border-radius: var(--stpl-radius-sm); padding: 6px 6px 6px 14px; }
.stpl-search-form:focus-within { border-color: var(--stpl-gold-400); }
.stpl-search-form i { color: var(--stpl-ink-dim); }
.stpl-search-form input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--stpl-ink); font-family: inherit; font-size: 13px; text-align: right; }
.stpl-search-form button { background: var(--stpl-grad); color: #0a0a0b; border: none; border-radius: 8px; padding: 9px 16px; font-family: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }

.stpl-search-empty { text-align: center; padding: 50px 10px; color: var(--stpl-ink-soft); }
.stpl-search-empty i { font-size: 34px; color: var(--stpl-ink-dim); margin-bottom: 14px; display: block; }
.stpl-search-empty p { max-width: 460px; margin: 0 auto; font-size: 13.5px; line-height: 1.9; }

/* ==================== صفحه‌بندی (نتایج جستجو و…) ==================== */
.stpl-pagination { margin-top: 30px; display: flex; justify-content: center; }
.stpl-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; margin: 0 3px; padding: 0 8px; border-radius: 9px; background: var(--stpl-card); border: 1px solid var(--stpl-border); color: var(--stpl-ink-soft); font-size: 13px; font-weight: 700; text-decoration: none; }
.stpl-pagination .page-numbers.current { background: var(--stpl-grad); color: #0a0a0b; border-color: transparent; }
.stpl-pagination .page-numbers:hover:not(.current):not(.dots) { border-color: var(--stpl-gold-400); color: var(--stpl-gold-400); }
.stpl-pagination .page-numbers.dots { background: none; border: none; }

/* ==================== واکنش‌گرا ==================== */
@media (max-width: 900px) {
	.stpl-col-twothird, .stpl-col-half, .stpl-col-third { grid-column: span 12; }
}
@media (max-width: 560px) {
	.stpl-cards-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
	.stpl-single-title { font-size: 24px; }
	.stpl-list-thumb { width: 76px; height: 60px; }
}
