/*
Theme Name: Thai Roots Project
Theme URI: https://piya.party
Author: Piya Willwerth
Author URI: https://piya.party
Description: A custom classic WordPress theme for the Thai Roots Project — a cultural organization connecting Thai adoptees worldwide.
Version: 1.0.5
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trp
Tags: custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   Self-hosted fonts
   ========================================================================== */

@font-face {
	font-family: 'Montserrat';
	src: url('assets/fonts/Montserrat-VariableFont_wght.ttf') format('truetype');
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Montserrat';
	src: url('assets/fonts/Montserrat-Italic-VariableFont_wght.ttf') format('truetype');
	font-weight: 100 900;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: 'EB Garamond';
	src: url('assets/fonts/EBGaramond-VariableFont_wght.ttf') format('truetype');
	font-weight: 400 800;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'EB Garamond';
	src: url('assets/fonts/EBGaramond-Italic-VariableFont_wght.ttf') format('truetype');
	font-weight: 400 800;
	font-style: italic;
	font-display: swap;
}

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
	--color-maroon:  #44131e;
	--color-rust:    #a44129;
	--color-black:   #1e1e1e;
	--color-amber:   #c37b3e;
	--color-cream:   #ebe2d0;
	--color-olive:   #828243;
	--color-white:   #ffffff;

	--font-heading:  'Montserrat', sans-serif;
	--font-body:     'EB Garamond', serif;

	--site-max-width: 1100px;
	--content-width:  720px;

	--spacing-xs:  0.5rem;
	--spacing-sm:  1rem;
	--spacing-md:  2rem;
	--spacing-lg:  4rem;
	--spacing-xl:  6rem;

	--transition: 0.2s ease;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	font-size: 18px;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.7;
	color: var(--color-black);
	background-color: var(--color-white);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--color-rust);
	text-decoration: none;
	transition: color var(--transition);
}

a:hover,
a:focus {
	color: var(--color-maroon);
	text-decoration: underline;
}

a.page-numbers:hover,
a.page-numbers:focus {
	text-decoration: none;
}

ul,
ol {
	padding-left: 1.5em;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: 600;
	line-height: 1.25;
	margin-top: 0;
	margin-bottom: 0.5em;
	color: var(--color-maroon);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem,  3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
	margin-top: 0;
	margin-bottom: 1em;
}

blockquote {
	border-left: 4px solid var(--color-amber);
	margin: var(--spacing-md) 0;
	padding: var(--spacing-sm) var(--spacing-md);
	font-style: italic;
	color: var(--color-maroon);
}

blockquote p {
	margin-bottom: 0;
}

code,
pre {
	font-family: monospace;
	font-size: 0.875em;
	background: var(--color-cream);
	border-radius: 3px;
}

code {
	padding: 0.15em 0.35em;
}

