/**
 * Single Post Styles
 * Tech-inspired blog post design
 */

/* ========================================
   PAGE SINGLE POST
   ======================================== */

.page-single-post {
	background: var(--light-primary);
}

/* ========================================
   POST HERO
   ======================================== */

.post-hero {
	position: relative;
	padding: var(--space-20) 0 var(--space-12);
	background: var(--light-secondary);
	overflow: hidden;
}

.post-hero-bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.post-grid-pattern {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(50, 30, 12, 0.03) 1px, transparent 1px),
		linear-gradient(90deg, rgba(50, 30, 12, 0.03) 1px, transparent 1px);
	background-size: 40px 40px;
}

.post-orb-1 {
	position: absolute;
	top: -100px;
	right: -100px;
	width: 400px;
	height: 400px;
	background: radial-gradient(circle, rgba(255, 112, 76, 0.15) 0%, transparent 70%);
}

.post-orb-2 {
	position: absolute;
	bottom: -150px;
	left: -100px;
	width: 500px;
	height: 500px;
	background: radial-gradient(circle, rgba(2, 176, 181, 0.1) 0%, transparent 70%);
}

.post-hero-content {
	max-width: 800px;
	margin: 0 auto;
	text-align: center;
}

/* Breadcrumb */
.post-breadcrumb {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	margin-bottom: var(--space-6);
	font-size: var(--text-sm);
}

.post-breadcrumb a {
	color: var(--text-secondary);
	text-decoration: none;
	transition: color var(--duration-fast);
}

.post-breadcrumb a:hover {
	color: var(--tingle-coral);
}

.post-breadcrumb svg {
	color: var(--text-muted);
}

.post-breadcrumb span {
	color: var(--text-muted);
}

/* Meta */
.post-hero-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-4);
	margin-bottom: var(--space-4);
}

.post-category {
	padding: var(--space-1) var(--space-3);
	background: linear-gradient(135deg, var(--tingle-coral), var(--tingle-gold));
	color: white;
	font-size: var(--text-xs);
	font-weight: 600;
	border-radius: var(--radius-full);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.post-reading-time {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--text-sm);
	color: var(--text-muted);
}

/* Title */
.post-hero-title {
	font-family: var(--font-display);
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--text-primary);
	margin-bottom: var(--space-4);
}

/* Excerpt */
.post-hero-excerpt {
	font-size: var(--text-lg);
	color: var(--text-secondary);
	line-height: 1.6;
	margin-bottom: var(--space-6);
}

/* Author Info */
.post-author-info {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-3);
}

.post-author-avatar img {
	width: 48px;
	height: 48px;
	border-radius: var(--radius-full);
	object-fit: cover;
}

.post-author-details {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-1);
}

.post-author-name {
	font-weight: 600;
	color: var(--text-primary);
}

.post-date {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--text-sm);
	color: var(--text-muted);
}

/* ========================================
   FEATURED IMAGE
   ======================================== */

.post-featured-image {
	margin-top: calc(-1 * var(--space-6));
	padding-bottom: var(--space-12);
}

.post-image-wrapper {
	max-width: 900px;
	margin: 0 auto;
	border-radius: var(--radius-xl);
	overflow: hidden;
	box-shadow: var(--shadow-xl);
}

.post-image-terminal {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-3) var(--space-4);
	background: var(--dark-primary);
}

.post-image-wrapper .post-thumbnail {
	width: 100%;
	height: auto;
	display: block;
}

/* ========================================
   POST CONTENT SECTION
   ======================================== */

.post-content-section {
	padding: var(--space-8) 0 var(--space-16);
}

.post-content-wrapper {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: var(--space-12);
	align-items: start;
}

/* Main Content */
.post-content {
	background: var(--light-primary);
	border-radius: var(--radius-xl);
	padding: var(--space-8);
	border: 1px solid var(--light-border);
}

