/*
 * Course section — a faithful RTL port of aipro-academy.com/course-section.
 *
 * Every rule is scoped under .aip-cs so nothing reaches the theme layout.
 * Values are the ones the .com build ships (Tailwind classes resolved):
 * surface #F4F4F2, accent #EAB308 with the #A16207 hard shadow, cards on
 * white/70 + blur, 2xl (16px) radii, 20px grid gutters.
 */

.aip-cs {
	--cs-accent: #EAB308;
	--cs-accent-d: #A16207;
	--cs-ink: #0f172a;
	--cs-surface: #F4F4F2;
	color: #0f172a;
}

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

.aip-cs p,
.aip-cs h1,
.aip-cs h2,
.aip-cs h3 {
	margin: 0;
}

/* ---------------- page head ---------------- */

.aip-cs__head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 8px;
}

.aip-cs__head-icon {
	width: 48px;
	height: 48px;
	border-radius: 16px;
	background: #000;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
}

.aip-cs__title {
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -.025em;
	line-height: 1.25;
	color: #0f172a;
}

.aip-cs__sub {
	color: #64748b;
	font-size: 14px;
	margin-top: 4px !important;
	line-height: 1.7;
}

.aip-cs__section {
	margin-bottom: 40px;
}

.aip-cs__section:last-child {
	margin-bottom: 0;
}

/* ---------------- unlock banner ---------------- */

.aip-cs__unlock {
	position: relative;
	overflow: hidden;
	background: #000;
	border-radius: 16px;
	padding: 24px;
	margin: 32px 0;
	display: flex;
	align-items: center;
	gap: 16px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
}

.aip-cs__unlock::before {
	content: "";
	position: absolute;
	inset: 0;
	opacity: .1;
	background-image: radial-gradient(circle at 20% 50%, #EAB308 0%, transparent 60%);
	pointer-events: none;
}

.aip-cs__unlock-icon {
	position: relative;
	width: 48px;
	height: 48px;
	border-radius: 16px;
	background: var(--cs-accent);
	color: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.aip-cs__unlock-text {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.aip-cs__unlock-text b {
	display: block;
	color: #fff;
	font-weight: 700;
	font-size: 18px;
	line-height: 1.5;
}

.aip-cs__unlock-text p {
	color: rgba(255, 255, 255, .6);
	font-size: 14px;
	margin-top: 2px !important;
	line-height: 1.6;
}

.aip-cs__unlock-btn {
	position: relative;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--cs-accent);
	color: #000 !important;
	padding: 10px 20px;
	border-radius: 12px;
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
	box-shadow: 0 4px 0 0 var(--cs-accent-d);
	transition: background .15s, transform .12s, box-shadow .12s;
}

.aip-cs__unlock-btn:hover {
	background: #F4C20C;
}

.aip-cs__unlock-btn:active {
	transform: translateY(2px);
	box-shadow: 0 2px 0 0 var(--cs-accent-d);
}

/* ---------------- progress card ---------------- */

.aip-cs__progress {
	background: rgba(255, 255, 255, .6);
	-webkit-backdrop-filter: blur(24px);
	backdrop-filter: blur(24px);
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 16px;
	padding: 16px 20px;
	margin: 32px 0;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
}

.aip-cs__progress-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.aip-cs__progress-top h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #1e293b;
	font-weight: 700;
	font-size: 14px;
}

.aip-cs__progress-top h3 .aip-ico {
	color: var(--cs-accent);
}

.aip-cs__progress-pct {
	color: #000;
	font-size: 14px;
	font-weight: 700;
}

.aip-cs__track {
	width: 100%;
	height: 6px;
	background: rgba(0, 0, 0, .05);
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 12px;
}

.aip-cs__track i {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(to left, var(--cs-accent), #f59e0b);
	transition: width .7s;
}

.aip-cs__stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.aip-cs__stat {
	background: rgba(255, 255, 255, .5);
	border-radius: 8px;
	padding: 8px 4px;
	text-align: center;
}

.aip-cs__stat b {
	display: block;
	color: #000;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
}

.aip-cs__stat span {
	display: block;
	color: #94a3b8;
	font-size: 10px;
	margin-top: 4px;
}

/* ---------------- section headings + note ---------------- */

.aip-cs__sechead {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.aip-cs__sechead i {
	width: 6px;
	height: 24px;
	border-radius: 999px;
	background: #000;
	flex: 0 0 auto;
}

.aip-cs__sechead h3 {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -.025em;
	color: #0f172a;
}

.aip-cs__sechead--soft i {
	background: #cbd5e1;
}

.aip-cs__note {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: rgba(255, 255, 255, .6);
	-webkit-backdrop-filter: blur(24px);
	backdrop-filter: blur(24px);
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 12px;
	padding: 10px 16px;
	margin-bottom: 16px;
}

.aip-cs__note .aip-ico {
	color: var(--cs-accent);
	flex: 0 0 auto;
	margin-top: 2px;
}

.aip-cs__note p {
	font-size: 12px;
	line-height: 1.8;
	color: #475569;
}

.aip-cs__note b {
	font-weight: 600;
	color: #1e293b;
}

/* ---------------- grid ---------------- */

.aip-cs__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

@media (min-width: 640px) {
	.aip-cs__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.aip-cs__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ---------------- card ---------------- */

.aip-cs-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: rgba(255, 255, 255, .7);
	-webkit-backdrop-filter: blur(24px);
	backdrop-filter: blur(24px);
	border: 1px solid rgba(255, 255, 255, .6);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
	transition: box-shadow .3s, transform .3s;
}

.aip-cs-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
}

.aip-cs-card__cover {
	position: relative;
	display: block;
	height: 96px;
	width: 100%;
	overflow: hidden;
	background: #f4f4f5;
}

.aip-cs-card__cover img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.aip-cs-card__cover::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, .4), transparent);
}

