/**
 * La-Kass Blog Styles
 *
 * Covers: blog header, post cards (grid/list/masonry),
 * single article, author box, share buttons, related posts,
 * post navigation, comments area.
 *
 * @package La-Kass
 * @since   1.0.0
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
	--lk-blog-header-bg: #f8f9fa;
	--lk-blog-header-text: #111;
	--lk-blog-card-bg: #fff;
	--lk-blog-cols: 3;
}

/* ==========================================================================
   Blog Header
   ========================================================================== */

.lk-blog-header {
	background: var(--lk-blog-header-bg);
	padding: 40px 0;
	margin-bottom: 40px;
}

.lk-blog-header__title {
	font-size: 28px;
	font-weight: 700;
	color: var(--lk-blog-header-text);
	margin: 0;
}

.lk-blog-header__title span {
	color: var(--lk-color-primary, #ff4d00);
}

.lk-blog-header__desc {
	font-size: 15px;
	color: #666;
	margin-top: 8px;
}

/* ==========================================================================
   Blog Posts Grid
   ========================================================================== */

.lk-blog-posts--grid,
.lk-blog-posts--masonry {
	display: grid;
	grid-template-columns: repeat(var(--lk-blog-cols, 3), 1fr);
	gap: 30px;
}

/* Masonry uses CSS columns as fallback for browsers without masonry grid */
.lk-blog-posts--masonry {
	display: block;
	column-count: var(--lk-blog-cols, 3);
	column-gap: 30px;
}

.lk-blog-posts--masonry .lk-post-card {
	break-inside: avoid;
	margin-bottom: 30px;
}

/* List layout */
.lk-blog-posts--list {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

/* ==========================================================================
   Post Card (Grid / Masonry)
   ========================================================================== */

.lk-post-card {
	background: var(--lk-blog-card-bg);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: transform 0.2s, box-shadow 0.2s;
}

.lk-post-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* Thumbnail */
.lk-post-card__thumb {
	display: block;
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 10;
}

.lk-post-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s;
}

.lk-post-card:hover .lk-post-card__thumb img {
	transform: scale(1.05);
}

/* Placeholder for posts without thumbnail */
.lk-post-card__thumb--placeholder {
	background: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ccc;
}

/* Category badge on thumbnail */
.lk-post-card__thumb .lk-entry__category-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 4px 10px;
	background: var(--lk-color-primary, #ff4d00);
	color: #fff;
	border-radius: 4px;
	text-decoration: none;
}

/* Body */
.lk-post-card__body {
	padding: 20px;
}

.lk-post-card__meta-top {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 12px;
	color: #888;
}

.lk-post-card__sep {
	color: #ccc;
}

.lk-reading-time {
	font-size: 12px;
	color: #888;
}

/* Title */
.lk-post-card__title {
	margin: 0 0 10px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
}

.lk-post-card__title a {
	color: #111;
	text-decoration: none;
	transition: color 0.2s;
}

.lk-post-card__title a:hover {
	color: var(--lk-color-primary, #ff4d00);
}

/* Excerpt */
.lk-post-card__excerpt {
	margin-bottom: 16px;
}

.lk-post-card__excerpt .lk-entry__excerpt {
	font-size: 14px;
	line-height: 1.6;
	color: #555;
	margin: 0;
}

/* Footer */
.lk-post-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 14px;
	border-top: 1px solid #f0f0f0;
}

.lk-post-card__author {
	display: flex;
	align-items: center;
	gap: 8px;
}

.lk-post-card__avatar {
	border-radius: 50%;
	width: 28px;
	height: 28px;
}

.lk-post-card__author-name {
	font-size: 13px;
	font-weight: 600;
	color: #333;
}

.lk-post-card__date {
	font-size: 12px;
	color: #999;
}

/* ==========================================================================
   Post Card — List Layout
   ========================================================================== */

.lk-post-card--list {
	display: flex;
	flex-direction: row;
	border-radius: 12px;
}

.lk-post-card--list .lk-post-card__thumb {
	width: 320px;
	flex-shrink: 0;
	aspect-ratio: auto;
}

.lk-post-card--list .lk-post-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 24px 28px;
}

