/* Blog page — shared + device-scoped styles. */

/* Page banner — same treatment as the lucky draw / slot lobby heroes: full-bleed
   artwork that keeps its own 2055x765 proportions. */
.blog-banner {
	position: relative;
	aspect-ratio: var(--banner-ratio);
	aspect-ratio: 2055 / 765; /* TEMP: matches current art; delete once blog.png is 1920×600 */
	max-width: none;
	margin: 0 var(--shell-bleed) 1.75rem;
	overflow: hidden;
	background-size: cover;
	background-position: center;
	box-shadow: var(--shadow-lg);
}

/* Bottom fade — dissolves the artwork's base into the page */
.blog-banner::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 87%, var(--bg-base) 100%);
	pointer-events: none;
}

.blog-banner-glow {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 60% 70% at 50% 100%, rgba(var(--gold-rgb), 0.22) 0%, transparent 60%);
	pointer-events: none;
}

.d-main .blog-page {
	padding-top: 0;
}

.main-scroll .blog-banner {
	margin: 0.875rem var(--shell-bleed) 1.25rem;
}

.blog-card {
	background: var(--bg-card);
	border-radius: 0.75rem;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	cursor: pointer;
	color: inherit;
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* clips the hover zoom so the scaled image never spills over the card body */
.blog-card-media {
	overflow: hidden;
}

.blog-card-img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	background: #1a1a2e;
	display: block;
	transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.blog-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.blog-card-date {
	color: var(--text-secondary);
	font-weight: 500;
}

.blog-card-title {
	font-weight: 700;
	color: var(--text-primary);
	line-height: 1.35;
	flex: 1;
}

.blog-card-read {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-weight: 600;
	color: var(--gold-text);
	text-decoration: none;
}

@media (hover: hover) {
	.blog-card:hover {
		transform: translateY(-0.25rem);
		box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.35);
	}

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

	.blog-card:hover .blog-card-read {
		text-decoration: underline;
	}
}

.blog-card:active {
	transform: translateY(0);
}

.blog-popular-item {
	display: flex;
	gap: 0.625rem;
	align-items: flex-start;
	padding: 0.625rem 0;
	border-bottom: 0.0625rem solid var(--border);
	cursor: pointer;
	color: inherit;
}

.blog-popular-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.blog-popular-thumb {
	width: 3.5rem;
	height: 3.5rem;
	object-fit: cover;
	border-radius: 0.375rem;
	background: #1a1a2e;
	flex-shrink: 0;
}

.blog-popular-title {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text-primary);
	line-height: 1.35;
	transition: color 0.2s;
}

@media (hover: hover) {
	.blog-popular-item:hover .blog-popular-title {
		color: var(--gold-text);
	}
}

/* DESKTOP */

.d-main .blog-heading {
	font-size: 2rem;
	font-weight: 800;
	color: var(--text-primary);
	margin: 0 0 1.25rem;
}

.d-main .blog-filters {
	margin-bottom: 1.5rem;
}

.d-main .blog-layout {
	display: grid;
	grid-template-columns: 1fr 14rem;
	gap: 1.5rem;
	align-items: start;
}

.d-main .blog-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
}

.d-main .blog-card-body {
	padding: 0.875rem;
	gap: 0.375rem;
}

.d-main .blog-card-date {
	font-size: 0.6875rem;
}

.d-main .blog-card-title {
	font-size: 0.9375rem;
}

.d-main .blog-card-read {
	margin-top: 0.75rem;
	font-size: 0.8125rem;
}

.d-main .blog-sidebar {
	background: var(--bg-card);
	border-radius: 0.75rem;
	padding: 1rem;
}

.d-main .blog-sidebar-heading {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--text-primary);
	border-left: 0.25rem solid var(--gold);
	padding-left: 0.625rem;
	line-height: 1.3;
	margin-bottom: 1rem;
}

/* MOBILE */

.main-scroll .blog-heading {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--text-primary);
	margin: 1rem 1rem 0.875rem;
}

.main-scroll .blog-filters {
	margin: 0 1rem 1rem;
}

.main-scroll .blog-grid {
	display: grid;
	/* auto-fill/auto-fit: adapts continuously instead of snapping at a
	   breakpoint, so split-view and Stage Manager widths are covered too.
	   Minimum sized against this grid's real container so a phone keeps the
	   column count it renders today. */
	grid-template-columns: repeat(auto-fill, minmax(clamp(9.5rem, 33vw, 19rem), 1fr));
	gap: 0.75rem;
	padding: 0 1rem;
}

