/**
 * Improved Blog Post Styles
 */

.iblog-article {
	max-width: 1060px;
	margin: 0 auto;
	padding: 2rem 1.5rem 4rem;
}

.iblog-header {
	max-width: 680px;
	margin-bottom: 2rem;
}

.iblog-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
}

.iblog-badge {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 3px 12px;
	border-radius: 6px;
	text-decoration: none;
	transition: opacity 0.2s;
}

.iblog-badge:hover {
	opacity: 0.8;
}

.iblog-title {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 12px;
	color: #111;
}

.iblog-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.82rem;
	color: #888;
}

.iblog-meta__sep {
	color: #ccc;
}

.iblog-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 200px;
	gap: 3rem;
	align-items: start;
}

@media (max-width: 860px) {
	.iblog-layout {
		grid-template-columns: 1fr;
	}

	.iblog-sidebar {
		order: -1;
		margin-bottom: 1rem;
	}

	.iblog-sidebar__sticky {
		position: static !important;
	}
}

.iblog-featured-img {
	margin: 0 0 2rem;
}

.iblog-featured-img__img {
	width: 100%;
	height: auto;
	border-radius: 10px;
	display: block;
}

.iblog-featured-img__caption {
	font-size: 0.8rem;
	color: #999;
	margin-top: 8px;
	text-align: center;
}

.iblog-body {
	font-size: 1.05rem;
	line-height: 1.78;
	color: #333;
}

.iblog-body p {
	margin: 0 0 1.35rem;
}

.iblog-body h2 {
	font-size: 1.45rem;
	font-weight: 650;
	margin: 2.5rem 0 0.75rem;
	color: #111;
	scroll-margin-top: 100px;
}

.iblog-body h3 {
	font-size: 1.15rem;
	font-weight: 600;
	margin: 2rem 0 0.6rem;
	color: #222;
}

.iblog-body a {
	color: #185FA5;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color 0.2s;
}

.iblog-body a:hover {
	color: #0C447C;
}

.iblog-body blockquote {
	border-left: 3px solid #ccc;
	margin: 1.75rem 0;
	padding: 0.75rem 1.15rem;
	border-radius: 0;
	font-style: italic;
	color: #666;
	line-height: 1.65;
}

.iblog-body blockquote p:last-child {
	margin-bottom: 0;
}

.iblog-body img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	margin: 1.5rem 0;
}

.iblog-body ul,
.iblog-body ol {
	padding-left: 1.5rem;
	margin: 0 0 1.35rem;
}

.iblog-body li {
	margin-bottom: 0.4rem;
}

.iblog-body pre {
	background: #f5f5f5;
	border-radius: 8px;
	padding: 1rem 1.25rem;
	overflow-x: auto;
	font-size: 0.88rem;
	line-height: 1.55;
	margin: 1.5rem 0;
}

.iblog-body code {
	font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
	font-size: 0.88em;
	background: #f5f5f5;
	padding: 2px 6px;
	border-radius: 4px;
}

.iblog-body pre code {
	background: none;
	padding: 0;
}

.iblog-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	border-top: 1px solid #eee;
	padding-top: 1.75rem;
	margin-top: 2.5rem;
}

.iblog-tags__label {
	font-size: 0.82rem;
	color: #999;
}

.iblog-tag {
	font-size: 0.75rem;
	padding: 3px 12px;
	border-radius: 6px;
	border: 1px solid #e5e5e5;
	color: #666;
	text-decoration: none;
	transition: border-color 0.2s, color 0.2s;
}

.iblog-tag:hover {
	border-color: #111;
	color: #111;
}

.iblog-post-nav {
	display: flex;
	gap: 1rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #eee;
}

.iblog-post-nav__link {
	flex: 1;
	text-decoration: none;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	border: 1px solid #eee;
	transition: border-color 0.2s;
}

.iblog-post-nav__link:hover {
	border-color: #ccc;
}

.iblog-post-nav__link--next {
	text-align: right;
}

.iblog-post-nav__dir {
	display: block;
	font-size: 0.75rem;
	color: #999;
	margin-bottom: 4px;
}

.iblog-post-nav__title {
	display: block;
	font-size: 0.88rem;
	font-weight: 500;
	color: #333;
	line-height: 1.35;
}