.post-content h2 {
	font-family: var(--font-display);
	font-size: var(--text-2xl);
	font-weight: 700;
	color: var(--text-primary);
	margin: var(--space-8) 0 var(--space-4);
	padding-bottom: var(--space-3);
	border-bottom: 2px solid var(--light-border);
}

.post-content h2:first-child {
	margin-top: 0;
}

.post-content h3 {
	font-family: var(--font-display);
	font-size: var(--text-xl);
	font-weight: 600;
	color: var(--text-primary);
	margin: var(--space-6) 0 var(--space-3);
}

.post-content h4 {
	font-size: var(--text-lg);
	font-weight: 600;
	color: var(--text-primary);
	margin: var(--space-5) 0 var(--space-2);
}

.post-content p {
	font-size: var(--text-base);
	line-height: 1.8;
	color: var(--text-secondary);
	margin-bottom: var(--space-4);
}

.post-content ul,
.post-content ol {
	margin: var(--space-4) 0;
	padding-left: var(--space-6);
}

.post-content li {
	font-size: var(--text-base);
	line-height: 1.8;
	color: var(--text-secondary);
	margin-bottom: var(--space-2);
}

.post-content li::marker {
	color: var(--tingle-coral);
}

.post-content strong {
	color: var(--text-primary);
	font-weight: 600;
}

.post-content em {
	color: var(--text-secondary);
	font-style: italic;
}

.post-content a {
	color: var(--tingle-coral);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color var(--duration-fast);
}

.post-content a:hover {
	border-bottom-color: var(--tingle-coral);
}

.post-content blockquote {
	margin: var(--space-6) 0;
	padding: var(--space-4) var(--space-6);
	background: var(--light-secondary);
	border-left: 4px solid var(--tingle-coral);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.post-content blockquote p {
	font-size: var(--text-lg);
	font-style: italic;
	color: var(--text-primary);
	margin: 0;
}

.post-content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--radius-lg);
	margin: var(--space-6) 0;
}

.post-content pre,
.post-content code {
	font-family: var(--font-mono);
}

.post-content code {
	padding: var(--space-1) var(--space-2);
	background: var(--light-secondary);
	border-radius: var(--radius-sm);
	font-size: 0.9em;
	color: var(--tingle-coral);
}

.post-content pre {
	margin: var(--space-6) 0;
	padding: var(--space-4);
	background: var(--dark-primary);
	border-radius: var(--radius-lg);
	overflow-x: auto;
}

.post-content pre code {
	padding: 0;
	background: none;
	color: var(--light-primary);
	font-size: var(--text-sm);
}

/* ========================================
   SIDEBAR
   ======================================== */

.post-sidebar {
	position: sticky;
	top: var(--space-24);
	display: flex;
	flex-direction: column;
	gap: var(--space-6);
}

/* Share Card */
.post-share-card,
.post-categories-card {
	background: var(--light-secondary);
	border-radius: var(--radius-lg);
	padding: var(--space-5);
	border: 1px solid var(--light-border);
}

.post-share-card h4,
.post-categories-card h4 {
	font-size: var(--text-sm);
	font-weight: 600;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: var(--space-4);
}

.post-share-links {
	display: flex;
	gap: var(--space-3);
}

.post-share-links a,
.post-share-links button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: var(--light-primary);
	border: 1px solid var(--light-border);
	border-radius: var(--radius-md);
	color: var(--text-secondary);
	cursor: pointer;
	transition: all var(--duration-fast);
}

.post-share-links a:hover,
.post-share-links button:hover {
	transform: translateY(-3px);
}

.post-share-links .share-linkedin:hover {
	background: #0077B5;
	border-color: #0077B5;
	color: white;
}

.post-share-links .share-twitter:hover {
	background: #000;
	border-color: #000;
	color: white;
}

.post-share-links .share-whatsapp:hover {
	background: #25D366;
	border-color: #25D366;
	color: white;
}

.post-share-links .share-copy:hover {
	background: var(--tingle-coral);
	border-color: var(--tingle-coral);
	color: white;
}

