/* =====================================================================
   [ab_books]: Further Reading
   Three books fit across the page frame.
   ===================================================================== */
/* Width: uses the same 1080px frame as every other page (theme sections.css, part 22). */
body.ab .page-content > .ab-books {
	max-width: calc(var(--ab-container, 1240px) - 80px + 2 * var(--ab-gutter, 40px));
	box-sizing: border-box;
	padding-inline: 0;
}

/* Toolbar: search, sort, count. Sticky under the header on wide screens. */
.ab-books__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
	padding: 12px 0;
	margin-bottom: 24px;
	background: var(--ab-cream, #FBF8F2);
	border-bottom: 1px solid var(--ab-border, #ECE6DA);
}
@media (min-width: 768px) {
	.ab-books__bar { position: sticky; top: var(--ab-sticky-top, 76px); z-index: 30; }
}
.ab-books__bar input[type="search"] {
	flex: 1 1 320px;
	min-height: 44px;
	padding: 8px 16px 8px 44px;
	border: 1.5px solid var(--ab-field-border, #C9D2C6);
	border-radius: 999px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A5856' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 15px center / 18px no-repeat;
	font: inherit;
	font-size: 16px;
}
.ab-books__bar input[type="search"]:focus,
.ab-books__sort select:focus { outline: none; border-color: var(--ab-orange-dark, #C25700); box-shadow: var(--ab-focus-ring, 0 0 0 2px #C25700, 0 0 0 6px rgba(255,115,0,.2)); }
.ab-books__sort { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--ab-muted, #4A5856); }
.ab-books__sort select {
	min-height: 44px;
	padding: 6px 34px 6px 14px;
	border: 1.5px solid var(--ab-field-border, #C9D2C6);
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 400;
	color: var(--ab-ink, #1F2A28);
}
.ab-books__count { margin: 0 0 0 auto; font-size: 15px; color: var(--ab-muted, #4A5856); white-space: nowrap; }

/* The grid of books */
.ab-books__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 20px;
	align-items: stretch;
}
.ab-books__grid:not(.has-open) { grid-auto-rows: 1fr; }   /* every card the same height */
.ab-books__grid.has-open { align-items: start; }
.ab-book[hidden] { display: none; }
.ab-book {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 18px;
	background: #fff;
	border: 1px solid var(--ab-sage-border, #D3DBCB);
	border-radius: 6px;
	box-shadow: var(--ab-shadow-soft, 0 8px 24px rgba(39,75,71,.05));
}
.ab-book__cover {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 230px;
	margin-bottom: 16px;
	padding: 14px;
	background: var(--ab-sage, #E7EDE0);
	border-radius: 6px;
}
.ab-book__cover img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	box-shadow: 0 6px 16px rgba(39, 75, 71, .22);
}
.ab-book__nocover {
	display: flex; align-items: center; justify-content: center;
	width: 130px; height: 190px; padding: 12px;
	background: var(--ab-teal, #274B47); color: #fff;
	font-family: var(--ab-font-heading, Poppins, sans-serif); font-size: 14px; text-align: center;
}
.ab-books .ab-book__title {
	margin: 0;
	font-family: var(--ab-font-heading, Poppins, sans-serif);
	font-weight: 600;
	font-size: 19px;
	line-height: 1.3;
	color: var(--ab-teal, #274B47);
}
.ab-books .ab-book__author {
	margin: 4px 0 10px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--ab-orange-dark, #C25700);
}
.ab-book__desc { font-size: 16px; line-height: 1.55; color: var(--ab-ink, #1F2A28); }
.ab-book__desc p { margin: 0; }
.ab-book__desc.is-clamped {
	max-height: calc(1.55em * 5);
	overflow: hidden;
	-webkit-mask-image: linear-gradient(#000 60%, transparent);
	        mask-image: linear-gradient(#000 60%, transparent);
}
.ab-book__more {
	align-self: flex-start;
	margin-top: 6px;
	padding: 4px 0;
	border: 0;
	background: none;
	color: var(--ab-teal, #274B47);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: .15em;
	cursor: pointer;
}
.ab-book__more:focus-visible { outline: none; box-shadow: var(--ab-focus-ring, 0 0 0 2px #C25700, 0 0 0 6px rgba(255,115,0,.2)); border-radius: 4px; }
.ab-book__find { align-self: flex-start; margin-top: auto; }
.ab-book__desc + .ab-book__find,
.ab-book__more + .ab-book__find { margin-top: auto; }
.ab-book > :nth-last-child(2) { margin-bottom: 16px; }

.ab-books__none { margin-top: 20px; font-size: 17px; }
.ab-books__none[hidden] { display: none; }

.ab-books .ab-visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
