/**
 * Article Floating Card Styles
 * เอฟเฟกต์กระดาษลอยขึ้นมาจากหน้าเว็บ
 * มีเงาและความนูน (3D effect)
 */

/* ============================================
   Article Card - Floating Paper Effect
   ============================================ */

/* สำหรับ single post page - เอฟเฟกต์กระดาษลอย */
.single article,
.single .post,
.single article.post,
.single #main > article {
	background: #ffffff;
	border-radius: 12px;
	padding: 2.5rem 3rem;
	margin-bottom: 2rem;
	
	/* Multiple shadows for depth - เอฟเฟกต์กระดาษลอย (เงาไปทางขวา) */
	box-shadow: 
		2px 2px 4px rgba(0, 0, 0, 0.08),
		4px 4px 8px rgba(0, 0, 0, 0.06),
		8px 10px 20px rgba(0, 0, 0, 0.08),
		12px 20px 40px rgba(0, 0, 0, 0.06),
		0 0 0 1px rgba(0, 0, 0, 0.02);
	
	/* Smooth transition */
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	
	/* Border for subtle definition */
	border: 1px solid rgba(0, 0, 0, 0.06);
	
	/* Position relative for z-index */
	position: relative;
	z-index: 1;
	
	/* Backdrop for extra depth */
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

/* Animation เมื่อโหลดหน้า */
.single article {
	animation: floatIn 0.6s ease-out;
}

