/* ==========================================================================
   قالب همپا: استایل اصلی
   اندازه‌ها و رنگ‌ها مطابق فایل فیگما (Hampa Design System) است.
   نقطه‌ی شکست: زیر ۷۶۸ پیکسل = طرح موبایل (۳۹۰)، بالاتر = طرح دسکتاپ (۱۴۰۰).
   ========================================================================== */

@font-face {
	font-family: "Vazirmatn";
	src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--brand: #2763eb;
	--accent: #0084ff;
	--info-50: #eff6ff;
	--info-600: #2563eb;
	--primary-50: #eef2ff;
	--primary-100: #e0e7ff;
	--n-0: #ffffff;
	--n-200: #e5e5e5;
	--n-400: #a3a3a3;
	--n-800: #262626;
	--n-900: #171717;
	--slate-200: #e2e8f0;
	--slate-600: #475569;
	--slate-900: #0f172a;
	--danger-600: #e11d48;
	--success-800: #166534;
	--dark-800: #4d5f6a;

	--font: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
	--maxw: 1080px;
}

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

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

body {
	margin: 0;
	background: var(--info-50);
	color: var(--slate-900);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
}

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

/* ---------- قالب کلی صفحه ---------- */

.hp-site {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	overflow-x: clip;
}

.hp-main { flex: 1 0 auto; position: relative; z-index: 1; }

.hp-hero-bg {
	position: absolute;
	inset: 0 0 auto 0;
	height: 845px;
	opacity: 0.5;
	pointer-events: none;
	z-index: 0;
	background:
		linear-gradient(to bottom, rgba(239, 246, 255, 0), var(--info-50)),
		url("../img/hero-bg.webp") center / cover no-repeat;
}

.hp-container {
	width: 100%;
	max-width: var(--maxw);
	margin-inline: auto;
	padding-inline: 16px;
}

/* ---------- سربرگ ---------- */

.hp-header {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	justify-content: center;
	padding: 12px;
}

.hp-header__pill {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	/* کمینه همان ۶۸۰ طرح، اما اگر منو گزینه‌ی بیشتری داشته باشد، قاب با آن پهن می‌شود. */
	width: auto;
	min-width: min(680px, 100%);
	max-width: 100%;
	gap: 24px;
	height: 64px;
	padding: 12px 16px 12px 12px;
	background: var(--n-0);
	border-radius: 50px;
	filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.1));
}

.hp-brand {
	display: flex;
	align-items: center;
	gap: 8px;
}

.hp-brand__icon {
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 11.52px;
	overflow: hidden;
}

.hp-brand__icon img { width: 100%; height: 100%; object-fit: cover; }

.hp-brand__name {
	font-size: 16px;
	font-weight: 700;
	line-height: 28px;
	color: var(--slate-900);
	white-space: nowrap;
}

.hp-header__end {
	display: flex;
	align-items: center;
	gap: 28px;
}

.hp-nav__list { display: flex; align-items: center; gap: 24px; }

.hp-nav__list a {
	display: block;
	min-width: 64px;
	padding: 4px;
	border-radius: 4px;
	text-align: center;
	font-size: 14px;
	font-weight: 500;
	line-height: normal;
	color: var(--n-800);
	white-space: nowrap;
	transition: color 0.15s;
}

.hp-nav__list a:hover { color: var(--brand); }
/* آیکن و توضیح هر لینک فقط در منوی کشویی موبایل. */
.hp-nav__ic, .hp-nav__d { display: none; }

.hp-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--info-600);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	white-space: nowrap;
	box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(0, 0, 0, 0.1);
	transition: background 0.15s;
}

.hp-cta:hover { background: #1d4fd0; }

.hp-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
}

/* ---------- عناصر مشترک ---------- */

.hp-eyebrow {
	display: inline-flex;
	padding: 4px 10px; /* + حاشیه‌ی ۲ پیکسلی = ۶ و ۱۲ مثل فیگما */
	background: #fff;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-radius: 999px;
	filter: drop-shadow(0 4px 2px rgba(0, 53, 102, 0.1));
}

.hp-eyebrow > span {
	font-size: 16px;
	font-weight: 700;
	line-height: 16px;
	white-space: nowrap;
	background: linear-gradient(to right, #0084ff, #007ecc 50%, #df00fd);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.hp-tag {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--primary-100);
	color: var(--accent);
	font-size: 12px;
	font-weight: 600;
	line-height: 16px;
}

/* ---------- دکمه‌های دانلود ---------- */

.hp-store {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 58px;
	padding: 14px 20px;
	background: #fff;
	border: 1px solid var(--slate-200);
	border-radius: 50px;
	color: var(--slate-900);
	transition: transform 0.15s, box-shadow 0.15s;
}

.hp-store:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12); }

.hp-store--bazaar {
	padding: 14px 24px;
	background: #000;
	border-color: #000;
	color: #fff;
	filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.1)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.hp-store--lg {
	gap: 8px;
	border: 0;
	font-size: 18px;
	font-weight: 500;
	line-height: 20px;
}

.hp-store img { max-width: none; }

.hp-myket {
	display: inline-flex;
	align-items: center;
	gap: 4.8px;
	direction: ltr;
}

.hp-apk {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 28px;
	font-size: 16px;
	font-weight: 500;
	line-height: 20px;
	white-space: nowrap;
}

/* لوگوی کافه‌بازار. --s مقیاس است: ۱ = دکمه‌ی بزرگ، ۰٫۸ = دکمه‌های کوچک. */
.hp-bazaar {
	--s: 1;
	display: inline-flex;
	align-items: center;
	gap: calc(6px * var(--s));
	direction: ltr;
}

.hp-bazaar__mark {
	position: relative;
	flex: none;
	width: calc(30px * var(--s));
	height: calc(30px * var(--s));
}

.hp-bazaar__mask {
	position: absolute;
	left: calc(-5.61px * var(--s));
	top: calc(-5.38px * var(--s));
	width: calc(41.668px * var(--s));
	height: calc(41.128px * var(--s));
	-webkit-mask-image: url("../img/bazar-mask-a.svg"), url("../img/bazar-mask-b.svg");
	mask-image: url("../img/bazar-mask-a.svg"), url("../img/bazar-mask-b.svg");
	-webkit-mask-size: calc(30px * var(--s)) calc(30px * var(--s)), calc(41.179px * var(--s)) calc(40.764px * var(--s));
	mask-size: calc(30px * var(--s)) calc(30px * var(--s)), calc(41.179px * var(--s)) calc(40.764px * var(--s));
	-webkit-mask-position: calc(5.615px * var(--s)) calc(5.43px * var(--s)), 0 calc(0.054px * var(--s));
	mask-position: calc(5.615px * var(--s)) calc(5.43px * var(--s)), 0 calc(0.054px * var(--s));
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-composite: source-in;
	mask-composite: intersect;
}

.hp-bazaar__mask img { width: 100%; height: 100%; max-width: none; object-fit: cover; }

.hp-bazaar__word {
	flex: none;
	width: calc(37.392px * var(--s));
	height: calc(24px * var(--s));
	max-width: none;
}

.hp-store-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	width: 100%;
	direction: ltr;
}

/* ---------- بالای صفحه (Hero) ---------- */

.hp-hero {
	position: relative;
	display: flex;
	justify-content: center;
	padding: 20px 0;
	overflow: clip;
}

.hp-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 50px;
	width: 100%;
}

.hp-hero__top {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 28px;
	width: 100%;
}

.hp-hero__text {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	width: 100%;
}

.hp-hero__heading {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.hp-hero__title {
	font-size: 48px;
	font-weight: 500;
	line-height: 1.8;
	text-align: center;
	color: var(--n-900);
	white-space: nowrap;
}

.hp-hero__lead {
	display: flex;
	flex-direction: column;
	align-items: center;
	font-size: 18px;
	line-height: 40px;
	text-align: center;
	color: var(--slate-600);
}

.hp-hero__lead strong { font-weight: 600; }

.hp-hero__ring {
	position: relative;
	display: inline-block;
}

.hp-hero__ring::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 146px;
	height: 36px;
	transform: translate(-50%, -50%);
	background: url("../img/underline.svg") center / 100% 100% no-repeat;
	pointer-events: none;
}

.hp-hero__cta {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.hp-more { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }

.hp-more__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	border: 0;
	background: none;
	font-size: 14px;
	line-height: normal;
	color: var(--n-400);
}

.hp-more__caret {
	display: inline-flex;
	border-radius: 50px;
	background: var(--n-400);
	overflow: hidden;
	transition: transform 0.2s;
}

.hp-more__toggle[aria-expanded="true"] .hp-more__caret { transform: rotate(180deg); }

.hp-more__list { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hp-more__list[hidden] { display: none; }

/* گوشی و نوار فصل‌ها */
.hp-phone {
	position: relative;
	flex: none;
	width: 358px;
	height: 390px;
	overflow: clip;
}

.hp-phone__bg {
	position: absolute;
	inset: auto 0 0 0;
	height: 320px;
	border-radius: 20px;
	background: url("../img/phone-bg.webp") center / cover no-repeat;
}

.hp-phone__device {
	position: absolute;
	left: 36.3px;
	top: 0;
	width: 285.398px;
	height: 582px;
}

.hp-phone__screen {
	position: absolute;
	left: 5.08%;
	top: 2.15%;
	width: 90.07%;
	height: 95.58%;
	max-width: none;
	object-fit: fill;
}

.hp-phone__frame {
	position: absolute;
	left: 0;
	top: 0;
	width: 100.23%;
	height: 99.89%;
	max-width: none;
	pointer-events: none;
}

.hp-seasons {
	position: absolute;
	left: 6px;
	right: 6px;
	bottom: 6px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px;
	padding: 6px;
	background: #fff;
	border-radius: 9999px;
	filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.4));
	direction: ltr;
}

.hp-seasons__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	height: 100%;
	aspect-ratio: 1;
	padding: 4px 8px;
	border-radius: 50px;
	color: var(--dark-800);
}

.hp-seasons__item img { width: 20px; height: 20px; max-width: none; }
.hp-seasons__item span { font-size: 10px; font-weight: 500; line-height: 14px; white-space: nowrap; }
.hp-seasons__item.is-auto { color: #004793; }
.hp-seasons__item.is-active { background: var(--brand); color: #fff; box-shadow: 0 0 0 2px rgba(39, 99, 235, 0.3); }

/* ---------- ویژگی‌ها ---------- */

.hp-features {
	display: flex;
	justify-content: center;
	padding: 80px 20px;
}

.hp-features__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 40px;
	width: 100%;
	max-width: var(--maxw);
}

.hp-features__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	width: 100%;
	text-align: center;
}

.hp-features__head h2 { font-size: 30px; font-weight: 500; line-height: 37.5px; color: var(--slate-900); }
.hp-features__head p { font-size: 18px; line-height: 32px; color: var(--slate-600); }

.hp-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	width: 100%;
	padding-inline: 16px;
}

.hp-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	padding: 20px;
	background: var(--n-0);
	border-radius: 20px;
}

.hp-card__art {
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
	position: relative;
	flex: none;
	width: 100%;
	height: 180px;
	border-radius: 10px;
	overflow: hidden;
}

.hp-card__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	width: 100%;
	text-align: center;
}

.hp-card__body h3 { font-size: 20px; font-weight: 500; line-height: normal; color: var(--slate-900); }
.hp-card__body p { font-size: 16px; line-height: 32px; color: var(--slate-600); }

/* چیپ‌ها و برچسب‌های تصویرسازی */
.hp-chip {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	padding: 2px 12px;
	background: #fff;
	border: 1.5px solid var(--n-200);
	border-radius: 50px;
	font-size: 14.346px;
	line-height: normal;
	color: var(--n-800);
	white-space: nowrap;
}

.hp-pill {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	height: 34px;
	padding: 10px 20px;
	background: #fff;
	border-radius: 800px;
	font-size: 14px;
	font-weight: 500;
	line-height: normal;
	color: var(--n-800);
	white-space: nowrap;
}

