/*****************************
*	Horizontal News Ticker
*	Responsive & Accessible
******************************/

.ticker-wrapper-h {
	display: flex;	
	position: relative;
	overflow: hidden;
	border: 1px solid #1b3957;
	background-color: #fff;
	width: 100%;
	margin-bottom: 0;
}

.ticker-wrapper-h .heading {
	background-color: #1b3957;
	color: #fff;
	padding: 15px 20px;
	flex: 0 0 auto;
	z-index: 1000;
	font-weight: 600;
	font-size: 14px;
	white-space: nowrap;
	position: relative;
}

.ticker-wrapper-h .heading:after {
	content: "";
	position: absolute;
	top: 50%;
	right: -20px;
	transform: translateY(-50%);
	border-left: 20px solid #1b3957;
	border-top: 22px solid transparent;
	border-bottom: 22px solid transparent;
}

.news-ticker-h {
	display: flex;
	margin: 0;
	padding: 0;
	padding-left: 100%;
	list-style: none;
	z-index: 999;
	
	/* Auto-scroll animation */
	animation: tic-h 120s linear infinite;
	animation-play-state: running;
	will-change: transform;
}

/* Pause on hover for accessibility */
.news-ticker-h:hover,
.news-ticker-h:focus-within { 
	animation-play-state: paused; 
}

.news-ticker-h li {
	display: flex;
	align-items: center;
	white-space: nowrap;
	padding: 0 40px;
	min-height: 50px;
}

.news-ticker-h li a {
	color: #1b3957;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.3s ease;
	padding: 2px 4px;
}

.news-ticker-h li a:hover,
.news-ticker-h li a:focus {
	color: #e42922;
	text-decoration: underline;
	outline: 2px solid #1b3957;
	outline-offset: 2px;
}

.news-ticker-h li img {
	vertical-align: middle;
	margin: 0 5px;
	max-width: 40px;
	height: auto;
}

/* Animation */
@keyframes tic-h {
	0% {
		transform: translate3d(0, 0, 0);
		visibility: visible;
	}
	100% {
		transform: translate3d(-100%, 0, 0);
	}
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
	.news-ticker-h {
		animation: none;
		padding-left: 20px;
		overflow-x: auto;
		scrollbar-width: thin;
		scrollbar-color: #1b3957 #f0f0f0;
	}
	
	.news-ticker-h::-webkit-scrollbar {
		height: 6px;
	}
	
	.news-ticker-h::-webkit-scrollbar-track {
		background: #f0f0f0;
	}
	
	.news-ticker-h::-webkit-scrollbar-thumb {
		background: #1b3957;
		border-radius: 3px;
	}
}

/* Responsive Design */
@media (max-width: 992px) {
	.ticker-wrapper-h .heading {
		padding: 12px 15px;
		font-size: 13px;
	}
	
	.ticker-wrapper-h .heading:after {
		border-left-width: 15px;
		border-top-width: 18px;
		border-bottom-width: 18px;
		right: -15px;
	}
	
	.news-ticker-h {
		animation-duration: 100s;
	}
	
	.news-ticker-h li {
		padding: 0 30px;
		min-height: 44px;
	}
	
	.news-ticker-h li a {
		font-size: 14px;
	}
}

@media (max-width: 768px) {
	.ticker-wrapper-h .heading {
		padding: 10px 12px;
		font-size: 12px;
	}
	
	.ticker-wrapper-h .heading:after {
		border-left-width: 12px;
		border-top-width: 16px;
		border-bottom-width: 16px;
		right: -12px;
	}
	
	.news-ticker-h {
		animation-duration: 80s;
	}
	
	.news-ticker-h li {
		padding: 0 20px;
		min-height: 40px;
		font-size: 13px;
	}
	
	.news-ticker-h li a {
		font-size: 13px;
	}
	
	.news-ticker-h li img {
		max-width: 30px;
	}
}

@media (max-width: 576px) {
	.ticker-wrapper-h {
		border-width: 1px 0;
	}
	
	.ticker-wrapper-h .heading {
		padding: 8px 10px;
		font-size: 11px;
	}
	
	.ticker-wrapper-h .heading:after {
		border-left-width: 10px;
		border-top-width: 14px;
		border-bottom-width: 14px;
		right: -10px;
	}
	
	.news-ticker-h {
		animation-duration: 60s;
	}
	
	.news-ticker-h li {
		padding: 0 15px;
		min-height: 36px;
		font-size: 12px;
	}
	
	.news-ticker-h li a {
		font-size: 12px;
	}
	
	.news-ticker-h li img {
		max-width: 25px;
		margin: 0 3px;
	}
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.ticker-wrapper-h {
		border-width: 2px;
	}
	
	.news-ticker-h li a:focus {
		outline-width: 3px;
	}
}

/* Print styles - hide ticker when printing */
@media print {
	.ticker-wrapper-h {
		display: none;
	}
}

/* Focus visible support for better keyboard navigation */
.news-ticker-h li a:focus-visible {
	outline: 2px solid #e42922;
	outline-offset: 2px;
	background-color: rgba(28, 101, 71, 0.1);
}

/* Screen reader only text */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Graceful degradation for browsers without CSS animation support */
@supports not (animation: none) {
	.news-ticker-h {
		padding-left: 20px;
		overflow-x: auto;
	}
}
