/* Accessibility: Screen reader only class */
.events-slider-block .sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
	clip-path: inset(50%);
}

.events-slider-block {
	padding-top: 60px;
	padding-bottom: 60px;
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	background-color: transparent;
}

.events-slider-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
	position: relative;
}

.events-slider-header {
	text-align: center;
	margin-bottom: 2rem;
}

.events-slider-title {
	font-style: normal;
	font-weight: 900;
	font-size: 60px;
	text-transform: uppercase;
	margin: 0;
	color: #0033A0;
}

.events-slider {
	margin-bottom: 2rem;
}

.events-post {
	position: relative;
	overflow: hidden;
	min-height: 367px;
	max-height: 367px;
	background-color: #000000;
	margin: 0 0.5rem;
	clip-path: polygon(
		0 10px, 5px 10px, 5px 5px, 10px 5px, 10px 0,
		calc(100% - 10px) 0, calc(100% - 10px) 5px, calc(100% - 5px) 5px, calc(100% - 5px) 10px, 100% 10px,
		100% calc(100% - 10px), calc(100% - 5px) calc(100% - 10px), calc(100% - 5px) calc(100% - 5px), calc(100% - 10px) calc(100% - 5px), calc(100% - 10px) 100%,
		10px 100%, 10px calc(100% - 5px), 5px calc(100% - 5px), 5px calc(100% - 10px), 0 calc(100% - 10px)
	);
}

.events-post-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.events-post-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.events-post::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
	z-index: 2;
}

.events-post-category {
	position: absolute;
	top: 1rem;
	left: 1rem;
	z-index: 10;
}

/* Category tag styles - matching news slider */
.category-tag {
	display: inline-block;
	padding: 0.375rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-radius: 0;
	background-color: rgba(255, 255, 255, 0.9);
	color: #0033A0;
	font-family: "bitcount-prop-single-square", monospace;
	clip-path: polygon(
		0 4px, 2px 4px, 2px 2px, 4px 2px, 4px 0,
		calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px,
		100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px), calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%,
		4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px)
	);
}

/* Event category specific colors */
.category-tag.college-events {
	background-color: #FFDC00;
	color: #0033A0;
}

.category-tag.ask {
	background-color: #4cbcc0;
	color: #ffffff;
}

.category-tag.foster-parent-training-program {
	background-color: #ffa360;
	color: #ffffff;
}

.category-tag.ask-support-groups {
	background-color: #1e8aff;
	color: #ffffff;
}

.category-tag.calendar {
	background-color: #1a365d;
	color: #ffffff;
}

.events-post-content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 1.5rem;
	color: #fff;
	z-index: 3;
}

.events-post-title {
	font-family: "Usual", sans-serif;
	font-size: 16px;
	font-style: normal;
	font-weight: 700;
	line-height: 124%;
	margin-bottom: 0.5rem;
}

.events-post-title a {
	color: #fff;
	text-decoration: none;
}

.events-post-title a:hover {
	text-decoration: underline;
}

.events-post-date {
	font-family: "Usual", sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: 400;
	line-height: 140%;
	color: rgba(255, 255, 255, 0.8);
}

.events-slider-view-all {
	text-align: center;
	margin-top: 2rem;
}

.events-slider .slick-prev,
.events-slider .slick-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	background: rgba(255, 255, 255, 0.8);
	border: none;
	cursor: pointer;
	z-index: 10;
	background-size: 20px 20px;
	background-position: center;
	background-repeat: no-repeat;
	transition: background-color 0.3s ease;
	font-size: 0;
	/* Ensure sufficient touch target size (WCAG 2.5.5) */
	min-width: 44px;
	min-height: 44px;
}

/* Accessibility: Enhanced focus states (WCAG 2.4.7) */
.events-slider .slick-prev:focus,
.events-slider .slick-next:focus {
	outline: 3px solid #FFDC00;
	outline-offset: 2px;
	box-shadow: 0 0 0 3px rgba(255, 220, 0, 0.5), 0 0 0 5px rgba(0, 51, 160, 0.3);
}

.events-slider .slick-prev:focus:not(:focus-visible),
.events-slider .slick-next:focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}

.events-slider .slick-prev:focus-visible,
.events-slider .slick-next:focus-visible {
	outline: 3px solid #FFDC00;
	outline-offset: 2px;
	box-shadow: 0 0 0 3px rgba(255, 220, 0, 0.5), 0 0 0 5px rgba(0, 51, 160, 0.3);
}

/* Focus states for event links */
.events-post-title a:focus {
	outline: 3px solid #FFDC00;
	outline-offset: 2px;
	text-decoration: underline;
}

.events-post-title a:focus:not(:focus-visible) {
	outline: none;
}

.events-post-title a:focus-visible {
	outline: 3px solid #FFDC00;
	outline-offset: 2px;
}

.events-slider .slick-prev:before,
.events-slider .slick-next:before {
	display: none !important;
}

.events-slider .slick-prev:hover {
	background-color: #d8e4f3 !important;
	background-image: url('/wp-content/uploads/2025/09/left-arrow.svg');
}

.events-slider .slick-next:hover {
	background-color: #d8e4f3 !important;
	background-image: url('/wp-content/uploads/2025/09/right-arrow.svg');
}

.events-slider .slick-prev {
	left: -25px;
	background-image: url('/wp-content/uploads/2025/09/left-arrow.svg');
}

.events-slider .slick-next {
	right: -25px;
	background-image: url('/wp-content/uploads/2025/09/right-arrow.svg');
}

@media (max-width: 768px) {
	.events-slider-block {
		padding: 1.5rem 0;
	}

	.events-slider-title {
		font-size: 42px;
	}

	.events-post {
		min-height: 320px;
		max-height: 320px;
	}

	.events-slider .slick-prev,
	.events-slider .slick-next {
		display: block !important;
		width: 40px;
		height: 40px;
		z-index: 10;
	}

	.events-slider .slick-prev {
		left: 10px;
	}

	.events-slider .slick-next {
		right: 10px;
	}
}

/* Reduced motion support (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
	.events-slider,
	.events-slider * {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* High contrast mode support (WCAG 1.4.11) */
@media (prefers-contrast: high) {
	.events-slider .slick-prev:focus,
	.events-slider .slick-next:focus {
		outline: 3px solid;
		outline-offset: 3px;
		border: 2px solid;
	}
	
	.events-post-title a:focus {
		outline: 3px solid;
		outline-offset: 3px;
	}
}

