/* =========================================================
   HNZ Articles Showcase — استایل ویجت نمایش مقالات
   رنگ‌های سازمانی: قرمز #ED2728 | خاکستری تیره #404040
   ========================================================= */

.hnz-as-wrapper {
	--hnz-primary: #ED2728;
	--hnz-dark: #404040;
	--hnz-light-bg: #F7F7F8;
	--hnz-white: #FFFFFF;
	direction: rtl;
	font-family: inherit;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.hnz-as-wrapper *,
.hnz-as-wrapper *::before,
.hnz-as-wrapper *::after {
	box-sizing: border-box;
}

/* ---------- گرید ---------- */

.hnz-as-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px;
	width: 100%;
}

/* ---------- مطلب ویژه ---------- */

.hnz-as-featured {
	position: relative;
	width: 100%;
	min-height: 460px;
	border-radius: 20px;
	overflow: hidden;
	display: flex;
	align-items: flex-end;
	background: var(--hnz-light-bg);
	box-shadow: 0 10px 30px rgba(64, 64, 64, 0.12);
}

.hnz-as-featured .hnz-as-image-link {
	position: absolute;
	inset: 0;
	display: block;
}

.hnz-as-featured .hnz-as-image-link img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.7s cubic-bezier(.22,1,.36,1);
}

.hnz-as-featured:hover .hnz-as-image-link img {
	transform: scale(1.05);
}

.hnz-as-featured-badge {
	position: absolute;
	top: 22px;
	right: 22px;
	background: var(--hnz-primary);
	color: #FFFFFF;
	font-size: 12.5px;
	font-weight: 700;
	padding: 7px 16px;
	border-radius: 30px;
	z-index: 3;
	box-shadow: 0 6px 14px rgba(237,39,40,0.35);
	letter-spacing: 0.3px;
}

.hnz-as-featured .hnz-as-card-content {
	position: relative;
	z-index: 2;
	padding: 40px 36px 32px;
	max-width: 760px;
}

.hnz-as-featured-title {
	font-size: 28px !important;
	line-height: 1.6 !important;
}

/* ---------- گرادیان روکارت (مشترک) ---------- */

.hnz-as-overlay-gradient {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(64,64,64,0) 0%, rgba(30,20,20,0.92) 100%);
	pointer-events: none;
	z-index: 1;
}

/* ---------- کارت مقاله ---------- */

.hnz-as-card {
	position: relative;
	border-radius: 18px;
	overflow: hidden;
	transition: transform 0.4s cubic-bezier(.22,1,.36,1), box-shadow 0.4s ease;
	display: flex;
	flex-direction: column;
}

/* --- سبک روکارت (Overlay) --- */

.hnz-as-style-overlay {
	min-height: 360px;
	box-shadow: 0 6px 20px rgba(64,64,64,0.1);
}

.hnz-as-style-overlay:hover {
	transform: translateY(-8px);
	box-shadow: 0 22px 40px rgba(64,64,64,0.22);
}

.hnz-as-style-overlay .hnz-as-card-image {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 360px;
	background: var(--hnz-light-bg);
}

.hnz-as-style-overlay .hnz-as-image-link {
	position: absolute;
	inset: 0;
	display: block;
}

.hnz-as-style-overlay .hnz-as-image-link img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.7s cubic-bezier(.22,1,.36,1);
}

.hnz-as-style-overlay:hover .hnz-as-image-link img {
	transform: scale(1.08);
}

.hnz-as-style-overlay .hnz-as-card-content {
	position: absolute;
	bottom: 0;
	right: 0;
	left: 0;
	z-index: 2;
	padding: 24px 22px 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hnz-as-no-image {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #F1F1F1 0%, #E4E4E4 100%);
}

/* --- سبک کلاسیک --- */

.hnz-as-style-classic {
	background: var(--hnz-white);
	box-shadow: 0 4px 16px rgba(64,64,64,0.08);
	border: 1px solid rgba(64,64,64,0.06);
}

.hnz-as-style-classic:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 34px rgba(64,64,64,0.14);
}

.hnz-as-style-classic .hnz-as-card-image {
	position: relative;
	width: 100%;
	height: 220px;
	overflow: hidden;
	background: var(--hnz-light-bg);
}

.hnz-as-style-classic .hnz-as-image-link {
	display: block;
	width: 100%;
	height: 100%;
}

.hnz-as-style-classic .hnz-as-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(.22,1,.36,1);
}

.hnz-as-style-classic:hover .hnz-as-card-image img {
	transform: scale(1.08);
}

.hnz-as-card-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
}

.hnz-as-card-excerpt {
	font-size: 13.5px;
	line-height: 1.9;
	color: #6E6E6E;
}

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

