/* 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: 3.75rem; /* 60px */
	padding-bottom: 3.75rem; /* 60px */
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	background-color: transparent;
}

.events-slider-container {
	max-width: 75rem; /* 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: 3.75em; /* 60px */
	text-transform: uppercase;
	margin: 0;
	color: #0033A0;
}

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

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

.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.75em;
	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 0.25rem, 0.125rem 0.25rem, 0.125rem 0.125rem, 0.25rem 0.125rem, 0.25rem 0,
		calc(100% - 0.25rem) 0, calc(100% - 0.25rem) 0.125rem, calc(100% - 0.125rem) 0.125rem, calc(100% - 0.125rem) 0.25rem, 100% 0.25rem,
		100% calc(100% - 0.25rem), calc(100% - 0.125rem) calc(100% - 0.25rem), calc(100% - 0.125rem) calc(100% - 0.125rem), calc(100% - 0.25rem) calc(100% - 0.125rem), calc(100% - 0.25rem) 100%,
		0.25rem 100%, 0.25rem calc(100% - 0.125rem), 0.125rem calc(100% - 0.125rem), 0.125rem calc(100% - 0.25rem), 0 calc(100% - 0.25rem)
	);
}

/* 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: 1em; /* 16px */
	font-style: normal;
	font-weight: 700;
	line-height: 1.24em; /* 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: 0.75em; /* 12px */
	font-style: normal;
	font-weight: 400;
	line-height: 1.4em; /* 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: 3.125rem; /* 50px */
	height: 3.125rem; /* 50px */
	background: rgba(255, 255, 255, 0.8);
	border: none;
	cursor: pointer;
	z-index: 10;
	background-size: 3rem; /* 48px - matches news slider */
	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: 2.75rem; /* 44px */
	min-height: 2.75rem; /* 44px */
}

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

.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: 0.1875rem solid #FFDC00; /* 3px */
	outline-offset: 0.125rem; /* 2px */
	box-shadow: 0 0 0 0.1875rem rgba(255, 220, 0, 0.5), 0 0 0 0.3125rem rgba(0, 51, 160, 0.3); /* 3px, 5px */
}

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

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

.events-post-title a:focus-visible {
	outline: 0.1875rem solid #FFDC00; /* 3px */
	outline-offset: 0.125rem; /* 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('assets/left-arrow.svg');
}

.events-slider .slick-next:hover {
	background-color: #D8E4F3 !important;
	background-image: url('assets/right-arrow.svg');
}

.events-slider .slick-prev {
	left: -1.0625rem; /* -17px - matches news slider */
	background-image: url('assets/left-arrow.svg');
	background-size: 3rem !important; /* 48px - matches news slider */
}

.events-slider .slick-next {
	right: -1.0625rem; /* -17px - matches news slider */
	background-image: url('assets/right-arrow.svg');
	background-size: 3rem !important; /* 48px - matches news slider */
}

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

	.events-slider-title {
		font-size: 2.625em; /* 42px */
	}

	.events-post {
		min-height: 20rem; /* 320px */
		max-height: 20rem; /* 320px */
	}

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

	.events-slider .slick-prev {
		left: 0.625rem; /* 10px */
	}

	.events-slider .slick-next {
		right: 0.625rem; /* 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-visible,
	.events-slider .slick-next:focus-visible {
		outline: 0.1875rem solid; /* 3px */
		outline-offset: 0.1875rem; /* 3px */
		border: 0.125rem solid; /* 2px */
	}
	
	.events-post-title a:focus-visible {
		outline: 0.1875rem solid; /* 3px */
		outline-offset: 0.1875rem; /* 3px */
	}
}

