/**
 * Astrological Single Blog Post Layout CSS
 *
 * Editorial design crafted for Sinhala and English astrological,
 * philosophical, and spiritual publications.
 *
 * @package    Custom_Astro_Handler_By_Hewabahithage
 * @author     Nirosh Hewabahithage <https://niroshhewabahithage.com/>
 * @copyright  Copyright (c) 2026 Nirosh Hewabahithage. All rights reserved.
 * @license    GPL-2.0-or-later
 */

:root {
	--cahbh-single-font-serif: var(--e-global-typography-primary-font-family, var(--wp--preset--font-family--primary, "Philosopher", "Noto Sans Sinhala", Georgia, serif));
	--cahbh-single-font-sans: var(--e-global-typography-text-font-family, var(--e-global-typography-secondary-font-family, var(--wp--preset--font-family--text, "Inter", "Noto Sans Sinhala", sans-serif)));

	--cahbh-single-bg: #071526;
	--cahbh-single-card-bg: #0b2239;
	--cahbh-single-card-subtle: #0e2b48;
	--cahbh-single-orange: #f25c05;
	--cahbh-single-orange-hover: #ff7324;
	--cahbh-single-gold: #e5a93c;
	--cahbh-single-gold-bright: #ffd166;
	--cahbh-single-border: rgba(242, 92, 5, 0.18);
	--cahbh-single-border-glow: rgba(242, 92, 5, 0.45);
	--cahbh-single-text-title: #ffffff;
	--cahbh-single-text-body: #d1dbe5;
	--cahbh-single-text-muted: #889bb0;

	--cahbh-single-radius: 16px;
	--cahbh-single-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
	--cahbh-single-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Deep Navy Page Background & Full-Width Site Main (Prevents White Flanks) */
html:has(body.single-post),
html:has(body.cahbh-single-post-body),
body.single,
body.single-post,
body.cahbh-single-post-body,
body.cahbh-single-post-body #page,
body.cahbh-single-post-body #content,
body.cahbh-single-post-body .site,
body.cahbh-single-post-body .site-content,
body.single-post #page,
body.single-post #content,
body.single-post .site,
body.single-post .site-content,
body:not([class*=elementor-page-]) .site-main.cahbh-single-post-site-main,
body.single-post:not([class*=elementor-page-]) .site-main,
.cahbh-single-post-site-main {
	background: #071526 !important;
	background-color: #071526 !important;
	max-width: 100% !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	min-height: 100vh;
}


/* Outer Container */
.cahbh-single-post-wrapper {
	max-width: 920px;
	margin: 0 auto;
	padding: 2.5rem 1.25rem 5rem;
	font-family: var(--cahbh-single-font-sans);
	color: var(--cahbh-single-text-body);
	box-sizing: border-box;
}

.cahbh-single-post-wrapper *,
.cahbh-single-post-wrapper *::before,
.cahbh-single-post-wrapper *::after {
	box-sizing: border-box;
}

/* Breadcrumb Navigation */
.cahbh-single-breadcrumb {
	margin-bottom: 2rem;
}

.cahbh-breadcrumb-inner {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(11, 34, 57, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 6px 16px;
	border-radius: 30px;
	font-size: 0.82rem;
	flex-wrap: wrap;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.cahbh-breadcrumb-link {
	color: var(--cahbh-single-text-muted);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	transition: var(--cahbh-single-transition);
}

.cahbh-breadcrumb-link:hover {
	color: var(--cahbh-single-gold-bright);
}

.cahbh-crumb-home-icon {
	width: 14px;
	height: 14px;
	color: var(--cahbh-single-gold);
}

.cahbh-breadcrumb-sep {
	color: rgba(255, 255, 255, 0.25);
	font-size: 0.9rem;
}

.cahbh-breadcrumb-current {
	color: var(--cahbh-single-gold-bright);
	font-weight: 500;
}

/* Hero Header */
.cahbh-single-hero {
	margin-bottom: 2.2rem;
	text-align: left;
}

.cahbh-single-cat-badge {
	display: inline-block;
	margin-bottom: 1rem;
}

.cahbh-single-cat-badge a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(242, 92, 5, 0.14);
	color: var(--cahbh-single-gold-bright);
	border: 1px solid rgba(242, 92, 5, 0.35);
	padding: 5px 14px;
	border-radius: 30px;
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
	transition: var(--cahbh-single-transition);
}

.cahbh-single-cat-badge a:hover {
	background: var(--cahbh-single-orange);
	color: #ffffff;
	border-color: var(--cahbh-single-orange);
	transform: translateY(-2px);
}

.cahbh-single-cat-badge .cahbh-sparkle {
	color: var(--cahbh-single-orange);
}

.cahbh-single-cat-badge a:hover .cahbh-sparkle {
	color: #ffffff;
}

.cahbh-single-main-title {
	font-family: var(--cahbh-single-font-serif);
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	font-weight: 700;
	line-height: 1.35;
	color: var(--cahbh-single-text-title);
	margin: 0 0 1.2rem 0;
	letter-spacing: -0.01em;
}

/* Post Meta Bar */
.cahbh-single-meta-bar {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 0.86rem;
	color: var(--cahbh-single-text-muted);
	flex-wrap: wrap;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cahbh-meta-author {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--cahbh-single-text-title);
	font-weight: 500;
}

.cahbh-meta-avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	object-fit: cover;
	border: 1.5px solid var(--cahbh-single-gold);
}

.cahbh-meta-time,
.cahbh-meta-reading,
.cahbh-meta-comments {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.cahbh-meta-svg {
	width: 15px;
	height: 15px;
	color: var(--cahbh-single-gold);
	flex-shrink: 0;
}

.cahbh-meta-bullet {
	color: rgba(255, 255, 255, 0.2);
}

/* Featured Media Frame */
.cahbh-single-media-frame {
	margin-bottom: 2.5rem;
	border-radius: var(--cahbh-single-radius);
	overflow: hidden;
	box-shadow: var(--cahbh-single-shadow);
	border: 1px solid var(--cahbh-single-border);
}

.cahbh-single-img-container {
	position: relative;
	width: 100%;
	background: #040d18;
}

.cahbh-single-featured-img {
	width: 100%;
	height: auto;
	max-height: 520px;
	object-fit: cover;
	display: block;
}

.cahbh-single-img-cosmic-glow {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(7, 21, 38, 0) 70%, rgba(7, 21, 38, 0.7) 100%);
	pointer-events: none;
}

.cahbh-single-img-caption {
	font-size: 0.84rem;
	color: var(--cahbh-single-text-muted);
	font-style: italic;
	text-align: center;
	padding: 0.75rem 1rem;
	background: #091c30;
	margin: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Article Body Container */
.cahbh-single-body-container {
	background: var(--cahbh-single-card-bg);
	border: 1px solid var(--cahbh-single-border);
	border-radius: var(--cahbh-single-radius);
	padding: 2.8rem 2.8rem;
	box-shadow: var(--cahbh-single-shadow);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
	.cahbh-single-body-container {
		padding: 1.8rem 1.3rem;
	}
}

/* Editorial Prose Styling */
.cahbh-single-prose {
	font-size: 1.08rem;
	line-height: 1.85;
	color: var(--cahbh-single-text-body);
}

.cahbh-single-prose p {
	margin: 0 0 1.6rem 0;
}

.cahbh-single-prose h2,
.cahbh-single-prose h3,
.cahbh-single-prose h4 {
	font-family: var(--cahbh-single-font-serif);
	color: var(--cahbh-single-text-title);
	line-height: 1.35;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}

.cahbh-single-prose h2 {
	font-size: 1.65rem;
	border-left: 4px solid var(--cahbh-single-orange);
	padding-left: 14px;
	color: #ffffff;
}

.cahbh-single-prose h3 {
	font-size: 1.35rem;
	color: var(--cahbh-single-gold-bright);
}

.cahbh-single-prose h4 {
	font-size: 1.15rem;
}

.cahbh-single-prose a {
	color: var(--cahbh-single-gold-bright);
	text-decoration: underline;
	text-underline-offset: 4px;
	transition: color 0.2s ease;
}

.cahbh-single-prose a:hover {
	color: var(--cahbh-single-orange-hover);
}

.cahbh-single-prose strong,
.cahbh-single-prose b {
	color: #ffffff;
	font-weight: 600;
}

.cahbh-single-prose blockquote {
	margin: 2rem 0;
	padding: 1.4rem 1.8rem;
	background: rgba(242, 92, 5, 0.08);
	border-left: 4px solid var(--cahbh-single-gold);
	border-radius: 0 10px 10px 0;
	font-size: 1.1rem;
	font-style: italic;
	color: #ffffff;
}

.cahbh-single-prose blockquote p:last-child {
	margin-bottom: 0;
}

.cahbh-single-prose ul,
.cahbh-single-prose ol {
	margin: 0 0 1.6rem 0;
	padding-left: 1.8rem;
}

.cahbh-single-prose li {
	margin-bottom: 0.6rem;
}

.cahbh-single-prose img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	margin: 1.5rem 0;
}

/* Footer Actions (Tags + Share) */
.cahbh-single-footer-actions {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	display: flex;
	flex-direction: column;
	gap: 1.8rem;
}

/* Tags List */
.cahbh-single-tags-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.cahbh-tags-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--cahbh-single-gold-bright);
}