.lk-post-card--list .lk-post-card__title {
	font-size: 20px;
}

.lk-post-card--list .lk-post-card__excerpt .lk-entry__excerpt {
	font-size: 15px;
}

/* ==========================================================================
   Single Article
   ========================================================================== */

.lk-article {
	max-width: 100%;
}

.lk-article__header {
	margin-bottom: 30px;
}

.lk-article__header .lk-entry__category-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 4px 12px;
	background: var(--lk-color-primary, #ff4d00);
	color: #fff;
	border-radius: 4px;
	text-decoration: none;
	margin-bottom: 14px;
}

.lk-article__title {
	font-size: 32px;
	font-weight: 800;
	line-height: 1.25;
	color: #111;
	margin: 0 0 18px;
}

.lk-article__meta {
	display: flex;
	align-items: center;
	gap: 16px;
}

.lk-article__author-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.lk-article__avatar {
	border-radius: 50%;
	width: 36px;
	height: 36px;
}

.lk-article__author-name {
	font-size: 14px;
	font-weight: 600;
	color: #333;
	text-decoration: none;
}

.lk-article__author-name:hover {
	color: var(--lk-color-primary, #ff4d00);
}

.lk-article__date-reading {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #888;
}

.lk-article__sep {
	color: #ccc;
}

/* Featured image */
.lk-article__featured-image {
	margin-bottom: 30px;
	border-radius: 12px;
	overflow: hidden;
}

.lk-article__featured-image img {
	width: 100%;
	height: auto;
	display: block;
}

/* Content */
.lk-article__content {
	font-size: 17px;
	line-height: 1.8;
	color: #333;
	margin-bottom: 30px;
}

.lk-article__content p {
	margin-bottom: 1.5em;
}

.lk-article__content h2 {
	font-size: 24px;
	font-weight: 700;
	margin: 2em 0 0.8em;
	color: #111;
}

.lk-article__content h3 {
	font-size: 20px;
	font-weight: 700;
	margin: 1.5em 0 0.6em;
	color: #111;
}

.lk-article__content blockquote {
	margin: 1.5em 0;
	padding: 20px 24px;
	border-left: 4px solid var(--lk-color-primary, #ff4d00);
	background: #f9f9f9;
	border-radius: 0 8px 8px 0;
	font-style: italic;
	color: #555;
}

.lk-article__content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.lk-article__content pre {
	background: #1e1e1e;
	color: #ddd;
	padding: 20px;
	border-radius: 8px;
	overflow-x: auto;
	font-size: 14px;
	line-height: 1.6;
}

.lk-article__content code {
	background: #f5f5f5;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.9em;
}

.lk-article__content pre code {
	background: none;
	padding: 0;
}

/* Page links */
.lk-page-links {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 16px 0;
	font-size: 14px;
}

.lk-page-links__label {
	font-weight: 600;
	margin-right: 4px;
}

.lk-page-links a,
.lk-page-links > span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
}

.lk-page-links a {
	background: #f0f0f0;
	color: #333;
}

.lk-page-links a:hover {
	background: var(--lk-color-primary, #ff4d00);
	color: #fff;
}

.lk-page-links > span:not(.lk-page-links__label) {
	background: var(--lk-color-primary, #ff4d00);
	color: #fff;
}

/* ==========================================================================
   Article Footer (Tags + Share)
   ========================================================================== */

.lk-article__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	padding: 20px 0;
	border-top: 1px solid #eee;
	border-bottom: 1px solid #eee;
	margin-bottom: 30px;
}

/* Tags */
.lk-article__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.lk-article__tags a {
	display: inline-block;
	padding: 4px 12px;
	background: #f5f5f5;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
	color: #555;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}

.lk-article__tags a:hover {
	background: var(--lk-color-primary, #ff4d00);
	color: #fff;
}

/* Share buttons */
.lk-article__share {
	display: flex;
	align-items: center;
	gap: 8px;
}

.lk-article__share-label {
	font-size: 13px;
	font-weight: 600;
	color: #888;
}

.lk-article__share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #f5f5f5;
	color: #555;
	text-decoration: none;
	transition: background 0.2s, color 0.2s, transform 0.1s;
}

.lk-article__share-btn:hover {
	transform: scale(1.1);
}

.lk-article__share-btn--facebook:hover {
	background: #1877f2;
	color: #fff;
}

.lk-article__share-btn--twitter:hover {
	background: #000;
	color: #fff;
}

.lk-article__share-btn--pinterest:hover {
	background: #e60023;
	color: #fff;
}

.lk-article__share-btn--email:hover {
	background: #333;
	color: #fff;
}

/* ==========================================================================
   Author Box
   ========================================================================== */

.lk-author-box {
	display: flex;
	gap: 20px;
	padding: 24px;
	background: #f9f9f9;
	border-radius: 12px;
	margin-bottom: 40px;
}

.lk-author-box__avatar img {
	width: 80px;
	height: 80px;
	border-radius: 50%;
}

.lk-author-box__label {
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #999;
}

.lk-author-box__name {
	margin: 4px 0 8px;
	font-size: 17px;
	font-weight: 700;
}

.lk-author-box__name a {
	color: #111;
	text-decoration: none;
}

.lk-author-box__name a:hover {
	color: var(--lk-color-primary, #ff4d00);
}

.lk-author-box__bio {
	font-size: 14px;
	line-height: 1.6;
	color: #666;
	margin: 0;
}

/* ==========================================================================
   Post Navigation
   ========================================================================== */

.lk-post-nav {
	margin: 40px 0;
}

.lk-post-nav .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.lk-post-nav .nav-previous,
.lk-post-nav .nav-next {
	padding: 20px;
	background: #f9f9f9;
	border-radius: 10px;
	transition: background 0.2s;
}

.lk-post-nav .nav-previous:hover,
.lk-post-nav .nav-next:hover {
	background: #f0f0f0;
}

.lk-post-nav .nav-next {
	text-align: right;
}

.lk-post-nav a {
	text-decoration: none;
	color: inherit;
}

.lk-post-nav__direction {
	display: block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #999;
	margin-bottom: 6px;
}

.lk-post-nav__title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #333;
	line-height: 1.4;
}

/* ==========================================================================
   Related Posts
   ========================================================================== */

.lk-related-posts {
	margin: 50px 0 40px;
}

.lk-related-posts__title {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 24px;
	color: #111;
}

.lk-related-posts__grid {
	display: grid;
	grid-template-columns: repeat(var(--lk-related-cols, 3), 1fr);
	gap: 24px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.lk-blog .lk-pagination {
	margin-top: 40px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
	.lk-blog-posts--grid,
	.lk-blog-posts--masonry {
		--lk-blog-cols: 2 !important;
	}

	.lk-blog-posts--masonry {
		column-count: 2;
	}

	.lk-related-posts__grid {
		--lk-related-cols: 2 !important;
	}
}

@media (max-width: 768px) {
	.lk-blog-header {
		padding: 30px 0;
	}

	.lk-blog-header__title {
		font-size: 22px;
	}

	/* Stack grid to single column */
	.lk-blog-posts--grid {
		--lk-blog-cols: 1 !important;
	}

	.lk-blog-posts--masonry {
		column-count: 1;
	}

	/* List → stack */
	.lk-post-card--list {
		flex-direction: column;
	}

	.lk-post-card--list .lk-post-card__thumb {
		width: 100%;
		aspect-ratio: 16 / 10;
	}

	.lk-post-card--list .lk-post-card__body {
		padding: 20px;
	}

	.lk-post-card--list .lk-post-card__title {
		font-size: 17px;
	}

	/* Single article */
	.lk-article__title {
		font-size: 24px;
	}

	.lk-article__content {
		font-size: 16px;
	}

	/* Author box */
	.lk-author-box {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	/* Post navigation */
	.lk-post-nav .nav-links {
		grid-template-columns: 1fr;
	}

	.lk-post-nav .nav-next {
		text-align: left;
	}

	/* Related posts */
	.lk-related-posts__grid {
		--lk-related-cols: 1 !important;
	}

	/* Share */
	.lk-article__footer {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 480px) {
	.lk-post-card__body {
		padding: 16px;
	}

	.lk-post-card__title {
		font-size: 15px;
	}

	.lk-article__title {
		font-size: 20px;
	}
}
