/**
 * API China — Readable layout for article + knowledge center pages
 * Fixes oversized Helix heading fonts and narrow content feel.
 */

/* -------------------------------------------------------------------------- */
/* Wider content containers                                                   */
/* -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
	body.view-article #sp-main-body > .container,
	body.itemid-241 #sp-main-body > .container,
	body.itemid-241 .sppb-row-container {
		max-width: 1280px;
	}
}

@media (min-width: 1400px) {
	body.view-article #sp-main-body > .container,
	body.itemid-241 #sp-main-body > .container,
	body.itemid-241 .sppb-row-container {
		max-width: 1360px;
	}
}

/* -------------------------------------------------------------------------- */
/* Article detail pages                                                       */
/* -------------------------------------------------------------------------- */
body.view-article #sp-main-body {
	padding-top: 140px;
	padding-bottom: 72px;
}

body.view-article .article-details {
	max-width: 1080px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 12px;
}

body.view-article .article-details .article-header h1,
body.view-article .article-details .article-header h2 {
	font-size: clamp(1.65rem, 2.2vw, 2rem) !important;
	line-height: 1.35 !important;
	font-weight: 700 !important;
	color: #e97025 !important;
	margin: 0 0 0.75rem;
	letter-spacing: -0.01em;
}

body.view-article .article-details .article-info {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
	margin-bottom: 1.25rem;
	font-size: 0.875rem;
	line-height: 1.5;
	color: #667085;
}

body.view-article .article-details .article-info a {
	color: #0b54e4;
}

body.view-article .article-details .article-full-image {
	float: none !important;
	width: 100%;
	margin: 0 0 1.75rem !important;
	text-align: center;
}

body.view-article .article-details .article-full-image img {
	display: block;
	width: 100%;
	max-width: 720px;
	height: auto;
	margin: 0 auto;
	border-radius: 14px;
}

body.view-article .article-details [itemprop="articleBody"] {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: #1f2937;
}

body.view-article .article-details [itemprop="articleBody"] p {
	margin: 0 0 1.1rem;
	padding: 0;
	display: block;
	width: auto;
	clear: none;
	position: static;
}

body.view-article .article-details [itemprop="articleBody"] h2 {
	font-size: clamp(1.25rem, 1.6vw, 1.45rem) !important;
	line-height: 1.4 !important;
	font-weight: 700 !important;
	color: #0f172a !important;
	margin: 2rem 0 0.75rem;
}

body.view-article .article-details [itemprop="articleBody"] h3 {
	font-size: clamp(1.1rem, 1.3vw, 1.2rem) !important;
	line-height: 1.45 !important;
	font-weight: 650 !important;
	color: #111827 !important;
	margin: 1.5rem 0 0.55rem;
}

body.view-article .article-details [itemprop="articleBody"] ul,
body.view-article .article-details [itemprop="articleBody"] ol {
	margin: 0 0 1.2rem;
	padding-left: 1.35rem;
}

body.view-article .article-details [itemprop="articleBody"] li {
	margin-bottom: 0.45rem;
	line-height: 1.7;
}

body.view-article .article-details [itemprop="articleBody"] hr {
	margin: 2rem 0;
	border: 0;
	border-top: 1px solid #e5e7eb;
}

body.view-article .article-details [itemprop="articleBody"] a {
	color: #0b54e4;
	text-decoration: underline;
	text-underline-offset: 2px;
}

body.view-article .article-social-share {
	margin-top: 2rem;
}

/* -------------------------------------------------------------------------- */
/* Knowledge center / interesting-features (itemid 241)                       */
/* -------------------------------------------------------------------------- */
body.itemid-241 #sp-main-body {
	padding-top: 120px;
	padding-bottom: 64px;
}

/* Soften giant decorative "News" title */
body.itemid-241 #sppb-addon-1629472682738 .sppb-addon-header .sppb-addon-title {
	font-size: clamp(64px, 10vw, 120px) !important;
	line-height: 0.95 !important;
	opacity: 0.12;
	letter-spacing: -0.03em;
}

/* Hero title "คลังความรู้" */
body.itemid-241 #sppb-addon-1629472682740 .sppb-addon-title {
	font-size: clamp(2rem, 3.5vw, 2.75rem) !important;
	line-height: 1.2 !important;
	margin-bottom: 12px !important;
	font-weight: 800 !important;
}

body.itemid-241 #sppb-addon-1629472682740 .sppb-addon-text-block .sppb-addon-content {
	font-size: 1.0625rem !important;
	line-height: 1.7 !important;
	color: #475569;
	max-width: 36rem;
}

/* Article cards grid */
body.itemid-241 .sppb-addon-articles .sppb-addon-article {
	background: #fff;
	border: 1px solid #e8eef7;
	border-radius: 16px;
	overflow: hidden;
	height: 100%;
	display: flex;
	flex-direction: column;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.itemid-241 .sppb-addon-articles .sppb-addon-article:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

body.itemid-241 .sppb-addon-articles .sppb-addon-article-layout {
	margin-bottom: 28px;
	padding-left: 12px !important;
	padding-right: 12px !important;
}

body.itemid-241 .sppb-addon-articles .sppb-article-img-wrap {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f8fafc;
}

body.itemid-241 .sppb-addon-articles .sppb-article-img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

body.itemid-241 .sppb-addon-articles .sppb-article-info-wrap {
	background: #fff !important;
	padding: 18px 18px 20px !important;
	flex: 1;
	display: flex;
	flex-direction: column;
}

body.itemid-241 .sppb-addon-articles .sppb-article-info-wrap h3 {
	font-size: 1.05rem !important;
	line-height: 1.4 !important;
	font-weight: 700 !important;
	margin: 0 0 0.55rem !important;
}

body.itemid-241 .sppb-addon-articles .sppb-article-info-wrap h3 a {
	color: #0f172a !important;
}

body.itemid-241 .sppb-addon-articles .sppb-article-info-wrap h3 a:hover {
	color: #0b54e4 !important;
}

body.itemid-241 .sppb-addon-articles .sppb-article-info-wrap .sppb-article-introtext,
body.itemid-241 .sppb-addon-articles .sppb-article-info-wrap p {
	font-size: 0.9375rem !important;
	line-height: 1.65 !important;
	color: #64748b !important;
	margin: 0 0 0.85rem !important;
	padding: 0 !important;
	display: block !important;
	width: auto !important;
	position: static !important;
}

body.itemid-241 .sppb-addon-articles .sppb-readmore,
body.itemid-241 .sppb-addon-articles .sppb-article-info-wrap a.sppb-readmore,
body.itemid-241 .sppb-addon-articles .sppb-article-info-wrap > a:last-child {
	font-size: 0.9rem !important;
	font-weight: 600;
	color: #0b54e4 !important;
	margin-top: auto;
}

/* -------------------------------------------------------------------------- */
/* Mobile                                                                     */
/* -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
	body.view-article #sp-main-body,
	body.itemid-241 #sp-main-body {
		padding-top: 100px;
		padding-bottom: 48px;
	}

	body.view-article .article-details {
		padding: 0 4px;
	}

	body.itemid-241 .sppb-addon-articles .sppb-addon-article-layout {
		margin-bottom: 20px;
	}
}
