/**
 * EduNexa — خواجه نصیر
 * Elementor Widget: Course Deal Countdown (پیشنهاد شگفت‌انگیز دوره‌ها با تایمر معکوس)
 *
 * @package    EduNexa
 * @author     امیر حسین بناوند (Amir Hossein Banavand)
 * @since      1.3.0
 */

.edunexa-deal-wrapper {
	position: relative;
	width: 100%;
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
	border-radius: 20px;
	padding: 30px;
	color: #ffffff;
	box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.25);
	overflow: hidden;
	direction: rtl;
	text-align: right;
	box-sizing: border-box;
}

.edunexa-deal-wrapper::before {
	content: "";
	position: absolute;
	top: -60px;
	right: -60px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(239, 68, 68, 0.2) 0%, transparent 70%);
	pointer-events: none;
}

.edunexa-deal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 25px;
	flex-wrap: wrap;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	padding-bottom: 20px;
}

.edunexa-deal-title-box {
	display: flex;
	align-items: center;
	gap: 12px;
}

.edunexa-deal-icon-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 12px;
	background: #ef4444;
	color: #ffffff;
	box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
	flex-shrink: 0;
}

.edunexa-deal-icon-badge svg,
.edunexa-deal-icon-badge i {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.edunexa-deal-title {
	margin: 0 0 4px 0;
	font-size: 1.35rem;
	font-weight: 800;
	color: #ffffff;
}

.edunexa-deal-subtitle {
	margin: 0;
	font-size: 0.85rem;
	color: #94a3b8;
}

/* Countdown Timer */
.edunexa-deal-countdown {
	display: flex;
	align-items: center;
	gap: 10px;
	direction: ltr;
}

.edunexa-deal-timer-unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 12px;
	backdrop-filter: blur(8px);
}

.edunexa-deal-timer-val {
	font-size: 1.25rem;
	font-weight: 800;
	color: #FAB237;
	line-height: 1.1;
	font-family: monospace;
}

.edunexa-deal-timer-label {
	font-size: 0.65rem;
	color: #94a3b8;
	font-weight: 600;
}

.edunexa-deal-timer-sep {
	font-size: 1.2rem;
	font-weight: 800;
	color: rgba(255, 255, 255, 0.3);
}

/* Deal Cards Track */
.edunexa-deal-cards-grid {
	display: grid;
	grid-template-columns: repeat(var(--deal-cols, 3), minmax(0, 1fr));
	gap: 20px;
}

@media (max-width: 1024px) {
	.edunexa-deal-cards-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.edunexa-deal-cards-grid {
		grid-template-columns: 1fr;
	}
}

.edunexa-deal-card {
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	color: #0f172a;
	display: flex;
	flex-direction: column;
	transition: all 0.3s ease;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.edunexa-deal-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.edunexa-deal-thumb {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	background: #0f172a;
	overflow: hidden;
}

.edunexa-deal-thumb img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.edunexa-deal-card:hover .edunexa-deal-thumb img {
	transform: scale(1.05);
}

.edunexa-deal-card-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.edunexa-deal-card-title {
	margin: 0 0 10px 0;
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.5;
	height: 3em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.edunexa-deal-card-title a {
	color: #0f172a;
	text-decoration: none !important;
}

.edunexa-deal-card-title a:hover {
	color: #ef4444;
}

/* Capacity bar */
.edunexa-deal-capacity-box {
	margin: 8px 0 14px 0;
}

.edunexa-deal-capacity-label {
	display: flex;
	justify-content: space-between;
	font-size: 0.75rem;
	color: #64748b;
	margin-bottom: 4px;
	font-weight: 600;
}

.edunexa-deal-bar {
	width: 100%;
	height: 6px;
	border-radius: 999px;
	background: #e2e8f0;
	overflow: hidden;
}

.edunexa-deal-bar-fill {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #ef4444, #f97316);
}

.edunexa-deal-footer {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.edunexa-deal-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 10px;
	background: #ef4444;
	color: #ffffff;
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none !important;
	transition: all 0.2s ease;
}

.edunexa-deal-btn:hover {
	background: #dc2626;
	color: #ffffff;
	transform: translateY(-2px);
}