pre {
	padding: var(--spacing-sm);
	overflow-x: auto;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.site {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	min-height: 100vh;
	width: 100%;
}

.site-content {
	flex: 1;
	width: 100%;
}

.container {
	max-width: var(--site-max-width);
	margin-inline: auto;
	padding-inline: var(--spacing-md);
}

/* Shared arrow icon — inherits currentColor automatically */
.trp-arrow {
	display: inline-block;
	width: 0.5em;
	height: 0.75em;
	background-color: currentColor;
	-webkit-mask-image: url('assets/images/trp-right-arrow.svg');
	mask-image: url('assets/images/trp-right-arrow.svg');
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	vertical-align: middle;
	margin-left: 0.2em;
}

.content-area {
	max-width: var(--content-width);
}

/* Two-column layout: content + sidebar */
.site-main-inner {
	display: grid;
	grid-template-columns: 1fr 280px;
	gap: var(--spacing-lg);
	align-items: start;
}

@media (max-width: 900px) {
	.site-main-inner {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Top Bar
   ========================================================================== */

.site-topbar {
	background: var(--color-black);
	color: var(--color-cream);
	font-family: var(--font-heading);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.site-topbar .container {
	display: flex;
	justify-content: flex-end;
	padding-block: 0.4rem;
	max-width: 100%;
	padding-inline: var(--spacing-md);
}

.site-topbar a {
	color: var(--color-cream);
	text-decoration: none;
}

.site-topbar a:hover {
	color: var(--color-cream);
	text-decoration: none;
}

.site-topbar__facebook {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.site-topbar__facebook-icon {
	height: 1rem;
	width: auto;
	display: block;
	padding-bottom: 0.15rem;
	transition: filter var(--transition);
}

.site-topbar__facebook:hover .site-topbar__facebook-icon {
	filter: brightness(0) invert(1);
}

/* ==========================================================================
   Site Header
   ========================================================================== */

.site-header {
	background: var(--color-rust);
	padding-block: var(--spacing-md);
}

.site-header .container {
	display: flex;
	align-items: stretch;
	gap: var(--spacing-md);
	padding-block: 0.7rem;
}

/* Icon — spans full header height */
.site-logo-icon-link {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
}

.site-logo-icon {
	height: 130px;
	width: auto;
}

/* Branding column: title → tagline → nav */
.site-branding {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.4rem;
	flex: 1;
}

.site-branding-link {
	text-decoration: none;
	display: block;
}

.site-logo-text {
	height: 29px;
	width: auto;
}

.site-description {
	font-family: var(--font-body);
	font-size: 1.155rem;
	font-weight: 400;
	color: var(--color-cream);
	margin: 0;
	opacity: 0.9;
	letter-spacing: 0.02em;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.main-navigation {
	font-family: var(--font-heading);
	margin-top: 0.25rem;
	width: 100%;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	width: 100%;
	gap: var(--spacing-md);
}

.main-navigation li {
	position: relative;
	flex: 1;
}

.main-navigation a {
	display: block;
	text-align: center;
	white-space: nowrap;
	padding: 0.128rem 1.15rem;
	background: var(--color-cream);
	color: var(--color-rust);
	font-size: 1.359rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: capitalize;
	text-decoration: none;
	border: 1.5px solid var(--color-cream);
	transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.main-navigation a::after {
	content: '';
	display: inline-block;
	width: 0.45em;
	height: 0.7em;
	background-color: currentColor;
	-webkit-mask-image: url('assets/images/trp-right-arrow.svg');
	mask-image: url('assets/images/trp-right-arrow.svg');
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	vertical-align: middle;
	margin-left: 0.3em;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a {
	background: var(--color-amber);
	color: var(--color-white);
	border-color: var(--color-amber);
	text-decoration: none;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item > a::after {
	background-color: var(--color-white);
}

/* Dropdown sub-menus */
.main-navigation ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	flex-direction: column;
	background: var(--color-cream);
	border: 1.5px solid var(--color-maroon);
	min-width: 200px;
	z-index: 100;
	gap: 0;
}

.main-navigation ul ul a {
	border: none;
	border-bottom: 1px solid var(--color-maroon);
}

.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
	display: flex;
}

/* Mobile menu toggle */
.menu-toggle {
	display: none;
	background: var(--color-cream);
	border: 1.5px solid var(--color-cream);
	padding: 0.5rem 0.75rem;
	cursor: pointer;
	font-family: var(--font-heading);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-maroon);
}

.menu-toggle:focus {
	outline: 2px solid var(--color-rust);
	outline-offset: 2px;
}

@media (max-width: 768px) {
	.menu-toggle {
		display: none;
	}

	.site-header .container {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: var(--spacing-sm);
	}

	.site-branding {
		align-items: center;
	}

	.site-logo-icon {
		height: 80px;
	}

	.site-logo-text {
		height: 20px;
	}

	.site-description {
		font-size: 0.85rem;
	}

	.main-navigation ul {
		display: flex;
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		background: transparent;
		border: none;
		padding: 0;
		gap: 0.5rem;
		width: auto;
	}

	.main-navigation li {
		flex: 0 1 auto;
	}

	.main-navigation a {
		font-size: 0.85rem;
		padding: 0.1rem 0.6rem;
		white-space: normal;
	}
}

/* Skip link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	background: var(--color-maroon);
	color: var(--color-cream);
	padding: 0.5rem 1rem;
	font-family: var(--font-heading);
	font-size: 0.85rem;
}

.skip-link:focus {
	left: 0;
}

/* Simple page title banner (no image) */
.page-header {
	background: var(--color-cream);
	padding: var(--spacing-md) 0;
	border-bottom: 1px solid var(--color-amber);
}

.page-header .page-title {
	margin: 0;
}

/* ==========================================================================
   Posts & Content
   ========================================================================== */

.site-main {
	padding-block: var(--spacing-lg);
}

.single-page.site-content .site-main {
	padding-top: 0;
}

/* Post list */
.post {
	margin-bottom: var(--spacing-lg);
	padding-bottom: var(--spacing-lg);
	border-bottom: 1px solid var(--color-cream);
}

.post:last-of-type {
	border-bottom: none;
}

/* Post thumbnail */
.post-thumbnail {
	margin-bottom: var(--spacing-md);
	overflow: hidden;
}

.post-thumbnail img {
	width: 100%;
	height: 280px;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.post-thumbnail:hover img {
	transform: scale(1.02);
}

/* Post meta */
.entry-meta {
	font-family: var(--font-heading);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-olive);
	margin-bottom: var(--spacing-sm);
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.entry-meta a {
	color: inherit;
}

.entry-footer {
	font-family: var(--font-heading);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-rust);
	margin-top: var(--spacing-md);
	padding-top: var(--spacing-sm);
	border-top: 1px solid var(--color-cream);
}

.entry-footer a {
	color: var(--color-rust);
}

/* Read more link */
.more-link {
	display: inline-block;
	font-family: var(--font-heading);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-rust);
	text-decoration: none;
	border-bottom: 2px solid var(--color-amber);
	padding-bottom: 1px;
}

.more-link::after {
	content: '';
	display: inline-block;
	width: 0.45em;
	height: 0.7em;
	background-color: currentColor;
	-webkit-mask-image: url('assets/images/trp-right-arrow.svg');
	mask-image: url('assets/images/trp-right-arrow.svg');
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	vertical-align: middle;
	margin-left: 0.2em;
}

.more-link:hover {
	color: var(--color-maroon);
	border-bottom-color: var(--color-maroon);
	text-decoration: none;
}

/* ==========================================================================
   Single Post
   ========================================================================== */

/* Narrow centred column */
.single-body {
	max-width: 736px;
	margin-inline: auto;
}

/* Hero image — centered in dark background */
.single-hero {
	width: 100%;
	background: var(--color-black);
	display: flex;
	justify-content: center;
	padding: var(--spacing-md) var(--spacing-md);
}

.single-page-header {
	padding-top: var(--spacing-md);
}

.single-hero img {
	max-width: var(--site-max-width);
	width: 100%;
	height: auto;
	max-height: 520px;
	object-fit: contain;
	display: block;
}

/* Category pill */
.entry-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 0.75rem;
}

.entry-category-pill {
	display: inline-block;
	background: var(--color-maroon);
	color: var(--color-white);
	font-family: var(--font-heading);
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: capitalize;
	padding: 0.25em 0.65em;
	text-decoration: none;
}

.entry-category-pill:hover {
	background: var(--color-rust);
	color: var(--color-white);
	text-decoration: none;
}

/* Title & meta */
.single .entry-title {
	font-family: var(--font-body);
	font-weight: 400;
	line-height: 1.1;
	margin-bottom: 0.4rem;
	color: var(--color-olive);
}

.single .entry-meta {
	margin-bottom: var(--spacing-md);
}

/* Body text */
.single .entry-content {
	font-family: var(--font-body);
	font-size: 1.21rem;
}

.single .entry-content > * + * {
	margin-top: 1.25em;
}

/* Full-width quote block */
.single-quote-block {
	background: var(--color-amber);
	width: 100%;
	padding: 3rem 0;
	margin: 2rem 0;
}

.single-quote-block blockquote {
	font-family: var(--font-body);
	font-style: italic;
	font-size: clamp(1.4rem, 2.5vw, 2rem);
	color: var(--color-white);
	margin: 0;
	padding: 0;
	border: none;
}

.single-quote-block blockquote cite,
.single-quote-block blockquote footer {
	display: block;
	font-family: var(--font-body);
	font-style: normal;
	font-weight: 400;
	font-size: 1.4rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-cream);
	margin-top: 1.5rem;
	text-align: right;
}

/* Full-width image block */
.single-image-block {
	background: var(--color-maroon);
	width: 100%;
	padding: 2.5rem 0;
	margin: 2.5rem 0;
}

.single-image-block figure,
.single-image-block img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
}

.single-image-block figcaption {
	font-family: var(--font-heading);
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(235,226,208,0.7);
	margin-top: 0.6rem;
	text-align: center;
}

/* Author bio */
.single-author-rule {
	border: none;
	border-top: 0.2rem solid var(--color-olive);
	margin: var(--spacing-lg) 0 var(--spacing-md);
	width: calc(var(--content-width) / 2);
	max-width: 100%;
	margin-inline: 0;
}

.single-author-bio {
	padding-bottom: var(--spacing-md);
}

.single-author-inner {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.single-author-avatar img {
	border-radius: 50%;
	width: 56px;
	height: 56px;
	object-fit: cover;
}

.single-author-name {
	display: block;
	font-family: var(--font-heading);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-maroon);
	margin-bottom: 0.35rem;
}

.single-author-desc {
	font-family: var(--font-body);
	font-size: 0.95rem;
	color: var(--color-black);
	margin: 0;
}


/* ==========================================================================
   Pagination
   ========================================================================== */

.navigation {
	margin-block: var(--spacing-lg);
	font-family: var(--font-heading);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.nav-links {
	display: flex;
	justify-content: space-between;
	gap: var(--spacing-sm);
}

.nav-links a {
	color: var(--color-rust);
	text-decoration: none;
	border-bottom: 2px solid var(--color-amber);
	padding-bottom: 1px;
}

.navigation.pagination .nav-links a {
	border-bottom: none;
	padding-bottom: 0;
}

.nav-links a:hover {
	color: var(--color-maroon);
	border-bottom-color: var(--color-maroon);
}

.posts-navigation .nav-previous::before { content: '\2039 '; }
.posts-navigation .nav-next::after {
	content: '';
	display: inline-block;
	width: 0.45em;
	height: 0.7em;
	background-color: currentColor;
	-webkit-mask-image: url('assets/images/trp-right-arrow.svg');
	mask-image: url('assets/images/trp-right-arrow.svg');
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	vertical-align: middle;
	margin-left: 0.2em;
}

/* Numbered pagination */
.page-numbers {
	display: inline-flex;
	align-items: center;
	gap: var(--spacing-xs);
	list-style: none;
	padding: 0;
	margin: 0 auto;
}

.navigation.pagination {
	display: flex;
	justify-content: center;
}

a.page-numbers,
.page-numbers li a,
.page-numbers li span {
	display: inline-block;
	color: var(--color-rust);
	text-decoration: none;
	transition: color var(--transition);
}

.page-numbers li .current {
	color: var(--color-maroon);
	font-weight: 700;
}

a.page-numbers:hover,
.page-numbers li a:hover {
	color: var(--color-maroon);
}

/* Hide all page number items except prev, next, and current */
.page-numbers li {
	display: none;
}

.page-numbers li:has(> .current),
.page-numbers li:has(> .prev),
.page-numbers li:has(> .next) {
	display: inline-flex;
	align-items: center;
}

/* Story archive pagination arrows */
.trp-pagination-arrow {
	width: 14px;
	height: auto;
	display: block;
	color: var(--color-rust);
}

.trp-pagination-arrow--prev .trp-pagination-arrow {
	transform: scaleX(-1);
}

/* ==========================================================================
   Sidebar / Widgets
   ========================================================================== */

.widget-area {
	font-size: 0.9rem;
}

.widget {
	margin-bottom: var(--spacing-lg);
	padding: var(--spacing-md);
	background: var(--color-cream);
}

.widget-title {
	font-family: var(--font-heading);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-maroon);
	border-bottom: 2px solid var(--color-amber);
	padding-bottom: 0.5em;
	margin-bottom: 1em;
}

.widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.widget ul li {
	padding: 0.3em 0;
	border-bottom: 1px solid rgba(68, 19, 30, 0.1);
}

.widget ul li:last-child {
	border-bottom: none;
}

/* ==========================================================================
   Search Form
   ========================================================================== */

.search-form {
	display: flex;
	gap: 0;
}

.search-field {
	flex: 1;
	padding: 0.5rem 0.75rem;
	border: 1.5px solid var(--color-maroon);
	border-right: none;
	font-family: var(--font-body);
	font-size: 1rem;
	color: var(--color-black);
	background: var(--color-white);
	outline: none;
}

.search-field:focus {
	border-color: var(--color-amber);
}

.search-submit {
	padding: 0.5rem 1rem;
	background: var(--color-maroon);
	color: var(--color-cream);
	border: 1.5px solid var(--color-maroon);
	font-family: var(--font-heading);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background var(--transition);
}

.search-submit:hover {
	background: var(--color-rust);
	border-color: var(--color-rust);
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
	margin-top: var(--spacing-lg);
	padding-top: var(--spacing-lg);
	border-top: 2px solid var(--color-cream);
}

.comments-title,
.comment-reply-title {
	font-family: var(--font-heading);
	color: var(--color-maroon);
}

.comment-list {
	list-style: none;
	padding: 0;
}

.comment-body {
	padding: var(--spacing-md);
	background: var(--color-cream);
	margin-bottom: var(--spacing-sm);
	border-left: 4px solid var(--color-amber);
}

.comment-meta {
	font-family: var(--font-heading);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-rust);
	margin-bottom: var(--spacing-xs);
}

/* Comment form */
.comment-form label {
	display: block;
	font-family: var(--font-heading);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-maroon);
	margin-bottom: 0.3em;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1.5px solid var(--color-maroon);
	font-family: var(--font-body);
	font-size: 1rem;
	background: var(--color-white);
	color: var(--color-black);
	outline: none;
	margin-bottom: var(--spacing-sm);
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--color-amber);
}

