/*
 * استایل‌های تکمیلی قالب فوت اسکن
 * فقط شامل مواردی است که با کلاس‌های آماده Tailwind قابل انجام نیست:
 * انیمیشن اسلایدرها/ورود سکشن‌ها، استایل خروجی ویرایشگر کلاسیک/بلوکی، ابزارک‌های ساید‌بار
 * (توجه: اسکرول نرم صفحه با کلاس Tailwind «scroll-smooth» روی تگ html در header.php انجام می‌شود، این‌جا تکرار نشده)
 */

/* استایل پیش‌فرض محتوای تولیدشده با ویرایشگر (کلاسیک یا بلوکی) داخل نوشته/برگه */
.footscan-entry-content img {
	border-radius: 0.75rem;
}
.footscan-entry-content a {
	color: var(--fs-link-color, #1e6fd9);
	text-decoration: underline;
}
.footscan-entry-content h2,
.footscan-entry-content h3,
.footscan-entry-content h4 {
	font-weight: 700;
	margin-top: 1.5em;
	margin-bottom: 0.75em;
}
.footscan-entry-content p {
	margin-bottom: 1em;
	line-height: 2;
}
.footscan-entry-content ul,
.footscan-entry-content ol {
	margin: 1em 1.5em;
}
.footscan-entry-content ul { list-style: disc; }
.footscan-entry-content ol { list-style: decimal; }
.footscan-entry-content blockquote {
	border-inline-start: 4px solid #1e6fd9;
	background: #eef6ff;
	padding: 1rem 1.25rem;
	border-radius: 0.5rem;
	margin: 1.5em 0;
}
.footscan-entry-content table {
	width: 100%;
	border-collapse: collapse;
}
.footscan-entry-content table td,
.footscan-entry-content table th {
	border: 1px solid #e5e7eb;
	padding: 0.5rem 0.75rem;
}

/* مخفی‌کردن اسکرول‌بار افقی اسلایدر گالری نتایج (کلاس scrollbar-hide در Tailwind CDN وجود ندارد) */
.scrollbar-hide::-webkit-scrollbar {
	display: none;
}
.scrollbar-hide {
	-ms-overflow-style: none;
	scrollbar-width: none;
}

/* پخش‌کننده اسلاید هیرو - فید نرم بین اسلایدها */
.footscan-hero-slide {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease-in-out;
	position: absolute;
	inset: 0;
}
.footscan-hero-slide.is-active {
	opacity: 1;
	visibility: visible;
	position: relative;
}

/* اسلایدر گالری نتایج - جلوگیری از پرش چیدمان قبل از لود جاوااسکریپت */
.footscan-results-track {
	scroll-snap-type: x mandatory;
}
.footscan-results-track > * {
	scroll-snap-align: start;
}

/* حالت فوکوس قابل‌دسترس برای صفحه‌کلید (Accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
	outline: 2px solid #1e6fd9;
	outline-offset: 2px;
}

/* ------------------------------------------------------------------
 * منوی اصلی هدر - دراپ‌داون/فلای‌اوت چندسطحی (پشتیبانی کامل تا هر عمقی، تست‌شده تا ۳ سطح)
 * هر زیرمنو صرفاً بر اساس هاور/فوکوس روی <li> والد بلافصل خودش نمایش داده می‌شود
 * (نه یک «group» مشترک برای کل منو) بنابراین چند سطح تودرتو هم‌زمان و بدون تداخل کار می‌کنند.
 * مارک‌آپ در inc/nav-menus.php (Footscan_Header_Walker) تولید می‌شود.
 * ------------------------------------------------------------------ */
.footscan-primary-nav .footscan-submenu {
	display: none;
}
.footscan-primary-nav li.relative:hover > .footscan-submenu,
.footscan-primary-nav li.relative:focus-within > .footscan-submenu {
	display: block;
	animation: footscan-submenu-in 0.15s ease;
}
/* زیرمنوهای عمق ۲ به بعد (فلای‌اوت کناری) روی زیرمنوی عمق ۱ قرار می‌گیرند */
.footscan-primary-nav .footscan-submenu .footscan-submenu {
	z-index: 40;
}
@keyframes footscan-submenu-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
/* ------------------------------------------------------------------
 * انیمیشن نرم و روان بارگذاری سکشن‌ها/آیتم‌ها هنگام لود صفحه یا اسکرول
 * (فقط با data-animate فعال می‌شود؛ منطق نمایش/تشخیص ورود به دیدگاه در
 * assets/js/main.js با IntersectionObserver انجام می‌شود - این‌جا فقط
 * حالت شروع/پایان انیمیشن تعریف شده است)
 * ------------------------------------------------------------------ */
[data-animate] {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
	will-change: opacity, transform;
}
[data-animate].is-visible {
	opacity: 1;
	transform: translateY(0);
}
/* اگر جاوااسکریپت به هر دلیلی لود نشود، محتوا هرگز مخفی نمی‌ماند (نویز-اسکریپت) */
.no-js [data-animate] {
	opacity: 1;
	transform: none;
}

/* احترام به تنظیمات کاهش انیمیشن سیستم کاربر */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
	[data-animate] {
		opacity: 1 !important;
		transform: none !important;
	}
}

