/* News Tile Grid - frontend styles */

.ntg-wrap {
	margin: 1.5em 0;
}

.ntg-filter-wrap {
	margin-bottom: 1em;
	display: flex;
	align-items: center;
	gap: 8px;
}

.ntg-filter-wrap label {
	font-weight: 600;
}

.ntg-filter {
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
}

.ntg-grid {
	display: grid;
	grid-template-columns: repeat(var(--ntg-columns, 4), 1fr);
	gap: 20px;
}

.ntg-tile {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ntg-tile:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.ntg-tile-link {
	display: block;
	text-decoration: none;
	color: inherit;
	height: 100%;
}

.ntg-tile-image {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #f1f1f1;
	overflow: hidden;
}

.ntg-tile-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ntg-tile-image-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e9ecef 0%, #dde1e4 100%);
}

.ntg-tile-category {
	position: absolute;
	top: 8px;
	left: 8px;
	background: rgba(20, 20, 20, 0.75);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 3px 8px;
	border-radius: 4px;
}

.ntg-tile-body {
	padding: 12px 14px 14px;
}

.ntg-tile-title {
	font-size: 15px;
	line-height: 1.35;
	margin: 0 0 10px;
	font-weight: 600;
	color: #1a1a1a;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ntg-tile-meta {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: #777;
	gap: 8px;
}

.ntg-tile-source {
	font-style: italic;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Rows beyond the configured visible count: present in DOM for SEO, hidden visually. */
.ntg-hidden-row {
	display: none;
}

.ntg-hidden-row.ntg-revealed {
	display: block;
	animation: ntg-fade-in 0.4s ease forwards;
}

@keyframes ntg-fade-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

.ntg-load-more-wrap {
	text-align: center;
	margin-top: 24px;
}

.ntg-load-more {
	background: #1a1a1a;
	color: #fff;
	border: none;
	padding: 10px 24px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 5px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.ntg-load-more:hover {
	background: #333;
}

.ntg-load-more:disabled {
	opacity: 0.5;
	cursor: default;
}

.ntg-empty {
	color: #777;
	font-style: italic;
}

/* Responsive breakpoints - degrade column count gracefully regardless of configured --ntg-columns */
@media (max-width: 1100px) {
	.ntg-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 800px) {
	.ntg-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.ntg-grid {
		grid-template-columns: repeat(1, 1fr);
	}
}