.cahbh-tags-list {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.cahbh-tag-pill {
	background: #071526;
	border: 1px solid rgba(229, 169, 60, 0.3);
	color: var(--cahbh-single-text-body);
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.8rem;
	text-decoration: none;
	transition: var(--cahbh-single-transition);
}

.cahbh-tag-pill:hover {
	background: var(--cahbh-single-orange);
	color: #ffffff;
	border-color: var(--cahbh-single-orange);
	transform: translateY(-2px);
}

/* Social Share Bar */
.cahbh-single-share-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #071526;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	padding: 1rem 1.4rem;
	flex-wrap: wrap;
	gap: 12px;
}

.cahbh-share-label {
	font-size: 0.88rem;
	font-weight: 600;
	color: #ffffff;
}

.cahbh-share-buttons {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.cahbh-share-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 25px;
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
	color: #ffffff;
	background: #0e2b48;
	border: 1px solid rgba(255, 255, 255, 0.12);
	cursor: pointer;
	transition: var(--cahbh-single-transition);
}

.cahbh-share-whatsapp {
	background: #128c7e;
	border-color: #128c7e;
}

.cahbh-share-whatsapp:hover {
	background: #075e54;
	transform: translateY(-2px);
}

.cahbh-share-facebook {
	background: #1877f2;
	border-color: #1877f2;
}