.main-scroll .blog-card-body {
	padding: 0.625rem;
	gap: 0.25rem;
}

.main-scroll .blog-card-date {
	font-size: 0.625rem;
}

.main-scroll .blog-card-title {
	font-size: 0.8125rem;
}

.main-scroll .blog-card-read {
	margin-top: 0.625rem;
	font-size: 0.75rem;
}

.main-scroll .blog-popular {
	margin: 1.25rem 1rem 0;
	background: var(--bg-card);
	border-radius: 0.75rem;
	padding: 1rem;
}

.main-scroll .blog-popular-heading {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--text-primary);
	border-left: 0.25rem solid var(--gold);
	padding-left: 0.625rem;
	line-height: 1.3;
	margin-bottom: 0.875rem;
}

/* DETAIL — single centered column, mirrors the source page_blog_detail_view. */

.blog-detail {
	max-width: 56.25rem;
	margin: 0 auto;
	padding-bottom: 2.5rem;
}

.blog-detail-hero {
	text-align: center;
	padding-bottom: 1.5rem;
	margin-bottom: 1.75rem;
	border-bottom: 0.0625rem solid var(--border);
}

.blog-detail-title {
	font-weight: 800;
	color: var(--gold-text);
	line-height: 1.2;
	margin: 0;
}

.blog-detail-meta {
	margin-top: 0.75rem;
	font-size: 0.875rem;
	color: var(--text-secondary);
}

.blog-detail-banner {
	width: 100%;
	height: auto;
	border-radius: 0.75rem;
	margin-bottom: 1.75rem;
	box-shadow: var(--shadow-lg);
	display: block;
}

.blog-detail-content {
	color: var(--text-secondary);
	line-height: 1.9;
	word-wrap: break-word;
}

.blog-detail-content img {
	display: inline-block; /* allow editor center/float alignment (base.css forces block) */
	max-width: 100%;
	height: auto;
	border-radius: 0.5rem;
}

.blog-detail-content h1,
.blog-detail-content h2,
.blog-detail-content h3 {
	color: var(--text-primary);
	margin: 1.5rem 0 0.75rem;
	line-height: 1.3;
}

.blog-detail-content p {
	margin: 0 0 1.125rem;
}

.blog-detail-content a {
	color: var(--gold-text);
	text-decoration: underline;
}

.blog-detail-content ul,
.blog-detail-content ol {
	margin: 0 0 1.125rem 1.25rem;
}

/* base.css resets ul to list-style:none globally — re-enable markers here */
.blog-detail-content ul { list-style: disc; }
.blog-detail-content ol { list-style: decimal; }

.blog-detail-content li {
	margin-bottom: 0.5rem;
}

.blog-detail-content h4,
.blog-detail-content h5,
.blog-detail-content h6 {
	color: var(--text-primary);
	margin: 1.25rem 0 0.5rem;
	line-height: 1.3;
}

.blog-detail-content blockquote {
	margin: 0 0 1.125rem;
	padding: 0.75rem 1rem;
	border-left: 0.1875rem solid var(--gold);
	background: rgba(255, 255, 255, 0.03);
}

.blog-detail-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.125rem;
}

.blog-detail-content th,
.blog-detail-content td {
	border: 0.0625rem solid rgba(255, 255, 255, 0.12);
	padding: 0.5rem 0.75rem;
	text-align: left;
}

.blog-detail-back {
	margin-top: 2.5rem;
	text-align: center;
}

/* DETAIL — desktop sizing */

.d-main .blog-detail-title {
	font-size: 2.25rem;
}

.d-main .blog-detail-content {
	font-size: 1rem;
}

/* DETAIL — mobile sizing */

.main-scroll .blog-detail {
	padding: 1rem 1rem 2.5rem;
}

.main-scroll .blog-detail-title {
	font-size: 1.5rem;
}

.main-scroll .blog-detail-content {
	font-size: 0.9375rem;
}

/* Full-width shell — hold the article to a readable measure. The card grid
   above is deliberately left full-width; only prose needs the limit. */
@media (min-width: 48rem) {
	.main-scroll .blog-detail {
		max-width: 44rem;
		margin-left: auto;
		margin-right: auto;
	}
}


/* Type was sized against a 430px column and a ~170px card. The cards are now
   250-380px wide on a tablet, so the same values read as undersized. One step
   at 48rem keeps them in proportion; phones are untouched. */
@media (min-width: 48rem) {
	.main-scroll .blog-card-title { font-size: 0.9375rem; }
	.main-scroll .blog-heading    { font-size: 1.75rem; }
}