@keyframes floatIn {
	from {
		opacity: 0;
		transform: translateY(30px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Hover effect - ยกขึ้นเล็กน้อย (เงาไปทางขวาเพิ่มขึ้น) */
.single article:hover,
.single .post:hover,
.single article.post:hover,
.single #main > article:hover {
	transform: translateY(-4px) scale(1.002);
	box-shadow: 
		4px 4px 8px rgba(0, 0, 0, 0.1),
		8px 8px 16px rgba(0, 0, 0, 0.1),
		12px 16px 32px rgba(0, 0, 0, 0.12),
		16px 32px 64px rgba(0, 0, 0, 0.1),
		0 0 0 1px rgba(0, 0, 0, 0.03);
}

/* ============================================
   Post Header - Floating Effect
   ============================================ */
.single .post-header {
	padding-bottom: 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 2px solid #f0f0f0;
	position: relative;
}

/* Decorative line under header */
.single .post-header::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 60px;
	height: 2px;
	background: linear-gradient(90deg, #0a3e78 0%, #2298e0 100%);
	border-radius: 2px;
}

.single .post-header .cat a {
	display: inline-block;
	padding: 0.4rem 1rem;
	background: linear-gradient(135deg, #0a3e78 0%, #2298e0 100%);
	color: #ffffff;
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 600;
	text-decoration: none;
	margin-bottom: 1rem;
	box-shadow: 0 2px 6px rgba(10, 62, 120, 0.3);
	transition: all 0.3s ease;
}

.single .post-header .cat a:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(10, 62, 120, 0.4);
}

.single .post-header h1 {
	font-size: 2rem;
	line-height: 1.3;
	margin: 1rem 0;
	color: #1a202c;
	font-weight: 700;
}

.single .post-header .date {
	display: inline-block;
	color: #6b7280;
	font-size: 0.9rem;
	margin-top: 0.5rem;
	padding: 0.5rem 1rem;
	background: #f8f9fa;
	border-radius: 6px;
}

/* ============================================
   Post Entry - Content Area
   ============================================ */
.single .post-entry {
	position: relative;
	line-height: 1.8;
	color: #374151;
	z-index: 1;
}

.single .post-entry p {
	margin-bottom: 1.5rem;
	font-size: 1.0625rem;
	line-height: 1.8;
}

.single .post-entry h1,
.single .post-entry h2,
.single .post-entry h3,
.single .post-entry h4,
.single .post-entry h5,
.single .post-entry h6 {
	margin-top: 2rem;
	margin-bottom: 1rem;
	color: #1a202c;
	font-weight: 600;
	line-height: 1.4;
}

.single .post-entry h2 {
	font-size: 1.75rem;
	border-left: 4px solid #0a3e78;
	padding-left: 1rem;
	margin-left: -1.25rem;
}

.single .post-entry h3 {
	font-size: 1.5rem;
}

.single .post-entry img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	margin: 2rem 0;
}

.single .post-entry a {
	color: #0066cc;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: all 0.2s ease;
}

.single .post-entry a:hover {
	color: #0a3e78;
	border-bottom-color: #0a3e78;
}

.single .post-entry blockquote {
	border-left: 4px solid #0a3e78;
	padding-left: 1.5rem;
	margin: 2rem 0;
	font-style: italic;
	color: #4b5563;
	background: #f8f9fa;
	padding: 1.5rem;
	border-radius: 0 8px 8px 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.single .post-entry ul,
.single .post-entry ol {
	margin: 1.5rem 0;
	padding-left: 2rem;
}

.single .post-entry li {
	margin-bottom: 0.75rem;
	line-height: 1.7;
}

.single .post-entry code {
	background: #f1f5f9;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	font-size: 0.9em;
	color: #e11d48;
}

.single .post-entry pre {
	background: #1e293b;
	color: #e2e8f0;
	padding: 1.5rem;
	border-radius: 8px;
	overflow-x: auto;
	margin: 2rem 0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.single .post-entry pre code {
	background: transparent;
	color: inherit;
	padding: 0;
}

/* ============================================
   Post Tags
   ============================================ */
.single .post-tags {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e5e7eb;
}

.single .post-tags a {
	display: inline-block;
	padding: 0.4rem 0.9rem;
	background: #f0f7ff;
	color: #0066cc;
	border-radius: 20px;
	font-size: 0.875rem;
	margin-right: 0.5rem;
	margin-bottom: 0.5rem;
	text-decoration: none;
	transition: all 0.2s ease;
	border: 1px solid rgba(0, 102, 204, 0.2);
}

.single .post-tags a:hover {
	background: #0066cc;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

/* ============================================
   Related Posts & Author Box
   ============================================ */
.single .related-posts,
.single .about-author {
	background: #ffffff;
	border-radius: 12px;
	padding: 2rem;
	margin-top: 2rem;
	box-shadow: 
		2px 2px 4px rgba(0, 0, 0, 0.05),
		4px 4px 8px rgba(0, 0, 0, 0.05),
		8px 10px 16px rgba(0, 0, 0, 0.08);
	border: 1px solid rgba(0, 0, 0, 0.05);
	position: relative;
	z-index: 1;
	transition: all 0.3s ease;
}

.single .related-posts:hover,
.single .about-author:hover {
	transform: translateY(-2px);
	box-shadow: 
		4px 4px 8px rgba(0, 0, 0, 0.08),
		8px 8px 16px rgba(0, 0, 0, 0.08),
		12px 16px 32px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Post Image
   ============================================ */
.single .post-image {
	margin: -2.5rem -3rem 2rem -3rem;
	border-radius: 12px 12px 0 0;
	overflow: hidden;
	position: relative;
	background: #f8f9fa;
}

.single .post-image::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.02) 100%);
	pointer-events: none;
}

.single .post-image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
	transition: transform 0.5s ease;
}

.single article:hover .post-image img {
	transform: scale(1.02);
}

/* ============================================
   Background for Page
   ============================================ */
.container.pixeldom_lite_sidebar {
	background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
	padding: 2rem 0;
	min-height: 100vh;
	position: relative;
}

/* Subtle pattern overlay */
.container.pixeldom_lite_sidebar::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: 
		radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.02) 1px, transparent 0);
	background-size: 20px 20px;
	pointer-events: none;
	z-index: 0;
}

.container.pixeldom_lite_sidebar #main {
	background: transparent;
	padding: 0;
	position: relative;
	z-index: 1;
}

/* ============================================
   Responsive Design for Single Post
   ============================================ */
