/* ===== BASE =====
   Every custom property below is a fallback. The active theme's skin
   (/static/themes/<slug>/theme.css) loads after this file and overrides them,
   so this stylesheet stays shared across every theme instead of being copied.
   See doc/themes.md. */
:root {
	--primary: #4f46e5;
	--primary-light: #818cf8;
	--primary-dark: #3730a3;
	--gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
	--gradient-dark: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
	--shadow: 0 4px 24px rgba(79, 70, 229, 0.12);
	--shadow-lg: 0 12px 40px rgba(79, 70, 229, 0.2);
	--radius: 16px;

	--body-bg: #ffffff;
	--body-text: #1e293b;
	--surface: #f8fafc;
	--surface-border: #e2e8f0;
	--muted: #64748b;
	--navbar-bg: rgba(15, 10, 40, 0.85);
	--navbar-bg-solid: rgba(15, 10, 40, 0.98);
	--footer-bg: #140f30;
}

body {
	font-family: 'Vazirmatn', sans-serif;
	background: var(--body-bg);
	color: var(--body-text);
	overflow-x: hidden;
}

.section-padding {
	padding: 80px 0;
}

.text-gradient {
	background: var(--gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.text-gradient-icon {
	background: var(--gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.card-hover {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
	transform: translateY(-6px);
	box-shadow: var(--shadow-lg);
}

/* ===== NAVBAR ===== */
#mainNav {
	background: var(--navbar-bg);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	transition: all 0.3s ease;
	padding: 12px 0;
}
#mainNav.scrolled {
	background: var(--navbar-bg-solid);
	padding: 8px 0;
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.brand-fa {
	font-size: 0.8rem;
	opacity: 0.6;
}
.navbar .nav-link {
	font-size: 0.9rem;
	padding: 8px 14px !important;
	transition: color 0.2s;
}
.navbar .nav-link:hover {
	color: var(--primary-light) !important;
}

/* ===== HERO ===== */
.hero-section {
	background: var(--gradient-dark);
	min-height: 100vh;
	display: flex;
	align-items: center;
	padding-top: 80px;
	position: relative;
	overflow: hidden;
}
.min-vh-80 {
	min-height: 80vh;
}
.hero-bg-shapes {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}
.shape {
	position: absolute;
	border-radius: 50%;
	opacity: 0.08;
}
.shape-1 {
	width: 600px;
	height: 600px;
	background: var(--primary-light);
	top: -200px;
	left: -100px;
	animation: float 8s ease-in-out infinite;
}
.shape-2 {
	width: 400px;
	height: 400px;
	background: #ec4899;
	bottom: -100px;
	right: -100px;
	animation: float 10s ease-in-out infinite reverse;
}
.shape-3 {
	width: 300px;
	height: 300px;
	background: #7c3aed;
	top: 50%;
	left: 50%;
	animation: float 12s ease-in-out infinite;
}

@keyframes float {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33% { transform: translate(30px, -30px) scale(1.05); }
	66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-title {
	line-height: 1.3;
}
.hero-subtitle {
	max-width: 500px;
}

/* Hero Mockup */
.hero-mockup {
	perspective: 1200px;
}
.mockup-window {
	background: #1e1b4b;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
	transform: rotateY(-8deg) rotateX(4deg);
	transition: transform 0.5s ease;
}
.mockup-window:hover {
	transform: rotateY(-2deg) rotateX(1deg);
}
.mockup-header {
	background: #0f0a28;
	padding: 10px 14px;
	display: flex;
	gap: 6px;
}
.dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.mockup-body {
	display: grid;
	grid-template-columns: 1fr 120px;
	grid-template-rows: 30px 1fr;
	gap: 10px;
	padding: 14px;
	min-height: 280px;
}
.mockup-nav {
	grid-column: 1 / -1;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 6px;
}
.mockup-content {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.mockup-card {
	background: rgba(255, 255, 255, 0.08);
	border-radius: 8px;
	height: 50px;
	animation: pulse-card 3s ease-in-out infinite;
}
.mockup-card.short {
	height: 35px;
	width: 70%;
}
.mockup-sidebar {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.mockup-stat {
	background: rgba(79, 70, 229, 0.2);
	border-radius: 8px;
	height: 35px;
}
.mockup-chart {
	background: rgba(124, 58, 237, 0.15);
	border-radius: 8px;
	flex: 1;
}

@keyframes pulse-card {
	0%, 100% { opacity: 0.6; }
	50% { opacity: 1; }
}

/* ===== STATS ===== */
.stats-section {
	margin-top: -40px;
	position: relative;
	z-index: 10;
	padding-bottom: 40px;
}
.stat-card {
	background: white;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	transition: transform 0.3s;
}
.stat-card:hover {
	transform: translateY(-4px);
}
.stat-number {
	color: var(--primary);
}

/* ===== PAIN CARDS ===== */
.pain-card .pain-icon {
	width: 70px;
	height: 70px;
	border-radius: 50%;
	background: #fef2f2;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
}

/* ===== FEATURE CARDS ===== */
.feature-card {
	border-radius: var(--radius);
	background: white;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}
.feature-icon-wrap {
	width: 56px;
	height: 56px;
	border-radius: 14px;
	background: linear-gradient(135deg, #eef2ff, #e0e7ff);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--primary);
}

/* ===== STEPS ===== */
.step-card {
	border-radius: var(--radius);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	transition: background 0.3s;
}
.step-card:hover {
	background: rgba(255, 255, 255, 0.08);
}
.step-num {
	position: absolute;
	top: -16px;
	right: 50%;
	transform: translateX(50%);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--gradient);
	color: white;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}
.step-icon {
	margin-top: 10px;
}

/* ===== PRICING ===== */
.pricing-card {
	border-radius: var(--radius);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
	overflow: hidden;
}
.pricing-card:hover {
	transform: translateY(-8px);
	box-shadow: var(--shadow-lg);
}
.pricing-popular {
	border: 2px solid var(--primary) !important;
	box-shadow: var(--shadow);
}
.popular-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	background: var(--gradient);
	color: white;
	font-size: 0.75rem;
	font-weight: bold;
	padding: 4px 14px;
	border-radius: 20px;
}
.pricing-amount {
	padding: 16px 0;
	border-top: 1px solid #f1f5f9;
	border-bottom: 1px solid #f1f5f9;
}

/* ===== BRAND ITEMS ===== */
.brand-item {
	background: white;
	border: 1px solid #e2e8f0;
	transition: all 0.3s;
}
.brand-item:hover {
	border-color: var(--primary-light);
	box-shadow: var(--shadow);
}

/* ===== FAQ ===== */
.accordion-button {
	font-size: 0.95rem;
	background: white;
}
.accordion-button:not(.collapsed) {
	background: #f8fafc;
	color: var(--primary);
	box-shadow: none;
}
.accordion-button:focus {
	box-shadow: none;
	border-color: #e2e8f0;
}

/* ===== CONTACT ===== */
.contact-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: linear-gradient(135deg, #eef2ff, #e0e7ff);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--primary);
}

/* ===== CTA ===== */
.cta-section {
	background: var(--gradient-dark);
	position: relative;
	overflow: hidden;
}
.cta-section::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--gradient);
	opacity: 0.15;
}

/* ===== FOOTER ===== */
footer a:hover {
	color: var(--primary-light) !important;
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-up {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
	opacity: 1;
	transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
	.hero-section {
		min-height: auto;
		padding: 120px 0 60px;
	}
	.min-vh-80 {
		min-height: auto;
	}
	.section-padding {
		padding: 50px 0;
	}
	.hero-title {
		font-size: 2rem;
	}
}

@media (max-width: 575.98px) {
	.hero-title {
		font-size: 1.6rem;
	}
	.stat-card {
		padding: 12px !important;
	}
	.stat-number {
		font-size: 1.2rem !important;
	}
}

/* ===== THEME PREVIEW BAR ===== */
.theme-preview-bar {
	position: sticky;
	top: 0;
	z-index: 1080;
	background: #f59e0b;
	color: #1f2937;
	font-size: 13px;
	font-weight: 600;
	padding: 9px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.theme-preview-bar a {
	color: #1f2937;
	text-decoration: underline;
}

/* The navbar is fixed-top; nudge it below the bar so nothing is covered. */
body:has(.theme-preview-bar) #mainNav {
	top: 38px;
}

/* ===== FOOTER — readable contrast on the deep brand background ===== */
footer {
	background: var(--footer-bg);
	color: rgba(255, 255, 255, 0.72);
}
footer h5,
footer h6 { color: #ffffff; }
footer .footer-text { color: rgba(255, 255, 255, 0.60); }
/* Bootstrap's .text-muted is far too dim on a dark footer — lift it. */
footer .text-muted { color: rgba(255, 255, 255, 0.62) !important; }
footer a.text-muted { transition: color 0.2s ease; }
footer hr { border-color: rgba(255, 255, 255, 0.12) !important; opacity: 1; }

footer .social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.07);
	color: rgba(255, 255, 255, 0.78);
	font-size: 1.1rem;
	text-decoration: none;
	transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
footer .social-link:hover {
	background: var(--gradient);
	color: #ffffff !important;
	transform: translateY(-2px);
}

footer .footer-newsletter .form-control {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	color: #ffffff;
}
footer .footer-newsletter .form-control::placeholder { color: rgba(255, 255, 255, 0.45); }
footer .footer-newsletter .form-control:focus {
	background: rgba(255, 255, 255, 0.12);
	border-color: var(--primary-light);
	box-shadow: none;
	color: #ffffff;
}

/* Logo mark in the navbar */
.navbar-logo { display: block; }
