/*
Theme Name:   High Plains Bible Mission
Theme URI:    https://high-plains.org
Description:  Astra child theme. All design lives here; page content is plain blocks
              tagged with hp-* classes so text can be edited without touching layout.
Author:       Matrix Software Inc.
Template:     astra
Version:      1.0.0
Text Domain:  hpbm
*/

:root {
	--hp-navy: #0f2744;
	--hp-navy-dark: #0a1b30;
	--hp-gold: #d4a017;
	--hp-gold-dark: #a97d0c;
	--hp-gold-soft: #fbf3dc;
	--hp-light: #f8fafc;
	--hp-text: #333;
	--hp-heading: #0f172a;
	--hp-muted: #64748b;
	--hp-border: #e5e9f0;
	--hp-radius: 15px;
	--hp-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
	--hp-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.12);
	--hp-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--hp-wrap: 1200px;
}

/* ---------- Base ---------- */

body,
button,
input,
select,
textarea {
	font-family: var(--hp-font);
}

body {
	background: #fff;
	color: var(--hp-text);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 {
	font-family: var(--hp-font);
	color: var(--hp-heading);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.entry-content h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; }
.entry-content h2 { font-size: clamp(1.75rem, 3.4vw, 2.4rem); }
.entry-content h3 { font-size: clamp(1.15rem, 1.8vw, 1.3rem); }

a { color: var(--hp-gold-dark); }
a:hover, a:focus { color: var(--hp-navy); }
:focus-visible { outline: 3px solid var(--hp-gold); outline-offset: 2px; }

/* Full-bleed page layout: sections carry their own padding. */
.ast-page-builder-template .entry-content > * { margin-top: 0; margin-bottom: 0; }
.ast-page-builder-template .site-content #primary { margin: 0; }
.ast-page-builder-template .entry-header { display: none; }

/* ---------- Header ---------- */

.site-header .ast-primary-header-bar,
.site-header .main-header-bar,
.ast-mobile-header-wrap .ast-primary-header-bar,
.ast-primary-header-bar {
	background: #fff;
	border-bottom: 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.ast-primary-header-bar .site-primary-header-wrap { min-height: 76px; }

.site-header { position: sticky; top: 0; z-index: 99; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }

.hpbm-brand {
	font-family: var(--hp-font);
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--hp-navy);
	letter-spacing: -0.01em;
	text-decoration: none;
	line-height: 1.15;
}
.hpbm-brand:hover { color: var(--hp-gold-dark); }

.main-header-menu .menu-link,
.ast-builder-menu-1 .menu-item > .menu-link {
	color: var(--hp-heading);
	font-family: var(--hp-font);
	font-size: 0.98rem;
	font-weight: 500;
}
.main-header-menu .menu-item:hover > .menu-link,
.main-header-menu .current-menu-item > .menu-link,
.main-header-menu .current_page_item > .menu-link {
	color: var(--hp-gold-dark) !important;
}
@media (min-width: 922px) {
	.main-header-menu .hp-nav-button { margin-left: 12px; display: flex; align-items: center; }
	.main-header-menu .hp-nav-button > .menu-link {
		height: auto;
		background: var(--hp-gold);
		color: #fff !important;
		border-radius: 8px;
		padding: 0 22px;
		line-height: 44px;
		font-weight: 600;
		transition: background 0.2s, box-shadow 0.2s;
	}
	.main-header-menu .hp-nav-button > .menu-link:hover {
		background: var(--hp-gold-dark);
		box-shadow: 0 8px 20px rgba(212, 160, 23, 0.4);
	}
}

/* Mobile menu: full-width rows, large tap targets. */
.ast-mobile-header-wrap .menu-toggle,
.ast-header-break-point .menu-toggle,
.menu-toggle .ast-mobile-svg { color: var(--hp-navy); fill: var(--hp-navy); background: transparent; }
.ast-mobile-header-content,
.ast-mobile-header-content .main-header-menu,
.ast-mobile-header-content .main-header-menu .menu-item { background: #fff !important; }
.ast-mobile-header-content .main-header-menu .menu-link {
	color: var(--hp-heading) !important;
	border-bottom: 1px solid var(--hp-border) !important;
	padding: 15px 20px;
	font-size: 1.05rem;
}
.ast-mobile-header-content .main-header-menu .current-menu-item > .menu-link,
.ast-mobile-header-content .main-header-menu .menu-link:hover { color: var(--hp-gold-dark) !important; }
.ast-mobile-header-content .hp-nav-button > .menu-link { color: var(--hp-gold-dark) !important; font-weight: 700; }

/* ---------- Shared section pieces ---------- */

.hp-section { padding: clamp(60px, 8vw, 90px) 20px; }
.hp-section > * { max-width: var(--hp-wrap); margin-left: auto !important; margin-right: auto !important; }
.hp-section--light { background: var(--hp-light); }
.hp-section--narrow > * { max-width: 820px; }

/* Section heading with a short gold bar under it. */
.hp-title { margin-bottom: 0 !important; }
.hp-title::after {
	content: "";
	display: block;
	width: 50px;
	height: 3px;
	border-radius: 2px;
	background: var(--hp-gold);
	margin: 14px 0 0;
}
.hp-title.has-text-align-center::after { margin-left: auto; margin-right: auto; }
.hp-intro { color: var(--hp-muted); font-size: 1.08rem; margin: 18px auto 48px !important; max-width: 640px; }

.hp-pill {
	display: inline-block;
	color: var(--hp-gold) !important;
	border: 1px solid rgba(212, 160, 23, 0.6);
	border-radius: 999px;
	padding: 5px 16px;
	font-size: 0.78rem !important;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 1.3em !important;
}

/* ---------- Buttons ---------- */

.wp-block-button .wp-block-button__link,
.wp-block-button__link,
.nf-form-content input[type="submit"],
.nf-form-content button,
.ast-button {
	background: var(--hp-gold);
	color: #fff;
	border: 2px solid var(--hp-gold);
	border-radius: 8px;
	font-family: var(--hp-font);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.4;
	padding: 13px 28px;
	transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.wp-block-button .wp-block-button__link:hover,
.wp-block-button__link:hover,
.nf-form-content input[type="submit"]:hover {
	background: var(--hp-gold-dark);
	border-color: var(--hp-gold-dark);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(212, 160, 23, 0.4);
}
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent !important;
	color: var(--hp-navy) !important;
	border: 2px solid var(--hp-navy) !important;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--hp-navy) !important;
	color: #fff !important;
	box-shadow: none;
}
/* Outline buttons on dark photo bands are light. */
.hp-hero .wp-block-button.is-style-outline .wp-block-button__link {
	color: #f8f9fa !important;
	border-color: #f8f9fa !important;
}
.hp-hero .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: #f8f9fa !important;
	color: var(--hp-navy) !important;
}
.hp-cta .wp-block-button .wp-block-button__link {
	background: #f8f9fa;
	color: #000;
	border-color: #f8f9fa;
}
.hp-cta .wp-block-button .wp-block-button__link:hover { background: #fff; color: #000; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); }

.hp-link { font-weight: 600; font-size: 0.95rem; }
.hp-link a { text-decoration: none; }

/* ---------- Hero ---------- */

.hp-hero.wp-block-cover {
	min-height: min(78vh, 680px);
	padding: clamp(70px, 11vw, 130px) 20px;
}
.hp-hero .wp-block-cover__inner-container { max-width: 820px; text-align: center; }
.hp-hero h1 { color: #fff; margin: 0 0 0.35em; }
/* Astra colours every cover paragraph with its body-text colour; dark bands need light text. */
.hp-hero p { color: rgba(255, 255, 255, 0.9) !important; }
.hp-hero .hp-lede { font-size: clamp(1.05rem, 1.7vw, 1.2rem); max-width: 680px; margin: 0 auto 2em !important; }
.hp-hero p.hp-pill { color: var(--hp-gold) !important; }

/* ---------- Cards (features, books, articles, order options) ---------- */

.hp-grid { gap: 24px !important; margin-bottom: 0 !important; }
.hp-grid + .hp-grid { margin-top: 24px !important; }

.hp-card {
	background: #fff;
	border-radius: var(--hp-radius);
	box-shadow: var(--hp-shadow);
	padding: 30px 28px;
	height: 100%;
	transition: transform 0.25s, box-shadow 0.25s;
}
.hp-card:hover { transform: translateY(-4px); box-shadow: var(--hp-shadow-hover); }
.hp-card h3 { margin: 0 0 0.45em; }
.hp-card p { color: var(--hp-muted); font-size: 0.97rem; margin-bottom: 0; }

/* Feature icons: a gold line icon on a soft gold tile, drawn by CSS so the text stays editable. */
.hp-feature::before {
	content: "";
	display: block;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	margin-bottom: 18px;
	background-color: var(--hp-gold-soft);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 26px 26px;
}
.hp-ico-heart::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a017' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.7l-1-1.1a5.5 5.5 0 0 0-7.8 7.8l1 1.1L12 21l7.8-7.5 1-1.1a5.5 5.5 0 0 0 0-7.8z'/%3E%3C/svg%3E"); }
.hp-ico-flame::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a017' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.4-.5-2-1-3-1.1-2.1-.2-4 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.2.4-2.3 1-3.3.3 1.6 1.2 2.8 2.5 2.8z'/%3E%3C/svg%3E"); }
.hp-ico-arrow::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a017' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E"); }
.hp-ico-turn::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a017' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.8 9.8 0 0 0-6.7 2.7L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E"); }
.hp-ico-crown::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a017' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 18h20M3 18 2 7l5.5 4L12 4l4.5 7L22 7l-1 11'/%3E%3C/svg%3E"); }
.hp-ico-sun::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a017' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M6.3 17.7l-1.4 1.4M19.1 4.9l-1.4 1.4'/%3E%3C/svg%3E"); }
.hp-ico-book::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a017' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20V3H6.5A2.5 2.5 0 0 0 4 5.5v14zM4 19.5A2.5 2.5 0 0 0 6.5 22H20v-5'/%3E%3C/svg%3E"); }
.hp-ico-phone::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a017' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='2' width='14' height='20' rx='2'/%3E%3Cpath d='M12 18h.01'/%3E%3C/svg%3E"); }
.hp-ico-box::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a017' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8v13H3V8M1 3h22v5H1zM10 12h4'/%3E%3C/svg%3E"); }

/* Book cards */
.hp-book-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.hp-book-card .wp-block-image { margin: 0 !important; background: var(--hp-light); padding: 26px 26px 0; text-align: center; }
.hp-book-card .wp-block-image img { max-height: 260px; width: auto; margin: 0 auto; box-shadow: 0 12px 26px rgba(15, 39, 68, 0.22); }
.hp-book-card > :not(.wp-block-image) { padding-left: 24px; padding-right: 24px; }
.hp-book-card h3 { margin-top: 22px !important; font-size: 1.1rem; }
.hp-book-card h3 a { color: var(--hp-heading); text-decoration: none; }
.hp-book-card h3 a:hover { color: var(--hp-gold-dark); }
.hp-book-card p { font-size: 0.93rem; }
.hp-book-card .wp-block-buttons { margin-top: auto; padding-top: 18px; padding-bottom: 6px; }
.hp-book-card .wp-block-button { width: 100%; }
.hp-book-card .wp-block-button__link { width: 100%; padding: 11px 16px; }
.hp-book-card .hp-link { padding-bottom: 22px; margin-top: 10px; text-align: center; }
.hp-book-card p.hp-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	padding: 3px 12px !important;
	background: var(--hp-navy);
	color: #fff;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	z-index: 1;
}

/* Book detail rows (Books page and each book's own page) */
.hp-book { gap: clamp(32px, 6vw, 80px) !important; align-items: center !important; margin-bottom: clamp(60px, 8vw, 100px) !important; }
.hp-book:last-child { margin-bottom: 0 !important; }
.hp-book .hp-cover { text-align: center; }
.hp-book .hp-cover img { max-width: 320px; width: 100%; border-radius: 4px; box-shadow: 0 24px 50px rgba(15, 39, 68, 0.25), 0 4px 10px rgba(15, 39, 68, 0.12); }
.hp-book h2 { margin-bottom: 0.3em; }
.hp-book .hp-tagline { font-size: 1.12rem; color: var(--hp-navy); font-weight: 600; }
.hp-checks { list-style: none; padding: 0 !important; margin: 1em 0 1.4em !important; }
.hp-checks li { position: relative; padding-left: 32px; margin-bottom: 0.55em; }
.hp-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--hp-gold-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a97d0c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- About ---------- */

.hp-about { gap: clamp(32px, 6vw, 70px) !important; align-items: center !important; }
.hp-photo img { border-radius: var(--hp-radius); box-shadow: var(--hp-shadow-hover); width: 100%; }
.hp-about .hp-tagline { font-size: 1.15rem; color: var(--hp-navy); font-weight: 600; margin-top: 18px; }
.hp-checks--two { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }

/* ---------- Quote and stats bands ---------- */

.hp-quote { background: var(--hp-navy); color: #fff; text-align: center; }
.hp-quote p { color: #fff; }
.hp-quote .hp-quote-text {
	font-size: clamp(1.35rem, 3vw, 2rem) !important;
	font-weight: 600;
	font-style: italic;
	line-height: 1.45;
	max-width: 860px;
	margin: 0 auto 0.8em !important;
}
.hp-quote .hp-quote-cite { color: var(--hp-gold); font-weight: 600; letter-spacing: 0.04em; }

.hp-stats { background: var(--hp-navy-dark); padding-top: 54px; padding-bottom: 54px; }
.hp-stats .wp-block-columns { gap: 24px !important; margin: 0 auto !important; }
.hp-stats .wp-block-column { text-align: center; }
.hp-stats .hp-stat-num { color: var(--hp-gold); font-size: clamp(2rem, 4.2vw, 2.8rem) !important; font-weight: 800; line-height: 1.1; margin-bottom: 0.15em !important; }
.hp-stats .hp-stat-label { color: rgba(255, 255, 255, 0.82); font-size: 0.95rem; margin: 0 !important; }

/* ---------- Recent articles (core Latest Posts block) ---------- */

.hp-articles.wp-block-latest-posts {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	padding: 0 !important;
	margin: 0 !important;
}
.hp-articles.wp-block-latest-posts li {
	background: #fff;
	border-radius: var(--hp-radius);
	box-shadow: var(--hp-shadow);
	overflow: hidden;
	margin: 0 !important;
	padding: 0 0 22px;
	display: flex;
	flex-direction: column;
	transition: transform 0.25s, box-shadow 0.25s;
}
.hp-articles.wp-block-latest-posts li:hover { transform: translateY(-4px); box-shadow: var(--hp-shadow-hover); }
.hp-articles .wp-block-latest-posts__featured-image { margin: 0 0 18px; }
.hp-articles .wp-block-latest-posts__featured-image img { width: 100%; height: 190px; object-fit: cover; display: block; }
.hp-articles .wp-block-latest-posts__post-title {
	padding: 0 22px;
	font-weight: 700;
	font-size: 1.08rem;
	line-height: 1.4;
	color: var(--hp-heading);
	text-decoration: none;
}
.hp-articles .wp-block-latest-posts__post-title:hover { color: var(--hp-gold-dark); }
.hp-articles .wp-block-latest-posts__post-date { padding: 8px 22px 0; color: var(--hp-muted); font-size: 0.85rem; }

/* ---------- How to order ---------- */

.hp-order-card { border-top: 4px solid var(--hp-gold); }
.hp-order-card .wp-block-buttons { margin-top: 1.4em; }
.hp-order-card ul { margin-top: 0.8em !important; }

/* ---------- Gold call-to-action band ---------- */

.hp-cta { background: var(--hp-gold); text-align: center; }
.hp-cta h2 { color: #fff; margin-bottom: 0.4em; }
.hp-cta p { color: rgba(255, 255, 255, 0.95); font-size: 1.08rem; max-width: 680px; margin-left: auto !important; margin-right: auto !important; }

/* ---------- Contact ---------- */

.hp-contact-item { padding-left: 62px; position: relative; min-height: 46px; margin-bottom: 1.3em !important; }
.hp-contact-item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 2px;
	width: 46px;
	height: 46px;
	border-radius: 10px;
	background: var(--hp-gold-soft) center / 22px no-repeat;
}
.hp-contact-item.hp-ico-pin::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a017' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
.hp-contact-item.hp-ico-heart::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a017' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.7l-1-1.1a5.5 5.5 0 0 0-7.8 7.8l1 1.1L12 21l7.8-7.5 1-1.1a5.5 5.5 0 0 0 0-7.8z'/%3E%3C/svg%3E"); }
.hp-contact-item.hp-ico-globe::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a017' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15 15 0 0 1 0 20M12 2a15 15 0 0 0 0 20'/%3E%3C/svg%3E"); }
.hp-contact-item strong { display: block; color: var(--hp-heading); }

.hp-form-card {
	background: #fff;
	border-radius: var(--hp-radius);
	box-shadow: var(--hp-shadow);
	padding: clamp(22px, 4vw, 40px);
}

/* Ninja Forms */
.nf-form-content { padding: 0 !important; max-width: none !important; }
.nf-form-content label { color: var(--hp-heading); font-weight: 600; font-size: 0.95rem; }
.nf-form-content .ninja-forms-field:not([type="submit"]):not([type="checkbox"]):not([type="radio"]) {
	background: #fff !important;
	border: 1px solid var(--hp-border) !important;
	border-radius: 8px !important;
	padding: 12px 14px !important;
	font-size: 1rem !important;
	color: var(--hp-text) !important;
	height: auto;
}
.nf-form-content .ninja-forms-field:focus { outline: 2px solid var(--hp-gold) !important; border-color: var(--hp-gold) !important; }
.nf-form-content input[type="submit"] { width: auto !important; height: auto !important; cursor: pointer; }
.nf-form-fields-required { font-size: 0.85rem; color: var(--hp-muted); margin-bottom: 1em; }

/* ---------- Blog (Articles) and single posts ---------- */

.blog .site-content,
.archive .site-content,
.single-post .site-content { background: var(--hp-light); }
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single {
	border-radius: var(--hp-radius);
	box-shadow: var(--hp-shadow);
}
.ast-separate-container #primary { padding-top: clamp(30px, 5vw, 60px); }
.entry-title a { color: var(--hp-heading); }
.entry-title a:hover { color: var(--hp-gold-dark); }
.single .entry-content { font-size: 1.05rem; }
.ast-read-more-container a, .read-more a { font-weight: 600; }

/* ---------- Footer ---------- */

.hpbm-footer { background: var(--hp-navy-dark); color: rgba(255, 255, 255, 0.72); font-size: 0.95rem; }
.hpbm-footer__inner {
	max-width: var(--hp-wrap);
	margin: 0 auto;
	padding: 64px 20px 36px;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1.2fr 1.1fr;
	gap: 40px;
}
.hpbm-footer .hpbm-brand { color: #fff; font-size: 1.15rem; }
.hpbm-footer .hpbm-brand:hover { color: var(--hp-gold); }
.hpbm-footer__brand p { margin-top: 1em; line-height: 1.65; }
.hpbm-footer h2 { color: #fff; font-size: 1rem; font-weight: 700; margin: 0 0 1.1em; }
.hpbm-footer ul { list-style: none; margin: 0; padding: 0; }
.hpbm-footer li { margin: 0 0 0.7em; }
.hpbm-footer a { color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.hpbm-footer a:hover { color: var(--hp-gold); }
.hpbm-footer__bottom {
	max-width: var(--hp-wrap);
	margin: 0 auto;
	padding: 22px 20px 30px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	text-align: center;
	font-size: 0.87rem;
	color: rgba(255, 255, 255, 0.55);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.hp-articles.wp-block-latest-posts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 921px) {
	.hpbm-footer__inner { grid-template-columns: 1fr 1fr; }
	.hpbm-footer__brand { grid-column: 1 / -1; }
	/* Four book cards: two per row on tablets. */
	.wp-block-columns.hp-books { flex-wrap: wrap !important; }
	.wp-block-columns.hp-books > .wp-block-column { flex-basis: calc(50% - 12px) !important; flex-grow: 0; }
}

@media (max-width: 781px) {
	body { font-size: 16px; }
	.hp-hero .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.hp-hero .wp-block-button__link { width: 100%; }
	.hp-book { text-align: center; }
	.hp-book .wp-block-column { flex-basis: 100% !important; }
	/* Cover always above the text on phones, whichever side it sits on desktop. */
	.hp-book--flip { flex-direction: column-reverse; }
	.hp-book .wp-block-buttons { justify-content: center; }
	.hp-book .hp-checks { text-align: left; display: inline-block; }
	.hp-book .hp-cover img { max-width: 240px; }
	.hp-checks--two { grid-template-columns: 1fr; }
	.hp-stats .wp-block-columns { flex-wrap: wrap !important; }
	.wp-block-columns.hp-stat-row:not(.is-not-stacked-on-mobile) > .wp-block-column { flex-basis: calc(50% - 12px) !important; flex-grow: 0; }
	.hp-card { padding: 24px 22px; }
	.hp-card:hover, .hp-articles.wp-block-latest-posts li:hover { transform: none; }
}

@media (max-width: 600px) {
	.hp-articles.wp-block-latest-posts { grid-template-columns: 1fr; }
	.hpbm-footer__inner { grid-template-columns: 1fr; gap: 30px; padding-top: 50px; }
	.hpbm-brand { font-size: 1.15rem; }
	.ast-primary-header-bar .site-primary-header-wrap { min-height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
	.hp-card, .wp-block-button__link, .hp-articles.wp-block-latest-posts li { transition: none; }
	.hp-card:hover, .hp-articles.wp-block-latest-posts li:hover, .wp-block-button__link:hover { transform: none; }
}

.hp-muted-note { color: var(--hp-muted); font-size: 0.9rem !important; margin-top: 0.9em !important; }

/* ---------- Fixes after the first browser pass ---------- */

/* Astra greys the page behind full-width layouts; sections set their own backgrounds. */
.ast-page-builder-template .site-content,
.ast-page-builder-template #content,
.ast-plain-container.ast-page-builder-template { background: #fff; }

.site-title .hpbm-brand,
.site-header .site-title a.hpbm-brand { font-weight: 800; color: var(--hp-navy); font-size: 1.4rem; }

/* Astra underlines every link in post content; cards and buttons are links already. */
.entry-content .hp-card h3 a,
.entry-content .hp-link a,
.entry-content .hp-articles a,
.entry-content .hp-contact-item a { text-decoration: none; }

.hp-section > .hp-articles.wp-block-latest-posts { margin-left: auto !important; margin-right: auto !important; margin-bottom: 36px !important; }

.hp-stats .hp-stat-num,
.hp-stats .hp-stat-label { text-align: center; }

.hp-form-card .nf-form-title { display: none; }
.hp-form-card .nf-form-content textarea.ninja-forms-field { min-height: 150px; }
.hp-form-card .nf-form-content input[type="submit"].ninja-forms-field {
	background: var(--hp-gold) !important;
	color: #fff !important;
	border: 2px solid var(--hp-gold) !important;
	border-radius: 8px !important;
	padding: 13px 34px !important;
	font-weight: 600 !important;
	font-size: 1rem !important;
}
.hp-form-card .nf-form-content input[type="submit"].ninja-forms-field:hover { background: var(--hp-gold-dark) !important; border-color: var(--hp-gold-dark) !important; }

/* Phones: keep the home page short enough to scroll comfortably. */
@media (max-width: 600px) {
	.hp-pill { font-size: 0.68rem !important; letter-spacing: 0.05em; padding: 4px 12px; }
	.hp-hero.wp-block-cover { min-height: 0; padding-top: 56px; padding-bottom: 56px; }

	/* Feature cards: icon beside the title instead of above it. */
	.hp-grid { gap: 14px !important; }
	.hp-grid + .hp-grid { margin-top: 14px !important; }
	.hp-feature:not(.hp-order-card) { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 20px; }
	.hp-feature:not(.hp-order-card)::before { width: 44px; height: 44px; margin: 0; grid-row: 1 / span 2; background-size: 22px 22px; }
	.hp-feature:not(.hp-order-card) h3 { align-self: center; margin: 0 0 0.3em !important; }
	.hp-feature:not(.hp-order-card) p { grid-column: 2; }

	/* Three recent articles on phones, the rest are one tap away. */
	.hp-articles.wp-block-latest-posts li:nth-child(n+4) { display: none; }
	.hp-articles .wp-block-latest-posts__featured-image img { height: 170px; }
}

.page .site-content { background: #fff; }
.hp-blog-head { text-align: center; padding: 10px 20px 10px; }
.hp-blog-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; }
.hp-blog-head .hp-intro { margin-bottom: 20px !important; }

/* Articles page: post excerpts are long hand-written summaries; show the first few lines. */
.blog .ast-excerpt-container p,
.archive .ast-excerpt-container p {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hp-contact-item.hp-ico-box::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a017' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8v13H3V8M1 3h22v5H1zM10 12h4'/%3E%3C/svg%3E"); }
.hp-cta p.hp-cta-note { font-size: 0.95rem; margin-top: 1.2em !important; }
.hp-cta p.hp-cta-note a { color: #fff; font-weight: 600; text-decoration: underline; }
.hpbm-footer a.hpbm-footer__cta { color: var(--hp-gold); font-weight: 600; }

/*
 * Phones: one book per row as a horizontal card. Cover on the left, everything else
 * left-aligned in one column beside it, so titles get the width they need.
 */
@media (max-width: 600px) {
	.wp-block-columns.hp-books { flex-direction: column; gap: 14px !important; }
	.wp-block-columns.hp-books > .wp-block-column { flex-basis: auto !important; width: 100%; }
	.hp-book-card {
		display: grid;
		grid-template-columns: 92px minmax(0, 1fr);
		column-gap: 16px;
		align-items: start;
		align-content: start;
		padding: 16px;
	}
	.hp-book-card > * { grid-column: 2; }
	.hp-book-card > :not(.wp-block-image) { padding-left: 0; padding-right: 0; }
	.hp-book-card .wp-block-image { grid-column: 1; grid-row: 1 / span 6; padding: 0; background: none; }
	.hp-book-card .wp-block-image img { width: 92px; max-height: none; height: auto; box-shadow: 0 8px 18px rgba(15, 39, 68, 0.22); }
	.hp-book-card p.hp-badge { position: static; justify-self: start; margin: 0 0 6px !important; font-size: 0.66rem; padding: 2px 9px !important; }
	.hp-book-card h3 { margin: 0 0 4px !important; font-size: 1.02rem; line-height: 1.3; text-align: left; }
	.hp-book-card h3, .hp-book-card p { overflow-wrap: normal; word-break: normal; hyphens: manual; }
	.hp-book-card > p:not(.hp-badge):not(.hp-link) {
		margin: 0 !important;
		font-size: 0.88rem;
		line-height: 1.5;
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
	.hp-book-card .wp-block-buttons { margin: 0; padding: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
	.hp-book-card .wp-block-button { width: auto; }
	.hp-book-card .wp-block-button__link { width: auto; padding: 9px 16px; font-size: 0.9rem; white-space: nowrap; }
	.hp-book-card .hp-link { text-align: left; margin: 8px 0 0 !important; padding: 0; font-size: 0.9rem; }
	.hp-book-card:hover { transform: none; }
}
