/* ============================================================
   Newspaper View — magazine layout
   ============================================================ */

.news-grid.newspaper-view {
	max-width: 1200px;
}

/* Day separator — DM Sans in newspaper context */
.news-grid.newspaper-view .day-separator {
	font-family: 'DM Sans', sans-serif;
	font-size: 1.1rem;
	letter-spacing: 0.08em;
}

/* Per-day wrapper */
.newspaper-day-grid {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin-bottom: 1rem;
}

/* ---- HERO ---- */
.newspaper-hero {
	position: relative;
	width: 100%;
	height: 420px;
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
}

.newspaper-hero .hero-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.newspaper-hero:hover .hero-image {
	transform: scale(1.03);
}

.newspaper-hero .hero-placeholder {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* Gradient overlay — tint color set via JS as --hero-tint CSS var */
.newspaper-hero .hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		var(--hero-tint, rgba(0, 0, 0, 0.88)) 0%,
		rgba(0, 0, 0, 0.35) 50%,
		rgba(0, 0, 0, 0.0) 100%
	);
}

/* Text sits above the overlay */
.newspaper-hero .hero-body {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 2rem 2rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.newspaper-hero .hero-title {
	font-family: 'DM Sans', sans-serif;
	font-size: 2rem;
	font-weight: 800;
	color: #fff;
	line-height: 1.2;
	margin: 0;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.newspaper-hero .hero-sources {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.newspaper-hero .hero-sources .sources-label {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.6);
}

.newspaper-hero .hero-sources .source-link {
	font-size: 0.78rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	background: rgba(255, 255, 255, 0.15);
	padding: 0.15rem 0.5rem;
	border-radius: 3px;
	transition: background 0.2s;
}

.newspaper-hero .hero-sources .source-link:hover {
	background: rgba(255, 255, 255, 0.28);
	color: #fff;
}

/* URL-changed badge in hero */
.newspaper-hero .url-changed-badge {
	color: rgba(255, 200, 0, 0.9);
	cursor: pointer;
	font-size: 0.85rem;
}

/* Share button — ghost, top-right corner */
.newspaper-hero .hero-share-btn {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: rgba(255, 255, 255, 0.8);
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 0.8rem;
	opacity: 0;
	transition: opacity 0.2s, background 0.2s;
}

.newspaper-hero:hover .hero-share-btn {
	opacity: 1;
}

.newspaper-hero .hero-share-btn:hover {
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
}

/* ---- COLUMN CARD ROWS ---- */
.newspaper-cards-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

.newspaper-cards-row-4 {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
}

.newspaper-cards-row-2 {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
}

/* Individual column card */
.newspaper-card {
	display: flex;
	flex-direction: column;
	background: var(--card-bg);
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid var(--border-color);
	transition: box-shadow 0.2s ease;
	cursor: pointer;
	position: relative;
}

.newspaper-card:hover {
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.newspaper-card .np-image {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.newspaper-card:hover .np-image {
	transform: scale(1.03);
}

.newspaper-card .np-image-wrapper {
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--border-color);
	flex-shrink: 0;
}

.newspaper-card .np-image-placeholder {
	width: 100%;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.newspaper-card .np-body {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	padding: 1rem;
	flex: 1;
}

.newspaper-card .np-title {
	font-family: 'DM Sans', sans-serif;
	font-size: 1rem;
	font-weight: 700;
	color: var(--primary-blue);
	line-height: 1.35;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.2s;
}

.newspaper-card:hover .np-title {
	color: var(--primary-red);
}

.newspaper-card .np-sources {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-top: auto;
}

.newspaper-card .np-sources .sources-label {
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-muted);
}

.newspaper-card .np-sources .source-link {
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--accent-blue);
	text-decoration: none;
	background: rgba(0, 102, 204, 0.07);
	padding: 0.15rem 0.45rem;
	border-radius: 3px;
	transition: background 0.15s;
}

.newspaper-card .np-sources .source-link:hover {
	background: rgba(0, 102, 204, 0.16);
}

/* Share button — appears on card hover */
.newspaper-card .np-share-btn {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	background: rgba(0, 0, 0, 0.45);
	border: none;
	color: #fff;
	width: 1.8rem;
	height: 1.8rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 0.75rem;
	opacity: 0;
	transition: opacity 0.2s, background 0.2s;
}

.newspaper-card:hover .np-share-btn {
	opacity: 1;
}

.newspaper-card .np-share-btn:hover {
	background: rgba(0, 0, 0, 0.7);
}

/* URL-changed badge in card */
.newspaper-card .url-changed-badge {
	color: var(--primary-red);
	cursor: pointer;
	font-size: 0.75rem;
}

/* Show-more button spans full width */
.news-grid.newspaper-view .show-more-container {
	width: 100%;
}

/* Highlight states */
.newspaper-hero.article-highlighted,
.newspaper-card.article-highlighted {
	outline: 3px solid #FFD700;
}

.newspaper-hero.article-highlighted-animating,
.newspaper-card.article-highlighted-animating {
	animation: highlightPulse 2s ease-in-out infinite;
}

.newspaper-hero.article-highlighted-fadeout,
.newspaper-card.article-highlighted-fadeout {
	animation: highlightFadeOut 1s ease-out forwards;
}

/* ---- RESPONSIVE ---- */

/* Tablet: 2 columns */
@media (max-width: 1024px) {
	.newspaper-cards-row,
	.newspaper-cards-row-4,
	.newspaper-cards-row-2 {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile: single column */
@media (max-width: 768px) {
	.news-grid.newspaper-view {
		max-width: 1000px;
	}

	.newspaper-hero {
		height: 280px;
		border-radius: 0;
	}

	.newspaper-hero .hero-title {
		font-size: 1.35rem;
	}

	.newspaper-hero .hero-body {
		padding: 1.25rem 1rem 1rem;
	}

	.newspaper-cards-row,
	.newspaper-cards-row-4,
	.newspaper-cards-row-2 {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
}
