/* =========================================================
   Finance Courses – ליסטינג קורסים (עיצוב מרהיב)
   כל כרטיס יורש את צבעי התבנית שלו דרך משתני --fc-*
   ========================================================= */

.fc-listing {
	--_p: var(--fc-primary, #1f6feb);
	--_s: var(--fc-secondary, #0b3d91);
	--_a: var(--fc-accent, #ffb703);
	direction: rtl;
	display: grid;
	gap: 28px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 8px;
	font-family: "Heebo", sans-serif;
}
.fc-listing * { box-sizing: border-box; }
.fc-cols-1 { grid-template-columns: 1fr; max-width: 560px; }
.fc-cols-2 { grid-template-columns: repeat(2, 1fr); }
.fc-cols-3 { grid-template-columns: repeat(3, 1fr); }
.fc-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .fc-cols-3, .fc-cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .fc-listing { grid-template-columns: 1fr !important; gap: 22px; } }

/* ---------- כרטיס ---------- */
.fc-card {
	--_p: var(--fc-primary, #1f6feb);
	--_s: var(--fc-secondary, #0b3d91);
	--_a: var(--fc-accent, #ffb703);
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 22px;
	overflow: hidden;
	text-decoration: none;
	color: #1a1a1a;
	isolation: isolate;
	box-shadow:
		0 1px 2px rgba(16,24,40,.06),
		0 12px 28px -12px rgba(16,24,40,.18);
	transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease;
	animation: fcCardIn .6s cubic-bezier(.2,.8,.2,1) both;
}
/* מסגרת גרדיאנט שמופיעה ב-hover */
.fc-card::before {
	content: "";
	position: absolute; inset: 0;
	border-radius: inherit;
	padding: 2px;
	background: linear-gradient(135deg, var(--_p), var(--_a));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor; mask-composite: exclude;
	opacity: 0;
	transition: opacity .4s ease;
	z-index: 3; pointer-events: none;
}
/* זוהר צבעוני מתחת לכרטיס */
.fc-card::after {
	content: "";
	position: absolute; inset: auto 10% -20px 10%;
	height: 60px; border-radius: 50%;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--_p) 55%, transparent), transparent);
	filter: blur(18px);
	opacity: 0;
	transition: opacity .4s ease;
	z-index: -1;
}
.fc-card:hover {
	transform: translateY(-10px);
	box-shadow:
		0 2px 4px rgba(16,24,40,.06),
		0 30px 60px -18px color-mix(in srgb, var(--_p) 45%, rgba(16,24,40,.25));
}
.fc-card:hover::before { opacity: 1; }
.fc-card:hover::after  { opacity: 1; }
.fc-card:active { transform: translateY(-4px) scale(.995); }

/* אנימציית כניסה מדורגת */
@keyframes fcCardIn { from { opacity: 0; transform: translateY(30px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.fc-card:nth-child(2) { animation-delay: .06s; }
.fc-card:nth-child(3) { animation-delay: .12s; }
.fc-card:nth-child(4) { animation-delay: .18s; }
.fc-card:nth-child(5) { animation-delay: .24s; }
.fc-card:nth-child(6) { animation-delay: .30s; }

/* ---------- מדיה ---------- */
.fc-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background-size: cover;
	background-position: center;
	background-color: var(--_s);
	background-image: linear-gradient(135deg, var(--_p), var(--_s));
	overflow: hidden;
	transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.fc-card:hover .fc-card__media { transform: scale(1.06); }
/* שכבת הכהיה בתחתית לטובת התגיות */
.fc-card__media::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.5), transparent 45%);
	transition: opacity .4s ease;
}
/* ברק חולף (shine) */
.fc-card__shine {
	position: absolute; top: 0; bottom: 0; width: 40%;
	right: -60%;
	background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
	transform: skewX(-18deg);
	transition: right .8s cubic-bezier(.2,.8,.2,1);
	z-index: 2;
}
.fc-card:hover .fc-card__shine { right: 130%; }

/* תגית מחיר צפה (glassmorphism) */
.fc-card__pricetag {
	position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2;
	background: rgba(255,255,255,.22);
	backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255,255,255,.4);
	color: #fff; font-weight: 800; font-size: .92rem;
	padding: 7px 15px; border-radius: 999px;
	box-shadow: 0 6px 18px rgba(0,0,0,.2);
}
/* צ'יפ ימי קורס */
.fc-card__chip {
	position: absolute; bottom: 14px; inset-inline-end: 14px; z-index: 2;
	background: var(--_a); color: #1a1a1a; font-weight: 700; font-size: .78rem;
	padding: 5px 13px; border-radius: 999px;
	box-shadow: 0 4px 12px rgba(0,0,0,.22);
}

/* ---------- גוף ---------- */
.fc-card__body {
	position: relative;
	display: flex; flex-direction: column;
	gap: 10px;
	padding: 20px 22px 22px;
	flex: 1;
}

/* מרצה */
.fc-card__lecturer { display: flex; align-items: center; gap: 9px; margin-top: -2px; }
.fc-card__avatar {
	width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
	border: 2px solid #fff;
	box-shadow: 0 0 0 2px var(--_p);
}
.fc-card__lecturer-name { font-size: .84rem; font-weight: 600; color: #64748b; }

/* כותרת */
.fc-card__title {
	margin: 0; font-size: 1.28rem; font-weight: 800; line-height: 1.25;
	color: #0f172a;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	transition: color .3s ease;
}
.fc-card:hover .fc-card__title { color: var(--_p); }

/* תת-כותרת */
.fc-card__sub {
	margin: 0; font-size: .93rem; color: #64748b; line-height: 1.5;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* meta */
.fc-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.fc-card__meta-item {
	display: inline-flex; align-items: center; gap: 6px;
	background: color-mix(in srgb, var(--_p) 8%, #f8fafc);
	color: #475569; font-size: .8rem; font-weight: 600;
	padding: 6px 11px; border-radius: 9px;
	border: 1px solid color-mix(in srgb, var(--_p) 14%, transparent);
}
.fc-card__ico { width: 15px; height: 15px; color: var(--_p); flex: 0 0 auto; }

/* footer */
.fc-card__footer {
	display: flex; align-items: center; justify-content: space-between;
	margin-top: auto; padding-top: 14px;
	border-top: 1px dashed #e5e9f0;
}
.fc-card__price {
	font-size: 1.5rem; font-weight: 900; letter-spacing: -.5px;
	color: var(--_s);
}
.fc-card__price small { font-size: .95rem; font-weight: 700; opacity: .7; }
.fc-card__price--free {
	background: linear-gradient(135deg, #10b981, #059669);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.fc-card__cta {
	display: inline-flex; align-items: center; gap: 6px;
	font-weight: 800; font-size: .92rem; color: #fff;
	background: linear-gradient(135deg, var(--_p), var(--_s));
	padding: 9px 18px; border-radius: 999px;
	box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--_p) 60%, transparent);
	transition: gap .3s ease, box-shadow .3s ease, transform .3s ease;
}
.fc-card:hover .fc-card__cta { gap: 11px; box-shadow: 0 12px 26px -6px color-mix(in srgb, var(--_p) 70%, transparent); }
.fc-card__arrow { width: 16px; height: 16px; transition: transform .3s ease; }
.fc-card:hover .fc-card__arrow { transform: translateX(-4px); }

/* ---------- מצב ריק ---------- */
.fc-empty {
	grid-column: 1 / -1;
	text-align: center; padding: 60px 20px;
	background: #f8fafc; border: 2px dashed #cbd5e1; border-radius: 20px;
	color: #64748b; font-size: 1.1rem; font-weight: 600;
}

/* ---------- נגישות / העדפת תנועה מופחתת ---------- */
@media (prefers-reduced-motion: reduce) {
	.fc-card, .fc-card__media, .fc-card__shine, .fc-card__cta, .fc-card__arrow { animation: none !important; transition: none !important; }
}

/* =========================================================
   שכבת הגנה – מנצחת דריסות מהתמה/Elementor
   (specificity גבוה + !important על הקריטי בלבד)
   ========================================================= */
.fc-listing a.fc-card,
.fc-listing a.fc-card:link,
.fc-listing a.fc-card:visited,
.fc-listing a.fc-card:hover,
.fc-listing a.fc-card:focus {
	display: flex !important;
	flex-direction: column !important;
	text-decoration: none !important;
	color: #1a1a1a !important;
	background-color: #fff;
	border: 0 !important;
	border-radius: 22px !important;
	overflow: hidden !important;
	padding: 0 !important;
}
/* הצללת הכרטיס – מוגנת מפני דריסה */
.fc-listing a.fc-card,
.fc-listing a.fc-card:link,
.fc-listing a.fc-card:visited {
	box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 12px 28px -12px rgba(16,24,40,.18) !important;
}
.fc-listing a.fc-card:hover,
.fc-listing a.fc-card:focus {
	box-shadow: 0 2px 4px rgba(16,24,40,.06),
	            0 30px 60px -18px color-mix(in srgb, var(--_p) 45%, rgba(16,24,40,.25)) !important;
}
.fc-listing .fc-card * { text-decoration: none !important; }
.fc-listing .fc-card__title { color: #0f172a !important; margin: 0 !important; }
.fc-listing .fc-card:hover .fc-card__title { color: var(--_p) !important; }
.fc-listing .fc-card__sub,
.fc-listing .fc-card__lecturer-name { color: #64748b !important; }
.fc-listing .fc-card__media {
	aspect-ratio: 16 / 10;
	min-height: 190px;               /* גיבוי אם aspect-ratio נדרס */
	background-size: cover !important;
	background-position: center !important;
	margin: 0 !important;
}
.fc-listing .fc-card__cta,
.fc-listing .fc-card__pricetag,
.fc-listing .fc-card__chip { color: #fff !important; }
.fc-listing .fc-card__pricetag,
.fc-listing .fc-card__chip { text-shadow: none; }
.fc-listing .fc-card__chip { color: #1a1a1a !important; }
.fc-listing .fc-card__price { color: var(--_s) !important; }
.fc-listing .fc-card__avatar { margin: 0 !important; max-width: 34px; }
.fc-listing .fc-card__ico { color: var(--_p) !important; }

/* איפוס list/box שהתמה עלולה להחיל על ה-grid */
.fc-listing { list-style: none !important; }
.fc-listing::before, .fc-listing::after { display: none !important; }

/* כפיית הפונט הנבחר על כל כרטיס (לפי --fc-font של הקורס) */
.fc-listing .fc-card,
.fc-listing .fc-card * { font-family: var(--fc-font, "Heebo"), sans-serif !important; }
