/* ==========================================================================
   نمایش دوره آپارات - استایل کارت دوره
   ========================================================================== */

.apcd-course-card {
	--apcd-primary: #6c5ce7;
	--apcd-primary-dark: #5a4bd1;
	--apcd-accent: #00c9a7;
	--apcd-text: #1f2430;
	--apcd-muted: #6b7280;
	--apcd-border: #e9eaf0;
	--apcd-bg: #ffffff;
	--apcd-bg-soft: #f7f7fb;

	direction: rtl;
	text-align: right;
	font-family: inherit;
	max-width: 800px;
	margin: 2rem auto;
	background: var(--apcd-bg);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(20, 20, 43, 0.08), 0 2px 6px rgba(20, 20, 43, 0.04);
	border: 1px solid var(--apcd-border);
}

.apcd-video-wrapper {
	position: relative;
	width: 100%;
	padding-top: 56.25%; /* نسبت ۱۶:۹ */
	background: #000;
}

.apcd-video-wrapper iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.apcd-course-body {
	padding: 1.75rem 2rem 2.25rem;
}

.apcd-course-title {
	margin: 0 0 1rem;
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--apcd-text);
	line-height: 1.5;
}

.apcd-course-description {
	color: var(--apcd-muted);
	font-size: 1rem;
	line-height: 2;
	margin-bottom: 1.75rem;
}

.apcd-course-description p:last-child {
	margin-bottom: 0;
}

/* سرفصل‌ها */
.apcd-syllabus {
	margin-bottom: 1.75rem;
}

.apcd-syllabus-title {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--apcd-text);
	margin: 0 0 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.apcd-syllabus-title::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 22px;
	border-radius: 4px;
	background: linear-gradient(180deg, var(--apcd-primary), var(--apcd-accent));
}

.apcd-syllabus-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.apcd-syllabus-item {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	background: var(--apcd-bg-soft);
	border: 1px solid var(--apcd-border);
	border-radius: 12px;
	padding: 0.8rem 1rem;
	transition: background 0.15s ease, transform 0.15s ease;
}

.apcd-syllabus-item:hover {
	background: #f0f0fb;
	transform: translateX(-2px);
}

.apcd-syllabus-number {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--apcd-primary), var(--apcd-accent));
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.apcd-syllabus-text {
	flex: 1 1 auto;
	color: var(--apcd-text);
	font-size: 0.98rem;
}

.apcd-syllabus-duration {
	flex: 0 0 auto;
	font-size: 0.8rem;
	color: var(--apcd-muted);
	background: #fff;
	border: 1px solid var(--apcd-border);
	border-radius: 20px;
	padding: 0.2rem 0.7rem;
	white-space: nowrap;
}

/* جعبه خرید */
.apcd-purchase-box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-top: 1.5rem;
	padding: 1.25rem 1.5rem;
	background: var(--apcd-bg-soft);
	border: 1px dashed var(--apcd-border);
	border-radius: 14px;
}

.apcd-price {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--apcd-text);
}

.apcd-price ins {
	text-decoration: none;
	color: var(--apcd-primary);
}

.apcd-price del {
	opacity: 0.6;
	margin-inline-end: 0.5rem;
}

.apcd-buy-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	background: linear-gradient(135deg, var(--apcd-primary), var(--apcd-primary-dark));
	color: #fff !important;
	font-weight: 700;
	font-size: 1rem;
	padding: 0.85rem 2rem;
	border-radius: 999px;
	text-decoration: none !important;
	box-shadow: 0 8px 20px rgba(108, 92, 231, 0.35);
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
	white-space: nowrap;
}

.apcd-buy-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 24px rgba(108, 92, 231, 0.45);
	opacity: 0.96;
	color: #fff;
}

.apcd-buy-button.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* واکنش‌گرا */
@media (max-width: 600px) {
	.apcd-course-card {
		margin: 1rem;
		border-radius: 14px;
	}

	.apcd-course-body {
		padding: 1.25rem 1.25rem 1.5rem;
	}

	.apcd-course-title {
		font-size: 1.3rem;
	}

	.apcd-purchase-box {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.apcd-buy-button {
		width: 100%;
	}
}
