/* Pulptastic Magazine Home (template-magazine.php) — mobile-first */

.pulp-mag {
	padding: 24px 0 0;
}

.pulp-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ---------- Cards ---------- */

.pulp-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 6px 18px -8px rgba(15, 23, 42, 0.12);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pulp-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08), 0 18px 36px -12px rgba(15, 23, 42, 0.22);
}

.pulp-card-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #0f172a;
}

.pulp-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}

.pulp-card:hover .pulp-card-media img {
	transform: scale(1.06);
}

.pulp-thumb-fallback {
	display: block;
	width: 100%;
	height: 100%;
}

/* Chip sits top-right: generated featured cards carry their own chip top-left. */
.pulp-chip {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	padding: 6px 11px;
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	pointer-events: none;
}

.pulp-card-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.pulp-card-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
}

.pulp-card-title a {
	color: #111827;
	text-decoration: none;
}

.pulp-card-title a:hover {
	color: #2563eb;
}

.pulp-meta {
	display: block;
	margin-top: auto;
	padding-top: 8px;
	font-size: 12px;
	font-weight: 500;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ---------- Hero ---------- */

.pulp-hero {
	margin-bottom: 40px;
}

.pulp-hero-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
}

.pulp-hero-lead .pulp-card-title {
	font-size: clamp(1.35rem, 4.5vw, 2rem);
	line-height: 1.2;
}

.pulp-hero-lead .pulp-card-body {
	padding: 18px 20px 20px;
}

@media (min-width: 720px) {
	.pulp-hero-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.pulp-hero-lead {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1024px) {
	.pulp-hero-grid {
		grid-template-columns: 1.6fr 1fr 1fr;
	}

	.pulp-hero-lead {
		grid-column: auto;
		grid-row: span 2;
	}

	.pulp-hero-lead .pulp-card-media {
		aspect-ratio: auto;
		flex: 1;
		min-height: 320px;
	}

	.pulp-hero-lead .pulp-card-media img {
		position: absolute;
		inset: 0;
	}
}

/* ---------- Section headers ---------- */

.pulp-section,
.pulp-trending {
	margin-bottom: 44px;
}

.pulp-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
	border-bottom: 2px solid #e5e7eb;
	padding-bottom: 10px;
}

.pulp-section-title {
	position: relative;
	margin: 0;
	font-size: 21px;
	font-weight: 800;
	letter-spacing: -0.01em;
	padding-left: 14px;
}

.pulp-section-title::before {
	content: "";
	position: absolute;
	left: 0;
	top: 3px;
	bottom: 3px;
	width: 5px;
	border-radius: 3px;
	background: linear-gradient(180deg, #0f2027, #2c5364);
}

.pulp-section-title a {
	color: #111827;
	text-decoration: none;
}

.pulp-section-title a:hover {
	color: #2563eb;
}

.pulp-section-more {
	font-size: 13px;
	font-weight: 600;
	color: #6b7280;
	text-decoration: none;
	white-space: nowrap;
}

.pulp-section-more:hover {
	color: #111827;
}

/* Per-section accent bars (brand gradients). */
.pulp-section--news .pulp-section-title::before          { background: linear-gradient(180deg, #0f2027, #2c5364); }
.pulp-section--entertainment .pulp-section-title::before { background: linear-gradient(180deg, #41295a, #2f0743); }
.pulp-section--lifestyle .pulp-section-title::before     { background: linear-gradient(180deg, #ff5f6d, #ffc371); }
.pulp-section--science-tech .pulp-section-title::before  { background: linear-gradient(180deg, #000428, #004e92); }
.pulp-section--animals .pulp-section-title::before       { background: linear-gradient(180deg, #134e4a, #65a30d); }
.pulp-section--weird .pulp-section-title::before         { background: linear-gradient(180deg, #7b4397, #dc2430); }
.pulp-section--sports .pulp-section-title::before        { background: linear-gradient(180deg, #1d2b64, #f8cd4a); }
.pulp-section--travel .pulp-section-title::before        { background: linear-gradient(180deg, #159957, #155799); }

.pulp-section-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
}

@media (min-width: 640px) {
	.pulp-section-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.pulp-section-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ---------- Trending ---------- */

.pulp-trending-dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	margin-right: 8px;
	border-radius: 50%;
	background: #dc2430;
	animation: pulp-pulse 1.6s ease-in-out infinite;
}

@keyframes pulp-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50%      { opacity: 0.45; transform: scale(0.8); }
}

.pulp-trending-scroller {
	position: relative;
}

.pulp-trending-row {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 4px;

	/* Hidden scrollbar, all browsers, all viewports */
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* legacy Edge/IE */

	/* Soft edge fade hints at overflowing cards */
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}

.pulp-trending-row::-webkit-scrollbar {
	display: none; /* Chrome/Safari/Edge */
}

/* Prev/next affordance arrows (desktop, fine pointers only) */
.pulp-trend-arrow {
	position: absolute;
	top: 42px; /* vertically centered on the 16/9 thumbs */
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(17, 24, 39, 0.72);
	color: #fff;
	cursor: pointer;
	opacity: 0;
	transform: translateY(-50%) scale(0.85);
	transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
	backdrop-filter: blur(4px);
}

.pulp-trend-prev { left: 6px; }
.pulp-trend-next { right: 6px; }

.pulp-trending:hover .pulp-trend-arrow,
.pulp-trending:focus-within .pulp-trend-arrow {
	opacity: 1;
	transform: translateY(-50%) scale(1);
}

.pulp-trend-arrow:hover {
	background: rgba(17, 24, 39, 0.92);
}

@media (hover: none), (max-width: 719.98px) {
	.pulp-trend-arrow {
		display: none;
	}
}

.pulp-trending-item {
	flex: 0 0 210px;
	scroll-snap-align: start;
}

.pulp-trending-thumb {
	display: block;
	aspect-ratio: 16 / 9;
	border-radius: 10px;
	overflow: hidden;
	background: #0f172a;
}

.pulp-trending-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.pulp-trending-item:hover .pulp-trending-thumb img {
	transform: scale(1.07);
}

.pulp-trending-title {
	margin: 8px 0 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pulp-trending-title a {
	color: #1f2937;
	text-decoration: none;
}

.pulp-trending-title a:hover {
	color: #2563eb;
}

/* ---------- CTA band ---------- */

.pulp-cta-band {
	margin-top: 8px;
	background: linear-gradient(135deg, #0f2027, #2c5364);
	color: #fff;
}

.pulp-cta-inner {
	padding: 64px 20px;
	text-align: center;
}

.pulp-cta-title {
	margin: 0 0 10px;
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
}

.pulp-cta-text {
	margin: 0 auto 26px;
	max-width: 520px;
	font-size: 16px;
	color: rgba(255, 255, 255, 0.8);
}

.pulp-cta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
}

.pulp-btn {
	display: inline-block;
	padding: 13px 28px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	background: #fff;
	color: #0f2027;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pulp-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.5);
	color: #0f2027;
}

.pulp-btn-ghost {
	background: transparent;
	color: #fff;
	border: 2px solid rgba(255, 255, 255, 0.55);
}

.pulp-btn-ghost:hover {
	color: #fff;
	border-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
	.pulp-card,
	.pulp-card-media img,
	.pulp-trending-thumb img,
	.pulp-btn,
	.pulp-trending-dot,
	.pulp-trend-arrow {
		transition: none;
		animation: none;
	}
}
