/* ==============================================================
   RunWeb — Blog & Single Post Styles
   Inherits the full design system from styles.css
============================================================== */

/* ============================================
   Blog page hero banner
============================================ */
.blog-hero {
	background: linear-gradient(135deg, var(--primary-deep) 0%, #1a0635 60%, var(--ink) 100%);
	padding: clamp(100px, 14vw, 160px) var(--pad-x) clamp(60px, 8vw, 100px);
	text-align: center;
	position: relative;
	overflow: hidden;
}
.blog-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(129, 97, 255, .35), transparent 70%);
	pointer-events: none;
}
.blog-hero__label {
	display: inline-block;
	font-family: var(--sans);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--primary-soft);
	background: rgba(129, 97, 255, .15);
	border: 1px solid rgba(129, 97, 255, .3);
	border-radius: var(--r-pill);
	padding: 6px 16px;
	margin-bottom: 20px;
}
.blog-hero h1 {
	font-family: var(--sans);
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 800;
	color: var(--paper);
	margin: 0 0 16px;
	line-height: 1.1;
}
.blog-hero h1 em {
	font-family: var(--serif);
	font-style: italic;
	color: var(--primary-soft);
}
.blog-hero p {
	color: rgba(244, 240, 255, .7);
	font-size: clamp(1rem, 1.8vw, 1.15rem);
	max-width: 540px;
	margin: 0 auto;
}

/* ============================================
   Blog layout wrapper
============================================ */
.blog-wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding: clamp(40px, 6vw, 80px) var(--pad-x);
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 60px;
	align-items: start;
}
@media (max-width: 900px) {
	.blog-wrap { grid-template-columns: 1fr; }
	.blog-sidebar { order: 2; }
}

/* ============================================
   Post cards grid
============================================ */
.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 28px;
}
.post-card {
	background: var(--paper-pure);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	overflow: hidden;
	transition: box-shadow .25s ease, transform .25s ease;
	display: flex;
	flex-direction: column;
}
.post-card:hover {
	box-shadow: var(--shadow-lift);
	transform: translateY(-4px);
}
.post-card__thumb {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--paper);
}
.post-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}
.post-card:hover .post-card__thumb img { transform: scale(1.05); }

.post-card__thumb-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--paper) 0%, rgba(129,97,255,.1) 100%);
}
.post-card__thumb-placeholder svg { opacity: .3; }

.post-card__body {
	padding: 24px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.post-card__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.post-card__cat {
	font-family: var(--sans);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--primary);
	background: rgba(129,97,255,.1);
	border-radius: var(--r-pill);
	padding: 4px 10px;
}
.post-card__date {
	font-size: 12px;
	color: var(--muted);
}
.post-card__title {
	font-family: var(--sans);
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--ink);
	line-height: 1.35;
	margin: 0;
}
.post-card__title a { color: inherit; }
.post-card__title a:hover { color: var(--primary); }
.post-card__excerpt {
	font-size: .9rem;
	color: var(--muted);
	line-height: 1.6;
	flex: 1;
}
.post-card__readmore {
	font-family: var(--sans);
	font-size: .85rem;
	font-weight: 600;
	color: var(--primary);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
}
.post-card__readmore:hover { gap: 10px; }

/* Pagination */
.blog-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
	flex-wrap: wrap;
}
.blog-pagination a,
.blog-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 14px;
	border-radius: var(--r-pill);
	font-family: var(--sans);
	font-size: .875rem;
	font-weight: 500;
	border: 1px solid var(--line);
	background: var(--paper-pure);
	color: var(--ink-2);
	transition: all .2s ease;
}
.blog-pagination a:hover,
.blog-pagination .current {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}

/* ============================================
   Sidebar
============================================ */
.blog-sidebar {
	position: sticky;
	top: 90px;
}
.widget {
	background: var(--paper-pure);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	padding: 24px;
	margin-bottom: 24px;
}
.widget__title {
	font-family: var(--sans);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--line);
}
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget ul li + li { margin-top: 10px; }
.widget ul li a {
	font-size: .9rem;
	color: var(--ink-2);
	display: flex;
	align-items: center;
	gap: 8px;
}
.widget ul li a:hover { color: var(--primary); }

/* Sidebar CTA */
.sidebar-cta {
	background: linear-gradient(135deg, var(--primary-deep), #3d1580);
	border: none;
	color: #fff;
	text-align: center;
}
.sidebar-cta p {
	font-size: .9rem;
	opacity: .8;
	margin: 8px 0 20px;
	line-height: 1.5;
}

/* ============================================
   Single post
============================================ */
.single-wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--pad-x) clamp(60px, 8vw, 100px);
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 60px;
	align-items: start;
}
@media (max-width: 900px) {
	.single-wrap { grid-template-columns: 1fr; }
}

