/* =============================================================
   AM Blog Article Template  –  assets/css/am-blog-article.css
   Loaded only on the "AM Blog Article" template via functions.php
   ============================================================= */

/* ── Page wrapper ───────────────────────────────────────────── */
.am-blog-page {
	background: #f4f5f7;
	padding: 64px 0 80px;
	min-height: 60vh;
}

.am-blog-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	gap: 32px;
	align-items: flex-start;
}

/* ── RTL: sidebar on the left (start), main on the right (end)
   LTR: sidebar on the right, main on the left ──────────────── */

/* Default (LTR): main first, sidebar second */
.am-blog-main   { order: 1; }
.am-blog-sidebar{ order: 2; }

/* RTL: sidebar comes first visually */
body.rtl .am-blog-main    { order: 2; }
body.rtl .am-blog-sidebar { order: 1; }

body.post-template-single-am-blog .page-wrapper {
    overflow: visible !important;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.am-blog-sidebar {
	flex: 0 0 320px;

	width: 320px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	position: -webkit-sticky;
	position: sticky;
	top: 115px;
	align-self: flex-start;
	height: fit-content;
}

.am-blog-page,
.am-blog-container {
	overflow: visible !important;
}

/* ── CTA box ────────────────────────────────────────────────── */
.am-sidebar-cta {
	position: relative;
	overflow: hidden;
	background: linear-gradient(160deg, #0F0E15 0%, #373643 100%);
	border-radius: 16px;
	padding: 36px 28px 32px;
	color: #ffffff;
}

.am-cta-glow {
	position: absolute;
	top: -80px;
	left: 50%;
	transform: translateX(-50%);
	width: 320px;
	height: 320px;
	background: radial-gradient(circle, rgba(226, 32, 26, 0.35) 0%, transparent 70%);
	pointer-events: none;
}

.am-cta-content {
	position: relative;
	z-index: 1;
}

.am-cta-heading {
	font-family: 'Fahkwang', '29LTBukra-Bold', sans-serif;
	font-size: 20px;
	font-weight: 700;
	color: #ffffff;
	margin-bottom: 12px;
	line-height: 1.4;
}

.am-cta-text {
	font-family: 'Lato', '29LTBukra-Regular', sans-serif;
	font-size: 14px;
	color: rgba(255,255,255,0.75);
	line-height: 1.7;
	margin-bottom: 24px;
}

.am-cta-btn {
	display: inline-block;
	background: #E2201A;
	color: #ffffff;
	font-family: 'Lato', sans-serif;
	font-size: 15px;
	font-weight: 600;
	padding: 12px 28px;
	border-radius: 50px;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.15s ease;
}

.am-cta-btn:hover,
.am-cta-btn:focus {
	background: #B71B15;
	color: #ffffff;
	transform: translateY(-2px);
	outline: none;
}

/* ── Related articles ───────────────────────────────────────── */
.am-sidebar-related {
	background: #ffffff;
	border-radius: 16px;
	padding: 28px 24px;
	border: 1px solid rgba(0,0,0,0.06);
}

.am-related-heading {
	font-family: 'Fahkwang', '29LTBukra-Bold', sans-serif;
	font-size: 17px;
	font-weight: 700;
	color: #1e1d27;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid #E2201A;
	display: inline-block;
}

.am-related-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.am-related-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.am-related-thumb {
	flex: 0 0 64px;
}

.am-related-thumb img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.am-related-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.am-related-title {
	font-family: 'Fahkwang', '29LTBukra-Regular', sans-serif;
	font-size: 13.5px;
	font-weight: 600;
	color: #1e1d27;
	text-decoration: none;
	line-height: 1.45;
	transition: color 0.15s;
}

.am-related-title:hover {
	color: #E2201A;
}

.am-related-date {
	font-family: 'Lato', sans-serif;
	font-size: 12px;
	color: #848484;
}

/* ── Main article area ──────────────────────────────────────── */
.am-blog-main {
	flex: 1 1 0;
	min-width: 0;
}

.am-article {
	background: #ffffff;
	border-radius: 16px;
	padding: 48px 52px;
	border: 1px solid rgba(0,0,0,0.06);
}

/* ── Article header ── */
.am-article-header {
	margin-bottom: 28px;
}

.am-article-title {
	font-family: 'Fahkwang', '29LTBukra-Bold', sans-serif;
	font-size: clamp(26px, 3.5vw, 40px);
	font-weight: 700;
	color: #1e1d27;
	line-height: 1.25;
	margin-bottom: 16px;
}

.am-article-meta {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.am-meta-date {
	display: flex;
	align-items: center;
	gap: 6px;
	font-family: 'Lato', sans-serif;
	font-size: 13.5px;
	color: #848484;
}

.am-meta-icon {
	width: 16px;
	height: 16px;
	color: #E2201A;
	flex-shrink: 0;
}

/* ── Featured image ── */
.am-article-thumbnail {
	margin-bottom: 36px;
}

.am-featured-img {
	width: 100%;
	height: auto;
	max-height: 480px;
	object-fit: cover;
	border-radius: 12px;
	display: block;
}

/* ── Article body ── */
.am-article-content {
	font-family: 'Lato', '29LTBukra-Regular', sans-serif;
	font-size: 17px;
	line-height: 1.85;
	color: #373643;
}

.am-article-content p {
	margin-bottom: 20px;
}

/* Headings inside post content: red left accent bar (LTR) */
.am-article-content h2,
.am-article-content h3 {
	font-family: 'Fahkwang', '29LTBukra-Bold', sans-serif;
	font-weight: 700;
	color: #1e1d27;
	padding-left: 16px;
	border-left: 4px solid #E2201A;
	margin-top: 36px;
	margin-bottom: 16px;
	line-height: 1.3;
}

/* RTL: flip accent to right border */
body.rtl .am-article-content h2,
body.rtl .am-article-content h3 {
	padding-left: 0;
	padding-right: 16px;
	border-left: none;
	border-right: 4px solid #E2201A;
}

.am-article-content h2 {
	font-size: clamp(22px, 2.5vw, 28px);
}

.am-article-content h3 {
	font-size: clamp(18px, 2vw, 22px);
}

.am-article-content h4,
.am-article-content h5,
.am-article-content h6 {
	font-family: 'Fahkwang', '29LTBukra-Bold', sans-serif;
	font-weight: 600;
	color: #1e1d27;
	margin-top: 28px;
	margin-bottom: 12px;
}

.am-article-content a {
	color: #E2201A;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.am-article-content a:hover {
	color: #B71B15;
}

.am-article-content ul,
.am-article-content ol {
	padding-left: 28px;
	margin-bottom: 20px;
}

body.rtl .am-article-content ul,
body.rtl .am-article-content ol {
	padding-left: 0;
	padding-right: 28px;
}

.am-article-content li {
	margin-bottom: 8px;
}

.am-article-content blockquote {
	border-left: 4px solid #E2201A;
	padding: 16px 20px;
	margin: 28px 0;
	background: #FFF0EF;
	border-radius: 0 8px 8px 0;
	font-style: italic;
	color: #373643;
}

body.rtl .am-article-content blockquote {
	border-left: none;
	border-right: 4px solid #E2201A;
	border-radius: 8px 0 0 8px;
}

.am-article-content img {
	max-width: 100%;
	border-radius: 8px;
}

/* ── Post navigation ── */
.am-post-nav {
	display: flex;
	gap: 16px;
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid rgba(0,0,0,0.08);
}

.am-post-nav-prev,
.am-post-nav-next {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

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

.am-nav-label {
	display: block;
	font-family: 'Lato', sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #E2201A;
	margin-bottom: 4px;
}

.am-nav-title a {
	font-family: 'Fahkwang', '29LTBukra-Regular', sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: #1e1d27;
	text-decoration: none;
	line-height: 1.4;
	transition: color 0.15s;
}

.am-nav-title a:hover {
	color: #E2201A;
}

/* ── Responsive ─────────────────────────────────────────────── */

/* Tablet: sidebar stacks below main */
@media (max-width: 991px) {
	.am-blog-container {
		flex-direction: column;
	}

	.am-blog-main,
	.am-blog-sidebar {
		order: unset !important;
		width: 100%;
		flex: none;
	}

	/* On mobile: main first, sidebar below */
	.am-blog-main    { order: 1 !important; }
	.am-blog-sidebar { order: 2 !important; }

	.am-blog-sidebar {
		position: static;
		flex-direction: row;
		gap: 24px;
		align-items: flex-start;
	}

	.am-sidebar-cta,
	.am-sidebar-related {
		flex: 1 1 300px;
	}
}

/* Phablet: sidebar cards stack */
@media (max-width: 680px) {
	.am-blog-sidebar {
		flex-direction: column;
	}

	.am-sidebar-cta,
	.am-sidebar-related {
		flex: none;
		width: 100%;
	}
}

/* Mobile: comfortable reading width */
@media (max-width: 559px) {
	.am-blog-page {
		padding: 32px 0 56px;
	}

	.am-blog-container {
		padding: 0 16px;
		gap: 20px;
	}

	.am-article {
		padding: 28px 20px;
	}

	.am-article-title {
		font-size: 24px;
	}

	.am-post-nav {
		flex-direction: column;
		gap: 20px;
	}

	.am-post-nav-next {
		text-align: start;
		align-items: flex-start;
	}
}

/* =============================================================
   FAQ Section
   ============================================================= */

.am-faq-section {
	margin-top: 52px;
	padding-top: 44px;
	border-top: 1px solid rgba(0,0,0,0.08);
}

.am-faq-title {
	font-family: 'Fahkwang', '29LTBukra-Bold', sans-serif;
	font-size: clamp(20px, 2.5vw, 26px);
	font-weight: 700;
	color: #1e1d27;
	margin-bottom: 28px;
	padding-left: 16px;
	border-left: 4px solid #E2201A;
	line-height: 1.3;
}

body.rtl .am-faq-title {
	padding-left: 0;
	padding-right: 16px;
	border-left: none;
	border-right: 4px solid #E2201A;
}

/* ── FAQ list ── */
.am-faq-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* ── FAQ item ── */
.am-faq-item {
	border: 1px solid rgba(0,0,0,0.08);
	border-radius: 12px;
	overflow: hidden;
	background: #fafafa;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.am-faq-item:has(.am-faq-question[aria-expanded="true"]) {
	border-color: rgba(226, 32, 26, 0.4);
	background: #ffffff;
	box-shadow: 0 2px 16px rgba(226, 32, 26, 0.06);
}

/* ── Question button ── */
.am-faq-question {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	background: none;
	border: none;
	cursor: pointer;
	text-align: right;
	font-family: 'Fahkwang', '29LTBukra-Bold', sans-serif;
	font-size: 15.5px;
	font-weight: 600;
	color: #1e1d27;
	line-height: 1.45;
	transition: color 0.15s;
}

body:not(.rtl) .am-faq-question {
	text-align: left;
}

.am-faq-question:hover {
	color: #E2201A;
}

.am-faq-question[aria-expanded="true"] {
	color: #E2201A;
}

/* ── +/- icon ── */
.am-faq-icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid #E2201A;
	position: relative;
	transition: background 0.2s ease, transform 0.3s ease;
}

/* Horizontal bar */
.am-faq-icon::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 10px;
	height: 2px;
	background: #E2201A;
	border-radius: 2px;
	transition: background 0.2s;
}

/* Vertical bar */
.am-faq-icon::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 2px;
	height: 10px;
	background: #E2201A;
	border-radius: 2px;
	transition: background 0.2s, opacity 0.2s, transform 0.3s;
}

/* Open state */
.am-faq-question[aria-expanded="true"] .am-faq-icon {
	background: #E2201A;
	transform: rotate(45deg);
}

.am-faq-question[aria-expanded="true"] .am-faq-icon::before,
.am-faq-question[aria-expanded="true"] .am-faq-icon::after {
	background: #ffffff;
}

/* ── Answer panel ── */
.am-faq-answer[hidden] {
	display: none;
}

.am-faq-answer-inner {
	padding: 0 24px 22px;
	font-family: 'Lato', '29LTBukra-Regular', sans-serif;
	font-size: 15.5px;
	line-height: 1.85;
	color: #373643;
}

.am-faq-answer-inner p:last-child {
	margin-bottom: 0;
}

.am-faq-answer-inner a {
	color: #E2201A;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ── FAQ responsive ── */
@media (max-width: 559px) {
	.am-faq-title {
		font-size: 18px;
	}

	.am-faq-question {
		font-size: 14px;
		padding: 16px 18px;
	}

	.am-faq-answer-inner {
		padding: 0 18px 18px;
		font-size: 14px;
	}
}