/* Partners item detail — aligns with partners-list-pages (KFN blue / green) */
.pd-page {
	--pd-blue: #163269;
	--pd-blue-soft: #1e4a8a;
	--pd-green: #3db166;
	--pd-surface: #f8fafc;
	--pd-border: #e2e8f0;
	--pd-text: #334155;
	--pd-muted: #64748b;
	background: linear-gradient(180deg, #f0f5fb 0%, #f8fafc 28%, #ffffff 100%);
	padding: 0 0 56px;
	overflow-x: hidden;
}

.pd-page__container {
	margin: 0 auto;
	padding-left: 20px;
	padding-right: 20px;
}

.pd-layout {
	display: flex;
	flex-wrap: wrap;
	gap: 20px 20px;
	align-items: flex-start;
	padding-top: 10px;
}

.pd-main {
	flex: 1 1 min(100%, 720px);
	min-width: 0;
}

.pd-aside {
	flex: 0 1 340px;
	min-width: 260px;
}

@media (min-width: 992px) {
	.pd-aside {
		position: sticky;
		align-self: flex-start;
	}
}

/* —— Article card —— */
.pd-article {
	background: #fff;
	border: 1px solid var(--pd-border);
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(22, 50, 105, 0.08);
	overflow: hidden;
}

/* —— Hero header —— */
.pd-hero {
	position: relative;
}

.pd-hero__banner {
	position: relative;
	padding: clamp(26px, 4vw, 40px) clamp(22px, 3vw, 36px) clamp(28px, 4vw, 38px);
	background: linear-gradient(128deg, #0c1f3d 0%, var(--pd-blue) 38%, #1a5f9e 72%, #143d6e 100%);
	overflow: hidden;
	border-radius: 15px 15px 0 0;
}

.pd-hero__decor {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.pd-hero__decor::before,
.pd-hero__decor::after {
	content: '';
	position: absolute;
	pointer-events: none;
	border-radius: 50%;
	filter: blur(0.5px);
}

/* วงแสงมุมขวาบน */
.pd-hero__decor::before {
	width: min(420px, 90vw);
	height: min(420px, 90vw);
	top: -45%;
	right: -18%;
	background: radial-gradient(circle at 40% 40%, rgba(61, 177, 102, 0.35) 0%, transparent 62%);
	opacity: 0.9;
}

/* วงอ่อนมุมซ้ายล่าง */
.pd-hero__decor::after {
	width: min(320px, 70vw);
	height: min(320px, 70vw);
	bottom: -55%;
	left: -12%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 55%);
}

.pd-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 52rem;
}

.pd-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
	padding: 5px 12px;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	color: rgba(255, 255, 255, 0.92) !important;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.pd-hero__eyebrow:hover {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}

.pd-hero__title {
	margin: 0 0 18px;
	font-size: clamp(1.45rem, 3.2vw, 2.05rem);
	font-weight: 800;
	line-height: 1.28;
	color: #fff !important;
	letter-spacing: -0.03em;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.18);
}

.pd-hero__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.pd-hero__chip {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border-radius: 999px;
	font-size: 0.86rem;
	font-weight: 700;
	line-height: 1.25;
}