.post-share-links .share-copy.copied {
	background: var(--tingle-cyan);
	border-color: var(--tingle-cyan);
	color: white;
}

.post-share-links svg {
	width: 20px;
	height: 20px;
}

/* Categories */
.post-categories-list {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.post-category-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--space-2) var(--space-3);
	background: var(--light-primary);
	border: 1px solid var(--light-border);
	border-radius: var(--radius-md);
	color: var(--text-secondary);
	font-size: var(--text-sm);
	text-decoration: none;
	transition: all var(--duration-fast);
}

.post-category-link:hover {
	border-color: var(--tingle-coral);
	color: var(--tingle-coral);
}

.post-category-link.active {
	background: linear-gradient(135deg, var(--tingle-coral), var(--tingle-gold));
	border-color: transparent;
	color: white;
}

.post-category-link .category-count {
	padding: var(--space-1) var(--space-2);
	background: rgba(0, 0, 0, 0.1);
	border-radius: var(--radius-sm);
	font-size: var(--text-xs);
}

.post-category-link.active .category-count {
	background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   POST NAVIGATION
   ======================================== */

.post-navigation-section {
	padding: var(--space-8) 0;
	background: var(--light-secondary);
	border-top: 1px solid var(--light-border);
	border-bottom: 1px solid var(--light-border);
}

.post-navigation {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
}

.post-nav-link {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	padding: var(--space-4);
	background: var(--light-primary);
	border: 1px solid var(--light-border);
	border-radius: var(--radius-lg);
	text-decoration: none;
	transition: all var(--duration-fast);
}

.post-nav-link:hover {
	border-color: var(--tingle-coral);
	transform: translateY(-4px);
	box-shadow: var(--shadow-md);
}

.post-nav-prev {
	align-items: flex-start;
}

.post-nav-next {
	align-items: flex-end;
	text-align: right;
}

.post-nav-label {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--text-sm);
	color: var(--text-muted);
}

.post-nav-title {
	font-weight: 600;
	color: var(--text-primary);
	line-height: 1.4;
}

.post-nav-empty {
	flex: 1;
	background: none;
	border: none;
}

.post-nav-all {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	background: var(--light-primary);
	border: 1px solid var(--light-border);
	border-radius: var(--radius-full);
	color: var(--text-secondary);
	transition: all var(--duration-fast);
}

.post-nav-all:hover {
	background: var(--tingle-coral);
	border-color: var(--tingle-coral);
	color: white;
}

/* ========================================
   RELATED POSTS
   ======================================== */

.related-posts-section {
	padding: var(--space-16) 0;
	background: var(--light-primary);
}

.related-posts-title {
	font-family: var(--font-display);
	font-size: var(--text-2xl);
	font-weight: 700;
	text-align: center;
	margin-bottom: var(--space-10);
	color: var(--text-primary);
}

.related-posts-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-8);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
	.post-content-wrapper {
		grid-template-columns: 1fr;
	}

	.post-sidebar {
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
	}

	.post-share-card,
	.post-categories-card {
		flex: 1;
		min-width: 250px;
	}

	.related-posts-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.post-hero {
		padding: var(--space-16) 0 var(--space-10);
	}

	.post-hero-meta {
		flex-direction: column;
		gap: var(--space-2);
	}

	.post-content {
		padding: var(--space-5);
	}

	.post-navigation {
		flex-direction: column;
	}

	.post-nav-link {
		width: 100%;
	}

	.post-nav-prev,
	.post-nav-next {
		align-items: center;
		text-align: center;
	}

	.post-nav-all {
		order: -1;
	}

	.related-posts-grid {
		grid-template-columns: 1fr;
	}

	.post-sidebar {
		flex-direction: column;
	}

	.post-share-card,
	.post-categories-card {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.post-hero-title {
		font-size: 1.75rem;
	}

	.post-breadcrumb {
		font-size: var(--text-xs);
	}

	.post-image-wrapper {
		border-radius: var(--radius-lg);
	}

	.post-content h2 {
		font-size: var(--text-xl);
	}
}