.comment-form .submit {
	padding: 0.6rem 1.5rem;
	background: var(--color-maroon);
	color: var(--color-cream);
	border: none;
	font-family: var(--font-heading);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background var(--transition);
}

.comment-form .submit:hover {
	background: var(--color-rust);
}

/* ==========================================================================
   Story Rows (category-about layout)
   ========================================================================== */

.story-page-header {
	background: transparent;
	padding-block: var(--spacing-md);
	border-bottom: none;
}

.story-page-header + .site-main {
	max-width: var(--site-max-width);
	margin-inline: auto;
	padding-inline: var(--spacing-md);
	padding-top: 0;
	padding-bottom: var(--spacing-lg);
}

.story-row.post {
	margin-bottom: var(--spacing-md);
	padding-bottom: 0;
	border-bottom: none;
}

.story-page-header .page-title {
	font-family: var(--font-body);
	font-size: 4rem;
	font-weight: 400;
	font-style: normal;
	color: var(--color-olive);
	text-decoration: none;
	margin: 0;
}

.story-row {
	display: grid;
	grid-template-columns: 2fr 3fr;
	min-height: 320px;
}

.story-row--image-right {
	grid-template-columns: 3fr 2fr;
}

.story-row__image {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.story-row__image-link {
	display: block;
	width: 100%;
	height: 100%;
}

.story-row__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: var(--spacing-md) calc(var(--spacing-md) * 1.5);
}

