/**
 * ThoughtsWorld — Blog & Editorial Articles Stylesheet (assets/css/blog.css)
 *
 * Dedicated modular stylesheet for:
 * - Blog & Articles Directory (index.php, archive.php)
 * - Article Card Grid (.tw-blog-grid, .tw-article-card)
 * - Single Editorial Article View (single.php)
 * - Standardized Typography for Direct Copy-Paste Admin Publishing
 * - Standalone Separated Thumbnail, Direct 1-Click Social Shares, Dynamic FAQs
 *
 * @package Thoughts_World
 */

/* ==========================================================================
   Article Grid & Directory (Archives & Blog Homepage)
   ========================================================================== */

.tw-blog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 32px;
	margin-bottom: 48px;
}

.tw-article-card {
	background: #FFFFFF;
	border: 1.5px solid #E2E8F0;
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.04);
	transition: all 0.25s ease;
	display: flex;
	flex-direction: column;
}

.tw-article-card:hover {
	transform: translateY(-4px);
	border-color: #0968E5;
	box-shadow: 0 16px 36px -6px rgba(9, 104, 229, 0.12);
}

.tw-article-card__media {
	position: relative;
	width: 100%;
	aspect-ratio: 16/9;
	overflow: hidden;
	background: #F8FAFC;
}

.tw-article-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.tw-article-card:hover .tw-article-card__img {
	transform: scale(1.05);
}

.tw-article-card__body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.tw-article-card__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 0.8rem;
	color: #64748B;
	margin-bottom: 10px;
	font-weight: 600;
}

.tw-article-card__title {
	font-size: 1.25rem;
	font-weight: 800;
	color: #0F172A;
	margin: 0 0 10px 0;
	line-height: 1.35;
}

.tw-article-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.18s ease;
}

.tw-article-card__title a:hover {
	color: #0968E5;
}

.tw-article-card__excerpt {
	font-size: 0.94rem;
	line-height: 1.62;
	color: #475569;
	margin: 0 0 18px 0;
	flex: 1;
}

/* ==========================================================================
   Single Editorial Article View Layout
   ========================================================================== */

.tw-single-article-wrap {
	max-width: 920px;
	margin: 0 auto;
	padding-bottom: 72px;
}

/* Article Meta Info Pill Strip */
.tw-article-meta-strip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
	padding: 12px 24px;
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 999px;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
	flex-wrap: wrap;
}

.tw-article-meta-left {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 0.9rem;
	color: #64748B;
}

.tw-article-meta-author {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #0F172A;
	font-weight: 700;
	text-decoration: none;
	transition: color 0.18s ease;
}

.tw-article-meta-author:hover {
	color: #0968E5;
}

.tw-article-meta-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	overflow: hidden;
	display: inline-flex;
	border: 1.5px solid #0968E5;
}

.tw-article-meta-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tw-article-meta-dot {
	color: #CBD5E1;
}

.tw-article-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.tw-article-meta-item i {
	color: #0968E5;
}

.tw-article-meta-cat {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #7C3AED;
	font-weight: 600;
	text-decoration: none;
	background: #F5F3FF;
	padding: 3px 12px;
	border-radius: 999px;
	font-size: 0.82rem;
	transition: all 0.18s ease;
}

.tw-article-meta-cat:hover {
	background: #EDE9FE;
	color: #6D28D9;
}

/* Single Sleek Share Button in Top Meta Strip */
.tw-article-meta-share-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #F8FAFC;
	border: 1px solid #CBD5E1;
	color: #0F172A;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
	transition: all 0.2s ease;
}

.tw-article-meta-share-btn i {
	color: #0968E5;
	font-size: 0.82rem;
	transition: color 0.2s ease;
}

.tw-article-meta-share-btn:hover {
	background: #0968E5;
	border-color: #0968E5;
	color: #FFFFFF;
}

.tw-article-meta-share-btn:hover i {
	color: #FFFFFF;
}

/* Main Article Card */
.tw-article-single {
	background: #FFFFFF;
	border-radius: 28px;
	border: 1.5px solid #E2E8F0;
	box-shadow: 0 16px 48px -12px rgba(15, 23, 42, 0.08);
	overflow: hidden;
	margin-bottom: 40px;
}

.tw-article-single__body {
	padding: clamp(24px, 5vw, 52px);
}

/* Separated Standalone Thumbnail with Soft Shadow and Rounded Corners */
.tw-article-single__thumb-wrap {
	margin: 0 auto 36px auto;
	width: 100%;
	background: #FFFFFF;
	border: 1.5px solid #E2E8F0;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.1);
	position: relative;
}

.tw-article-single__thumb-img {
	width: 100%;
	height: auto;
	max-height: none;
	display: block;
	object-fit: contain;
}

