/* ==========================================================================
   Interior page scaffolding
   For the non-landing templates (blog/single/search + the plugin-backed
   shop/account/support/contact shortcode pages). .leqa-section (in main.css)
   supplies the vertical rhythm; these give the inner wrapper a readable measure
   and style the standard WordPress entry elements. Tokens only.
   ========================================================================== */

.leqa-section-inner {
	width: 100%;
	max-width: var(--leqa-maxw);
	margin-inline: auto;
	padding-inline: var(--leqa-gutter);
}

.entry-title {
	font-family: var(--leqa-font-display);
	font-size: var(--leqa-fs-h2);
	line-height: var(--leqa-lh-tight);
	letter-spacing: var(--leqa-tracking-tight);
	margin: 0 0 var(--leqa-space-5);
	text-wrap: balance;
}

.entry-content > * + * {
	margin-top: var(--leqa-space-4);
}

.entry-content a {
	color: var(--leqa-accent);
}

.entry-thumb {
	margin-bottom: var(--leqa-space-5);
}

.entry-thumb img {
	display: block;
	border-radius: var(--leqa-radius-lg);
}

/* Give the shortcode-mounted app islands a little breathing room under the H1. */
.leqa-section-inner [data-leqa-app] {
	margin-top: var(--leqa-space-5);
}

/* ---- Interior page header (blog index / archive / search / generic page) ---- */
.leqa-page-header {
	display: flex;
	flex-direction: column;
	gap: var(--leqa-space-3);
	margin-bottom: var(--leqa-space-7);
}

.leqa-page-header__title {
	font-family: var(--leqa-font-display);
	font-size: var(--leqa-fs-h1);
	line-height: var(--leqa-lh-tight);
	letter-spacing: var(--leqa-tracking-tight);
	text-wrap: balance;
}

.leqa-page-header__desc {
	font-size: var(--leqa-fs-lead);
	line-height: 1.5;
	max-width: var(--leqa-maxw-narrow);
}

/* ---- Post list (archive / blog / search results) ---- */
.leqa-post-list,
.post-list {
	display: flex;
	flex-direction: column;
	gap: var(--leqa-space-5);
}

/* search.php / page-blog.php articles are bare (not .leqa-card): give them a rule. */
.post-list > article {
	padding-bottom: var(--leqa-space-5);
	border-bottom: var(--leqa-border-width) solid var(--leqa-border);
}

.post-list > article:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.leqa-post {
	display: flex;
	flex-direction: column;
	gap: var(--leqa-space-3);
}

.leqa-post__header {
	display: flex;
	flex-direction: column;
	gap: var(--leqa-space-1);
}

.leqa-post__title {
	font-size: var(--leqa-fs-h4);
	line-height: var(--leqa-lh-snug);
}

.leqa-post__link {
	color: var(--leqa-text);
	text-decoration: none;
}

.leqa-post__link:hover {
	color: var(--leqa-accent);
}

.leqa-post__meta {
	font-size: var(--leqa-fs-eyebrow);
}

.leqa-post__more {
	margin-top: var(--leqa-space-2);
}

/* ---- Empty state ---- */
.leqa-empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--leqa-space-4);
	padding-block: var(--leqa-space-6);
}

.leqa-empty__title {
	font-size: var(--leqa-fs-h3);
}

.leqa-empty__home {
	margin-top: var(--leqa-space-2);
}

/* ---- Pagination (the_posts_pagination class="leqa-pagination") ---- */
.leqa-pagination {
	margin-top: var(--leqa-space-7);
}

.leqa-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--leqa-space-2);
}

.leqa-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 0 var(--leqa-space-3);
	border: var(--leqa-border-width) solid var(--leqa-border-strong);
	border-radius: var(--leqa-radius);
	color: var(--leqa-text-muted);
	font-family: var(--leqa-font-mono);
	font-size: var(--leqa-fs-small);
	text-decoration: none;
	transition: border-color var(--leqa-dur) var(--leqa-ease), color var(--leqa-dur) var(--leqa-ease), background-color var(--leqa-dur) var(--leqa-ease);
}

.leqa-pagination .page-numbers:hover {
	border-color: var(--leqa-accent);
	color: var(--leqa-text);
}

.leqa-pagination .page-numbers.current {
	background: var(--leqa-accent);
	border-color: var(--leqa-accent);
	color: var(--leqa-accent-contrast);
}

.leqa-pagination .page-numbers.dots {
	border-color: transparent;
}

/* ---- 404 "lost signal" ---- */
.leqa-404__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--leqa-space-4);
	padding-block: var(--leqa-space-7);
	text-align: center;
}

.leqa-404__title {
	font-family: var(--leqa-font-display);
	font-size: var(--leqa-fs-h1);
	line-height: var(--leqa-lh-tight);
	letter-spacing: var(--leqa-tracking-tight);
	text-wrap: balance;
}

.leqa-404__lead {
	font-size: var(--leqa-fs-lead);
	max-width: var(--leqa-maxw-narrow);
}

.leqa-404__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--leqa-space-3);
	margin-top: var(--leqa-space-2);
}

.leqa-404__search {
	width: 100%;
	max-width: 420px;
	margin-top: var(--leqa-space-3);
}

/* ---- Generic page article (page.php) ---- */
.leqa-page-article__media {
	margin: 0 0 var(--leqa-space-6);
}

.leqa-page-article__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--leqa-radius-lg);
}

.leqa-page-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--leqa-space-2);
	margin-top: var(--leqa-space-6);
	font-family: var(--leqa-font-mono);
	font-size: var(--leqa-fs-small);
}

.leqa-page-links__label {
	color: var(--leqa-text-muted);
}

.leqa-page-links__num {
	display: inline-flex;
	min-width: 32px;
	min-height: 32px;
	align-items: center;
	justify-content: center;
	border: var(--leqa-border-width) solid var(--leqa-border-strong);
	border-radius: var(--leqa-radius-sm);
}

/* ---- Footer nav groups (hardcoded fallback when no footer menu is assigned) ---- */
.leqa-footer__nav {
	display: flex;
	flex-direction: column;
	gap: var(--leqa-space-2);
}

.leqa-footer__nav-title {
	font-size: var(--leqa-fs-eyebrow);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--leqa-text-faint);
}

.leqa-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--leqa-space-1);
}

.leqa-footer__menu a {
	color: var(--leqa-text-muted);
	text-decoration: none;
	font-size: var(--leqa-fs-small);
	transition: color var(--leqa-dur) var(--leqa-ease);
}

.leqa-footer__menu a:hover {
	color: var(--leqa-accent);
}

/* ---- Sticky footer: short pages (404, thin blog) keep the footer at the bottom ---- */
.leqa-page {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.leqa-main {
	flex: 1 0 auto;
}

/* ---- Search form inner row: input (flex:1) + submit button sit inline ---- */
.leqa-search__field {
	display: flex;
	gap: var(--leqa-space-2);
	align-items: stretch;
	flex: 1;
}

.leqa-search__input {
	flex: 1;
	min-width: 0;
}