/* Palette: cream */
.story-row--cream {
	background: var(--color-cream);
}
.story-row--cream .story-row__title a {
	color: var(--color-maroon);
}
.story-row--cream .story-row__excerpt {
	color: var(--color-black);
}

/* Palette: amber */
.story-row--amber {
	background: var(--color-amber);
}
.story-row--amber .story-row__title a {
	color: var(--color-cream);
}
.story-row--amber .story-row__excerpt {
	color: var(--color-cream);
}

/* Palette: maroon */
.story-row--maroon {
	background: var(--color-maroon);
}
.story-row--maroon .story-row__title a {
	color: var(--color-cream);
}
.story-row--maroon .story-row__excerpt {
	color: var(--color-cream);
}

.story-row__title {
	font-family: var(--font-body);
	font-size: 2.1rem;
	font-weight: 400;
	font-style: normal;
	line-height: 1.3;
	margin: 0;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.story-row__title a {
	text-decoration: inherit;
}

.story-row__title a:hover {
	opacity: 0.8;
}

.story-row__excerpt {
	font-family: var(--font-heading);
	font-size: 0.95rem;
	line-height: 1.4;
	font-weight: 400;
	margin: 0;
}

.story-row__excerpt p {
	margin: 0;
}

/* Mobile */
@media (max-width: 768px) {
	.story-row {
		grid-template-columns: 1fr;
	}
	.story-row__image {
		min-height: 260px;
	}
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer-search {
	background: var(--color-rust);
	padding: 2rem 0;
}

.footer-search .search-form {
	justify-content: flex-end;
}

.footer-search .search-field {
	width: 320px;
	background: var(--color-cream);
	border: none;
	font-size: 1rem;
	padding: 0.65rem 1rem;
}

.footer-search .search-submit {
	padding: 0.65rem 1.25rem;
	background: var(--color-cream);
	color: var(--color-maroon);
}

.footer-search .search-submit:hover {
	background: var(--color-amber);
	color: #fff;
}

.site-footer {
	background: var(--color-black);
	color: var(--color-cream);
	padding-block: var(--spacing-lg);
	margin-top: var(--spacing-lg);
}

.home .site-footer,
.category-blog .site-footer,
.page-template-page-resources .site-footer,
.search .site-footer,
.single .site-footer,
.category-about .site-footer {
	margin-top: 0;
}

.home .site-main,
.category-blog .site-main {
	padding-bottom: 0;
}

.site-footer .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--spacing-md);
	flex-wrap: wrap;
}