.hnz-as-badge-category {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 3;
	display: inline-block;
	background: var(--hnz-primary);
	color: #FFFFFF;
	font-size: 12px;
	font-weight: 700;
	padding: 5px 14px;
	border-radius: 30px;
	text-decoration: none;
	box-shadow: 0 4px 10px rgba(237,39,40,0.3);
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.hnz-as-badge-category:hover {
	background: var(--hnz-dark);
	transform: translateY(-2px);
	color: #FFFFFF;
}

.hnz-as-style-classic .hnz-as-badge-category {
	position: static;
	align-self: flex-start;
	margin-bottom: 2px;
	box-shadow: none;
}

/* ---------- عنوان ---------- */

.hnz-as-card-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.6;
}

.hnz-as-style-overlay .hnz-as-card-title {
	color: #FFFFFF;
}

.hnz-as-style-classic .hnz-as-card-title {
	color: var(--hnz-dark);
}

.hnz-as-card-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.25s ease;
}

.hnz-as-card-title a:hover {
	color: var(--hnz-primary);
}

/* ---------- متا ---------- */

.hnz-as-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	font-size: 12.5px;
	font-weight: 500;
}

.hnz-as-style-overlay .hnz-as-meta {
	color: rgba(255,255,255,0.85);
}

.hnz-as-style-classic .hnz-as-meta {
	color: #8A8A8A;
}

.hnz-as-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
}

.hnz-as-meta-item svg {
	flex-shrink: 0;
	stroke: var(--hnz-primary);
	opacity: 0.9;
}

.hnz-as-author-avatar {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	object-fit: cover;
	margin-inline-end: 4px;
	vertical-align: middle;
}

/* ---------- اقدامات (لایک، ادامه مطلب) ---------- */

.hnz-as-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 6px;
	padding-top: 12px;
	border-top: 1px solid rgba(150,150,150,0.15);
}

.hnz-as-style-overlay .hnz-as-actions {
	border-top-color: rgba(255,255,255,0.15);
}

.hnz-as-like-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #8A8A8A;
	font-size: 13px;
	font-weight: 600;
	padding: 4px 6px;
	border-radius: 8px;
	transition: color 0.25s ease, transform 0.2s ease;
}

.hnz-as-style-overlay .hnz-as-like-btn {
	color: rgba(255,255,255,0.85);
}

.hnz-as-like-btn:hover {
	color: var(--hnz-primary);
}

.hnz-as-like-btn.is-active {
	color: var(--hnz-primary);
}

.hnz-as-like-btn.is-active svg {
	fill: currentColor;
	animation: hnzAsPulse 0.4s ease;
}

@keyframes hnzAsPulse {
	0% { transform: scale(1); }
	40% { transform: scale(1.3); }
	100% { transform: scale(1); }
}

.hnz-as-readmore {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--hnz-primary);
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none;
	transition: color 0.25s ease, gap 0.25s ease;
}

.hnz-as-style-overlay .hnz-as-readmore {
	color: #FFFFFF;
}

.hnz-as-readmore:hover {
	color: var(--hnz-dark);
	gap: 8px;
}

.hnz-as-style-overlay .hnz-as-readmore:hover {
	color: var(--hnz-primary);
}

.hnz-as-arrow {
	font-style: normal;
	display: inline-block;
	transform: scaleX(-1);
	transition: transform 0.25s ease;
}

/* ---------- Toast اطلاع‌رسانی ---------- */

.hnz-as-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: var(--hnz-dark);
	color: #FFFFFF;
	padding: 12px 24px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
	box-shadow: 0 10px 30px rgba(0,0,0,0.25);
	direction: rtl;
}

.hnz-as-toast.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.hnz-as-toast.is-success {
	background: var(--hnz-primary);
}

.hnz-as-toast.is-error {
	background: #B33232;
}

/* ---------- ریسپانسیو ---------- */

@media (max-width: 1024px) {
	.hnz-as-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.hnz-as-featured {
		min-height: 380px;
	}
	.hnz-as-featured-title {
		font-size: 22px !important;
	}
}

@media (max-width: 600px) {
	.hnz-as-grid {
		grid-template-columns: repeat(1, 1fr);
	}
	.hnz-as-style-overlay {
		min-height: 300px;
	}
	.hnz-as-style-overlay .hnz-as-card-image {
		min-height: 300px;
	}
	.hnz-as-featured {
		min-height: 320px;
	}
	.hnz-as-featured .hnz-as-card-content {
		padding: 26px 20px 22px;
	}
	.hnz-as-featured-title {
		font-size: 19px !important;
	}
	.hnz-as-meta {
		gap: 10px;
	}
}
