/* ============================================================
   NC in the News – Front-end Styles
   Plugin: niagara-college-news-plugin
   ============================================================ */

/* Grid container */
.nc-news-grid {
	display: grid;
	gap: 1.5rem;
	margin: 1.5rem 0;
}

/* Columns – grid defaults to 3; list view overrides to 1 via nc-news-view-list */
.nc-news-col-3 { grid-template-columns: repeat(3, 1fr); }

/* ── Responsive breakpoints ── */

/* Tablet: drop to 2 columns */
@media (max-width: 900px) {
	.nc-news-col-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile: single column */
@media (max-width: 560px) {
	.nc-news-col-3 {
		grid-template-columns: 1fr;
	}
}

/* Card */
.nc-news-item {
	background: #ffffff;
	border: 1px solid rgba(0, 117, 188, 0.12);
	border-radius: 6px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease;
}

.nc-news-item:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	border: 1px solid rgba(0, 117, 188, 0.24);
}

/* Featured image */
.nc-news-image-link {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.nc-news-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.nc-news-item:hover .nc-news-image {
	transform: scale(1.03);
}

/* Content area */
.nc-news-content {
	padding: 1rem 1.4rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

/* Date */
.nc-news-date {
	font-size: 0.82rem;
	color: #757575;
	display: block;
	margin-top: 0.6rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Title */
.nc-news-title {
	font-size: 1rem;
	line-height: 1.4;
	margin: 0 !important;
}

.nc-news-title a {
	text-decoration: none;
	color: #1a1a1a;
}

.nc-news-title a:hover {
	text-decoration: underline;
	color: #0075bc; 
}

/* Error / empty state */
.nc-news-error {
	padding: 1rem;
	background: #fff8f8;
	border-left: 4px solid #0075bc;
	color: #555555;
	font-size: 0.9rem;
}

/* ── View-toggle toolbar ── */
.nc-news-toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0;
	margin-bottom: 0.75rem;
}

.nc-news-toggle-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 4px;
	color: #b0b0b0;
	cursor: pointer;
	transition: color 0.15s ease, background 0.15s ease;
}

.nc-news-toggle-btn:hover {
	color: #333333;
	background: #f5f5f5;
}

.nc-news-toggle-btn.is-active {
	color: #0075bc;
	background: transparent;
}

.nc-news-toggle-btn:focus-visible {
	outline: 2px solid #0075bc;
	outline-offset: 2px;
}

/* Thin vertical separator between the two icon buttons */
.nc-news-toolbar-sep {
	display: inline-block;
	width: 1px;
	height: 16px;
	background: #d8d8d8;
	margin: 0 5px;
	pointer-events: none;
	flex-shrink: 0;
}

/* ── List view overrides ── */
.nc-news-grid.nc-news-view-list {
	grid-template-columns: 1fr !important;
	gap: 1rem;
}

.nc-news-grid.nc-news-view-list .nc-news-item {
	flex-direction: row;
	align-items: stretch;
}

.nc-news-grid.nc-news-view-list .nc-news-image-link {
	flex: 0 0 160px;
	width: 160px;
	border-radius: 0;
	aspect-ratio: unset;
}

.nc-news-grid.nc-news-view-list .nc-news-content {
	padding: 0.75rem 1rem;
}

/* List view: collapse image to full width on mobile */
@media (max-width: 560px) {
	.nc-news-grid.nc-news-view-list .nc-news-item {
		flex-direction: column;
	}

	.nc-news-grid.nc-news-view-list .nc-news-image-link {
		flex: none;
		width: 100%;
	}
}

/* ── Pagination ── */

.nc-news-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	margin-top: 1.75rem;
	flex-wrap: wrap;
}

.nc-news-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 0.5rem;
	background: transparent;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	color: #444444;
	font-size: 0.875rem;
	font-family: inherit;
	cursor: pointer;
	line-height: 1;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nc-news-page-btn:hover:not( :disabled ) {
	background: #f5f5f5;
	border-color: #b0b0b0;
	color: #1a1a1a;
}

.nc-news-page-btn.is-active {
	background: #0075bc;
	border-color: #0075bc;
	color: #ffffff;
	font-weight: 600;
	cursor: default;
}

.nc-news-page-btn:disabled {
	cursor: not-allowed;
}

.nc-news-page-btn:focus-visible {
	outline: 2px solid #0075bc;
	outline-offset: 2px;
}

.nc-news-page-arrow {
	font-size: 1.1rem;
}

.nc-news-page-ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	color: #888888;
	font-size: 0.875rem;
	user-select: none;
}