.pd-hero__chip--year {
	background: rgba(255, 255, 255, 0.95);
	color: var(--pd-blue);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.pd-hero__chip--type {
	background: linear-gradient(135deg, rgba(61, 177, 102, 0.95), #2d9a5a);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.25);
	box-shadow: 0 4px 14px rgba(61, 177, 102, 0.35);
}

.pd-hero__facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 14px;
	padding: 20px clamp(18px, 2.5vw, 28px) 24px;
	background: linear-gradient(180deg, #e8f0fa 0%, #f8fafc 45%, #ffffff 100%);
	border-bottom: 1px solid var(--pd-border);
}

.pd-fact-card {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 16px 16px 18px;
	background: #fff;
	border: 1px solid var(--pd-border);
	border-radius: 14px;
	box-shadow: 0 4px 16px rgba(22, 50, 105, 0.06);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.pd-fact-card:hover {
	border-color: #cbd5e1;
	box-shadow: 0 8px 22px rgba(22, 50, 105, 0.1);
}

.pd-fact-card__icon {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: linear-gradient(145deg, #ecfdf5, #d1fae5);
	color: var(--pd-green);
	font-size: 1.1rem;
}

.pd-fact-card__text {
	min-width: 0;
}

.pd-fact-card__label {
	margin: 0 0 4px;
	font-size: 0.9rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pd-muted);
}

.pd-fact-card__value {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: #1e293b;
	line-height: 1.45;
	word-break: break-word;
}

/* —— Featured image —— */
.pd-figure {
	margin: 0;
	padding: 0 28px;
	background: #fff;
}

.pd-figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
	margin-top: 20px;
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

/* —— Rich text —— */
.pd-content {
	padding: 28px;
	color: var(--pd-text);
	font-size: 1rem;
	line-height: 1.75;
}

.pd-content p {
	margin: 0 0 1em;
}

.pd-content p:last-child {
	margin-bottom: 0;
}

.pd-content h2,
.pd-content h3,
.pd-content h4 {
	color: var(--pd-blue);
	margin: 1.35em 0 0.6em;
	font-weight: 700;
	line-height: 1.35;
}

.pd-content h2:first-child,
.pd-content h3:first-child {
	margin-top: 0;
}

.pd-content ul,
.pd-content ol {
	margin: 0 0 1em;
	padding-left: 1.35em;
}

.pd-content a {
	color: var(--pd-blue-soft);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.pd-content a:hover {
	color: var(--pd-green);
}

/* —— PDF —— */
.pd-pdf-actions {
	padding: 0 28px 24px;
}

.pd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 26px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 0.95rem;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	border: none;
	cursor: pointer;
}

.pd-btn--primary {
	background: linear-gradient(135deg, var(--pd-green), #2d9a5a);
	color: #fff;
	box-shadow: 0 4px 16px rgba(61, 177, 102, 0.35);
}

.pd-btn--primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(61, 177, 102, 0.45);
	color: #fff;
}

.pd-btn--ghost {
	background: #fff;
	color: var(--pd-blue);
	border: 2px solid var(--pd-border);
}

.pd-btn--ghost:hover {
	border-color: var(--pd-green);
	color: var(--pd-green);
}

.pd-pdf-frame {
	padding: 0 28px 28px;
}

.pd-pdf-frame__inner {
	height: min(78vh, 820px);
	min-height: 420px;
	border: 1px solid var(--pd-border);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
	background: #f1f5f9;
}

.pd-pdf-frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: none;
}

/* —— Google Drive CTA (Material-style “Google” button) —— */
.pd-drive-link {
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
}

.pd-drive-link--after-gallery {
	margin-top: 28px;
	padding-top: 26px;
	border-top: 1px solid var(--pd-border);
}

.pd-drive-link--standalone {
	padding: 16px 28px 32px;
}

.pd-drive-link__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px 14px;
	min-height: 48px;
	padding: 12px 28px;
	font-size: 0.9375rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: #3c4043 !important;
	text-decoration: none !important;
	background: #fff;
	border: 1px solid #dadce0;
	border-radius: 24px;
	box-shadow:
		0 1px 2px rgba(60, 64, 67, 0.08),
		0 1px 3px rgba(60, 64, 67, 0.06);
	transition:
		background 0.2s ease,
		box-shadow 0.2s ease,
		border-color 0.2s ease,
		transform 0.18s ease;
	text-align: center;
	width: fit-content;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

.pd-drive-link__btn:hover {
	background: #f8f9fa;
	border-color: #d2e3fc;
	box-shadow:
		0 2px 8px rgba(60, 64, 67, 0.12),
		0 2px 12px rgba(26, 115, 232, 0.12);
	transform: translateY(-1px);
	color: #202124 !important;
}

.pd-drive-link__btn:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
}

.pd-drive-link__brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.pd-drive-link__g-logo {
	display: block;
	flex-shrink: 0;
}

.pd-drive-link__drive-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
	background: linear-gradient(135deg, #1a73e8 0%, #0066da 45%, #00832d 100%);
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(26, 115, 232, 0.35);
	line-height: 1.2;
}

.pd-drive-link__label {
	flex: 0 1 auto;
	max-width: 22rem;
	line-height: 1.35;
	text-align: center;
}

@media (min-width: 480px) {
	.pd-drive-link__btn {
		flex-wrap: nowrap;
	}
}

/* —— Gallery —— */
.pd-gallery {
	padding: 28px 28px 36px;
	border-top: 1px solid var(--pd-border);
	background:
		linear-gradient(180deg, rgba(248, 250, 252, 0.85) 0%, rgba(255, 255, 255, 0.65) 42%, #fff 100%);
}

.pd-gallery__head {
	margin-bottom: 22px;
}

.pd-gallery__title {
	margin: 0;
	padding: 2px 0 2px 2px;
	font-size: clamp(1.08rem, 2.4vw, 1.38rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.25;
	color: var(--pd-blue);
	display: flex;
	align-items: center;
	gap: 14px;
}

.pd-gallery__title::before {
	content: '';
	flex-shrink: 0;
	width: 5px;
	height: 1.25em;
	min-height: 1.5rem;
	border-radius: 6px;
	background: linear-gradient(180deg, #4fd188 0%, var(--pd-green) 38%, #2a8f54 100%);
	box-shadow:
		0 2px 10px rgba(61, 177, 102, 0.38),
		inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.pd-gallery__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
	gap: clamp(14px, 2.2vw, 22px);
	align-items: stretch;
}

.pd-gallery__card {
	display: block;
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	line-height: 0;
	text-decoration: none;
	background: #e8eef5;
	border: 1px solid rgba(226, 232, 240, 0.95);
	box-shadow:
		0 4px 22px rgba(22, 50, 105, 0.09),
		0 1px 4px rgba(15, 23, 42, 0.06);
	transition:
		transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.28s ease,
		border-color 0.2s ease;
}

.pd-gallery__card::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
	opacity: 0.85;
	transition: opacity 0.25s ease;
}

.pd-gallery__card:hover {
	transform: translateY(-4px);
	border-color: rgba(61, 177, 102, 0.35);
	box-shadow:
		0 14px 36px rgba(22, 50, 105, 0.14),
		0 6px 14px rgba(61, 177, 102, 0.12);
}

.pd-gallery__card:hover::after {
	opacity: 0.65;
}

.pd-gallery__card:focus-visible {
	outline: none;
	box-shadow:
		0 0 0 3px #fff,
		0 0 0 6px rgba(61, 177, 102, 0.55),
		0 12px 30px rgba(22, 50, 105, 0.12);
}

.pd-gallery__media {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.pd-gallery__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: scale(1.001);
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.pd-gallery__card:hover .pd-gallery__media img {
	transform: scale(1.07);
}

/* ห่อ .gallery สำหรับ iLightbox — ไม่ให้สไตล์ WP gallery รบกวนกริด */
.pd-gallery .pd-gallery-ilightbox-root.gallery {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	display: block;
	width: 100%;
	float: none;
	clear: none;
}

@media (prefers-reduced-motion: reduce) {
	.pd-gallery__card,
	.pd-gallery__media img {
		transition-duration: 0.01ms;
	}

	.pd-gallery__card:hover {
		transform: none;
	}

	.pd-gallery__card:hover .pd-gallery__media img {
		transform: none;
	}
}
.pd-widget {
	background: #fff;
	border: 1px solid var(--pd-border);
	border-radius: 14px;
	padding: 20px 18px 22px;
	margin-bottom: 22px;
	box-shadow: 0 6px 24px rgba(22, 50, 105, 0.06);
}

.pd-widget__title {
	margin: 0 0 16px;
	padding-bottom: 12px;
	font-size: 1rem;
	font-weight: 800;
	color: var(--pd-blue);
	border-bottom: 3px solid var(--pd-green);
	letter-spacing: 0.02em;
}

.pd-related {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.pd-related__item {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 12px;
	border-radius: 10px;
	background: var(--pd-surface);
	border: 1px solid transparent;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.pd-related__item:hover {
	border-color: #cbd5e1;
	background: #fff;
}

.pd-related__item--current {
	border-color: rgba(61, 177, 102, 0.45);
	background: #f0fdf4;
}

.pd-related__thumb {
	flex-shrink: 0;
	width: 88px;
	height: 88px;
	border-radius: 10px;
	overflow: hidden;
	background: #e2e8f0;
}

.pd-related__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pd-related__body {
	min-width: 0;
	flex: 1;
}

.pd-related__link {
	display: block;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.4;
	color: #1e293b;
	text-decoration: none;
	margin-bottom: 6px;
}

.pd-related__link:hover {
	color: var(--pd-blue-soft);
}

.pd-related__item--current .pd-related__link {
	color: #15803d;
	font-weight: 700;
}

.pd-related__date {
	font-size: 0.82rem;
	color: var(--pd-muted);
}

.pd-loadmore {
	text-align: center;
	margin-top: 8px;
	padding-top: 8px;
}

@media (max-width: 767px) {
	.pd-layout {
		padding-top: 10px;
	}

	.pd-hero__facts {
		grid-template-columns: 1fr;
	}

	.pd-content,
	.pd-pdf-actions,
	.pd-pdf-frame,
	.pd-drive-link--standalone,
	.pd-gallery,
	.pd-figure {
		padding-left: 18px;
		padding-right: 18px;
	}

	.pd-related__thumb {
		width: 72px;
		height: 72px;
	}
}