.footer-branding {
	display: flex;
	align-items: center;
	gap: var(--spacing-md);
}

.footer-logo {
	height: 120px;
	width: auto;
}

.site-info {
	font-family: var(--font-heading);
	font-size: 0.6rem;
	font-weight: 600;
	color: rgba(235, 226, 208, 0.65);
	max-width: 500px;
}

.site-info a {
	color: rgba(235, 226, 208, 0.65);
}

.site-info a:hover {
	color: var(--color-cream);
}

.footer-utility-links {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.footer-utility-link {
	font-size: 0.6rem;
	opacity: 0.5;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.footer-utility-link:hover {
	opacity: 1;
}

.footer-utility-sep {
	font-size: 0.6rem;
	opacity: 0.5;
}

.footer-social {
	display: flex;
	align-items: center;
	gap: calc(var(--spacing-sm) * 1.5);
}

.footer-social a {
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	opacity: 0.8;
	transition: opacity var(--transition);
}

.footer-social a:hover {
	opacity: 1;
	text-decoration: none;
}

.footer-social__icon {
	height: 56px;
	width: auto;
	display: block;
}

.footer-social__email-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	opacity: 0.8;
	transition: opacity var(--transition);
}

.footer-social__email-btn:hover {
	opacity: 1;
}

.footer-email-tooltip {
	position: absolute;
	bottom: calc(100% + 0.5rem);
	left: 50%;
	transform: translateX(-50%);
	background: var(--color-cream);
	color: var(--color-black);
	font-family: var(--font-heading);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	white-space: nowrap;
	padding: 0.3rem 0.6rem;
	border-radius: 3px;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.footer-email-tooltip.is-visible {
	opacity: 1;
}

@media (max-width: 640px) {
	.footer-search .search-form {
		justify-content: center;
	}

	.site-footer .container {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.footer-branding {
		flex-direction: column;
		align-items: center;
	}

	.footer-social {
		justify-content: center;
	}

	.footer-utility-links {
		justify-content: center;
	}

	.footer-social__icon {
		height: 32px;
	}
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-404 {
	text-align: center;
	padding-block: var(--spacing-xl);
}

.error-404 .page-title {
	font-size: clamp(3rem, 10vw, 7rem);
	color: var(--color-cream);
	margin-bottom: var(--spacing-xs);
}

.error-404 .error-description {
	font-size: 1.15rem;
	max-width: 480px;
	margin-inline: auto;
	margin-bottom: var(--spacing-lg);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--color-cream);
	clip: auto !important;
	clip-path: none;
	color: var(--color-black);
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 0.75rem 1.5rem;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

:focus-visible {
	outline: 2px solid var(--color-amber);
	outline-offset: 3px;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.alignleft  { float: left; margin: 0 var(--spacing-md) var(--spacing-sm) 0; }
.alignright { float: right; margin: 0 0 var(--spacing-sm) var(--spacing-md); }
.aligncenter { margin-inline: auto; display: block; }

.wp-caption {
	max-width: 100%;
	font-family: var(--font-heading);
	font-size: 0.75rem;
	color: var(--color-rust);
}

.wp-caption-text { margin-top: 0.3em; }

.sticky {
	background: var(--color-cream);
	padding: var(--spacing-md);
	border-left: 4px solid var(--color-amber);
}

.bypostauthor { /* intentionally empty — style as needed */ }

/* ==========================================================================
   Homepage
   ========================================================================== */

.home-main {
	display: flex;
	flex-direction: column;
}

/* Feature cards */
.home-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--spacing-md);
	padding-block: var(--spacing-lg);
}

.home-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: var(--color-black);
	border: 1px solid var(--color-maroon);
	transition: box-shadow var(--transition);
	padding-bottom: var(--spacing-sm);
}

.home-card:hover {
	text-decoration: none;
	color: var(--color-black);
	background-color: var(--color-cream);
}

.home-card__image {
	aspect-ratio: 4 / 3;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.home-card__image--empty {
	background: var(--color-cream);
}

.home-card__body {
	padding: var(--spacing-sm);
	flex: 1;
}

.home-card__title {
	font-family: var(--font-heading);
	font-size: 1rem;
	font-weight: 600;
	color: var(--color-rust);
	margin-bottom: 0.4rem;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.home-card:hover .home-card__title {
	color: var(--color-maroon);
}

.home-card__desc {
	font-family: var(--font-body);
	font-size: 1.17rem;
	color: var(--color-black);
	margin: 0;
}

/* Success Stories banner */
.home-stories {
	background: var(--color-amber);
	padding-block: var(--spacing-lg);
}

.home-stories__inner {
	display: flex;
	align-items: stretch;
	gap: calc(var(--spacing-lg) / 2);
}

.home-stories__image {
	flex: 0 0 auto;
	width: clamp(100px, 14vw, 190px);
	overflow: hidden;
}

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

.home-stories__body {
	flex: 1 1 0;
	min-width: 0;
}

.home-stories__rule {
	width: 100%;
	max-width: calc(var(--content-width) / 2);
	height: 0.2rem;
	background: var(--color-cream);
	margin-bottom: var(--spacing-sm);
	opacity: 0.7;
}

.home-stories__title {
	font-family: var(--font-heading);
	font-size: clamp(1.4rem, 3vw, 2rem);
	font-weight: 600;
	color: var(--color-white);;
	margin-bottom: var(--spacing-sm);
}

.home-stories__title a {
	color: var(--color-white);;
	text-decoration: none;
}

.home-stories__title a:hover {
	color: var(--color-white);
	text-decoration: none;
}

.home-stories__excerpt {
	color: rgba(235, 226, 208, 0.85);
	font-family: var(--font-body);
	font-size: 1.43rem;
	max-width: var(--site-max-width);
}

.home-stories__excerpt p:last-child {
	margin-bottom: 0;
}

@media (max-width: 768px) {
	.home-cards {
		grid-template-columns: 1fr;
	}

	.home-stories__inner {
		flex-direction: column;
	}

	.home-stories__image {
		width: 100%;
	}

	.home-stories__rule {
		max-width: 100%;
	}
}

/* ==========================================================================
   Updates Page
   ========================================================================== */

.updates-page-header {
	background: transparent;
	padding-top: var(--spacing-md);
	padding-bottom: 0;
	border-bottom: none;
}

.updates-page-header .page-title {
	font-family: var(--font-body);
	font-size: 4rem;
	font-weight: 400;
	font-style: normal;
	color: var(--color-olive);
	text-decoration: none;
	margin: 0;
}

.updates-main > .container {
	padding-top: 0;
	padding-bottom: var(--spacing-lg);
}

.updates-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: var(--spacing-md);
	margin-bottom: var(--spacing-md);
}

.updates-grid__cell {
	aspect-ratio: 1;
}

.updates-grid__cell--empty {
	background: var(--color-cream);
}

.updates-grid__cell--post {
	background: var(--color-amber);
	color: var(--color-cream);
	text-decoration: none;
	padding: 0.5rem;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 0.2rem;
	transition: background var(--transition);
}

.updates-grid__cell--post:hover {
	background: var(--color-maroon);
	color: var(--color-cream);
	text-decoration: none;
}

.updates-grid__date {
	font-family: var(--font-heading);
	font-size: 0.66rem;
	font-weight: 900;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--color-white);
}

.updates-grid__title {
	font-family: var(--font-heading);
	font-size: 0.78rem;
	font-weight: 400;
	line-height: 1.3;
	color: var(--color-white);
}

.updates-pagination {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.updates-resource {
	background: var(--color-olive);
	padding-block: var(--spacing-lg);
}

.updates-resource__inner {
	display: flex;
	align-items: stretch;
	gap: calc(var(--spacing-lg) / 2);
}

.updates-resource__image {
	flex: 0 0 auto;
	width: clamp(100px, 14vw, 190px);
	overflow: hidden;
}

.updates-resource__image a {
	display: block;
	height: 100%;
}

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

.updates-resource__body {
	flex: 1 1 0;
	min-width: 0;
}

.updates-resource__rule {
	width: 100%;
	max-width: calc(var(--content-width) / 2);
	height: 0.2rem;
	background: var(--color-cream);
	margin-bottom: var(--spacing-sm);
	opacity: 0.7;
}

.updates-resource__title {
	font-family: var(--font-heading);
	font-size: clamp(1.4rem, 3vw, 2rem);
	font-weight: 600;
	color: var(--color-white);
	margin-bottom: var(--spacing-sm);
}

.updates-resource__title a {
	color: var(--color-white);
	text-decoration: none;
}

.updates-resource__title a:hover {
	color: var(--color-white);
	text-decoration: none;
}

.updates-resource__excerpt {
	color: rgba(235, 226, 208, 0.8);
	font-family: var(--font-body);
	font-size: 1.43rem;
	max-width: var(--site-max-width);
}

.updates-resource__excerpt p:last-child {
	margin-bottom: 0;
}

@media (max-width: 768px) {
	.updates-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 640px) {
	.updates-resource__inner {
		flex-direction: column;
	}

	.updates-resource__image {
		width: 100%;
	}

	.updates-resource__rule {
		max-width: 100%;
	}

	.resources-links__item {
		font-size: 0.735rem;
	}
}

/* ==========================================================================
   Resources Page
   ========================================================================== */

.resources-page-header {
	background: var(--color-amber);
	padding: 3rem 0 1.25rem;
}

.resources-page-header .page-title {
	font-family: var(--font-body);
	font-size: 4rem;
	font-weight: 400;
	font-style: normal;
	text-decoration: none;
	margin: 0;
}

.page-template-page-resources .site-content {
	background: var(--color-amber);
}

.resources-page {
	color: var(--color-cream);
	padding: 1.5rem 0 8rem;
}

.resources-page-header .page-title,
.resources-links__heading,
.resources-faq__heading {
	color: var(--color-white);
}

.resources-divider {
	border: none;
	border-top: 2px dotted var(--color-cream);
	margin: 3rem 0;
	opacity: 0.5;
}

/* ── Section 1: numbered resources list ── */

.resources-list__items {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: resources-counter;
}

.resources-list__item {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	padding: 0.45rem 0;
	font-size: 1.68rem;
}

.resources-list__number {
	font-size: 1rem;
	opacity: 0.7;
	min-width: 1.5rem;
	text-align: right;
	flex-shrink: 0;
}

.resources-list__link {
	color: var(--color-cream);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.resources-list__link:hover {
	text-decoration: none;
}

/* ── Section 2: links ── */

.resources-links__heading,
.resources-faq__heading {
	font-family: var(--font-body);
}

.resources-links__heading,
.resources-faq__heading {
	font-size: 4rem;
	font-weight: 400;
	margin: 0 0 1.5rem;
}

.resources-links__items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.resources-links__item {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	padding: 0.6rem 0;
	font-size: 1.47rem;
}

.resources-links__ext-link {
	display: inline;
	color: var(--color-cream);
	text-decoration: underline;
	text-underline-offset: 3px;
	flex-shrink: 0;
}

.resources-links__ext-link:hover {
	text-decoration: none;
}

.resources-links__title-plain {
	color: var(--color-cream);
	flex-shrink: 0;
}

.resources-links__ext-icon {
	display: inline;
	width: 0.8em;
	height: 0.8em;
	vertical-align: middle;
}

.resources-links__dots {
	flex: 1;
	border-bottom: 2px dotted rgba(235, 226, 208, 0.4);
	margin: 0 0.5rem 0.2rem;
	min-width: 1rem;
}

.resources-links__details {
	color: var(--color-cream);
	flex-shrink: 0;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.resources-links__details:hover {
	text-decoration: none;
}

/* ── Section 3: FAQ ── */

.resources-faq .trp-faq {
	color: var(--color-cream);
}

.resources-faq .trp-faq__item {
	border-bottom: 2px dotted rgba(235, 226, 208, 0.4);
}

.resources-faq .trp-faq__item:first-child {
	border-top: 2px dotted rgba(235, 226, 208, 0.4);
}

.resources-faq .trp-faq__question {
	color: var(--color-cream);
	font-size: 1.47rem;
}

/* ==========================================================================
   Search Page
   ========================================================================== */

.search-page {
	background: var(--color-cream);
	width: 100%;
}

body.search,
html:has(body.search) {
	background-color: var(--color-cream);
}

body.search .site-footer {
	background: var(--color-black);
}

body.search .site-header,
body.search .site-topbar {
	position: relative;
	z-index: 1;
}

.search-page .search-page-header {
	padding: var(--spacing-md) 0 var(--spacing-sm);
}

.search-page-title {
	font-family: var(--font-body);
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 600;
	color: var(--color-maroon);
	line-height: 1.25;
}

.search-page-title em {
	font-family: var(--font-body);
	font-style: italic;
	font-weight: 400;
}

.search-page .site-main {
	padding-top: 0;
}

.search-results {
	max-width: 100%;
	counter-reset: search-counter;
}

.search-result-item {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	padding: 2rem 0;
	margin-bottom: 0 !important;
	border-bottom: 1px solid var(--color-maroon) !important;
	list-style: none;
	counter-increment: search-counter;
}

.search-result-item::before {
	content: counter(search-counter);
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 400;
	color: var(--color-maroon);
	opacity: 0.7;
	min-width: 1.5rem;
	text-align: right;
	flex-shrink: 0;
	padding-top: 0.15rem;
}

.search-result-item:first-child {
	border-top: 1px solid var(--color-maroon);
}

.search-result-thumb {
	flex: 0 0 120px;
	width: 120px;
	height: 90px;
	overflow: hidden;
	display: block;
}

.search-result-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.search-result-body {
	flex: 1;
}

.search-result-title {
	font-family: var(--font-body);
	font-size: 1.4rem;
	font-weight: 600;
	margin-top: 0;
	margin-bottom: 0.25rem;
	line-height: 1.2;
}

.search-result-title a {
	color: var(--color-maroon);
	text-decoration: none;
}

.search-result-title a:hover {
	text-decoration: underline;
}

.search-result-excerpt p {
	font-size: 1.2rem;
	color: var(--color-maroon);
	margin: 0;
}

@media (max-width: 640px) {
	.search-result-title {
		font-size: 1.12rem;
	}

	.search-result-excerpt p {
		font-size: 0.96rem;
	}
}

/* No results */
.no-results {
	padding: var(--spacing-md) 0;
	text-align: center;
}

.no-results-message p {
	font-family: var(--font-body);
	font-size: clamp(2.7rem, 6vw, 3.9rem);
	font-weight: 400;
	color: var(--color-maroon);
	margin: 0;
	line-height: 1.3;
}

.no-results .search-form {
	margin-top: 2.5rem;
	display: flex;
	justify-content: center;
	gap: 0.5rem;
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-404-page {
	background: var(--color-black);
	min-height: 70vh;
	display: flex;
	flex-direction: column;
}

.error-404-page .site-main {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.error-404-page .container {
	width: 100%;
}

.error-404 {
	text-align: center;
	padding: var(--spacing-lg) 0;
}

.error-404-number {
	font-family: var(--font-heading);
	font-size: clamp(6rem, 18vw, 12rem);
	font-weight: 700;
	color: var(--color-olive);
	line-height: 1;
	margin-bottom: 0.2em;
}

.error-404-label {
	font-family: var(--font-body);
	font-size: clamp(1.8rem, 4vw, 3rem);
	font-style: italic;
	font-weight: 400;
	color: var(--color-olive);
	margin-bottom: 2.5rem;
}

.error-404 .search-form {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
}

.error404 .site-footer {
	margin-top: 0;
}

/* Search form shared styles */
.search-form {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.search-form label {
	flex: 0 0 auto;
}

.search-field {
	border: 1px solid #ccc;
	padding: 0.5rem 0.75rem;
	font-size: 1rem;
	font-family: var(--font-heading);
	background: #fff;
	width: 220px;
	outline: none;
}

.search-field:focus {
	border-color: var(--color-olive);
}

.search-submit {
	background: var(--color-olive);
	color: #fff;
	border: none;
	padding: 0.5rem 1.25rem;
	font-size: 1rem;
	font-family: var(--font-heading);
	cursor: pointer;
	white-space: nowrap;
}

.search-submit:hover {
	background: var(--color-maroon);
}