@media (max-width: 768px) {
	.single article,
	.single .post {
		padding: 1.5rem 1.5rem;
		margin-bottom: 1.5rem;
		border-radius: 8px;
	}
	
	.single .post-header h1 {
		font-size: 1.5rem;
	}
	
	.single .post-entry {
		font-size: 1rem;
	}
	
	.single .post-entry h2 {
		font-size: 1.375rem;
		margin-left: 0;
		padding-left: 0.75rem;
	}
	
	.single .post-image {
		margin: -1.5rem -1.5rem 1.5rem -1.5rem;
		border-radius: 8px 8px 0 0;
	}
	
	.single .related-posts,
	.single .about-author {
		padding: 1.5rem;
	}
}

@media (max-width: 480px) {
	.single article,
	.single .post {
		padding: 1rem;
	}
	
	.single .post-header h1 {
		font-size: 1.25rem;
	}
	
	.single .post-entry p {
		font-size: 1rem;
	}
}

/* ============================================
   Category & Archive Pages - Floating Card Effect
   (Compact Horizontal Layout)
   ============================================ */

/* Card Container */
.category .pixeldom-grid li,
.archive .pixeldom-grid li,
.taxonomy .pixeldom-grid li {
	display: block;
	background: #ffffff;
	border-radius: 10px; /* Reduced radius slightly */
	margin-bottom: 1.5rem; /* Reduced margin */
	padding: 0;
	overflow: hidden;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 4px 8px rgba(0, 0, 0, 0.05);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	border: 1px solid rgba(0, 0, 0, 0.05);
	list-style: none;
	height: auto !important;
	max-height: none !important;
}

/* Hover Effect */
.category .pixeldom-grid li:hover,
.archive .pixeldom-grid li:hover,
.taxonomy .pixeldom-grid li:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08), 0 12px 20px rgba(0, 0, 0, 0.08);
}

/* Article Layout - Flexbox */
.category .pixeldom-grid li .item,
.archive .pixeldom-grid li .item,
.taxonomy .pixeldom-grid li .item {
	display: flex !important;
	flex-direction: row;
	width: 100%;
	margin: 0;
	padding: 0;
	background: transparent;
	border: none;
	box-shadow: none;
	min-height: 140px; /* Reduced height for compact look */
	height: auto !important;
}

/* Image Wrapper (Left Side) */
.category .pixeldom-grid li .item > a,
.archive .pixeldom-grid li .item > a,
.taxonomy .pixeldom-grid li .item > a {
	flex: 0 0 220px; /* Reduced width to balance the height */
	position: relative;
	overflow: hidden;
	margin: 0 !important;
	padding: 0 !important;
	display: block !important;
	height: auto !important;
	min-height: 100%;
}

/* Image Styling */
.category .pixeldom-grid li .item > a img,
.archive .pixeldom-grid li .item > a img,
.taxonomy .pixeldom-grid li .item > a img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block !important;
	border-radius: 0 !important;
	transition: transform 0.5s ease;
	margin: 0 !important;
	position: absolute;
	top: 0;
	left: 0;
}

/* Hover Scale Image */
.category .pixeldom-grid li:hover .item > a img,
.archive .pixeldom-grid li:hover .item > a img,
.taxonomy .pixeldom-grid li:hover .item > a img {
	transform: scale(1.05);
}

/* Clean up pseudo elements on link */
.category .pixeldom-grid li .item > a::before,
.category .pixeldom-grid li .item > a::after,
.archive .pixeldom-grid li .item > a::before,
.archive .pixeldom-grid li .item > a::after,
.taxonomy .pixeldom-grid li .item > a::before,
.taxonomy .pixeldom-grid li .item > a::after {
	display: none !important;
	content: none !important;
}

/* Content Wrapper (Right Side) */
.category .pixeldom-grid li .item-content,
.archive .pixeldom-grid li .item-content,
.taxonomy .pixeldom-grid li .item-content {
	flex: 1;
	padding: 1rem 1.5rem; /* Compact padding */
	display: flex !important;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	background: #fff !important;
	height: auto !important;
	overflow: visible !important;
}

/* Title */
.category .pixeldom-grid li .item-content h2,
.archive .pixeldom-grid li .item-content h2,
.taxonomy .pixeldom-grid li .item-content h2 {
	margin: 0 0 0.5rem 0 !important;
	font-size: 1.15rem !important; /* Smaller title */
	line-height: 1.3 !important;
	font-weight: 700 !important;
	color: #1a202c !important;
	overflow: visible !important;
	white-space: normal !important;
	height: auto !important;
}