.tw-article-single__caption {
	padding: 10px 24px;
	font-size: 0.86rem;
	color: #64748B;
	background: #F8FAFC;
	border-top: 1px solid #E2E8F0;
	text-align: center;
	font-style: italic;
}

/* Lead Excerpt */
.tw-article-single__lead {
	font-size: 1.18rem;
	line-height: 1.75;
	color: #1E293B;
	font-weight: 600;
	margin-bottom: 32px;
	padding: 20px 26px;
	background: linear-gradient(135deg, #F0F7FF 0%, #FAF5FF 100%);
	border-left: 4px solid #0968E5;
	border-radius: 0 16px 16px 0;
}

/* ==========================================================================
   Editorial Content Typography (Standardized for Direct Admin Copy-Paste)
   ========================================================================== */

.tw-editorial-content {
	font-family: var(--tw-font-sans, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif);
	font-size: 1.1rem;
	line-height: 1.86;
	color: #334155;
	letter-spacing: -0.01em;
	word-break: break-word;
}

/* Paragraphs */
.tw-editorial-content p {
	margin-top: 0;
	margin-bottom: 24px;
}

.tw-editorial-content p:empty {
	display: none;
}

/* Headings */
.tw-editorial-content h1,
.tw-editorial-content h2,
.tw-editorial-content h3,
.tw-editorial-content h4,
.tw-editorial-content h5,
.tw-editorial-content h6 {
	font-family: var(--tw-font-heading, var(--tw-font-sans, sans-serif));
	color: #0F172A;
	font-weight: 800;
	line-height: 1.35;
	letter-spacing: -0.02em;
	margin-bottom: 16px;
}

.tw-editorial-content h2 {
	font-size: clamp(1.4rem, 2.4vw, 1.75rem);
	margin-top: 44px;
	padding-bottom: 10px;
	border-bottom: 2px solid #F1F5F9;
	position: relative;
}

.tw-editorial-content h2::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 48px;
	height: 2px;
	background: #0968E5;
	border-radius: 999px;
}

.tw-editorial-content h3 {
	font-size: clamp(1.2rem, 1.8vw, 1.38rem);
	margin-top: 32px;
	color: #1E293B;
}

.tw-editorial-content h4 {
	font-size: 1.15rem;
	margin-top: 26px;
}

.tw-editorial-content h5,
.tw-editorial-content h6 {
	font-size: 1.05rem;
	margin-top: 22px;
}

/* Strong / Bold */
.tw-editorial-content strong,
.tw-editorial-content b {
	color: #0F172A;
	font-weight: 700;
}

/* Emphasis / Italic */
.tw-editorial-content em,
.tw-editorial-content i {
	font-style: italic;
}

/* Links */
.tw-editorial-content a {
	color: #0968E5;
	text-decoration: underline;
	text-underline-offset: 3px;
	font-weight: 600;
	transition: color 0.18s ease;
}

.tw-editorial-content a:hover {
	color: #0751b3;
}

/* Blockquotes */
.tw-editorial-content blockquote {
	margin: 34px 0;
	padding: 22px 28px;
	background: #F8FAFD;
	border-left: 4px solid #7C3AED;
	border-radius: 0 16px 16px 0;
	position: relative;
}

.tw-editorial-content blockquote p {
	font-size: 1.12rem;
	font-style: italic;
	line-height: 1.75;
	color: #1E293B;
	margin-bottom: 6px;
}

.tw-editorial-content blockquote cite {
	display: block;
	font-style: normal;
	font-size: 0.9rem;
	font-weight: 700;
	color: #64748B;
	margin-top: 10px;
}

/* Lists */
.tw-editorial-content ul,
.tw-editorial-content ol {
	margin: 20px 0 26px 24px;
	padding: 0;
}

.tw-editorial-content li {
	margin-bottom: 10px;
	padding-left: 4px;
	line-height: 1.8;
}

.tw-editorial-content ul li::marker {
	color: #0968E5;
}

.tw-editorial-content ol li::marker {
	color: #7C3AED;
	font-weight: 700;
}

/* Media & Alignments (Classic Editor classes) */
.tw-editorial-content img {
	max-width: 100%;
	height: auto;
	border-radius: 16px;
	display: block;
}

.tw-editorial-content .aligncenter {
	display: block;
	margin: 32px auto;
	text-align: center;
	clear: both;
}

.tw-editorial-content .alignleft {
	float: left;
	margin: 10px 28px 20px 0;
	max-width: 48%;
	clear: left;
}

.tw-editorial-content .alignright {
	float: right;
	margin: 10px 0 20px 28px;
	max-width: 48%;
	clear: right;
}