.cahbh-share-facebook:hover {
	background: #0d65d9;
	transform: translateY(-2px);
}

.cahbh-share-telegram {
	background: #229ed9;
	border-color: #229ed9;
}

.cahbh-share-telegram:hover {
	background: #1a82b3;
	transform: translateY(-2px);
}

.cahbh-copy-link-btn:hover {
	background: var(--cahbh-single-orange);
	border-color: var(--cahbh-single-orange);
	transform: translateY(-2px);
}

/* Author Box */
.cahbh-single-author-box {
	margin-top: 3rem;
	background: #071526;
	border: 1px solid var(--cahbh-single-border);
	border-radius: var(--cahbh-single-radius);
	padding: 1.8rem;
	display: flex;
	align-items: center;
	gap: 20px;
}

@media (max-width: 640px) {
	.cahbh-single-author-box {
		flex-direction: column;
		text-align: center;
	}
}

.cahbh-author-box-avatar-wrap {
	position: relative;
	flex-shrink: 0;
}

.cahbh-author-box-avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--cahbh-single-gold);
	display: block;
}

.cahbh-author-box-content {
	flex-grow: 1;
}

.cahbh-author-badge {
	font-size: 0.78rem;
	color: var(--cahbh-single-orange);
	font-weight: 600;
	letter-spacing: 0.05em;
	display: block;
	margin-bottom: 4px;
}