.aip-cs-card.is-locked .aip-cs-card__cover img {
	filter: grayscale(1);
	opacity: .6;
}

.aip-cs-card__badge {
	position: absolute;
	top: 10px;
	inset-inline-end: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	border-radius: 999px;
	padding: 3px 9px;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.6;
	background: rgba(0, 0, 0, .65);
	color: var(--cs-accent);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.aip-cs-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 20px;
}

.aip-cs-card__body h4 {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.375;
	color: #000;
}

.aip-cs-card__body h4 a {
	color: inherit;
}

.aip-cs-card.is-locked .aip-cs-card__body h4 {
	color: #a1a1aa;
}

.aip-cs-card__desc {
	flex: 1 1 auto;
	font-size: 12px;
	line-height: 1.8;
	color: #71717a;
	margin-bottom: 16px !important;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.aip-cs-card.is-locked .aip-cs-card__desc {
	color: #a1a1aa;
}

.aip-cs-card__meta {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 12px;
	color: #a1a1aa;
	margin-bottom: 12px;
}

.aip-cs-card__meta span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.aip-cs-card.is-locked .aip-cs-card__meta {
	color: #d4d4d8;
}

.aip-cs-card__price {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 12px;
	line-height: 1.6;
}

.aip-cs-card__price del {
	color: #a1a1aa;
	font-weight: 500;
	font-size: 12px;
	margin-inline-start: 6px;
}

.aip-cs-card__price ins {
	text-decoration: none;
}

.aip-cs-card__progress {
	margin-bottom: 16px;
}

.aip-cs-card__progress .aip-cs__track {
	margin-bottom: 0;
}

.aip-cs-card__progress .aip-cs__track i {
	background: var(--cs-accent);
}

.aip-cs-card__done {
	font-size: 11px;
	margin-top: 6px !important;
	font-weight: 500;
	color: #a1a1aa;
}

/* ---------------- buttons ---------------- */

.aip-csb {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	padding: 10px 12px;
	border: 0;
	border-radius: 12px;
	cursor: pointer;
	transition: background .15s, transform .12s, box-shadow .12s;
}

.aip-csb + .aip-csb {
	margin-top: 8px;
}

.aip-csb--dark {
	background: #000;
	color: #fff !important;
	box-shadow: 0 4px 0 0 #262626;
}

.aip-csb--dark:hover {
	background: #27272a;
}

.aip-csb--dark:active {
	transform: translateY(2px);
	box-shadow: 0 2px 0 0 #262626;
}

.aip-csb--lock {
	background: #f4f4f5;
	border: 1px solid #e4e4e7;
	color: #52525b !important;
	box-shadow: 0 3px 0 0 #d4d4d8;
}

.aip-csb--lock:hover {
	background: #e4e4e7;
}

.aip-csb--lock:active {
	transform: translateY(2px);
	box-shadow: 0 1px 0 0 #d4d4d8;
}

.aip-csb--ghost {
	background: transparent;
	color: #71717a !important;
	box-shadow: none;
	padding: 6px 12px;
}

.aip-csb--ghost:hover {
	color: #000 !important;
}

/* ---------------- empty state ---------------- */

.aip-cs__empty {
	background: rgba(255, 255, 255, .6);
	border: 1px dashed rgba(0, 0, 0, .12);
	border-radius: 16px;
	padding: 28px 20px;
	text-align: center;
	color: #64748b;
	font-size: 13px;
}

/* ---------------- small screens ---------------- */

@media (max-width: 639px) {
	.aip-cs__title {
		font-size: 24px;
	}

	.aip-cs__unlock {
		flex-direction: column;
		text-align: center;
		padding: 20px;
	}

	.aip-cs__unlock-text {
		text-align: center;
	}

	.aip-cs__unlock-btn {
		width: 100%;
		justify-content: center;
	}
}

/* ---------------- member offer strip ---------------- */

.aip-cs__offer {
	display: flex;
	align-items: center;
	gap: 12px;
	background: rgba(255, 255, 255, .6);
	-webkit-backdrop-filter: blur(24px);
	backdrop-filter: blur(24px);
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 16px;
	padding: 12px 16px;
	margin-bottom: 32px;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
	transition: box-shadow .2s, transform .2s;
}

.aip-cs__offer:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .08);
}

