/* ==========================================================================
   Tira Home Hub
   ========================================================================== */

.nizva-tira-home {
	--nizva-primary: #2563EB;
	--nizva-primary-hover: #1D4ED8;
	--nizva-primary-soft: #DBEAFE;
	--nizva-surface: #FFFFFF;
	--nizva-text: #0F172A;
	--nizva-text-body: #334155;
	--nizva-text-muted: #64748B;
	--nizva-border: #E2E8F0;
	--nizva-radius: 18px;
	--nizva-container: 1200px;

	max-width: var(--nizva-container);
	margin: 0 auto;
	padding: 28px 16px 36px;
	direction: rtl;
	box-sizing: border-box;
	font-family: Vazirmatn, "Vazirmatn", Tahoma, sans-serif;
	color: var(--nizva-text);
	background:
		radial-gradient(1200px 420px at 100% 0%, rgba(37, 99, 235, 0.10), transparent 55%),
		radial-gradient(900px 360px at 0% 20%, rgba(14, 165, 233, 0.08), transparent 50%),
		linear-gradient(180deg, #F8FAFC 0%, #EEF2FF 48%, #F8FAFC 100%);
	border-radius: 24px;
}

.nizva-tira-home *,
.nizva-tira-home *::before,
.nizva-tira-home *::after {
	box-sizing: border-box;
}

.nizva-tira-home a {
	color: inherit;
	text-decoration: none;
}

/* Gate */
.nizva-tira-home__gate {
	max-width: 560px;
	margin: 12px auto;
	padding: 36px 28px;
	text-align: center;
	background: var(--nizva-surface);
	border: 1px solid var(--nizva-border);
	border-radius: var(--nizva-radius);
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.nizva-tira-home__gate-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	margin-bottom: 16px;
	border-radius: 999px;
	background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
	color: var(--nizva-primary);
	font-size: 13px;
	font-weight: 700;
}

.nizva-tira-home__gate-title {
	margin: 0 0 10px;
	font-size: 22px;
	line-height: 1.45;
	font-weight: 800;
}

.nizva-tira-home__gate-msg {
	margin: 0 0 22px;
	font-size: 14px;
	line-height: 1.9;
	color: var(--nizva-text-body);
}

.nizva-tira-home__gate-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 22px;
	border-radius: 12px;
	background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.nizva-tira-home__gate-cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
	color: #fff !important;
}

/* Collapsed intro */
.nizva-tira-home__intro {
	max-width: 720px;
}

.nizva-tira-home__brand {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
	color: var(--nizva-primary);
	font-size: 14px;
}

.nizva-tira-home__brand-icon {
	display: inline-flex;
	animation: nizvaTiraPulse 2.4s ease-in-out infinite;
}

.nizva-tira-home__brand-tag {
	color: var(--nizva-text-muted);
	font-size: 12px;
	font-weight: 500;
}

