/**
 * Block Style: Home Events (Direct Dynamic Colors & Consistent Hierarchy)
 */

.events-section {
	background: transparent !important;
	padding: 70px 0;
}

.events-section .section-header {
	margin-bottom: 45px;
}

.events-section .section-badge-wrapper {
	display: block;
	margin-bottom: 14px;
}

/* الشارة العليا تأخذ خلفية من اللون الرئيسي primary_color ولون الخط الثانوي text_color_secondary */
.events-section .section-badge {
	display: inline-flex;
	align-items: center;
	background: rgba(var(--theme-primary-rgb), 0.12) !important;
	color: var(--theme-text-light) !important;
	padding: 6px 18px;
	border-radius: 50px;
	font-weight: 700;
	font-size: 0.88rem;
}

/* العنوان يظهر فيه الوصف ويأخذ لون الخط الرئيسي text_color_primary */
.events-section .section-title {
	color: var(--theme-text-dark) !important;
	font-weight: 800;
	font-size: 2.1rem;
	margin-bottom: 0;
	line-height: 1.4;
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
}

/* سلايدر الفعاليات */
.events-swiper {
	padding: 10px 4px 45px !important;
	overflow: hidden;
}

.events-swiper .swiper-wrapper {
	align-items: stretch !important;
}

.events-swiper .swiper-slide {
	height: auto !important;
	display: flex !important;
	flex-direction: column !important;
}

.events-slider-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin-top: 36px !important;
	padding-top: 10px !important;
	position: relative !important;
}

.events-slider-pagination .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	border-radius: 50px;
	background: rgba(var(--theme-primary-rgb), 0.25);
	opacity: 1;
	transition: all 0.3s ease;
}

.events-slider-pagination .swiper-pagination-bullet-active {
	width: 32px;
	background: var(--theme-primary) !important;
	box-shadow: 0 2px 8px rgba(var(--theme-primary-rgb), 0.4);
}

.events-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 28px;
	align-items: stretch;
}

/* بطاقة الفعالية */
.event-card {
	display: flex;
	flex-direction: column;
	border-radius: 20px;
	overflow: hidden;
	background: #ffffff;
	border: 1px solid rgba(var(--theme-primary-rgb), 0.12);
	height: 100%;
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.event-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.09);
	border-color: rgba(var(--theme-primary-rgb), 0.25);
}

/* صورة الفعالية */
.event-img-wrapper {
	position: relative;
	height: 210px;
	overflow: hidden;
	background: rgba(var(--theme-primary-rgb), 0.05);
}

.event-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.event-card:hover .event-img {
	transform: scale(1.06);
}

.event-img-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--theme-primary);
}

/* شارة تاريخ الفعالية */
.event-date-badge {
	position: absolute;
	top: 14px;
	right: 14px;
	background: rgba(var(--theme-primary-rgb), 0.9);
	color: #ffffff;
	padding: 4px 12px;
	border-radius: 50px;
	font-size: 0.8rem;
	font-weight: 700;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* جسم البطاقة */
.event-body {
	padding: 24px 22px 22px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.event-title {
	font-size: 1.2rem;
	font-weight: 800;
	margin-bottom: 10px;
	line-height: 1.45;
}

.event-title a {
	color: var(--theme-text-dark);
	text-decoration: none;
	transition: color var(--transition-fast);
}

.event-title a:hover {
	color: var(--theme-primary);
}

.event-meta-location {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.88rem;
	color: var(--theme-text-light);
	margin-bottom: 12px;
}

.event-meta-location .icon {
	color: var(--theme-secondary);
}

.event-excerpt {
	font-size: 0.92rem;
	color: var(--theme-text-light);
	line-height: 1.65;
	margin-bottom: 20px;
	flex: 1;
}

/* الأزرار التفاعلية للفعالية (تخطيط مرن يستوعب زرين أو زر واحد بانسجام) */
.event-actions {
	margin-top: auto;
	width: 100%;
	display: flex;
	gap: 10px;
	align-items: center;
}

.btn-event-register,
.btn-event-details {
	flex: 1;
	border-radius: 50px;
	padding: 10px 16px;
	font-weight: 700;
	font-size: 0.9rem;
	text-align: center;
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-decoration: none !important;
	white-space: nowrap;
}

.btn-event-register {
	background: var(--theme-primary) !important;
	color: #ffffff !important;
	border: 1px solid var(--theme-primary);
}

.btn-event-register:hover {
	background: var(--theme-secondary) !important;
	border-color: var(--theme-secondary);
	box-shadow: 0 6px 18px rgba(var(--theme-secondary-rgb), 0.3);
}

.btn-event-details {
	background: rgba(var(--theme-primary-rgb), 0.08) !important;
	color: var(--theme-text-dark) !important;
	border: 1px solid rgba(var(--theme-primary-rgb), 0.15);
}

.btn-event-details:hover {
	background: var(--theme-primary) !important;
	color: #ffffff !important;
	border-color: var(--theme-primary);
}

/* زر استعراض كافة الفعاليات والبرامج السفلي */
.btn-events-all {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 30px;
	border-radius: 50px;
	border: 2px solid var(--theme-primary) !important;
	color: var(--theme-primary) !important;
	font-weight: 800;
	font-size: 0.98rem;
	transition: all 0.3s ease;
	text-decoration: none !important;
	background: transparent;
}

.btn-events-all:hover {
	background: var(--theme-primary) !important;
	color: #ffffff !important;
	box-shadow: 0 8px 24px rgba(var(--theme-primary-rgb), 0.25);
}

@media (max-width: 768px) {
	.events-grid {
		grid-template-columns: 1fr;
	}
	.event-body {
		padding: 20px 18px;
	}
}
