/**
 * news-feed.css
 * Styles for DVIDS news feed widget (Bootstrap 5.3)
 */

/* ── Filter Bar ──────────────────────────────────────────── */

#news-filter-bar {
	margin-bottom: 0.8rem;
}

#news-filter-bar .row {
	margin-bottom: 1rem;
}

#news-filter-bar input[type="radio"] {
	margin: 0 0.25rem 0 0;
}

#news-filter-bar .form-check-inline {
	margin-right: 0;
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 0;
}

#news-unit {
	margin-bottom: 0;
	width: auto;
	max-width: 100%;
}

/* Radio button custom color */
#news-filter-bar .form-check-input:checked {
	background-color: #11263f;
	border-color: #11263f;
}

#news-filter-bar .form-check-input:focus {
	border-color: #11263f;
	box-shadow: 0 0 0 0.25rem rgba(17, 38, 63, 0.25);
}

/* ── News Items Grid ────────────────────────────────────── */

#news-items .news-card {
	border: none;
	border-radius: 0;
	transition: transform 0.2s ease-in-out;
}

#news-items .news-card:hover {
	transform: scale(1.03);
}

#news-items .news-img {
	border-radius: 10px;
	overflow: hidden;
	max-height: 200px;
	padding: 0;
}

#news-items .news-img img {
	width: 100%;
	height: auto;
	object-fit: cover;
}

#news-items .news-img a {
	display: block;
	width: 100%;
}

#news-items .card-body {
	padding: 0.6rem;
}

/* ── News Item Content ──────────────────────────────────── */

#news-items .news-date {
	font-size: 0.9rem;
	color: #6c757d;
	margin-bottom: 0.5rem;
}

#news-items .news-title h2 {
	font-size: 1rem;
	line-height: 1.2rem;
	margin: 4px 0 6px 0;
}

#news-items .news-title h2 a {
	text-decoration: none;
	color: inherit;
}

#news-items .news-title h2 a:hover {
	text-decoration: underline;
}

#news-items .news-url {
	margin-top: 0.5rem;
}

#news-items .news-url a {
	font-size: 0.9rem;
	margin-top: 6px;
	padding: 6px 12px;
	text-decoration: none;
	background-color: #e0e0e0;
	color: #000;
	border: none;
	transition: background-color 0.3s ease;
}

#news-items .news-url a:hover {
	background-color: #c3c3c3;
	color: #000;
}

/* ── Pagination ─────────────────────────────────────────── */

#news-pagination {
	margin-top: 2rem;
}

#news-pagination .pagination {
	margin-bottom: 0;
}

#news-pagination .page-link.disabled {
	pointer-events: none;
	cursor: default;
	opacity: 0.6;
}

/* Pagination custom color */
#news-pagination .page-item.active .page-link {
	background-color: #11263f;
	border-color: #11263f;
}

#news-pagination .page-link {
	color: #11263f;
	cursor: pointer;
}

#news-pagination .page-link:hover {
	color: #11263f;
	background-color: #e9ecef;
}

#news-pagination .page-item.active>.page-link {
	color: #fff
}

#news-pagination .page-link:focus {
	box-shadow: 0 0 0 0.25rem rgba(17, 38, 63, 0.25);
}

/* ── Responsive Adjustments ─────────────────────────────── */

@media (max-width: 767px) {
	#news-items .news-card {
		margin-bottom: 1rem;
	}

	#news-filter-bar .col-12 {
		margin-top: 0.5rem;
	}

	#news-filter-bar .form-check-inline {
		display: block;
		margin-right: 0;
		margin-bottom: 0.5rem;
	}
}

/* ── Loading State ──────────────────────────────────────── */

#news-items-container>.col-12 p {
	text-align: center;
	padding: 2rem;
	color: #6c757d;
}