.nizva-tira-home__greeting {
	margin: 0 0 10px;
	font-size: clamp(20px, 2.8vw, 26px);
	line-height: 1.45;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.nizva-tira-home__lead {
	margin: 0 0 20px;
	max-width: 640px;
	font-size: 14px;
	line-height: 1.95;
	color: var(--nizva-text-body);
}

.nizva-tira-home__start {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 22px;
	border: none;
	border-radius: 12px;
	background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.nizva-tira-home__start:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.nizva-tira-home.is-open .nizva-tira-home__start {
	background: #fff;
	color: var(--nizva-primary);
	border: 1px solid rgba(37, 99, 235, 0.35);
	box-shadow: none;
}

/* Expanded panel */
.nizva-tira-home__panel {
	margin-top: 28px;
	padding-top: 8px;
	animation: nizvaTiraFadeUp 0.4s ease both;
}

.nizva-tira-home__panel[hidden] {
	display: none !important;
}

.nizva-tira-home__loading {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 16px;
	margin-bottom: 12px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid var(--nizva-border);
	color: var(--nizva-text-muted);
	font-size: 13px;
}

.nizva-tira-home__loading[hidden] {
	display: none !important;
}

.nizva-tira-home__spinner {
	width: 18px;
	height: 18px;
	border: 2px solid #BFDBFE;
	border-top-color: var(--nizva-primary);
	border-radius: 50%;
	animation: nizvaTiraSpin 0.7s linear infinite;
	flex-shrink: 0;
}

@keyframes nizvaTiraSpin {
	to { transform: rotate(360deg); }
}

.nizva-tira-home__empty {
	margin: 0;
	padding: 20px;
	border-radius: 14px;
	background: var(--nizva-surface);
	border: 1px solid var(--nizva-border);
	color: var(--nizva-text-muted);
	font-size: 14px;
	line-height: 1.8;
}

/* Sections */
.nizva-tira-home__section {
	margin-bottom: 36px;
}

.nizva-tira-home__section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 14px;
}

.nizva-tira-home__section-title {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 800;
}

.nizva-tira-home__section-desc {
	margin: 0;
	max-width: 720px;
	font-size: 13px;
	color: var(--nizva-text-muted);
	line-height: 1.85;
}

.nizva-tira-home__nav {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.nizva-tira-home__nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--nizva-border);
	border-radius: 10px;
	background: var(--nizva-surface);
	color: var(--nizva-text-body);
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.nizva-tira-home__nav-btn:hover {
	border-color: var(--nizva-primary);
	color: var(--nizva-primary);
	background: #EFF6FF;
}

/* Slider */
.nizva-tira-home__slider {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding-bottom: 8px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.nizva-tira-home__slider:focus-visible {
	outline: 2px solid var(--nizva-primary);
	outline-offset: 4px;
}

.nizva-tira-home__slider::-webkit-scrollbar {
	height: 6px;
}

.nizva-tira-home__slider::-webkit-scrollbar-thumb {
	background: #CBD5E1;
	border-radius: 999px;
}

/* Product card — restored larger size */
.nizva-tira-card {
	flex: 0 0 min(240px, 72vw);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	background: var(--nizva-surface);
	border: 1px solid var(--nizva-border);
	border-radius: 16px;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nizva-tira-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.nizva-tira-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	background: #E2E8F0;
	overflow: hidden;
}

.nizva-tira-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.nizva-tira-card:hover .nizva-tira-card__media img {
	transform: scale(1.04);
}

.nizva-tira-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #E2E8F0, #F1F5F9);
}

.nizva-tira-card__badge {
	position: absolute;
	top: 10px;
	right: 10px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	background: rgba(15, 23, 42, 0.78);
	color: #fff;
	backdrop-filter: blur(4px);
}

.nizva-tira-card__badge--star,
.nizva-tira-card__badge--hot_new {
	background: rgba(22, 163, 74, 0.92);
}

.nizva-tira-card__badge--strong {
	background: rgba(37, 99, 235, 0.92);
}

.nizva-tira-card__badge--rising {
	background: rgba(217, 119, 6, 0.92);
}

.nizva-tira-card__badge--opportunity {
	background: rgba(14, 165, 233, 0.92);
}

.nizva-tira-card__rank {
	position: absolute;
	bottom: 10px;
	left: 10px;
	min-width: 34px;
	padding: 4px 8px;
	border-radius: 8px;
	background: #fff;
	color: var(--nizva-primary);
	font-size: 12px;
	font-weight: 800;
	text-align: center;
}

.nizva-tira-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px;
	flex: 1;
}

.nizva-tira-card__title {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nizva-tira-card__title a:hover {
	color: var(--nizva-primary);
}

.nizva-tira-card__specs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 11px;
	color: var(--nizva-text-muted);
}

.nizva-tira-card__specs span {
	color: var(--nizva-text-body);
	font-weight: 600;
}

.nizva-tira-card__insight {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.75;
	color: var(--nizva-text-body);
	flex: 1;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nizva-tira-card__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 14px;
	border-radius: 10px;
	background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
	color: #fff !important;
	font-size: 13px;
	font-weight: 700;
	margin-top: auto;
	transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.nizva-tira-card__cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
	color: #fff !important;
}

@keyframes nizvaTiraPulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.08); opacity: 0.85; }
}

@keyframes nizvaTiraFadeUp {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 720px) {
	.nizva-tira-home__section-head {
		align-items: flex-start;
		flex-direction: column;
	}

	.nizva-tira-home__gate {
		padding: 28px 18px;
	}
}