/* ------------------------------------------------------------------
 * استایل حرفه‌ای ابزارک‌های پیش‌فرض وردپرس داخل ساید‌بار قالب
 * (دسته‌بندی‌ها، نوشته‌های اخیر، آرشیو، ابر برچسب، صفحات، متن و ...)
 * تمام قوانین زیر عمداً محدود به «.footscan-widget» شده‌اند تا هیچ بخش
 * دیگری از سایت (محتوای اصلی نوشته، صفحه اصلی و ...) تحت تاثیر قرار نگیرد.
 * ------------------------------------------------------------------ */

/* لیست‌های عمومی (دسته‌بندی‌ها، نوشته‌های اخیر، آرشیو، صفحات، منو) */
.footscan-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.footscan-widget ul ul {
	margin-inline-start: 0.9rem;
	margin-top: 0.4rem;
}
.footscan-widget li {
	border-bottom: 1px solid #f1f3f6;
}
.footscan-widget li:last-child {
	border-bottom: none;
}
.footscan-widget li > a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.65rem 0.1rem 0.65rem 0;
	color: #4b5563;
	font-size: 0.85rem;
	text-decoration: none;
	transition: color 0.2s ease, padding-inline-start 0.2s ease;
}
.footscan-widget li > a::before {
	content: "";
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--fs-widget-accent, #9db8dd);
	flex-shrink: 0;
	transition: background 0.2s ease;
}
.footscan-widget li > a:hover,
.footscan-widget li > a:focus-visible {
	color: var(--fs-widget-primary, #1e6fd9);
	padding-inline-start: 0.35rem;
}
.footscan-widget li > a:hover::before,
.footscan-widget li > a:focus-visible::before {
	background: var(--fs-widget-primary, #1e6fd9);
}

/* تاریخ کنار نوشته‌های اخیر (اسپن post-date) */
.footscan-widget .post-date {
	display: block;
	width: 100%;
	margin-top: 0.15rem;
	font-size: 0.7rem;
	color: #9ca3af;
}

/* ابر برچسب (Tag Cloud) - به شکل چیپ‌های رنگی */
.footscan-widget .tagcloud {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.footscan-widget .tagcloud a {
	font-size: 0.75rem !important;
	line-height: 1;
	background: var(--fs-widget-chip-bg, #eef6ff);
	color: var(--fs-widget-primary, #1e6fd9);
	padding: 0.45rem 0.85rem;
	border-radius: 999px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.footscan-widget .tagcloud a:hover,
.footscan-widget .tagcloud a:focus-visible {
	background: var(--fs-widget-primary, #1e6fd9);
	color: #fff;
}

/* ابزارک متن/HTML سفارشی - هماهنگ با تایپوگرافی محتوای اصلی */
.footscan-widget .textwidget img {
	max-width: 100%;
	height: auto;
	border-radius: 0.75rem;
}
.footscan-widget .textwidget a {
	color: var(--fs-widget-primary, #1e6fd9);
	text-decoration: underline;
}
.footscan-widget .textwidget p:last-child {
	margin-bottom: 0;
}

/* جدول تقویم (Calendar) */
.footscan-widget table#wp-calendar {
	width: 100%;
	text-align: center;
	font-size: 0.75rem;
	border-collapse: collapse;
}
.footscan-widget table#wp-calendar caption {
	font-weight: 700;
	color: #1a2b45;
	padding-bottom: 0.5rem;
}
.footscan-widget table#wp-calendar th {
	color: #9ca3af;
	font-weight: 600;
	padding: 0.35rem 0;
}
.footscan-widget table#wp-calendar td {
	padding: 0.4rem 0;
	color: #4b5563;
}
.footscan-widget table#wp-calendar #today {
	background: var(--fs-widget-primary, #1e6fd9);
	color: #fff;
	border-radius: 0.4rem;
}
.footscan-widget table#wp-calendar a {
	color: var(--fs-widget-primary, #1e6fd9);
	font-weight: 700;
}

/* آر‌اس‌اس / نظرات اخیر */
.footscan-widget .rss-date,
.footscan-widget .recentcomments .comment-author-link {
	color: var(--fs-widget-primary, #1e6fd9);
}

/* ------------------------------------------------------------------
 * تودرتویی/تورفتگی پاسخ‌های دیدگاه‌ها (کامنت‌های پاسخ‌داده‌شده جلوتر و با فاصله نمایش داده شوند)
 * وردپرس به‌صورت پیش‌فرض <ul class="children"> را داخل <li> دیدگاه والد قرار می‌دهد؛
 * این‌جا فقط تورفتگی + خط راهنمای عمودی سمت راست (هماهنگ با چیدمان راست‌به‌چپ) اضافه می‌شود.
 * ------------------------------------------------------------------ */
#comments .children {
	list-style: none;
	margin: 14px 0 0 0;
	padding-inline-end: 0;
	padding-inline-start: 0;
	padding-right: 28px;
	border-right: 2px solid #eef1f5;
}
#comments .children > li {
	margin-top: 14px;
}
