/* ===============================================
 * PCP Templates — single, page, archive, search, 404
 * Scoped under .pcp-tpl-* to avoid all conflicts.
 * =============================================== */

.pcp-tpl {
	background: var(--pcp-cream, #FFFDF5);
	color: var(--pcp-text, #2a2a2a);
	font-family: Georgia, "Times New Roman", serif;
	min-height: 60vh;
	padding-bottom: 60px;
}
body.pcp-has-bottom-nav .pcp-tpl { padding-bottom: 100px; }

.pcp-tpl__wrap {
	max-width: 820px;
	margin: 0 auto;
	padding: 32px 20px 0;
}

/* ---------- Breadcrumbs ---------- */
.pcp-tpl-crumbs ol {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 14px;
	color: #666;
}
.pcp-tpl-crumbs a {
	color: var(--pcp-burgundy, #8B1A1A);
	text-decoration: none;
}
.pcp-tpl-crumbs a:hover { text-decoration: underline; }
.pcp-tpl-crumbs__sep { margin: 0 4px; color: #aaa; }

/* ---------- Flourish ---------- */
.pcp-tpl-flourish {
	display: inline-flex;
	color: var(--pcp-gold, #C9A84C);
	margin-bottom: 12px;
}

/* ---------- Article (single + page) ---------- */
.pcp-tpl-article {
	background: #fff;
	border: 1px solid rgba(139, 26, 26, 0.08);
	border-radius: var(--pcp-radius-lg, 10px);
	box-shadow: var(--pcp-shadow-md, 0 4px 12px rgba(0,0,0,0.08));
	padding: 40px 32px;
	margin-bottom: 40px;
}
.pcp-tpl-article__header {
	text-align: center;
	padding-bottom: 24px;
	margin-bottom: 28px;
	border-bottom: 1px solid rgba(201, 168, 76, 0.25);
}
.pcp-tpl-article__title {
	font-family: Georgia, serif;
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.2;
	color: var(--pcp-burgundy, #8B1A1A);
	margin: 8px 0 16px;
	font-weight: 700;
}
.pcp-tpl-article__chips {
	list-style: none;
	margin: 0;
	padding: 0;
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}
.pcp-tpl-article__chips a {
	display: inline-block;
	padding: 4px 12px;
	background: rgba(139, 26, 26, 0.08);
	color: var(--pcp-burgundy, #8B1A1A);
	border-radius: 999px;
	font-size: 13px;
	text-decoration: none;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	transition: background .2s;
}
.pcp-tpl-article__chips a:hover { background: rgba(139, 26, 26, 0.15); }

.pcp-tpl-article__body {
	font-size: 18px;
	line-height: 1.75;
	color: #2a2a2a;
}
.pcp-tpl-article__body p { margin: 0 0 1.2em; }
.pcp-tpl-article__body h2,
.pcp-tpl-article__body h3 {
	color: var(--pcp-burgundy, #8B1A1A);
	font-family: Georgia, serif;
	margin-top: 1.6em;
	margin-bottom: 0.5em;
}
.pcp-tpl-article__body h2 { font-size: 26px; }
.pcp-tpl-article__body h3 { font-size: 22px; }
.pcp-tpl-article__body a {
	color: var(--pcp-burgundy, #8B1A1A);
	text-decoration: underline;
	text-decoration-color: rgba(139, 26, 26, 0.35);
	text-underline-offset: 3px;
}
.pcp-tpl-article__body blockquote {
	border-left: 4px solid var(--pcp-gold, #C9A84C);
	margin: 1.4em 0;
	padding: 0.4em 1.2em;
	color: #444;
	font-style: italic;
	background: rgba(201, 168, 76, 0.06);
}
.pcp-tpl-article__body ul,
.pcp-tpl-article__body ol { padding-left: 1.6em; margin: 0 0 1.2em; }
.pcp-tpl-article__body li { margin-bottom: 0.4em; }

/* ---------- Prev / Next ---------- */
.pcp-tpl-prevnext {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin: 40px 0;
}
.pcp-tpl-prevnext__link {
	display: block;
	background: #fff;
	border: 1px solid rgba(139, 26, 26, 0.12);
	border-radius: var(--pcp-radius-md, 6px);
	padding: 16px 20px;
	text-decoration: none;
	color: inherit;
	transition: border-color .2s, transform .2s;
}
.pcp-tpl-prevnext__link:hover {
	border-color: var(--pcp-burgundy, #8B1A1A);
	transform: translateY(-2px);
}
.pcp-tpl-prevnext__next { text-align: right; }
.pcp-tpl-prevnext__dir {
	display: block;
	font-size: 12px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--pcp-burgundy, #8B1A1A);
	margin-bottom: 4px;
}
.pcp-tpl-prevnext__title {
	font-family: Georgia, serif;
	font-size: 16px;
	color: #333;
	line-height: 1.4;
}

/* ---------- Section headings ---------- */
.pcp-tpl-section-head {
	text-align: center;
	margin: 40px 0 24px;
}
.pcp-tpl-eyebrow {
	display: inline-block;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 12px;
	color: var(--pcp-gold, #C9A84C);
	margin-bottom: 8px;
}
.pcp-tpl-section-head h2 {
	font-family: Georgia, serif;
	color: var(--pcp-burgundy, #8B1A1A);
	font-size: 28px;
	margin: 0;
}

/* ---------- Card grid (archive / search / related) ---------- */
.pcp-tpl-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 18px;
	margin-bottom: 32px;
}
.pcp-tpl-grid--3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.pcp-tpl-card {
	background: #fff;
	border: 1px solid rgba(139, 26, 26, 0.08);
	border-radius: var(--pcp-radius-md, 6px);
	box-shadow: var(--pcp-shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
	transition: transform .2s, box-shadow .2s, border-color .2s;
}
.pcp-tpl-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--pcp-shadow-md, 0 4px 12px rgba(0,0,0,0.08));
	border-color: rgba(139, 26, 26, 0.25);
}
.pcp-tpl-card__link {
	display: block;
	padding: 20px 22px;
	text-decoration: none;
	color: inherit;
	height: 100%;
}
.pcp-tpl-card__eyebrow {
	display: inline-block;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 11px;
	color: var(--pcp-gold, #C9A84C);
	margin-bottom: 8px;
}
.pcp-tpl-card__title {
	font-family: Georgia, serif;
	color: var(--pcp-burgundy, #8B1A1A);
	font-size: 19px;
	line-height: 1.3;
	margin: 0 0 10px;
	font-weight: 700;
}
.pcp-tpl-card__excerpt {
	font-size: 15px;
	color: #555;
	line-height: 1.55;
	margin: 0 0 14px;
}
.pcp-tpl-card__cta {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: var(--pcp-burgundy, #8B1A1A);
}

/* ---------- Hero (archive / search / 404) ---------- */
.pcp-tpl-hero {
	background: linear-gradient(135deg, var(--pcp-burgundy, #8B1A1A) 0%, var(--pcp-burgundy-dark, #5C1010) 100%);
	color: #fff;
	padding: 56px 20px 48px;
	text-align: center;
	border-bottom: 4px solid var(--pcp-gold, #C9A84C);
}
.pcp-tpl-hero__inner {
	max-width: 760px;
	margin: 0 auto;
}
.pcp-tpl-hero .pcp-tpl-flourish { color: var(--pcp-gold, #C9A84C); }
.pcp-tpl-hero__eyebrow {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 12px;
	color: var(--pcp-gold, #C9A84C);
	margin: 0 0 8px;
}
.pcp-tpl-hero__title {
	font-family: Georgia, serif;
	font-size: clamp(28px, 4.5vw, 44px);
	line-height: 1.2;
	margin: 0 0 12px;
	color: #fff;
	font-weight: 700;
}
.pcp-tpl-hero__desc {
	font-size: 17px;
	line-height: 1.6;
	color: rgba(255, 253, 245, 0.92);
	margin: 0 auto 16px;
	max-width: 640px;
}
.pcp-tpl-hero__count {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	color: rgba(255, 253, 245, 0.85);
	margin: 0;
}

/* ---------- Search form (inside hero) ---------- */
.pcp-tpl-searchform {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	border-radius: 999px;
	padding: 6px 6px 6px 18px;
	max-width: 520px;
	margin: 20px auto 0;
	box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.pcp-tpl-searchform svg { color: #999; flex-shrink: 0; }
.pcp-tpl-searchform input {
	flex: 1;
	border: 0;
	background: transparent;
	font-size: 16px;
	font-family: inherit;
	padding: 10px 8px;
	color: #333;
	outline: none;
	min-width: 0;
}
.pcp-tpl-searchform button {
	background: var(--pcp-burgundy, #8B1A1A);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 10px 22px;
	font-weight: 600;
	cursor: pointer;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	transition: background .2s;
}
.pcp-tpl-searchform button:hover { background: var(--pcp-burgundy-dark, #5C1010); }

/* ---------- Pagination ---------- */
.pcp-tpl-pagination {
	margin: 32px 0 16px;
	text-align: center;
}
.pcp-tpl-pagination ul {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.pcp-tpl-pagination a,
.pcp-tpl-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: var(--pcp-radius-sm, 4px);
	background: #fff;
	color: var(--pcp-burgundy, #8B1A1A);
	border: 1px solid rgba(139, 26, 26, 0.15);
	text-decoration: none;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	font-weight: 600;
}
.pcp-tpl-pagination a:hover {
	background: var(--pcp-burgundy, #8B1A1A);
	color: #fff;
}
.pcp-tpl-pagination .current {
	background: var(--pcp-burgundy, #8B1A1A);
	color: #fff;
	border-color: var(--pcp-burgundy, #8B1A1A);
}
.pcp-tpl-pagination .dots { background: transparent; border: 0; }

/* ---------- Empty state ---------- */
.pcp-tpl-empty {
	text-align: center;
	padding: 40px 20px 60px;
	color: #555;
	font-size: 17px;
}
.pcp-tpl-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-top: 18px;
}
.pcp-tpl-chip {
	display: inline-block;
	padding: 8px 16px;
	background: #fff;
	border: 1px solid var(--pcp-burgundy, #8B1A1A);
	color: var(--pcp-burgundy, #8B1A1A);
	border-radius: 999px;
	text-decoration: none;
	font-size: 14px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	transition: background .2s, color .2s;
}
.pcp-tpl-chip:hover {
	background: var(--pcp-burgundy, #8B1A1A);
	color: #fff;
}

/* ---------- Buttons ---------- */
.pcp-tpl-btn {
	display: inline-block;
	padding: 12px 28px;
	background: var(--pcp-burgundy, #8B1A1A);
	color: #fff;
	border-radius: 999px;
	text-decoration: none;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-weight: 600;
	margin-top: 16px;
	transition: background .2s, transform .2s;
}
.pcp-tpl-btn:hover {
	background: var(--pcp-burgundy-dark, #5C1010);
	transform: translateY(-1px);
}
.pcp-tpl-btn--ghost {
	background: transparent;
	color: #fff;
	border: 2px solid rgba(255, 253, 245, 0.6);
}
.pcp-tpl-btn--ghost:hover {
	background: rgba(255, 253, 245, 0.12);
	border-color: #fff;
}

/* ---------- 404 specific ---------- */
.pcp-tpl-404-quote {
	margin: 18px auto;
	max-width: 520px;
	font-family: Georgia, serif;
	color: var(--pcp-gold, #C9A84C);
	font-size: 17px;
	line-height: 1.5;
	border: 0;
	padding: 0;
}
.pcp-tpl-404-cats {
	list-style: none;
	margin: 0 0 40px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}
.pcp-tpl-404-cats a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	background: #fff;
	border: 1px solid rgba(139, 26, 26, 0.1);
	border-radius: var(--pcp-radius-md, 6px);
	color: var(--pcp-burgundy, #8B1A1A);
	text-decoration: none;
	font-family: Georgia, serif;
	font-size: 17px;
	transition: border-color .2s, transform .2s;
}
.pcp-tpl-404-cats a:hover {
	border-color: var(--pcp-burgundy, #8B1A1A);
	transform: translateY(-2px);
}
.pcp-tpl-404-cats__count {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 13px;
	background: rgba(139, 26, 26, 0.08);
	padding: 2px 10px;
	border-radius: 999px;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
	.pcp-tpl__wrap { padding: 20px 16px 0; }
	.pcp-tpl-article { padding: 28px 20px; }
	.pcp-tpl-article__body { font-size: 17px; line-height: 1.7; }
	.pcp-tpl-prevnext { grid-template-columns: 1fr; }
	.pcp-tpl-prevnext__next { text-align: left; }
	.pcp-tpl-hero { padding: 40px 16px 36px; }
	.pcp-tpl-searchform { padding: 4px 4px 4px 14px; }
	.pcp-tpl-searchform button { padding: 8px 16px; font-size: 14px; }
}