.iblog-sidebar__sticky {
	position: sticky;
	top: 2rem;
}

.iblog-sidebar__heading {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 1.3px;
	color: #aaa;
	margin: 0 0 10px;
	font-weight: 600;
}

.iblog-toc {
	margin-bottom: 2rem;
}

.iblog-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.iblog-toc__link {
	font-size: 0.82rem;
	color: #888;
	text-decoration: none;
	transition: color 0.2s;
	line-height: 1.4;
	display: block;
}

.iblog-toc__link:hover {
	color: #333;
}

.iblog-toc__link--active {
	color: #185FA5;
	font-weight: 500;
}

.iblog-related__list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.iblog-related__card {
	text-decoration: none;
	display: block;
}

.iblog-related__card:hover .iblog-related__title {
	color: #111;
}

.iblog-related__thumb {
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 10;
	border-radius: 6px;
	overflow: hidden;
	background: #f3f3f3;
	margin-bottom: 6px;
}

.iblog-related__thumb--empty {
	display: block;
}

.iblog-related__img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: cover;
	display: block;
}

.iblog-related__title {
	font-size: 0.82rem;
	font-weight: 550;
	color: #333;
	margin: 0 0 2px;
	line-height: 1.35;
	transition: color 0.2s;
}

.iblog-related__time {
	font-size: 0.72rem;
	color: #aaa;
}

.iblog-comments {
	margin-top: 2.5rem;
	border-top: 1px solid #eee;
	padding-top: 2rem;
}

.iblog-comments__title {
	font-size: 1.1rem;
	font-weight: 600;
	margin: 0 0 1.25rem;
	color: #111;
}

.iblog-comment-list {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
}

.iblog-comment {
	margin-bottom: 1rem;
}

.iblog-comment .children {
	list-style: none;
	padding-left: 48px;
	margin: 0;
}

.iblog-comment__inner {
	display: flex;
	gap: 12px;
}

.iblog-comment__avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8rem;
	font-weight: 600;
	flex-shrink: 0;
	line-height: 1;
}

.iblog-comment__body {
	flex: 1;
	min-width: 0;
}

.iblog-comment__header {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 4px;
}

.iblog-comment__author {
	font-size: 0.88rem;
	font-weight: 550;
	color: #222;
}

.iblog-comment__date {
	font-size: 0.75rem;
	color: #bbb;
}

.iblog-comment__text {
	font-size: 0.88rem;
	color: #555;
	line-height: 1.6;
}

.iblog-comment__text p {
	margin: 0;
}

.iblog-comment__reply {
	margin-top: 4px;
}

.iblog-comment__reply a {
	font-size: 0.75rem;
	color: #999;
	text-decoration: none;
}

.iblog-comment__reply a:hover {
	color: #111;
}

.iblog-comment-form-wrap {
	background: #f8f8f8;
	border-radius: 10px;
	padding: 1.25rem;
	margin-top: 1.5rem;
}

.iblog-comment-field textarea,
.iblog-comment-field input {
	width: 100%;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 0.88rem;
	background: #fff;
	color: #333;
	transition: border-color 0.2s;
	box-sizing: border-box;
	resize: vertical;
}

.iblog-comment-field textarea:focus,
.iblog-comment-field input:focus {
	outline: none;
	border-color: #111;
}

.iblog-comment-fields-row {
	display: flex;
	gap: 10px;
	margin-bottom: 10px;
}

.iblog-comment-field--half {
	flex: 1;
}

.iblog-comment-field {
	margin-bottom: 10px;
}

.iblog-comment-submit {
	display: inline-block;
	padding: 8px 22px;
	font-size: 0.82rem;
	font-weight: 600;
	background: #111;
	color: #fff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s, transform 0.15s;
	margin-top: 4px;
}

.iblog-comment-submit:hover {
	background: #333;
}

.iblog-comment-submit:active {
	transform: scale(0.98);
}

.iblog-comment-form-wrap .comment-form {
	margin: 0;
	padding: 0;
}

.iblog-comment-form-wrap .comment-form > p.form-submit {
	margin: 0;
	text-align: right;
}

.iblog-comment-form-wrap .logged-in-as {
	font-size: 0.8rem;
	color: #999;
	margin-bottom: 10px;
}

.iblog-comment-form-wrap .logged-in-as a {
	color: #666;
}