.category .pixeldom-grid li .item-content h2 a,
.archive .pixeldom-grid li .item-content h2 a,
.taxonomy .pixeldom-grid li .item-content h2 a {
	color: #1a202c !important;
	text-decoration: none !important;
	transition: color 0.2s;
	display: block !important;
	white-space: normal !important;
	overflow: visible !important;
}

.category .pixeldom-grid li .item-content h2 a:hover,
.archive .pixeldom-grid li .item-content h2 a:hover,
.taxonomy .pixeldom-grid li .item-content h2 a:hover {
	color: #0a3e78 !important;
}

/* Excerpt (Paragraph) */
.category .pixeldom-grid li .item-content p,
.archive .pixeldom-grid li .item-content p,
.taxonomy .pixeldom-grid li .item-content p {
	margin: 0 0 0.8rem 0 !important;
	padding: 0 !important;
	color: #4b5563 !important;
	font-size: 0.9rem !important; /* Smaller text */
	line-height: 1.5 !important;
	display: -webkit-box !important;
	-webkit-line-clamp: 2 !important; /* Limit to 2 lines for compactness */
	-webkit-box-orient: vertical !important;
	overflow: hidden !important;
	visibility: visible !important;
	opacity: 1 !important;
	height: auto !important;
	max-height: none !important;
	white-space: normal !important;
}

/* Date / Meta */
.category .pixeldom-grid li .item-content .date,
.archive .pixeldom-grid li .item-content .date,
.taxonomy .pixeldom-grid li .item-content .date {
	display: inline-block !important;
	font-size: 0.75rem !important; /* Smaller date */
	color: #6b7280 !important;
	background: #f3f4f6;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	margin-top: auto !important;
}

/* Archive Box Header */
.archive-box {
	background: #ffffff;
	border-radius: 10px;
	padding: 1.5rem 2rem;
	margin-bottom: 2rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	border: 1px solid rgba(0, 0, 0, 0.05);
	text-align: center;
}

.archive-box span {
	display: block;
	color: #6b7280;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 0.5rem;
}

.archive-box h1 {
	font-size: 1.75rem;
	color: #1a202c;
	margin: 0;
	font-weight: 700;
}

/* Page Background */
.category .container.pixeldom_lite_sidebar,
.archive .container.pixeldom_lite_sidebar,
.taxonomy .container.pixeldom_lite_sidebar {
	background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
	min-height: 100vh;
}

/* Responsive Design */
@media (max-width: 768px) {
	.category .pixeldom-grid li .item,
	.archive .pixeldom-grid li .item,
	.taxonomy .pixeldom-grid li .item {
		flex-direction: column !important;
	}

	.category .pixeldom-grid li .item > a,
	.archive .pixeldom-grid li .item > a,
	.taxonomy .pixeldom-grid li .item > a {
		flex: none;
		width: 100%;
		height: 200px !important;
	}

	.category .pixeldom-grid li .item-content,
	.archive .pixeldom-grid li .item-content,
	.taxonomy .pixeldom-grid li .item-content {
		padding: 1.25rem;
	}

	.category .pixeldom-grid li .item-content h2,
	.archive .pixeldom-grid li .item-content h2,
	.taxonomy .pixeldom-grid li .item-content h2 {
		font-size: 1.2rem !important;
	}
}

@media (max-width: 480px) {
	.category .pixeldom-grid li .item > a,
	.archive .pixeldom-grid li .item > a,
	.taxonomy .pixeldom-grid li .item > a {
		height: 160px !important;
	}
	
	.category .pixeldom-grid li .item-content,
	.archive .pixeldom-grid li .item-content,
	.taxonomy .pixeldom-grid li .item-content {
		padding: 1rem;
	}
}

/* Print Styles */
@media print {
	.single article,
	.single .post,
	.category .pixeldom-grid li,
	.archive .pixeldom-grid li,
	.taxonomy .pixeldom-grid li {
		box-shadow: none;
		border: 1px solid #ddd;
	}
}