.tw-editorial-content .alignnone {
	display: block;
	margin: 28px 0;
}

.tw-editorial-content .wp-caption {
	max-width: 100%;
	background: #F8FAFC;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	padding: 10px;
	margin: 32px auto;
	text-align: center;
}

.tw-editorial-content .wp-caption img {
	margin: 0 auto;
	border-radius: 12px;
}

.tw-editorial-content .wp-caption-text {
	font-size: 0.88rem;
	color: #64748B;
	margin: 10px 0 4px;
	font-style: italic;
	text-align: center;
}

/* Tables */
.tw-editorial-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 32px 0;
	border: 1px solid #E2E8F0;
	border-radius: 14px;
	overflow: hidden;
}

.tw-editorial-content th,
.tw-editorial-content td {
	padding: 14px 18px;
	border: 1px solid #E2E8F0;
	text-align: left;
}

.tw-editorial-content th {
	background: #F8FAFC;
	color: #0F172A;
	font-weight: 700;
}

.tw-editorial-content tr:nth-child(even) {
	background: #FAFAFC;
}

/* Code & Pre */
.tw-editorial-content pre {
	background: #0F172A;
	color: #F8FAFC;
	padding: 22px 26px;
	border-radius: 16px;
	overflow-x: auto;
	margin: 28px 0;
	font-family: 'Consolas', 'Fira Code', monospace;
	font-size: 0.95rem;
	line-height: 1.6;
}

.tw-editorial-content code {
	background: #F1F5F9;
	color: #0F172A;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 0.9em;
	font-family: 'Consolas', 'Fira Code', monospace;
}

.tw-editorial-content pre code {
	background: transparent;
	color: inherit;
	padding: 0;
}

/* Horizontal Rule */
.tw-editorial-content hr {
	border: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, #CBD5E1, transparent);
	margin: 48px 0;
}

/* ==========================================================================
   Social Direct Share Bar (Bottom)
   ========================================================================== */

.tw-article-share-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 40px;
	padding: 18px 24px;
	border-radius: 18px;
	background: #F8FAFC;
	border: 1px solid #E2E8F0;
	flex-wrap: wrap;
}

.tw-article-share-bar__title {
	font-size: 0.92rem;
	font-weight: 700;
	color: #0F172A;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.tw-article-share-bar__btns {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.tw-share-icon-btn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #FFFFFF;
	text-decoration: none;
	font-size: 1rem;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.tw-share-icon-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(0,0,0,0.15);
	color: #FFFFFF;
}