.aip-cs__offer-logo {
	width: 32px;
	height: 32px;
	border-radius: 10px;
	object-fit: cover;
	flex: 0 0 auto;
}

.aip-cs__offer-badge {
	flex: 0 0 auto;
	background: var(--cs-accent);
	color: #000;
	font-size: 10px;
	font-weight: 800;
	border-radius: 999px;
	padding: 3px 10px;
	line-height: 1.6;
	white-space: nowrap;
}

.aip-cs__offer-text {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 13px;
	color: #334155;
	line-height: 1.6;
}

.aip-cs__offer-text b {
	font-weight: 800;
	color: #0f172a;
}

.aip-cs__offer-cta {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #000;
	color: var(--cs-accent);
	font-size: 12px;
	font-weight: 700;
	border-radius: 999px;
	padding: 7px 14px;
	line-height: 1;
	white-space: nowrap;
}

@media (max-width: 639px) {
	.aip-cs__offer {
		flex-wrap: wrap;
	}

	.aip-cs__offer-text {
		flex: 1 0 100%;
		order: 3;
	}

	.aip-cs__offer-cta {
		order: 4;
		width: 100%;
		justify-content: center;
	}
}

/* ---------------- slim page bar (the .com h-12 sticky header) ---------------- */

.aip-app .aip-top--slim {
	position: sticky;
	top: var(--aip-top);
	z-index: 30;
	min-height: 48px;
	padding: 0 32px;
	align-items: center;
	background: rgba(255, 255, 255, .6);
	-webkit-backdrop-filter: blur(24px);
	backdrop-filter: blur(24px);
	border-bottom: 1px solid rgba(255, 255, 255, .6);
}

.aip-app .aip-top--slim > div {
	display: flex;
	align-items: center;
	gap: 0;
}

/* The course section carries its own headline, so the wrap starts tighter. */
.aip-app .aip-top--slim + .aip-wrap {
	padding-top: 32px;
	max-width: 1180px;
	margin-inline: auto;
	width: 100%;
}

@media (max-width: 767px) {
	.aip-app .aip-top--slim {
		padding: 0 16px;
	}

	.aip-app .aip-top--slim + .aip-wrap {
		padding-top: 20px;
	}
}