.hp-pill--dot { width: 34px; padding: 10px; }
.hp-pill--abs { position: absolute; }

.hp-rot {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hp-rot > * { flex: none; transform: rotate(var(--r, 0deg)); }

/* ۱) بدون تبلیغات */
.hp-art--ads { background: #ffdd8e; }

.hp-ads__strip {
	left: 50%;
	top: 50%;
	width: 463.565px;
	height: 123.434px;
	translate: -50% -50%;
}

.hp-ads__strip img {
	width: 468.023px;
	height: 27.309px;
	max-width: none;
	object-fit: cover;
	box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.hp-ads__badge {
	position: absolute;
	left: 50%;
	top: 50%;
	translate: -50% -50%;
	padding: 6px 16px;
	background: var(--danger-600);
	border-radius: 8px;
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(244, 63, 94, 0.3);
	font-size: 28px;
	font-weight: 500;
	line-height: normal;
	color: #fff;
	white-space: nowrap;
}

/* تکان خوردن هنگام دیده شدن کارت (کلاس is-shaking را main.js اضافه می‌کند).
   چرخش پایه‌ی هر عنصر (--r) حفظ می‌شود و فقط کمی به دو طرف می‌رود. */
@keyframes hp-shake {
	0%, 100% { transform: rotate(var(--r, 0deg)) translateX(0); }
	15% { transform: rotate(calc(var(--r, 0deg) - 4deg)) translateX(-4px); }
	30% { transform: rotate(calc(var(--r, 0deg) + 4deg)) translateX(4px); }
	45% { transform: rotate(calc(var(--r, 0deg) - 3deg)) translateX(-3px); }
	60% { transform: rotate(calc(var(--r, 0deg) + 3deg)) translateX(3px); }
	78% { transform: rotate(calc(var(--r, 0deg) - 1.5deg)) translateX(-1px); }
}

@keyframes hp-pop {
	0%, 100% { scale: 1; }
	40% { scale: 1.08; }
	70% { scale: 0.97; }
}

.hp-art--ads.is-shaking .hp-rot > * {
	animation: hp-shake 0.7s ease-in-out var(--d, 0s) 1 both;
}

.hp-art--ads.is-shaking .hp-rot:nth-child(2) { --d: 0.06s; }
.hp-art--ads.is-shaking .hp-rot:nth-child(3) { --d: 0.12s; }
.hp-art--ads.is-shaking .hp-rot:nth-child(4) { --d: 0.18s; }
.hp-art--ads.is-shaking .hp-ads__strip { --d: 0.09s; }

.hp-art--ads.is-shaking .hp-ads__badge {
	animation: hp-pop 0.6s ease-out 0.15s 1 both;
}

@media (prefers-reduced-motion: reduce) {
	.hp-art--ads.is-shaking .hp-rot > *,
	.hp-art--ads.is-shaking .hp-ads__badge {
		animation: none;
	}
}

/* ۲) تقویم سه‌گانه */
/* overflow: visible، چون دکمه‌ی کپی باید از لبه‌ی پایین تصویر بگذرد (پایین‌تر توضیح داده شده).
   گوشه‌های گرد را خود پس‌زمینه ایجاد می‌کند و به برش نیازی ندارد. */
.hp-art--date { background: linear-gradient(to bottom, #00254d, #0056b2); color: #fff; overflow: visible; }

/* دکمه‌ی کپی: در حالت عادی فقط لبه‌ی بالایی‌اش دیده می‌شود؛ با hover روی کارت بالا می‌آید.
   دکمه ۴ پیکسل بلندتر از قسمت دیده‌شده است و در حالت hover آن ۴ پیکسل زیر لبه‌ی تصویر آبی، روی زمینه‌ی سفید کارت
   (سفید روی سفید) می‌نشیند. اگر دقیقاً روی لبه تمام می‌شد، در مقیاس‌های کسری نمایشگر (۱۲۵٪ و ۱۵۰٪)
   یک ردیف باریک آبی زیرش دیده می‌شد. */
.hp-date__tab {
	position: absolute;
	left: 50%;
	bottom: -24px;
	translate: -50% 0;
	display: flex;
	align-items: flex-start;
	height: 40px;
	padding: 0;
	border: 0;
	background: #fff;
	border-radius: 10px 10px 0 0;
	color: #000;
	cursor: pointer;
	transition: transform 0.25s ease;
}

.hp-date__tab-inner {
	display: flex;
	align-items: center;
	gap: 8px; /* فاصله‌ی دیده‌شده‌ی آیکون تا نوشته ۸ پیکسل است؛ حاشیه‌ی خالی داخل خود آیکون‌ها پایین‌تر جبران می‌شود */
	padding: 6px 8px;
	opacity: 0;
	font-size: 14px;
	line-height: normal;
	white-space: nowrap;
	transition: opacity 0.2s ease;
}

.hp-date__icon, .hp-date__check { flex: none; width: 24px; height: 24px; }
.hp-date__icon { margin-inline-end: -3px; }  /* خود آیکون کپی ۳ پیکسل حاشیه‌ی خالی دارد */
.hp-date__check { display: none; margin-inline-end: -4.5px; }  /* آیکون تیک: حاشیه‌ی دیده‌شده‌ی لبه‌ی خط */

/* تاریخ‌ها فشرده‌تر می‌شوند و کمی بالا می‌روند تا برای دکمه جا باز شود (مطابق حالت hover طراحی). */
.hp-date__en, .hp-date__ar { transition: transform 0.25s ease; }

.hp-card:hover .hp-date__en,
.hp-art--date:has(.hp-date__tab:focus-visible) .hp-date__en { transform: translateY(-9px); }

.hp-card:hover .hp-date__ar,
.hp-art--date:has(.hp-date__tab:focus-visible) .hp-date__ar { transform: translateY(-21px); }

.hp-card:hover .hp-date__tab,
.hp-date__tab:focus-visible { transform: translateY(-20px); }

.hp-card:hover .hp-date__tab-inner,
.hp-date__tab:focus-visible .hp-date__tab-inner { opacity: 1; }

.hp-date__tab.is-copied .hp-date__icon { display: none; }
.hp-date__tab.is-copied .hp-date__check { display: block; }
.hp-date__tab.is-copied .hp-date__label { color: var(--success-800); }

/* صفحه‌ی لمسی hover ندارد؛ دکمه همیشه کامل دیده می‌شود تا قابل لمس باشد. */
@media (hover: none) {
	.hp-date__tab { transform: translateY(-20px); }
	.hp-date__tab-inner { opacity: 1; }
	.hp-date__en { transform: translateY(-9px); }
	.hp-date__ar { transform: translateY(-21px); }
}

@media (prefers-reduced-motion: reduce) {
	.hp-date__tab, .hp-date__tab-inner, .hp-date__en, .hp-date__ar { transition: none; }
}

.hp-date__fa, .hp-date__en, .hp-date__ar {
	position: absolute;
	left: calc(50% - 86px);
	width: 172px;
	text-align: center;
	line-height: normal;
}

.hp-date__fa { top: 33px; font-size: 32px; font-weight: 500; }
.hp-date__en { top: 93px; font-size: 14px; }
.hp-date__ar { top: 125px; font-size: 14px; }

/* ۳) رویدادها */
.hp-art--events { background: var(--success-800); }

.hp-events {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	translate: 0 -50%;
	display: flex;
	flex-direction: column;
	direction: ltr;
}

/* نوار متحرک: هر ردیف چند کپی یکسان از چیپ‌ها دارد و به اندازه‌ی یک کپی جابه‌جا می‌شود؛ پایان دور همان شروع دور است. */
.hp-marquee { --copies: 4; display: flex; padding: 8px 0; overflow: hidden; }

.hp-marquee__track {
	display: flex;
	flex: none;
	width: max-content;
	animation: hp-marquee-left var(--dur, 26s) linear var(--delay, 0s) infinite;
	animation-play-state: paused; /* تا وقتی کارت دیده نمی‌شود، ندویم و باتری مصرف نشود */
}

.hp-marquee--right .hp-marquee__track { animation-name: hp-marquee-right; }
.hp-art--events.is-running .hp-marquee__track { animation-play-state: running; }

.hp-marquee__group { display: flex; flex: none; gap: 9px; padding-inline-end: 9px; }

@keyframes hp-marquee-left {
	from { transform: translateX(0); }
	to { transform: translateX(calc(-100% / var(--copies))); }
}

@keyframes hp-marquee-right {
	from { transform: translateX(calc(-100% / var(--copies))); }
	to { transform: translateX(0); }
}

/* «کاهش حرکت»: نوار ثابت می‌ماند و فقط یک کپی از چیپ‌ها، مثل طراحی، دیده می‌شود. */
@media (prefers-reduced-motion: reduce) {
	.hp-marquee .hp-marquee__track,
	.hp-marquee--right .hp-marquee__track { animation: none; transform: none; }
	.hp-marquee__group[aria-hidden="true"] { display: none; }
	.hp-marquee { justify-content: center; }
	.hp-events .hp-marquee:last-child { justify-content: flex-start; }
}

/* ۴) اوقات شرعی و قطب‌نما */
.hp-art--compass { background: var(--primary-50); }

.hp-compass__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.hp-compass__base,
.hp-compass__needle {
	position: absolute;
	left: 50%;
	top: 50%;
	translate: -50% -50%;
	width: 125.774px;
	height: 125.774px;
	max-width: none;
}

/* فلش دور مرکز دایره می‌چرخد (وسط فایل SVG). --a زاویه است و main.js آن را پله‌پله عوض می‌کند.
   منحنی با کمی «پس‌زدگی» است تا هر پله مثل یک تیک مکانیکی حس شود. */
.hp-compass__needle {
	transform: rotate(var(--a, 0deg));
	transform-origin: 50% 50%;
	transition: transform 0.14s cubic-bezier(0.34, 1.7, 0.64, 1);
}

/* برگشت به حالت اول بعد از رفتن ماوس: نرم و بدون تیک */
.hp-compass__needle.is-returning { transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1); }

.hp-art--compass { touch-action: pan-y; }

@media (prefers-reduced-motion: reduce) {
	.hp-compass__needle, .hp-compass__needle.is-returning { transition: none; }
}

/* ۵) پوسته‌ها (مطابق فیگما) */
/* پس‌زمینه: گرادیان آبی تیره + رنگ تم با حالت ترکیب «color» (رنگ و اشباع از تم، روشنایی از گرادیان).
   حالت اول رنگ آبی همپا و یک سایه‌ی ۲۰٪ دارد؛ در تم‌ها فقط رنگ تم می‌نشیند.
   دو متغیر «ثبت‌شده» هستند تا مرورگر هنگام عوض شدن، رنگ را نرم به رنگ بعدی برساند. */
@property --theme-tint { syntax: "<color>"; inherits: true; initial-value: #2763eb; }
@property --theme-shade { syntax: "<color>"; inherits: true; initial-value: rgba(0, 0, 0, 0.2); }

.hp-art--themes {
	background: linear-gradient(to bottom, #00254d, #0056b2);
	transition: --theme-tint 0.4s ease, --theme-shade 0.4s ease;
}

.hp-art--themes::before, .hp-art--themes::after { content: ""; position: absolute; inset: 0; }
.hp-art--themes::before { background: var(--theme-tint); mix-blend-mode: color; }
.hp-art--themes::after { background: var(--theme-shade); }

.hp-art--themes[data-theme="winter"] { --theme-tint: #0a395c; --theme-shade: rgb(0 0 0 / 0); }
.hp-art--themes[data-theme="autumn"] { --theme-tint: #e36c35; --theme-shade: rgb(0 0 0 / 0); }
.hp-art--themes[data-theme="spring"] { --theme-tint: #93062d; --theme-shade: rgb(0 0 0 / 0); }
.hp-art--themes[data-theme="summer"] { --theme-tint: #077955; --theme-shade: rgb(0 0 0 / 0); }

.hp-themes {
	position: absolute;
	z-index: 1;
	left: 50%;
	top: 50%;
	translate: -50% -50%;
	display: flex;
	flex-wrap: wrap;
	align-content: center;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 259px;
	height: 160px;
	direction: ltr;
}

/* دایره‌ی تم. --fill رنگ عادی، --main رنگ اصلی تم (حالت انتخاب‌شده) و --ring رنگ حلقه‌ی بیرونی است. */
.hp-themes__item {
	--fill: #e8f4fd;
	--main: #0a395c;
	--ring: #fff;
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0;
	width: 60px;
	height: 60px;
	padding: 12px;
	border-radius: 100px;
	background: var(--fill);
	color: var(--dark-800);
	box-shadow: 0 0 0 0 transparent;
	transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, padding 0.3s ease, gap 0.3s ease;
}

.hp-themes__item[data-theme="winter"] { --fill: #e8f4fd; --main: #0a395c; }
.hp-themes__item[data-theme="autumn"] { --fill: #fcefe9; --main: #ca531c; }
.hp-themes__item[data-theme="spring"] { --fill: #fee7ed; --main: #93062d; --ring: #fafafa; }
.hp-themes__item[data-theme="summer"] { --fill: #e7fef6; --main: #077955; }
.hp-themes__item[data-theme="hampa"] { --fill: #bfd1f9; }

.hp-themes__item img {
	width: 23.439px;
	height: 23.439px;
	max-width: none;
	transition: width 0.3s ease, height 0.3s ease, filter 0.3s ease;
}

.hp-themes__item span {
	font-size: 11.719px;
	font-weight: 500;
	line-height: 16.407px;
	white-space: nowrap;
	transition: font-size 0.3s ease, line-height 0.3s ease;
}

/* «فعال»: دایره‌ی همپا وقتی هیچ تمی انتخاب نشده حلقه‌ی سفید دارد. */
.hp-art--themes:not([data-theme]) .hp-themes__item.is-active { box-shadow: 0 0 0 2px #fff; }

/* «انتخاب‌شده»: پر از رنگ تم، حلقه‌ی سفید بیرونی، آیکون ۲۰ و نوشته‌ی ۱۰ پیکسلی سفید. */
.hp-themes__item.is-selected {
	gap: 2px;
	padding: 4px 8px;
	background: var(--main);
	color: #fff;
	box-shadow: 0 0 0 2px var(--ring);
}

.hp-themes__item.is-selected img { width: 20px; height: 20px; filter: brightness(0) invert(1); }
.hp-themes__item.is-selected span { font-size: 10px; line-height: 16px; }

/* «کاهش حرکت»: حالت‌ها عوض می‌شوند ولی آنی، بدون محو شدن. */
@media (prefers-reduced-motion: reduce) {
	.hp-art--themes, .hp-themes__item, .hp-themes__item img, .hp-themes__item span { transition: none; }
}

/* ۶) امکانات دیگر */
.hp-art--more { background: var(--primary-100); }

/* با گرانش می‌ریزند و می‌نشینند: فیزیک را more-physics.js (Matter.js) اجرا می‌کند و فقط transform هر برچسب را عوض می‌کند.
   بدون جاوااسکریپت یا با «کاهش حرکت»، چیدمان ثابت بالا دیده می‌شود. */
.hp-art--more.is-physics > * { position: absolute; cursor: grab; touch-action: none; will-change: transform; }
.hp-art--more.is-physics > .is-grabbed { cursor: grabbing; z-index: 2; }
.hp-art--more.is-physics > .hp-rot > * { transform: none; }

/* ---------- بنر دانلود ---------- */

.hp-banner-section {
	display: flex;
	justify-content: center;
	padding: 80px 16px;
}

.hp-banner {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px;
	width: 100%;
	max-width: var(--maxw);
	height: 516px;
	background: var(--n-0);
	border-radius: 20px;
	overflow: clip;
}

.hp-banner__bg {
	position: absolute;
	inset: 0;
	opacity: 0.5;
	background: url("../img/banner-bg.webp") center / cover no-repeat;
}

.hp-banner__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to left, #fff, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, 0));
}

.hp-banner__content {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 20px;
	padding: 40px 60px;
	border-radius: 24px;
	overflow: clip;
}

.hp-banner__title {
	width: 100%;
	max-width: 576px;
	font-size: 36px;
	font-weight: 400;
	line-height: 1.7;
	color: var(--slate-900);
}

.hp-banner__list { display: flex; flex-direction: column; gap: 8px; width: 100%; }

.hp-banner__list li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	line-height: 28px;
	color: var(--n-800);
}

.hp-banner__list img { flex: none; width: 24px; height: 24px; }

.hp-store-grid--banner {
	width: 320px;
	filter: drop-shadow(0 8px 12.5px rgba(0, 0, 0, 0.15));
}

.hp-banner__visual { position: relative; height: 516px; }

.hp-banner__visual img {
	position: absolute;
	left: calc(50% + 1px);
	top: calc(50% + 176px);
	translate: -50% -50%;
	scale: -1 1;
	width: 322px;
	height: 762px;
	max-width: none;
	filter: drop-shadow(-36px 80px 24px rgba(41, 19, 0, 0.25));
}

/* ---------- فوتر ---------- */

.hp-footer {
	position: relative;
	z-index: 1;
	background: var(--info-50);
}

.hp-footer__body { display: flex; justify-content: center; padding: 28px; }

.hp-footer__grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr 2fr;
	grid-template-areas: "brand product company download";
	gap: 20px 40px;
	width: 100%;
	max-width: var(--maxw);
}

.hp-footer__brand { grid-area: brand; display: flex; flex-direction: column; gap: 16px; }
.hp-footer__col--product { grid-area: product; }
.hp-footer__col--company { grid-area: company; }
.hp-footer__download { grid-area: download; align-self: start; }

.hp-footer__logo { display: flex; align-items: center; gap: 8px; }

/* لوگوی همپا، مثل لوگوی سربرگ. */
.hp-footer__mark {
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 11.52px;
	overflow: hidden;
}

.hp-footer__mark img { display: block; width: 100%; height: 100%; object-fit: cover; }

.hp-footer__name { font-size: 18px; font-weight: 700; line-height: 28px; color: var(--slate-900); }

.hp-footer__about { display: flex; flex-direction: column; gap: 8px; color: var(--slate-600); }
.hp-footer__about p { font-size: 14px; line-height: 1.8; }
.hp-footer__about .hp-footer__note { font-size: 11px; }

.hp-footer__col { display: flex; flex-direction: column; gap: 12px; }
.hp-footer__col h3 { font-size: 14px; font-weight: 600; line-height: 20px; color: var(--slate-900); }
.hp-footer__list { display: flex; flex-direction: column; gap: 10px; }
.hp-footer__list a { font-size: 14px; line-height: 20px; color: var(--slate-600); transition: color 0.15s; }
.hp-footer__list a:hover { color: var(--brand); }

.hp-footer__download {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 20px;
	background: #fff;
	border: 1px dashed var(--n-200);
	border-radius: 24px;
}

.hp-footer__download-title { font-size: 16px; font-weight: 700; line-height: 28px; text-align: center; color: var(--slate-900); }

.hp-footer__bar { border-top: 1px solid var(--slate-200); }

.hp-footer__bar p {
	max-width: var(--maxw);
	margin-inline: auto;
	padding: 16px;
	font-size: 12px;
	line-height: 16px;
	text-align: center;
	color: rgba(71, 85, 105, 0.7);
}

/* ---------- صفحه‌های معمولی و نوشته‌ها ---------- */

.hp-page {
	max-width: 860px;
	margin: 0 auto;
	padding: 24px 16px 80px;
}

.hp-page__title { margin-bottom: 24px; font-size: 32px; font-weight: 700; line-height: 1.6; text-align: center; }

.hp-prose {
	padding: 28px;
	background: #fff;
	border-radius: 20px;
	font-size: 16px;
	line-height: 2;
	color: var(--slate-600);
}

.hp-prose > * + * { margin-top: 1em; }
.hp-prose h2, .hp-prose h3 { color: var(--slate-900); font-weight: 700; line-height: 1.7; margin-top: 1.6em; }
.hp-prose a { color: var(--brand); text-decoration: underline; }
.hp-prose ul { list-style: disc; padding-inline-start: 1.4em; }
.hp-prose ol { list-style: decimal; padding-inline-start: 1.4em; }

/* ==========================================================================
   موبایل (زیر ۷۶۸ پیکسل)
   ========================================================================== */

@media (max-width: 1023px) {
	.hp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	/* سربرگ */
	.hp-header { padding: 8px 12px; }
	.hp-header__pill { width: 100%; min-width: 0; max-width: none; padding: 12px; }
	.hp-brand__name { font-size: 18px; }
	.hp-header__end { gap: 0; }
	.hp-menu-toggle { display: flex; }

	.hp-nav {
		display: none;
		position: absolute;
		top: calc(100% + 8px);
		inset-inline: 0;
		padding: 8px;
		background: #fff;
		border-radius: 24px;
		box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
	}

	.hp-nav.is-open { display: block; }
	.hp-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.hp-nav { max-height: calc(100vh - 110px); overflow-y: auto; }
	.hp-nav__list { gap: 2px; }
	.hp-nav__list a { display: flex; align-items: center; gap: 12px; width: auto; padding: 10px 12px; border-radius: 16px; text-align: start; font-size: 15px; white-space: normal; }
	.hp-nav__list a:hover { background: var(--info-50); }
	.hp-nav__ic { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--info-50); font-size: 22px; line-height: 1; }
	.hp-nav__list a:hover .hp-nav__ic { background: #fff; }
	.hp-nav__txt { display: flex; flex-direction: column; min-width: 0; }
	.hp-nav__t { font-size: 15px; font-weight: 600; line-height: 24px; color: var(--n-900); }
	.hp-nav__d { display: block; font-size: 13px; font-weight: 400; line-height: 20px; color: var(--slate-600); }

	/* بالای صفحه */
	.hp-hero__title { font-size: 40px; line-height: 1.6; white-space: normal; }

	/* ویژگی‌ها */
	.hp-cards { grid-template-columns: minmax(0, 1fr); }

	/* بنر */
	.hp-banner { display: flex; flex-direction: column; gap: 4px; height: auto; }
	.hp-banner__content { align-self: stretch; padding: 28px; }
	.hp-banner__title { font-size: 32px; }
	.hp-store-grid--banner { width: 320px; max-width: 100%; }
	.hp-banner__visual { height: 260px; }

	.hp-banner__visual img {
		top: 0;
		translate: -50% 0;
		width: 174px;
		height: 411px;
		filter: drop-shadow(-36px 80px 24px rgba(41, 19, 0, 0.25));
	}

	/* فوتر */
	.hp-footer__grid {
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"brand brand"
			"download download"
			"product company";
		gap: 20px;
	}
}

/* ===================================================================   صفحه‌ی «درباره ما» (page-about.php)
   ========================================================================== */
.hp-about { max-width: 500px; margin: 0 auto; padding: 8px 16px 48px; text-align: center; }
.hp-about__intro { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hp-about__intro .hp-sparkle-icon { width: 96px; height: 96px; margin-bottom: 3px; border-radius: 22px; box-shadow: 0 10px 24px rgba(0, 84, 255, 0.22); }
.hp-about__title { font-size: 28px; font-weight: 500; line-height: 1.4; color: #262626; }
.hp-about__sub, .hp-about__ver { font-size: 15px; line-height: 22px; color: #262626; }
.hp-about__ver { font-size: 14px; color: var(--slate-600); }
.hp-about__download { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; padding: 20px; border: 1px dashed var(--slate-200); border-radius: 20px; background: rgba(255, 255, 255, 0.85); }
.hp-about__download-title { font-size: 16px; font-weight: 700; line-height: 28px; color: var(--slate-900); }
.hp-about__app { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 24px; }
.hp-about__text { font-size: 14px; line-height: 22px; color: #262626; }
.hp-about__rate { padding: 12px 24px; font-size: 14px; font-weight: 700; }
.hp-about__rows { display: flex; flex-direction: column; gap: 11px; margin-top: 24px; }
.hp-about__row { display: flex; align-items: center; gap: 16px; min-height: 49px; padding: 0 12px; border-radius: 24px; background: #f5f5f5; text-align: start; color: #262626; transition: background-color 0.15s; }
.hp-about__row:hover { background: #eeeeee; }
.hp-about__row-icon { flex: none; width: 24px; height: 24px; }
.hp-about__row-name { flex: 1; font-size: 14px; font-weight: 600; }
.hp-about__tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.hp-about__tag--warn { background: #fef3e2; color: #d97706; }
.hp-about__tag--info { background: #e8f0fe; color: #2763eb; }
.hp-about__tag--ok { background: #dcfce7; color: #16a34a; }
.hp-about__tag img { margin-inline-start: -6px; }
/* برچسب «ارتباط با ما» هر ۱٫۵ ثانیه عوض می‌شود (سه برچسب روی هم، فقط یکی دیده می‌شود). */
.hp-about__rot { position: relative; display: grid; }
.hp-about__rot > .hp-about__tag { grid-area: 1 / 1; justify-content: center; opacity: 0; animation: hp-rot3 4.5s infinite; }
.hp-about__rot > .hp-about__tag:nth-child(2) { animation-delay: 1.5s; }
.hp-about__rot > .hp-about__tag:nth-child(3) { animation-delay: 3s; }
@keyframes hp-rot3 {
	0% { opacity: 0; transform: translateY(40%); }
	6%, 30% { opacity: 1; transform: translateY(0); }
	36%, 100% { opacity: 0; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
	.hp-about__rot > .hp-about__tag { animation: none; }
	.hp-about__rot > .hp-about__tag:first-child { opacity: 1; }
}
.hp-about__features { margin-top: 28px; text-align: start; }
.hp-about__features h2 { margin-bottom: 8px; font-size: 14px; font-weight: 400; line-height: 20px; color: #262626; }
.hp-about__features ul { display: flex; flex-direction: column; gap: 2px; overflow: hidden; border-radius: 12px; }
.hp-about__features li { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 4px; background: #f5f5f5; font-size: 14px; color: #262626; }
.hp-about__feat-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(30, 30, 30, 0.1); }
.hp-about__feat-icon img { width: 16px; height: 16px; }
.hp-about__links { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; overflow: hidden; border-radius: 12px; text-align: start; }
.hp-about__links > * { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 4px; background: #f5f5f5; font-size: 14px; color: #262626; }
.hp-about__links a:hover { background: #eeeeee; }
.hp-about__links small { font-size: 13px; color: #737373; }
.hp-about__links .hp-about__web { font-weight: 700; color: #0084ff; }
.hp-about__made { margin-top: 24px; font-size: 12px; line-height: 2; color: var(--slate-600); }
/* آیکن اپ با ستاره‌های چشمک‌زن: تصویر بدون ستاره + ستاره‌های سفید روی آن. */
.hp-sparkle-icon { position: relative; flex: none; display: block; width: 68px; height: 68px; overflow: hidden; }
.hp-sparkle-icon img { display: block; width: 100%; height: 100%; }
.hp-sparkle {
	position: absolute;
	aspect-ratio: 1;
	height: auto;
	transform: translate(-50%, -50%);
	filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.9));
	animation: hp-twinkle 2.8s ease-in-out var(--d, 0s) infinite;
}
@keyframes hp-twinkle {
	0%, 100% { opacity: 0.25; transform: translate(-50%, -50%) scale(0.55) rotate(0deg); }
	45% { opacity: 1; transform: translate(-50%, -50%) scale(1.25) rotate(18deg); }
	70% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.9) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
	.hp-sparkle { animation: none; opacity: 1; transform: translate(-50%, -50%); }
}
@media (max-width: 767px) {
	.hp-about__title { font-size: 26px; }
}

/* ==========================================================================
   صفحه‌های «حریم خصوصی» (page-privacy.php) و «پشتیبانی» (page-support.php)
   ========================================================================== */
.hp-doc, .hp-support { max-width: 640px; margin: 0 auto; padding: 0 20px 80px; }
.hp-doc__intro, .hp-support__intro { text-align: center; padding: 20px 0; }
.hp-doc__title { font-size: 48px; font-weight: 500; line-height: 1.8; color: var(--n-900); }
.hp-doc__lead { margin-top: 4px; font-size: 18px; line-height: 28px; color: var(--slate-600); }
.hp-doc__body { display: flex; flex-direction: column; gap: 32px; margin-top: 20px; text-align: start; }
.hp-doc__body h2 { font-size: 18px; font-weight: 600; line-height: 28px; color: var(--slate-900); }
.hp-doc__body p { margin-top: 8px; font-size: 14px; line-height: 32px; color: var(--slate-600); }

.hp-support__badge { display: inline-flex; padding: 6px 12px; border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 999px; background: #fff; box-shadow: 0 4px 2px rgba(0, 53, 102, 0.1); margin-bottom: 12px; }
.hp-support__badge span { font-size: 16px; font-weight: 700; line-height: 16px; background: linear-gradient(90deg, #0084ff, #007ecc, #df00fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hp-support__credit { margin-top: 12px; font-size: 14px; color: var(--slate-600); }
.hp-support__block { margin-top: 40px; }
.hp-support__block h2 { margin-bottom: 16px; text-align: center; font-size: 18px; font-weight: 600; line-height: 28px; color: var(--slate-900); }

.hp-faq { display: flex; flex-direction: column; gap: 2px; overflow: hidden; border-radius: 12px; }
.hp-faq__item { background: #fff; border-radius: 4px; }
.hp-faq__item summary { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: 14px; line-height: 20px; color: var(--n-800); cursor: pointer; list-style: none; text-align: start; }
.hp-faq__item summary::-webkit-details-marker { display: none; }
.hp-faq__chev { flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgba(59, 130, 246, 0.16); position: relative; }
.hp-faq__chev::after { content: ""; position: absolute; inset: 0; margin: auto; width: 7px; height: 7px; border-right: 2px solid var(--info-600); border-bottom: 2px solid var(--info-600); transform: translateY(-2px) rotate(45deg); transition: transform 0.2s; }
.hp-faq__item[open] .hp-faq__chev::after { transform: translateY(2px) rotate(-135deg); }
.hp-faq__item p { padding: 0 16px 14px; font-size: 14px; line-height: 28px; color: var(--slate-600); }

.hp-form { display: flex; flex-direction: column; gap: 20px; padding: 24px; border: 1px solid var(--slate-200); border-radius: 16px; background: #fff; }
.hp-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hp-field { display: flex; flex-direction: column; gap: 6px; }
.hp-field > span { font-size: 14px; font-weight: 500; line-height: 20px; color: var(--slate-900); }
.hp-field em { color: var(--danger-600); font-style: normal; }
.hp-field input, .hp-field select, .hp-field textarea { width: 100%; min-height: 48px; padding: 12px; border: 1px solid #d4d4d4; border-radius: 8px; background: #fafafa; font: inherit; font-size: 14px; color: var(--n-800); }
.hp-field textarea { min-height: 126px; resize: vertical; }
.hp-field input[type="file"] { padding: 10px; background: #fff; }
.hp-field__hint { font-size: 12px; line-height: 18px; color: var(--n-500, #737373); }
.hp-field input::placeholder, .hp-field textarea::placeholder { color: var(--n-400); }
.hp-field input:focus, .hp-field select:focus, .hp-field textarea:focus { outline: 2px solid var(--info-600); outline-offset: 1px; }
.hp-form__submit { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border: 0; border-radius: 999px; background: var(--n-900); color: #fff; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(0, 0, 0, 0.1); }
.hp-form__submit:hover { background: #000; }
.hp-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hp-note { margin-bottom: 12px; padding: 10px 16px; border-radius: 12px; font-size: 14px; text-align: center; }
.hp-note--ok { background: #dcfce7; color: var(--success-800); }
.hp-note--err { background: rgba(245, 158, 11, 0.12); color: #d97706; }
@media (max-width: 767px) {
	.hp-doc__title { font-size: 32px; }
	.hp-doc__lead { font-size: 16px; }
	.hp-form__row { grid-template-columns: 1fr; }
	.hp-form { padding: 16px; }
}

/* ==========================================================================
   مناسبت‌ها: مقاله‌ی هر رویداد، صفحه‌ی ماه و صفحه‌ی اصلی مناسبت‌ها
   رنگ دسته‌ها همان رنگ‌های اپ است: ملی آبی، بین‌المللی نیلی، اسلامی فیروزه‌ای.
   ========================================================================== */

:root {
	--cat-iranian: #0084ff;
	--cat-iranian-bg: #eef3fc;
	--cat-international: #6366f1;
	--cat-international-bg: #eeeffe;
	--cat-islamic: #14b8a6;
	--cat-islamic-bg: #e3f6f3;
}

.hp-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 16px;
	font-size: 13px;
	line-height: 20px;
	color: var(--slate-600);
}
.hp-crumbs a:hover { color: var(--brand); }

.hp-cat-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 24px;
	padding: 0 10px;
	border-radius: 50px;
	font-size: 12px;
	line-height: 16px;
	color: #02244a;
	background: rgba(0, 132, 255, 0.2);
}
.hp-cat-tag--international { color: #180349; background: rgba(99, 102, 241, 0.2); }
.hp-cat-tag--islamic { color: #404040; background: rgba(0, 0, 0, 0.12); }
.hp-cat-tag--holiday { color: #525252; background: var(--n-200); }

/* ---------- مقاله ---------- */

.hp-event { max-width: 760px; margin: 0 auto; padding: 24px 16px 80px; }

/* کارت بالای مقاله: همه‌ی رویدادها بدون نیاز به تصویر، یک ظاهر یکدست دارند
   (رنگ دسته + عنوان + تاریخ). رویدادهای ویژه به‌جای آن بنر خودشان را دارند. */
.hp-event__head {
	position: relative;
	overflow: hidden;
	padding: 32px 28px 28px;
	border-radius: 28px;
	background: #fff;
	border-top: 6px solid var(--cat-iranian);
}
.hp-event__head::after {
	content: "";
	position: absolute;
	inset-block-start: 0;
	inset-inline-end: 0;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	transform: translate(-35%, -55%);
	background: var(--cat-iranian-bg);
	pointer-events: none;
}
.hp-event__head > * { position: relative; z-index: 1; }
.hp-event__head--international { border-top-color: var(--cat-international); }
.hp-event__head--international::after { background: var(--cat-international-bg); }
.hp-event__head--islamic { border-top-color: var(--cat-islamic); }
.hp-event__head--islamic::after { background: var(--cat-islamic-bg); }
.hp-event__head--banner { padding-top: 0; border-top: 0; }
.hp-event__head--banner::after { display: none; }

.hp-event__banner {
	width: calc(100% + 56px);
	max-width: none;
	margin: 0 -28px 24px;
	aspect-ratio: 318 / 100;
	object-fit: cover;
}

.hp-event__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-event__title { margin-top: 16px; font-size: 32px; font-weight: 700; line-height: 1.6; color: var(--n-900); }
.hp-event__date { margin-top: 8px; font-size: 15px; line-height: 24px; color: #737373; }
.hp-event__date span { margin: 0 4px; }
.hp-event__lead { margin-top: 16px; font-size: 17px; line-height: 1.9; color: var(--dark-800); }

.hp-event__body { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.hp-event__prose h2 { font-size: 22px; }
.hp-event__prose h3 { font-size: 18px; }


.hp-event__years,
.hp-event__sources,
.hp-event__related {
	padding: 24px 28px;
	background: #fff;
	border-radius: 20px;
}
.hp-event__years h2,
.hp-event__sources h2,
.hp-event__related h2 { font-size: 18px; font-weight: 700; line-height: 28px; color: var(--slate-900); }

.hp-event__years table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 14px; line-height: 24px; }
.hp-event__years th { text-align: start; font-weight: 600; color: var(--slate-900); padding: 8px 0; border-bottom: 1px solid var(--slate-200); }
.hp-event__years td { padding: 10px 0; color: var(--slate-600); border-bottom: 1px solid var(--slate-200); }
.hp-event__years tr:last-child td { border-bottom: 0; }

.hp-event__sources ul,
.hp-event__related ul { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 24px; }
.hp-event__sources a,
.hp-event__related a { color: var(--brand); text-decoration: underline; }

.hp-event__report { font-size: 13px; line-height: 22px; color: var(--slate-600); text-align: center; }
.hp-event__report a { color: var(--brand); text-decoration: underline; }

.hp-event-cta {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 16px;
	align-items: center;
	margin-top: 24px;
	padding: 24px;
	border-radius: 28px;
	background: var(--n-900);
	color: #fff;
}
.hp-event-cta img { border-radius: 14px; }
.hp-event-cta__title { font-size: 18px; font-weight: 700; line-height: 28px; }
.hp-event-cta__text p:not(.hp-event-cta__title) { font-size: 14px; line-height: 24px; color: var(--n-400); }
.hp-event-cta .hp-store-grid { grid-column: 1 / -1; }

/* ---------- صفحه‌ی مناسبت‌ها و صفحه‌ی ماه ---------- */

.hp-evhub { max-width: 860px; margin: 0 auto; padding: 24px 16px 80px; }
.hp-evhub__intro { padding: 12px 0 24px; text-align: center; }
.hp-evhub__title { font-size: 40px; font-weight: 700; line-height: 1.6; color: var(--n-900); }
.hp-evhub__lead { margin-top: 8px; font-size: 17px; line-height: 28px; color: var(--slate-600); }
.hp-evhub__empty { padding: 20px; background: #fff; border-radius: 20px; color: var(--slate-600); text-align: center; }
.hp-evhub__section { margin-top: 32px; }
.hp-evhub__section > h2 { margin-bottom: 12px; font-size: 22px; font-weight: 700; line-height: 1.6; color: var(--slate-900); }

.hp-event-list { display: flex; flex-direction: column; gap: 8px; }

.hp-event-row {
	display: flex;
	gap: 16px;
	padding: 16px;
	background: #fff;
	border-radius: 16px;
	border-inline-start: 3px solid var(--cat-iranian);
	scroll-margin-top: 24px;
}
.hp-event-row--international { border-inline-start-color: var(--cat-international); }
.hp-event-row--islamic { border-inline-start-color: var(--cat-islamic); }
.hp-event-row:target { box-shadow: 0 0 0 2px var(--brand); }

.hp-event-row__day {
	flex: 0 0 48px;
	height: 48px;
	display: grid;
	place-items: center;
	border-radius: 12px;
	background: var(--info-50);
	font-size: 20px;
	font-weight: 700;
	color: var(--slate-900);
}
.hp-event-row__day.is-holiday { color: var(--danger-600); background: #fff1f2; }

.hp-event-row__main { min-width: 0; flex: 1; }
.hp-event-row__title { font-size: 16px; font-weight: 600; line-height: 26px; color: var(--n-900); }
.hp-event-row__title a:hover { color: var(--brand); }
.hp-event-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; line-height: 20px; color: #737373; }
.hp-event-row__caption { margin-top: 8px; font-size: 14px; line-height: 26px; color: var(--dark-800); }
.hp-event-row__more { display: inline-block; margin-top: 8px; font-size: 14px; line-height: 22px; color: var(--brand); }

.hp-month-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.hp-month-grid a,
.hp-month-nav a {
	display: block;
	padding: 12px;
	border-radius: 14px;
	background: #fff;
	text-align: center;
	font-size: 15px;
	line-height: 24px;
	color: var(--slate-900);
}
.hp-month-grid a:hover,
.hp-month-nav a:hover { color: var(--brand); }

.hp-month-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 24px; }
.hp-month-nav a { flex: 1; }

.hp-article-list { display: flex; flex-direction: column; gap: 8px; }
.hp-article-list a { display: block; padding: 16px; background: #fff; border-radius: 16px; }
.hp-article-list__title { display: block; font-size: 16px; font-weight: 600; line-height: 26px; color: var(--n-900); }
.hp-article-list__excerpt { display: block; margin-top: 4px; font-size: 14px; line-height: 24px; color: var(--slate-600); }
.hp-article-list a:hover .hp-article-list__title { color: var(--brand); }

.hp-evhub .nav-links { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.hp-evhub .page-numbers { padding: 6px 12px; border-radius: 10px; background: #fff; font-size: 14px; }
.hp-evhub .page-numbers.current { background: var(--brand); color: #fff; }

@media (max-width: 767px) {
	.hp-event { padding-top: 12px; }
	.hp-event__head { padding: 24px 20px 20px; border-radius: 24px; }
	.hp-event__banner { width: calc(100% + 40px); margin: 0 -20px 20px; }
	.hp-event__title { font-size: 24px; }
	.hp-event__lead { font-size: 16px; }
	.hp-event__years, .hp-event__sources, .hp-event__related { padding: 20px; }
	.hp-evhub__title { font-size: 28px; }
	.hp-month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.hp-event-cta { grid-template-columns: 1fr; text-align: center; }
	.hp-event-cta img { margin: 0 auto; }
}

/* ---------- همه رویدادها (/events/ و صفحه‌ی هر ماه) ---------- */

.hp-eboard-page { max-width: 640px; margin: 0 auto; padding: 20px 16px 80px; }

.hp-eboard__intro { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.hp-eboard__title { font-size: 48px; font-weight: 500; line-height: 1.8; color: var(--n-900); }
.hp-eboard__lead { margin-top: -12px; font-size: 18px; line-height: 28px; color: #475569; }

.hp-eboard { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }

/* ماه قبل / ماه جاری / ماه بعد: فلش‌ها در لبه‌های بیرونی، جهت‌شان همان سمتی است که ماه در آن قرار دارد. */
.hp-eboard__months { display: flex; align-items: center; justify-content: space-between; padding: 8px; }
.hp-eboard__month { display: flex; align-items: center; gap: 2px; padding-inline: 8px; font-size: 16px; line-height: 24px; color: #737373; }
.hp-eboard__month:hover { color: var(--brand); }
.hp-eboard__month img { flex: none; width: 16px; height: 16px; }
.hp-eboard__current { padding-inline: 8px; font-size: 24px; font-weight: 400; line-height: 32px; color: #404040; }

.hp-eboard__filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
.hp-eboard__chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	height: 32px;
	min-width: 60px;
	padding: 4px 8px 4px 14px;
	border: 2px solid rgba(39, 99, 235, 0.3);
	border-radius: 100px;
	background: #fff;
	font-size: 14px;
	line-height: 22px;
	color: #09225d;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.hp-eboard__chip:hover { border-color: #2763eb; }
.hp-eboard__chip > span:first-child:not(:only-child), .hp-eboard__chip > img { flex: none; font-size: 18px; line-height: 24px; }
.hp-eboard__chip[data-filter="all"] { padding-inline: 14px; }
.hp-eboard__chip.is-active { border-color: #2763eb; background: #2763eb; color: #fff; }

.hp-eboard__day { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.hp-eboard__heading { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 500; line-height: 32px; color: #0f172a; }
.hp-eboard__day[hidden] { display: none; }
.hp-eboard__list { display: flex; flex-direction: column; gap: 8px; }
.hp-eboard__empty { padding: 16px; border-radius: 4px; background: #fff; font-size: 14px; line-height: 22px; color: #525252; text-align: center; }

.hp-ecard {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 8px;
	row-gap: 4px;
	align-items: start;
	padding: 12px 16px;
	border-inline-start: 2px solid #2763eb;
	border-radius: 4px;
	background: #fff;
}
.hp-ecard--international { border-inline-start-color: #6366f1; }
.hp-ecard--islamic { border-inline-start-color: var(--cat-islamic); }
.hp-ecard:target { box-shadow: 0 0 0 2px var(--brand); }
.hp-ecard[hidden] { display: none; }

.hp-ecard__title { font-size: 20px; font-weight: 500; line-height: 26px; color: #262626; }
.hp-ecard__title a:hover { color: var(--brand); }
.hp-ecard__tags { display: flex; gap: 4px; }
.hp-ecard__tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 20px;
	padding: 0 6px;
	border-radius: 50px;
	font-size: 11px;
	line-height: normal;
	color: #262626;
	white-space: nowrap;
	background: rgba(0, 132, 255, 0.2);
}
.hp-ecard__tag--iranian { padding-inline: 4px; }
.hp-ecard__tag--international { background: rgba(151, 71, 255, 0.2); }
.hp-ecard__tag--islamic { background: rgba(20, 184, 166, 0.2); }
.hp-ecard__tag--holiday { background: rgba(239, 68, 68, 0.15); }
.hp-ecard__tag img { flex: none; width: 17px; height: 17px; }
.hp-ecard__tag span[aria-hidden] { font-size: 12px; }

.hp-ecard__date { grid-column: 1 / -1; font-size: 13px; line-height: 18px; color: #525252; }
.hp-ecard__more { grid-column: 1 / -1; display: flex; align-items: flex-end; gap: 4px; }
.hp-ecard__caption {
	flex: 1;
	min-width: 0;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	font-size: 14px;
	line-height: 22px;
	color: #737373;
}
.hp-ecard__link { flex: none; font-size: 12px; line-height: 20px; color: #2563eb; white-space: nowrap; }
.hp-ecard__link:hover { text-decoration: underline; }
.hp-ecard__more:not(:has(.hp-ecard__caption)) { justify-content: flex-start; }

@media (max-width: 767px) {
	.hp-eboard-page { padding-top: 12px; }
	.hp-eboard__title { font-size: 30px; line-height: 1.6; }
	.hp-eboard__lead { margin-top: -4px; font-size: 16px; }
	.hp-ecard__title { font-size: 17px; line-height: 26px; }
	.hp-eboard__heading { font-size: 20px; }
}

/* ---------- تقویم (/taghvim/) ---------- */

.hp-cal-page { max-width: 640px; margin: 0 auto; padding: 20px 16px 80px; }
.hp-cal-page .hp-crumbs { margin-bottom: 12px; }
.hp-cal-page__section { margin-top: 40px; }
.hp-cal-page__section:first-of-type { margin-top: 0; }
.hp-cal-page__h2 { margin-bottom: 12px; font-size: 24px; font-weight: 500; line-height: 32px; color: #0f172a; }

/* امروز به سه تقویم */
.hp-today { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: -4px; }
.hp-today__label { padding: 2px 10px; border-radius: 100px; background: var(--brand); color: #fff; font-size: 13px; line-height: 22px; }
.hp-today__date { padding: 4px 12px; border-radius: 100px; background: #fff; font-size: 15px; line-height: 24px; color: #404040; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); }
.hp-today__date--j { font-weight: 500; color: #0f172a; }
/* «همگی در همپا» + دکمه‌ی دانلود (به‌جای نشان «بدون تبلیغات» در این صفحه) */
.hp-cal-badge { display: inline-flex; align-items: center; gap: 10px; padding: 4px 4px 4px 4px; padding-inline-start: 14px; border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 999px; background: #fff; filter: drop-shadow(0 4px 2px rgba(0, 53, 102, 0.1)); }
.hp-cal-badge__text { font-size: 16px; font-weight: 700; line-height: 16px; white-space: nowrap; background: linear-gradient(to right, #0084ff, #007ecc 50%, #df00fd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hp-cal-badge__btn { padding: 6px 14px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; line-height: 18px; }
.hp-cal-badge__btn:hover { background: #1d4fd8; }

/* مناسبت امروز: مثل کارت رویداد «این روز» در اپ */
.hp-tcards { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 380px; margin-top: 4px; }
.hp-tcard { display: flex; align-items: flex-start; gap: 5px; min-height: 36px; padding: 8px; padding-inline-start: 12px; border-inline-start: 2px solid #0084ff; border-radius: 4px; background: #eef3fc; text-align: start; }
.hp-tcard--international { border-inline-start-color: #6366f1; background: rgba(99, 102, 241, 0.16); }
.hp-tcard--islamic { border-inline-start-color: #14b8a6; background: rgba(20, 184, 166, 0.16); }
.hp-tcard__title { flex: 1; min-width: 0; font-size: 14px; line-height: 20px; color: #001a2a; }
.hp-tcard__title:hover { text-decoration: underline; }
.hp-tcard__tag { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: 50px; background: rgba(0, 132, 255, 0.2); font-size: 11px; line-height: 17px; color: #02244a; }
.hp-tcard--iranian .hp-tcard__tag { padding: 0 4px; }
.hp-tcard--international .hp-tcard__tag { background: rgba(99, 102, 241, 0.2); color: #180349; }
.hp-tcard--islamic .hp-tcard__tag { background: rgba(0, 0, 0, 0.16); color: #404040; }
.hp-tcard__tag img { width: 14px; height: 14px; }
.hp-tcards__more { font-size: 13px; color: var(--brand); }

/* انتخاب سال کنار نام ماه */
.hp-eboard__center { display: flex; align-items: center; gap: 4px; }
/* انتخاب سال: دکمه‌ی کوچک + فهرست کشویی با حدود ۵ سال (بقیه با اسکرول). */
.hp-year { position: relative; }
.hp-year > summary {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 32px;
	padding: 0 12px;
	border: 2px solid rgba(39, 99, 235, 0.3);
	border-radius: 100px;
	background: #fff;
	font-size: 15px;
	color: #09225d;
	list-style: none;
	cursor: pointer;
}
.hp-year > summary::-webkit-details-marker { display: none; }
.hp-year > summary::after {
	content: "";
	width: 12px;
	height: 12px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2309225d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 0.15s;
}
.hp-year[open] > summary::after { transform: rotate(180deg); }
.hp-year > summary:hover, .hp-year[open] > summary { border-color: #2763eb; }
.hp-year__list {
	position: absolute;
	top: calc(100% + 6px);
	left: 50%;
	z-index: 30;
	width: 104px;
	max-height: 200px; /* ۵ ردیف ۴۰ پیکسلی */
	padding: 4px;
	overflow-y: auto;
	overscroll-behavior: contain;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
	transform: translateX(-50%);
}
.hp-year__list a { display: block; height: 40px; border-radius: 10px; font-size: 15px; line-height: 40px; color: #262626; text-align: center; }
.hp-year__list a:hover { background: #eef3fc; }
.hp-year__list a.is-current { background: #2763eb; color: #fff; }
.hp-eboard__months > span:empty { width: 60px; }
.hp-eboard__today { align-self: center; margin-top: -2px; font-size: 13px; line-height: 20px; color: var(--brand); }
.hp-eboard__today:hover { text-decoration: underline; }
.hp-evhub__cal { margin-top: 12px; font-size: 14px; line-height: 22px; color: #525252; text-align: center; }
.hp-evhub__cal a { color: var(--brand); }
.hp-eboard__note { font-size: 13px; line-height: 22px; color: #737373; text-align: center; }
.hp-eboard__day { scroll-margin-top: 96px; }
.hp-eboard__day.is-picked .hp-eboard__heading { color: var(--brand); }
.hp-ecard__approx { color: #a3a3a3; }
.hp-eboard--cal:not(.is-expanded) .hp-eboard__day.is-more { display: none; }
.hp-eboard--cal.is-expanded .hp-eboard__all { display: none; }
.hp-eboard__all { align-self: center; height: 40px; padding: 0 20px; border: 2px solid rgba(39, 99, 235, 0.3); border-radius: 100px; background: #fff; font-size: 14px; color: #09225d; }
.hp-eboard__all:hover { border-color: #2763eb; }

/* جدول ماه */
.hp-cal { padding: 12px; border-radius: 16px; background: #fff; }
.hp-cal__ranges { display: flex; justify-content: space-between; gap: 8px; padding: 0 4px 10px; font-size: 13px; line-height: 20px; color: #737373; }
.hp-cal__grid { display: flex; flex-direction: column; gap: 4px; }
.hp-cal__row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.hp-cal__wd { padding: 4px 0; font-size: 13px; line-height: 20px; color: #737373; text-align: center; }
.hp-cal__wd.is-off { color: var(--danger-600); }
.hp-cal__cell {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 64px;
	padding: 6px 2px 8px;
	border-radius: 10px;
	background: #f8fafc;
	color: #262626;
	transition: background-color 0.15s, box-shadow 0.15s;
}
.hp-cal__cell.is-blank { background: transparent; }
.hp-cal__cell.is-off { color: var(--danger-600); background: #fff5f6; }
.hp-cal__cell.has-events:hover { background: #eef3fc; }
.hp-cal__cell.is-off.has-events:hover { background: #ffe9ec; }
.hp-cal__cell.is-today { background: #fff; box-shadow: inset 0 0 0 2px var(--brand), 0 4px 14px rgba(39, 99, 235, 0.28); }
.hp-cal__cell.is-today.is-off { background: #fff; }
.hp-cal__j { font-size: 20px; font-weight: 500; line-height: 26px; }
.hp-cal__sub { display: flex; justify-content: space-between; width: 100%; padding: 0 6px; font-size: 11px; line-height: 14px; color: #a3a3a3; }
.hp-cal__cell.is-off .hp-cal__sub { color: #f19aaa; }
.hp-cal__dots { position: absolute; bottom: 4px; display: flex; gap: 3px; }
.hp-cal__dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #2763eb; }
.hp-cal__dot--international { background: #9747ff; }
.hp-cal__dot--islamic { background: var(--cat-islamic); }
.hp-cal__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; padding-top: 12px; font-size: 12px; line-height: 18px; color: #737373; }
.hp-cal__legend span { display: inline-flex; align-items: center; gap: 4px; }
.hp-cal__legend .is-off { color: var(--danger-600); }
.hp-cal__legend .hp-cal__dot { position: static; }

/* سه ابزار */
.hp-ctools { display: flex; flex-direction: column; gap: 12px; }
.hp-ctool { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 16px; background: #fff; }
.hp-ctool__title { font-size: 18px; font-weight: 600; line-height: 28px; color: #0f172a; }
.hp-ctool__tabs, .hp-ctool__presets { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-ctool__tabs .hp-eboard__chip, .hp-ctool__presets .hp-eboard__chip { padding-inline: 14px; }
.hp-ctool__date { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 8px; }
.hp-ctool__date--time { grid-template-columns: 1fr 1.4fr; }
.hp-ctool__date label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; line-height: 18px; color: #737373; }
.hp-ctool__date input, .hp-ctool__date select {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--slate-200);
	border-radius: 12px;
	background: #fff;
	font: inherit;
	font-size: 16px;
	color: #0f172a;
}
.hp-ctool__date input:focus-visible, .hp-ctool__date select:focus-visible { border-color: var(--brand); outline: 2px solid rgba(39, 99, 235, 0.2); outline-offset: 0; }
.hp-ctool__pair { display: grid; gap: 12px; }
.hp-ctool__lbl { font-size: 13px; line-height: 20px; color: #525252; }
.hp-ctool .hp-ctool__go { align-self: flex-start; background: var(--brand); }
.hp-ctool .hp-ctool__go:hover { background: #1d4fd8; }
.hp-ctool__out { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: #f8fafc; font-size: 15px; line-height: 24px; color: #262626; }
.hp-ctool__out:empty { display: none; }
.hp-ctool__out strong { font-weight: 500; color: #525252; }
.hp-ctool__out .is-error { color: var(--danger-600); }
.hp-ctool__big { font-size: 22px; font-weight: 600; line-height: 32px; color: var(--brand); }
.hp-ctool__cities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hp-ctool__cities li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #f8fafc; font-size: 14px; line-height: 22px; color: #404040; }
.hp-ctool__cities strong { margin-inline-start: auto; font-size: 17px; font-weight: 600; color: #0f172a; }
.hp-ctool__cities em { font-style: normal; font-size: 11px; color: #9747ff; }
.hp-ctool__hint { font-size: 12px; line-height: 18px; color: #a3a3a3; }

/* دعوت پایانی به نصب اپ */
.hp-cal-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 40px; padding: 32px 24px; border-radius: 24px; background: linear-gradient(160deg, #eef3fc, #ffffff 60%); border: 1px solid #dbe6fb; text-align: center; }
.hp-cal-cta__icon { border-radius: 18px; box-shadow: 0 8px 20px rgba(39, 99, 235, 0.18); }
.hp-cal-cta__title { font-size: 24px; font-weight: 700; line-height: 1.6; color: #0f172a; }
.hp-cal-cta__text { max-width: 460px; font-size: 15px; line-height: 26px; color: #475569; }
.hp-cal-cta__stores { width: 100%; max-width: 440px; margin-top: 4px; }
.hp-cal-cta__more { font-size: 14px; line-height: 22px; color: var(--brand); }
.hp-cal-cta__more:hover { text-decoration: underline; }
.hp-cal-page .hp-tools-more { margin-top: 40px; }

@media (max-width: 767px) {
	.hp-cal-page { padding-top: 12px; }
	.hp-cal { padding: 8px; }
	.hp-cal__row { gap: 3px; }
	.hp-cal__cell { min-height: 54px; padding: 4px 1px 7px; border-radius: 8px; }
	.hp-cal__j { font-size: 17px; line-height: 22px; }
	.hp-cal__sub { padding: 0 3px; font-size: 10px; }
	.hp-ctool { padding: 16px; }
	.hp-ctool__cities { grid-template-columns: 1fr; }
	.hp-today__date { font-size: 14px; }
	.hp-cal-cta__title { font-size: 20px; }
}

/* ---------- مقاله‌ی رویداد (طرح «داستان رویداد») ---------- */

.hp-event--v2 { max-width: 832px; padding-top: 32px; }
.hp-event--v2 > * + * { margin-top: 40px; }
.hp-event--v2 > .hp-ad + * { margin-top: 0; }
.hp-story { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 16px; border-inline-start: 2px solid #2763eb; border-radius: 4px; background: #fff; }
.hp-story--international { border-inline-start-color: #6366f1; }
.hp-story--islamic { border-inline-start-color: var(--cat-islamic); }
.hp-story__banner { width: 100%; height: auto; margin-bottom: 8px; border-radius: 4px; }
.hp-story__head { display: flex; align-items: flex-start; gap: 4px; }
.hp-story__title { flex: 1; min-width: 0; font-size: 28px; font-weight: 500; line-height: 36px; color: #262626; }
.hp-story__tags { flex: none; display: flex; gap: 4px; padding-top: 8px; }
.hp-story__date { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; line-height: 18px; color: #525252; }
.hp-story__lead, .hp-story__body { font-size: 14px; line-height: 22px; color: #737373; }
.hp-story__body > * + * { margin-top: 8px; }
.hp-story__body h2 { margin-top: 16px; font-size: 20px; font-weight: 500; line-height: 26px; color: #262626; }
.hp-story__body h3 { margin-top: 12px; font-size: 16px; font-weight: 500; line-height: 24px; color: #262626; }
.hp-story__body ul, .hp-story__body ol { padding-inline-start: 20px; list-style: disc; }
.hp-story__body ol { list-style: decimal; }
.hp-story__body a { color: var(--brand); text-decoration: underline; }
.hp-story__body strong { color: #404040; }
.hp-story__body .hp-ad { margin: 16px 0; }

.hp-story__faq h2 { margin-bottom: 16px; font-size: 18px; font-weight: 600; line-height: 28px; color: #0f172a; text-align: center; }
.hp-story__faq-list { display: flex; flex-direction: column; gap: 2px; overflow: hidden; border-radius: 12px; }
.hp-story__faq details { border-radius: 4px; background: #fff; }
.hp-story__faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: 14px; line-height: 20px; color: #262626; list-style: none; cursor: pointer; }
.hp-story__faq summary::-webkit-details-marker { display: none; }
.hp-story__chev { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50px; background: rgba(59, 130, 246, 0.16); }
.hp-story__chev img { width: 18px; height: 18px; transition: transform 0.2s; }
.hp-story__faq details[open] .hp-story__chev img { transform: rotate(180deg); }
.hp-story__answer { padding: 0 16px 14px; font-size: 14px; line-height: 22px; color: #737373; }
.hp-story__answer > * + * { margin-top: 8px; }

@media (max-width: 767px) {
	.hp-event--v2 { padding-top: 12px; }
	.hp-story__title { font-size: 22px; line-height: 32px; }
	.hp-story__tags { padding-top: 6px; }
}

/* صفحه‌ی کوتاه رویدادی که مقاله ندارد */
.hp-event__nearby { padding: 24px 28px; background: #fff; border-radius: 20px; }
.hp-event__nearby h2 { margin-bottom: 12px; font-size: 18px; font-weight: 700; line-height: 28px; color: var(--slate-900); }
.hp-event__nearby .hp-event-row { padding: 12px 0; border-radius: 0; border-inline-start: 0; border-bottom: 1px solid var(--slate-200); }
.hp-event__nearby .hp-event-row:last-child { border-bottom: 0; }
.hp-event__all { display: inline-block; margin-top: 12px; font-size: 14px; line-height: 22px; color: var(--brand); }
@media (max-width: 767px) {
	.hp-event__nearby { padding: 20px; }
}

/* ==========================================================================
   جای تبلیغ (inc/ads.php). برچسب «تبلیغات» مثل مجله‌های خبری، تا با محتوا اشتباه نشود.
   ========================================================================== */

.hp-ad { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 24px 0; }
.hp-ad__label { font-size: 11px; line-height: 16px; color: var(--n-400); letter-spacing: 0; }
.hp-ad__body { display: flex; justify-content: center; width: 100%; max-width: 100%; overflow: hidden; }
.hp-ad__body img, .hp-ad__body iframe { max-width: 100%; height: auto; }
/* جای بنر بالای صفحه از قبل نگه داشته می‌شود تا صفحه موقع بارگذاری تبلیغ نپرد. */
.hp-ad--top { margin: 0 0 16px; }
.hp-ad--top .hp-ad__body { min-height: 100px; }
.hp-ad--end { margin-top: 8px; }
.hp-event-list__ad .hp-ad { margin: 8px 0; }

.hp-rail { display: none; }
@media (min-width: 1200px) {
	.hp-rail-layout:has(.hp-rail) {
		display: grid;
		grid-template-columns: minmax(0, 760px) 300px;
		justify-content: center;
		gap: 32px;
		max-width: 1140px;
		margin: 0 auto;
	}
	.hp-rail-layout:has(.hp-rail) > :first-child { margin: 0; max-width: none; }
	.hp-rail { display: block; padding-top: 24px; }
	.hp-rail .hp-ad { position: sticky; top: 24px; margin: 0; }
	.hp-ad--top .hp-ad__body { min-height: 90px; }
}

.hp-ad-sticky {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 50;
	display: none;
	padding: 4px 0 calc(4px + env(safe-area-inset-bottom));
	background: #fff;
	box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.12);
}
.hp-ad-sticky .hp-ad { margin: 0; gap: 0; }
.hp-ad-sticky .hp-ad__label { display: none; }
.hp-ad-sticky__close {
	position: absolute;
	top: -28px;
	inset-inline-start: 8px;
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.12);
	font-size: 18px;
	line-height: 28px;
	color: var(--slate-600);
}
@media (max-width: 767px) {
	.hp-ad-sticky { display: block; }
	.hp-ad-sticky.is-closed { display: none; }
}

/* ==========================================================================
   ابزارها: فال حافظ، تست‌ها، حیوان سال (inc/tools.php، tools/*.php)
   همان زبان کارت‌های سفید و گرد سایت؛ رنگ‌ها همه از متغیرهای بالای همین فایل.
   ========================================================================== */

:root {
	--fal: #b45309;
	--fal-bg: #fff7ed;
	--fal-ink: #431407;
	--quiz: #6366f1;
	--quiz-bg: #eef2ff;
}

.hp-tool { max-width: 760px; margin: 0 auto; padding: 24px 16px 80px; display: flex; flex-direction: column; gap: 16px; }
.hp-tool--wide { max-width: 860px; }
.hp-tool > .hp-crumbs { margin-bottom: 0; }

.hp-tool__head {
	position: relative;
	overflow: hidden;
	padding: 32px 28px 28px;
	border-radius: 28px;
	background: #fff;
	border-top: 6px solid var(--brand);
}
.hp-tool__head::after {
	content: "";
	position: absolute;
	inset-block-start: 0;
	inset-inline-end: 0;
	width: 240px;
	height: 240px;
	border-radius: 50%;
	transform: translate(-35%, -55%);
	background: var(--info-50);
	pointer-events: none;
}
.hp-tool__head > * { position: relative; z-index: 1; }
.hp-tool__head--fal { border-top-color: var(--fal); }
.hp-tool__head--fal::after { background: var(--fal-bg); }
.hp-tool__head--quiz { border-top-color: var(--quiz); }
.hp-tool__head--quiz::after { background: var(--quiz-bg); }
.hp-tool__head--animal { border-top-color: #0d9488; }
.hp-tool__head--animal::after { background: #e3f6f3; }

.hp-tool__eyebrow { font-size: 14px; line-height: 22px; font-weight: 500; color: var(--slate-600); }
.hp-tool__title { margin-top: 8px; font-size: 32px; font-weight: 700; line-height: 1.6; color: var(--n-900); }
.hp-tool__lead { margin-top: 12px; font-size: 17px; line-height: 1.9; color: var(--dark-800); }
.hp-tool__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hp-tool__actions--end { margin-top: 16px; }

.hp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 24px;
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 24px;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.15s ease;
}
.hp-btn:active { transform: scale(0.98); }
.hp-btn--primary { background: var(--n-900); color: #fff; }
.hp-btn--primary:hover { background: #000; }
.hp-btn--ghost { background: #f5f5f5; color: var(--n-900); }
.hp-btn--ghost:hover { background: var(--n-200); }
.hp-btn:disabled { opacity: 0.7; cursor: default; }

.hp-card { padding: 24px 28px; background: #fff; border-radius: 20px; }
.hp-card > h2, .hp-tool__faq > h2, .hp-fal__tabir > h2 { font-size: 20px; font-weight: 700; line-height: 32px; color: var(--slate-900); }

/* ---------- فال حافظ ---------- */

.hp-ghazal { padding: 24px 28px 20px; background: #fff; border-radius: 20px; }
.hp-ghazal__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.hp-ghazal__num {
	display: inline-flex;
	align-items: center;
	height: 28px;
	padding: 0 12px;
	border-radius: 50px;
	background: var(--fal-bg);
	color: var(--fal-ink);
	font-size: 13px;
	font-weight: 500;
}
.hp-ghazal__link, .hp-ghazal__source a { color: var(--brand); font-size: 14px; }
.hp-ghazal__beyts { display: flex; flex-direction: column; }
.hp-beyt {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px 24px;
	padding: 12px 0;
	border-bottom: 1px dashed var(--n-200);
	font-size: 17px;
	line-height: 2;
	color: var(--n-900);
}
.hp-beyt:last-child { border-bottom: 0; }
.hp-beyt__m { text-align: center; text-wrap: balance; }
.hp-ghazal__source { margin-top: 12px; font-size: 12px; line-height: 20px; color: var(--n-400); }

.hp-fal__tabir { padding: 24px 28px; background: var(--fal-bg); border-radius: 20px; }
.hp-fal__tabir > p { margin-top: 8px; font-size: 17px; line-height: 2; color: var(--fal-ink); }
.hp-fal.is-niyat .hp-fal__tabir { box-shadow: 0 0 0 2px var(--fal); }

.hp-fal__nav, .hp-tool__pager { display: flex; justify-content: space-between; gap: 8px; }
.hp-fal__nav a, .hp-tool__pager a {
	flex: 1;
	padding: 12px;
	border-radius: 14px;
	background: #fff;
	text-align: center;
	font-size: 15px;
	line-height: 24px;
	color: var(--slate-900);
}
.hp-fal__nav a:hover, .hp-tool__pager a:hover { color: var(--brand); }

/* غزل قبلی/بعدی: دکمه‌ی سمت راست فلش راست و دکمه‌ی سمت چپ فلش چپ دارد (جهت فیزیکی، مستقل از RTL). */
.hp-fal__nav a { position: relative; padding-inline: 44px; }
.hp-fal__nav a::before {
	content: "";
	position: absolute;
	top: 50%;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	background: currentColor;
	-webkit-mask: var(--arrow) center / contain no-repeat;
	mask: var(--arrow) center / contain no-repeat;
}
.hp-fal__nav a[rel="next"] { --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.hp-fal__nav a[rel="prev"] { --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E"); }
.hp-fal__nav a[rel="next"]::before { right: 16px; }
.hp-fal__nav a[rel="prev"]::before { left: 16px; }

.hp-tool__faq { padding: 24px 28px; background: #fff; border-radius: 20px; }
.hp-tool__faq details { border-bottom: 1px solid var(--slate-200); }
.hp-tool__faq details:last-child { border-bottom: 0; }
.hp-tool__faq summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 16px 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 26px;
	cursor: pointer;
	list-style: none;
}
.hp-tool__faq summary::-webkit-details-marker { display: none; }
.hp-tool__faq summary::after { content: "+"; font-size: 22px; color: var(--slate-600); transition: transform 0.2s ease; }
.hp-tool__faq details[open] summary::after { transform: rotate(45deg); }
.hp-tool__faq details p { padding-bottom: 16px; font-size: 15px; line-height: 1.9; color: var(--dark-800); }

/* نیت: کادر وسط صفحه با کتاب نیمه‌باز که هنگام «باز کردن دیوان» ورق می‌خورد. */
.hp-no-scroll { overflow: hidden; }
.hp-niyat {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: grid;
	place-items: center;
	padding: 16px;
	background: rgba(0, 26, 42, 0.45);
}
.hp-niyat[hidden] { display: none; }
.hp-niyat__card {
	width: 100%;
	max-width: 420px;
	padding: 32px 24px 24px;
	border-radius: 28px;
	background: #fff;
	text-align: center;
	animation: hp-pop 0.2s ease-out;
}
.hp-niyat__card .hp-tool__actions { justify-content: center; }
.hp-niyat__title { margin-top: 16px; font-size: 22px; font-weight: 700; line-height: 34px; color: var(--n-900); }
.hp-niyat__text { margin-top: 8px; font-size: 15px; line-height: 1.9; color: var(--dark-800); }
.hp-niyat__book { position: relative; width: 112px; height: 76px; margin: 0 auto; perspective: 400px; }
.hp-niyat__book span {
	position: absolute;
	top: 0;
	width: 56px;
	height: 76px;
	background: var(--fal-bg);
	border: 2px solid var(--fal);
}
.hp-niyat__book span:first-child { right: 56px; border-radius: 10px 0 0 10px; transform-origin: left center; }
.hp-niyat__book span:last-child { right: 0; border-radius: 0 10px 10px 0; transform-origin: right center; transform: rotateY(-25deg); }
.hp-niyat.is-opening .hp-niyat__book span:last-child { animation: hp-page 0.45s ease-in-out infinite alternate; }
@keyframes hp-page { from { transform: rotateY(-25deg); } to { transform: rotateY(-160deg); } }
@keyframes hp-pop { from { transform: scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.hp-niyat__card, .hp-niyat.is-opening .hp-niyat__book span:last-child { animation: none; }
}

.hp-search { display: block; margin-top: 20px; }
.hp-search input {
	width: 100%;
	height: 48px;
	padding: 0 16px;
	border: 1px solid var(--n-200);
	border-radius: 14px;
	background: #fff;
	font: inherit;
	font-size: 15px;
	color: var(--n-900);
}
.hp-search input:focus { outline: 2px solid var(--info-600); outline-offset: 1px; }

.hp-ghazal-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hp-ghazal-list a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border-radius: 14px; }
.hp-ghazal-list a:hover .hp-ghazal-list__m { color: var(--brand); }
.hp-ghazal-list__n {
	flex: 0 0 40px;
	height: 40px;
	display: grid;
	place-items: center;
	border-radius: 10px;
	background: var(--fal-bg);
	color: var(--fal-ink);
	font-size: 14px;
	font-weight: 600;
}
.hp-ghazal-list__m { min-width: 0; font-size: 15px; line-height: 26px; color: var(--n-900); }

/* ---------- سرگرمی‌های دیگر ---------- */

.hp-tools-more { padding: 24px 28px; background: #fff; border-radius: 20px; }
.hp-tools-more h2 { margin-bottom: 12px; font-size: 18px; font-weight: 700; line-height: 28px; color: var(--slate-900); }
.hp-tools-more ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hp-tools-more a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 12px; border: 1px solid var(--n-200); border-radius: 16px; }
.hp-tools-more a:hover { border-color: var(--brand); }
.hp-tools-more__emoji { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--info-50); font-size: 22px; }
.hp-tools-more__text { display: flex; flex-direction: column; min-width: 0; }
.hp-tools-more__text strong { font-size: 15px; font-weight: 600; line-height: 24px; color: var(--n-900); }
.hp-tools-more__text span { font-size: 13px; line-height: 20px; color: var(--slate-600); }

/* ---------- تست‌ها ---------- */

.hp-test-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hp-test-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; background: #fff; border-radius: 20px; }
.hp-test-card:hover { box-shadow: 0 0 0 2px var(--quiz); }
.hp-test-card__emoji { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--quiz-bg); font-size: 28px; }
.hp-test-card h2 { margin-top: 8px; font-size: 18px; font-weight: 700; line-height: 28px; color: var(--n-900); }
.hp-test-card p { font-size: 14px; line-height: 24px; color: var(--slate-600); }
.hp-test-card__meta { margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--quiz); }

.hp-quiz__facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hp-quiz__facts span { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 50px; background: #f5f5f5; color: #404040; font-size: 13px; }
.hp-quiz__resume span { margin-inline-start: 4px; font-weight: 400; color: var(--slate-600); }

.hp-quiz__run { padding: 24px 28px 28px; background: #fff; border-radius: 28px; scroll-margin-top: 16px; }
.hp-quiz__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; }
.hp-quiz__count { font-size: 14px; line-height: 22px; color: var(--slate-600); }
.hp-quiz__back { padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--brand); font-size: 14px; }
.hp-quiz__back:hover { background: var(--info-50); }
.hp-quiz__progress { height: 6px; margin-top: 8px; border-radius: 6px; background: #f5f5f5; overflow: hidden; }
.hp-quiz__bar { height: 100%; width: 0; border-radius: 6px; background: var(--quiz); transition: width 0.25s ease; }
.hp-quiz__q { margin-top: 24px; min-height: 72px; font-size: 22px; font-weight: 600; line-height: 1.7; color: var(--n-900); outline: 0; }
.hp-quiz__options { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.hp-quiz__option {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	padding: 12px 16px;
	border: 1px solid var(--n-200);
	border-radius: 14px;
	background: #fff;
	text-align: start;
	font-size: 16px;
	line-height: 26px;
	color: var(--n-900);
}
.hp-quiz__option:hover { border-color: var(--quiz); background: var(--quiz-bg); }
.hp-quiz__option.is-selected { border-color: var(--quiz); background: var(--quiz-bg); box-shadow: inset 0 0 0 1px var(--quiz); }
.hp-quiz__dot { flex: 0 0 20px; height: 20px; border: 2px solid var(--n-400); border-radius: 50%; }
.hp-quiz__option.is-selected .hp-quiz__dot { border-color: var(--quiz); background: radial-gradient(circle, var(--quiz) 45%, transparent 50%); }
/* مقیاس لیکرت: موافق‌ها سبزتر، مخالف‌ها گرم‌تر؛ فقط در رنگ دایره. */
.hp-quiz__option--l0 .hp-quiz__dot { border-color: #e11d48; }
.hp-quiz__option--l1 .hp-quiz__dot { border-color: #fb7185; }
.hp-quiz__option--l3 .hp-quiz__dot { border-color: #34d399; }
.hp-quiz__option--l4 .hp-quiz__dot { border-color: #059669; }
.hp-quiz__run.is-done .hp-quiz__q { color: var(--slate-600); font-size: 18px; }
.hp-quiz__note { margin-top: 16px; font-size: 12px; line-height: 20px; color: var(--n-400); }

/* ---------- نتیجه‌ی تست ---------- */

.hp-result__code { display: inline-block; margin-top: 4px; font-size: 44px; font-weight: 800; line-height: 1.3; letter-spacing: 2px; color: var(--quiz); direction: ltr; }
.hp-result__personal { padding: 24px 28px; background: #fff; border-radius: 20px; border: 2px solid var(--quiz); }
.hp-result__personal h2 { font-size: 18px; font-weight: 700; line-height: 28px; color: var(--slate-900); }
.hp-result__bars { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.hp-bar__labels { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; line-height: 22px; color: var(--slate-600); }
.hp-bar__labels [data-value] { font-weight: 600; color: var(--n-900); }
.hp-bar__track { position: relative; height: 10px; margin-top: 6px; border-radius: 10px; background: #f5f5f5; overflow: hidden; }
.hp-bar__fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; border-radius: 10px; background: var(--quiz); transition: width 0.6s ease; }
.is-second .hp-bar__fill { inset-inline-start: auto; inset-inline-end: 0; }
.is-first .hp-bar__first, .is-second .hp-bar__second { color: var(--n-900); font-weight: 600; }

.hp-result__section { padding: 24px 28px; background: #fff; border-radius: 20px; }
.hp-result__section h2 { font-size: 20px; font-weight: 700; line-height: 32px; color: var(--slate-900); }
.hp-result__section > p { margin-top: 8px; font-size: 16px; line-height: 2; color: var(--dark-800); }
.hp-result__section ul { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.hp-result__section li { position: relative; padding-inline-start: 20px; font-size: 16px; line-height: 1.9; color: var(--dark-800); }
.hp-result__section li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--quiz); }
.hp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hp-chips li { padding: 4px 12px; border-radius: 50px; background: var(--quiz-bg); color: #312e81; font-size: 14px; line-height: 24px; }
.hp-chips li::before { display: none; }
.hp-result__others { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.hp-result__others a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border: 1px solid var(--n-200); border-radius: 14px; text-align: center; }
.hp-result__others a:hover, .hp-result__others a[aria-current] { border-color: var(--quiz); }
.hp-result__others strong { font-size: 15px; line-height: 22px; color: var(--n-900); direction: ltr; }
.hp-result__others span { font-size: 12px; line-height: 18px; color: var(--slate-600); }

/* ---------- حیوان سال ---------- */

.hp-animal-hero { display: flex; align-items: center; gap: 20px; }
.hp-animal-hero__emoji { flex: 0 0 96px; height: 96px; display: grid; place-items: center; border-radius: 28px; background: #e3f6f3; font-size: 56px; line-height: 1; }
.hp-animal-calc { padding: 24px 28px; background: #fff; border-radius: 20px; }
.hp-animal-calc h2 { font-size: 18px; font-weight: 700; line-height: 28px; color: var(--slate-900); }
.hp-animal-calc__row { display: flex; gap: 8px; margin-top: 12px; }
.hp-animal-calc__row input {
	flex: 1;
	min-width: 0;
	height: 48px;
	padding: 0 16px;
	border: 1px solid var(--n-200);
	border-radius: 14px;
	font: inherit;
	font-size: 16px;
	text-align: center;
}
.hp-animal-calc__row input:focus { outline: 2px solid var(--info-600); outline-offset: 1px; }
.hp-animal-calc [data-hp-animal-out] { margin-top: 12px; }
.hp-animal-calc [data-hp-animal-out] p { font-size: 14px; color: var(--danger-600); }
.hp-animal-result { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: #e3f6f3; }
.hp-animal-result__emoji { font-size: 36px; line-height: 1; }
.hp-animal-result__text { display: flex; flex-direction: column; }
.hp-animal-result__text strong { font-size: 16px; line-height: 26px; color: var(--n-900); }
.hp-animal-result__text span { font-size: 14px; line-height: 22px; color: #0f766e; }
.hp-animal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hp-animal-grid a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; background: #fff; border-radius: 16px; text-align: center; border: 2px solid transparent; }
.hp-animal-grid a:hover { border-color: #0d9488; }
.hp-animal-grid a.is-current { border-color: #0d9488; background: #f0fdfa; }
.hp-animal-grid__emoji { font-size: 36px; line-height: 1.2; }
.hp-animal-grid strong { font-size: 16px; line-height: 26px; color: var(--n-900); }
.hp-animal-grid span { font-size: 12px; line-height: 18px; color: var(--slate-600); }
.hp-years { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hp-years li { padding: 4px 12px; border-radius: 50px; background: #f5f5f5; color: #404040; font-size: 14px; line-height: 24px; }
.hp-years li.is-current { background: #0d9488; color: #fff; }
.hp-years li::before { display: none; }

@media (max-width: 767px) {
	.hp-tool { padding-top: 12px; }
	.hp-tool__head { padding: 24px 20px 20px; border-radius: 24px; }
	.hp-tool__title { font-size: 26px; }
	.hp-tool__lead { font-size: 16px; }
	.hp-tool__actions .hp-btn { flex: 1 1 auto; }
	.hp-ghazal, .hp-fal__tabir, .hp-tool__faq, .hp-tools-more, .hp-card, .hp-result__section, .hp-result__personal, .hp-animal-calc { padding: 20px; }
	.hp-beyt { grid-template-columns: 1fr; gap: 0; font-size: 17px; }
	.hp-beyt__m { text-align: start; }
	.hp-beyt__m:last-child { padding-inline-start: 24px; }
	.hp-ghazal-list, .hp-tools-more ul, .hp-test-grid { grid-template-columns: 1fr; }
	.hp-quiz__run { padding: 20px; border-radius: 24px; }
	.hp-quiz__q { font-size: 19px; min-height: 64px; }
	.hp-result__others { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hp-result__code { font-size: 36px; }
	.hp-animal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.hp-animal-hero__emoji { flex-basis: 72px; height: 72px; font-size: 42px; border-radius: 20px; }
}
.hp-quiz__prompt { margin-top: 20px; font-size: 14px; line-height: 22px; color: var(--slate-600); }
.hp-quiz__prompt + .hp-quiz__q { margin-top: 4px; }
.hp-card__p { margin-top: 8px; font-size: 16px; line-height: 2; color: var(--dark-800); }
.hp-result__emoji { margin-top: 12px; }
.hp-result__section ul.hp-chips { flex-direction: row; gap: 8px; }
.hp-result__section .hp-chips li { padding: 4px 12px; }
.hp-animal-grid--in-card { margin-top: 12px; }
.hp-animal-grid--in-card a { border-color: var(--n-200); border-width: 1px; }
.hp-years small { color: var(--n-400); font-size: 12px; }
.hp-years li.is-current small { color: #ccfbf1; }
@media (max-width: 767px) {
	/* انتهای صفحه زیر نوار چسبان تبلیغ پنهان نشود. */
	body:has(.hp-ad-sticky:not(.is-closed)) { padding-bottom: 66px; }
	.hp-beyt { font-size: 16px; }
	.hp-beyt__m:last-child { padding-inline-start: 16px; }
}