.tw-share-icon-btn--wa { background: #25D366; }
.tw-share-icon-btn--x  { background: #0F172A; }
.tw-share-icon-btn--fb { background: #1877F2; }
.tw-share-icon-btn--li { background: #0A66C2; }
.tw-share-icon-btn--pi { background: #E60023; }

/* ==========================================================================
   Dynamic Article FAQs Section
   ========================================================================== */

.tw-article-faqs {
	margin-top: 48px;
	padding-top: 36px;
	border-top: 2px solid #F1F5F9;
}

.tw-article-faqs__header {
	margin-bottom: 20px;
}

.tw-article-faqs__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #EFF6FF;
	color: #0968E5;
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 5px 14px;
	border-radius: 999px;
	margin-bottom: 10px;
}

.tw-article-faqs__title {
	font-size: clamp(1.35rem, 2.2vw, 1.7rem) !important;
	font-weight: 800 !important;
	color: #0F172A !important;
	margin: 0 0 12px !important;
	padding-bottom: 0 !important;
	border-bottom: none !important;
}

.tw-article-faqs__title::after {
	display: none !important;
}

.tw-article-faqs__list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tw-article-faq-item {
	background: #F8FAFC;
	border: 1.5px solid #E2E8F0;
	border-radius: 16px;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tw-article-faq-item[open] {
	border-color: #0968E5;
	background: #FFFFFF;
	box-shadow: 0 8px 24px -6px rgba(9, 104, 229, 0.1);
}

.tw-article-faq-item__question {
	padding: 18px 22px;
	font-size: 1.05rem;
	font-weight: 700;
	color: #0F172A;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	user-select: none;
	list-style: none;
}

.tw-article-faq-item__question::-webkit-details-marker {
	display: none;
}

.tw-article-faq-item__q-text {
	flex: 1;
}

.tw-article-faq-item__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #FFFFFF;
	border: 1px solid #CBD5E1;
	color: #64748B;
	font-size: 0.8rem;
	transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease;
	flex-shrink: 0;
}

.tw-article-faq-item[open] .tw-article-faq-item__icon {
	transform: rotate(180deg);
	background: #0968E5;
	border-color: #0968E5;
	color: #FFFFFF;
}

.tw-article-faq-item__answer {
	padding: 0 22px 20px 22px;
	color: #475569;
	font-size: 1rem;
	line-height: 1.75;
	border-top: 1px dashed #E2E8F0;
	padding-top: 16px;
}

.tw-article-faq-item__answer p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   Tags Strip
   ========================================================================== */

.tw-article-tags-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 32px;
	padding-top: 28px;
	border-top: 1px solid #E2E8F0;
	flex-wrap: wrap;
}

.tw-article-tags-label {
	font-size: 0.9rem;
	font-weight: 700;
	color: #0F172A;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.tw-article-tag-pill {
	font-size: 0.84rem;
	font-weight: 600;
	color: #475569;
	background: #F1F5F9;
	padding: 6px 14px;
	border-radius: 999px;
	text-decoration: none;
	transition: all 0.2s ease;
}

.tw-article-tag-pill:hover {
	background: #0968E5;
	color: #FFFFFF;
}

/* ==========================================================================
   Author Bio Card
   ========================================================================== */

.tw-article-author-card {
	display: flex;
	gap: 24px;
	margin-top: 40px;
	padding: 28px;
	border-radius: 22px;
	background: linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 100%);
	border: 1.5px solid #DCE5F2;
	align-items: center;
	flex-wrap: wrap;
}

.tw-article-author-card__avatar {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	border: 3px solid #FFFFFF;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
}

.tw-article-author-card__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tw-article-author-card__info {
	flex: 1;
	min-width: 260px;
}

.tw-article-author-card__badge {
	font-size: 0.75rem;
	font-weight: 800;
	color: #7C3AED;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	display: block;
	margin-bottom: 4px;
}

.tw-article-author-card__name {
	font-size: 1.25rem;
	font-weight: 800;
	color: #0F172A;
	margin: 0 0 8px;
}

.tw-article-author-card__name a {
	color: inherit;
	text-decoration: none;
}

.tw-article-author-card__name a:hover {
	color: #0968E5;
}

.tw-article-author-card__bio {
	font-size: 0.94rem;
	color: #475569;
	margin: 0 0 14px;
	line-height: 1.6;
}

.tw-article-author-card__link {
	font-size: 0.85rem;
	font-weight: 700;
	color: #0968E5;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: gap 0.2s ease;
}

.tw-article-author-card__link:hover {
	gap: 10px;
}

/* ==========================================================================
   Article Navigation (Previous / Next)
   ========================================================================== */

.tw-article-nav-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	margin-top: 36px;
}

.tw-article-nav-card {
	background: #FFFFFF;
	border: 1.5px solid #E2E8F0;
	border-radius: 20px;
	padding: 22px 26px;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
	transition: all 0.25s ease;
}

.tw-article-nav-card:hover {
	transform: translateY(-3px);
	border-color: #0968E5;
	box-shadow: 0 12px 28px -6px rgba(9, 104, 229, 0.12);
}

.tw-article-nav-card--next {
	text-align: right;
}

.tw-article-nav-card__label {
	font-size: 0.75rem;
	font-weight: 800;
	color: #64748B;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.tw-article-nav-card--next .tw-article-nav-card__label {
	justify-content: flex-end;
}

.tw-article-nav-card__title {
	color: #0F172A;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.4;
}

/* Footer Action Buttons */
.tw-article-footer-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-top: 36px;
	flex-wrap: wrap;
}

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

@media (max-width: 768px) {
	.tw-blog-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.tw-single-article-wrap {
		padding-bottom: 48px;
	}

	.tw-article-meta-strip {
		border-radius: 20px;
		padding: 14px 18px;
	}

	.tw-article-single {
		border-radius: 20px;
	}

	.tw-article-single__body {
		padding: 24px 20px;
	}

	.tw-article-single__thumb-wrap {
		border-radius: 16px;
		margin-bottom: 24px;
	}

	.tw-editorial-content {
		font-size: 1.05rem;
		line-height: 1.8;
	}

	.tw-editorial-content .alignleft,
	.tw-editorial-content .alignright {
		float: none;
		margin: 20px auto;
		max-width: 100%;
	}

	.tw-article-share-bar {
		padding: 16px 20px;
	}

	.tw-article-author-card {
		padding: 20px;
		flex-direction: column;
		text-align: center;
	}

	.tw-article-author-card__link {
		justify-content: center;
	}

	.tw-article-nav-grid {
		grid-template-columns: 1fr;
	}

	.tw-article-nav-card--next {
		text-align: left;
	}

	.tw-article-nav-card--next .tw-article-nav-card__label {
		justify-content: flex-start;
	}
}