.cahbh-author-box-name {
	font-family: var(--cahbh-single-font-serif);
	font-size: 1.25rem;
	color: #ffffff;
	margin: 0 0 6px 0;
	font-weight: 700;
}

.cahbh-author-box-desc {
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--cahbh-single-text-muted);
	margin: 0;
}

/* Prev / Next Navigation */
.cahbh-single-nav-grid {
	margin-top: 2.5rem;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 640px) {
	.cahbh-single-nav-grid {
		grid-template-columns: 1fr;
	}
}

.cahbh-nav-card {
	background: #071526;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	padding: 1.2rem 1.4rem;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	gap: 6px;
	transition: var(--cahbh-single-transition);
}

.cahbh-nav-card:hover {
	background: #0e2b48;
	border-color: var(--cahbh-single-border-glow);
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.cahbh-nav-sub {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--cahbh-single-gold-bright);
}

.cahbh-nav-title {
	font-family: var(--cahbh-single-font-serif);
	font-size: 0.98rem;
	color: #ffffff;
	font-weight: 600;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cahbh-nav-next {
	text-align: right;
}

/* Related Articles Section */
.cahbh-single-related-section {
	margin-top: 3.5rem;
}

.cahbh-related-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 1.5rem;
}

.cahbh-related-title {
	font-family: var(--cahbh-single-font-serif);
	font-size: 1.35rem;
	color: #ffffff;
	margin: 0;
	font-weight: 700;
}

.cahbh-related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

@media (max-width: 768px) {
	.cahbh-related-grid {
		grid-template-columns: 1fr;
	}
}

.cahbh-related-card {
	background: #071526;
	border: 1px solid var(--cahbh-single-border);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	transition: var(--cahbh-single-transition);
}

.cahbh-related-card:hover {
	background: #0e2b48;
	border-color: var(--cahbh-single-border-glow);
	transform: translateY(-4px);
}

.cahbh-related-thumb-box {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.cahbh-related-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.cahbh-related-card:hover .cahbh-related-thumb {
	transform: scale(1.08);
}

.cahbh-related-fallback {
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #05101d;
	color: var(--cahbh-single-gold);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
}

.cahbh-related-card-content {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex-grow: 1;
}

.cahbh-related-date {
	font-size: 0.78rem;
	color: var(--cahbh-single-text-muted);
}

.cahbh-related-card-title {
	font-family: var(--cahbh-single-font-serif);
	font-size: 0.96rem;
	color: #ffffff;
	font-weight: 600;
	line-height: 1.4;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cahbh-related-read-more {
	font-size: 0.8rem;
	color: var(--cahbh-single-gold-bright);
	font-weight: 600;
	margin-top: auto;
	padding-top: 6px;
}

/* Comments Box */
.cahbh-single-comments-box {
	margin-top: 3.5rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cahbh-single-comments-box #comments {
	color: #ffffff;
}

.cahbh-single-comments-box .comment-reply-title {
	font-family: var(--cahbh-single-font-serif);
	color: #ffffff;
	font-size: 1.3rem;
}

.cahbh-single-comments-box textarea,
.cahbh-single-comments-box input[type="text"],
.cahbh-single-comments-box input[type="email"],
.cahbh-single-comments-box input[type="url"] {
	background: #071526;
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #ffffff;
	border-radius: 8px;
	padding: 10px 14px;
	width: 100%;
}

.cahbh-single-comments-box input[type="submit"] {
	background: linear-gradient(135deg, var(--cahbh-single-orange) 0%, #d84f02 100%);
	color: #ffffff;
	border: none;
	padding: 10px 24px;
	border-radius: 30px;
	font-weight: 600;
	cursor: pointer;
	transition: var(--cahbh-single-transition);
}

.cahbh-single-comments-box input[type="submit"]:hover {
	box-shadow: 0 4px 15px rgba(242, 92, 5, 0.4);
	transform: translateY(-2px);
}