/* Post header */
.post-hero {
	background: linear-gradient(160deg, var(--primary-deep) 0%, #1e0840 100%);
	padding: clamp(100px, 14vw, 160px) var(--pad-x) 0;
	position: relative;
	overflow: hidden;
}
.post-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(129, 97, 255, .3), transparent 70%);
	pointer-events: none;
}
.post-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 820px;
	margin: 0 auto;
	padding-bottom: 48px;
}
.post-hero__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}
.post-hero__cat {
	font-family: var(--sans);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--primary-soft);
	background: rgba(129, 97, 255, .2);
	border: 1px solid rgba(129, 97, 255, .35);
	border-radius: var(--r-pill);
	padding: 5px 14px;
}
.post-hero__title {
	font-family: var(--sans);
	font-size: clamp(1.8rem, 4.5vw, 3rem);
	font-weight: 800;
	color: var(--paper);
	line-height: 1.1;
	margin: 0 0 24px;
}
.post-hero__title em {
	font-family: var(--serif);
	font-style: italic;
	color: var(--primary-soft);
}
.post-hero__meta {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	font-size: .875rem;
	color: rgba(244, 240, 255, .6);
}
.post-hero__meta strong { color: rgba(244, 240, 255, .9); }
.post-hero__meta .sep { opacity: .3; }
.post-hero__thumb {
	margin-top: 40px;
	border-radius: var(--r-lg) var(--r-lg) 0 0;
	overflow: hidden;
	aspect-ratio: 16 / 7;
}
.post-hero__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Post content */
.post-content {
	padding-top: 48px;
}
.post-content__body {
	font-family: var(--body);
	font-size: clamp(1rem, 1.5vw, 1.1rem);
	line-height: 1.8;
	color: var(--ink-2);
}
.post-content__body h2,
.post-content__body h3,
.post-content__body h4 {
	font-family: var(--sans);
	font-weight: 800;
	color: var(--ink);
	margin: 2em 0 .75em;
	line-height: 1.2;
}
.post-content__body h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
.post-content__body h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
.post-content__body h4 { font-size: 1.1rem; }
.post-content__body p { margin: 0 0 1.4em; }
.post-content__body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.post-content__body a:hover { color: var(--primary-deep); }
.post-content__body ul,
.post-content__body ol {
	padding-left: 1.5em;
	margin: 0 0 1.4em;
}
.post-content__body li { margin-bottom: .5em; }
.post-content__body blockquote {
	margin: 2em 0;
	padding: 24px 28px;
	border-left: 3px solid var(--primary);
	background: rgba(129, 97, 255, .06);
	border-radius: 0 var(--r-md) var(--r-md) 0;
	font-style: italic;
	color: var(--ink);
	font-size: 1.05em;
}
.post-content__body blockquote p { margin: 0; }
.post-content__body img {
	border-radius: var(--r-md);
	max-width: 100%;
	height: auto;
}
.post-content__body pre {
	background: var(--ink);
	color: var(--paper);
	padding: 20px 24px;
	border-radius: var(--r-md);
	overflow-x: auto;
	font-size: .875rem;
	line-height: 1.6;
	margin: 0 0 1.4em;
}
.post-content__body code {
	font-size: .9em;
	background: rgba(129,97,255,.1);
	color: var(--primary-deep);
	padding: 2px 7px;
	border-radius: 5px;
}
.post-content__body pre code {
	background: none;
	color: inherit;
	padding: 0;
	border-radius: 0;
}

/* Post tags */
.post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 40px;
	padding-top: 32px;
	border-top: 1px solid var(--line);
}
.post-tags__label {
	font-family: var(--sans);
	font-size: .8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--muted);
	display: flex;
	align-items: center;
	margin-right: 4px;
}
.post-tag {
	font-family: var(--sans);
	font-size: .8rem;
	font-weight: 500;
	background: var(--paper);
	border: 1px solid var(--line);
	color: var(--ink-2);
	border-radius: var(--r-pill);
	padding: 5px 14px;
	transition: all .2s;
}
.post-tag:hover {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}

/* Author box */
.post-author {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	padding: 28px;
	background: var(--paper-pure);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	margin-top: 40px;
}
.post-author__avatar img {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}
.post-author__info h4 {
	font-family: var(--sans);
	font-size: .9rem;
	font-weight: 700;
	color: var(--ink);
	margin: 0 0 4px;
}
.post-author__info p {
	font-size: .875rem;
	color: var(--muted);
	margin: 0;
	line-height: 1.5;
}

/* Related posts */
.related-posts {
	margin-top: 60px;
	padding-top: 40px;
	border-top: 1px solid var(--line);
}
.related-posts h3 {
	font-family: var(--sans);
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 28px;
	color: var(--ink);
}
.related-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
}

/* Comments */
.comments-area {
	margin-top: 60px;
	padding-top: 40px;
	border-top: 1px solid var(--line);
}
.comments-title {
	font-family: var(--sans);
	font-size: 1.2rem;
	font-weight: 800;
	color: var(--ink);
	margin: 0 0 28px;
}
.comment-list {
	list-style: none;
	padding: 0;
	margin: 0 0 40px;
}
.comment {
	padding: 20px 0;
	border-bottom: 1px solid var(--line);
}
.comment:last-child { border-bottom: none; }
.comment-author { font-weight: 700; color: var(--ink); font-size: .9rem; }
.comment-metadata { font-size: .8rem; color: var(--muted); margin: 2px 0 10px; }
.comment-body p { font-size: .9rem; color: var(--ink-2); margin: 0; line-height: 1.6; }

/* Comment form */
.comment-form input,
.comment-form textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	background: var(--paper-pure);
	font-family: var(--body);
	font-size: .9rem;
	color: var(--ink);
	margin-bottom: 16px;
	transition: border-color .2s;
	-webkit-appearance: none;
}
.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(129,97,255,.12);
}
.comment-form textarea { height: 140px; resize: vertical; }
.comment-form label {
	display: block;
	font-family: var(--sans);
	font-size: .8rem;
	font-weight: 600;
	color: var(--muted);
	margin-bottom: 6px;
}
.comment-form .submit {
	background: var(--primary);
	color: #fff;
	border: none;
	padding: 14px 32px;
	border-radius: var(--r-pill);
	font-family: var(--sans);
	font-size: .9rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .2s;
}
.comment-form .submit:hover { opacity: .88; }

/* No posts notice */
.no-posts {
	text-align: center;
	padding: 80px 20px;
	color: var(--muted);
}
.no-posts h2 { font-family: var(--sans); font-size: 1.5rem; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
