/*
 Theme Name: Astra Child
 Theme URI: https://wpastra.com/
 Description: Child theme for Astra.
 Author: Site Team
 Template: astra
 Version: 1.0.0
 Text Domain: astra-child
*/

/* ============================================
   Book Post Type Styles
   ============================================ */

/* Single book page hero layout */
.book-hero {
	padding: 2rem 0;
	margin-bottom: 2rem;
}

.book-hero__wrapper {
	display: flex;
	gap: 3rem;
	align-items: flex-start;
}

.book-hero__image {
	flex: 0 0 300px;
	max-width: 100%;
}

.book-hero__cover {
	width: 100%;
	max-width: 100%;
	height: auto;
	display: block;
}

.book-hero__content {
	flex: 1;
	min-width: 0; /* Allows flex item to shrink below content size */
}

.book-hero__header {
	margin-bottom: 1.5rem;
}

.book-hero__title {
	margin-bottom: 0.5rem;
}

.book-hero__subtitle {
	font-size: 1.25rem;
	color: #666;
	margin-bottom: 1rem;
	font-style: italic;
}

.book-hero__summary {
	margin-bottom: 1.5rem;
	line-height: 1.6;
}

.book-hero__themes {
	margin-bottom: 1.5rem;
}

.book-hero__themes-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.book-hero__themes-list li {
	padding: 0.25rem 0;
	padding-left: 1.5rem;
	position: relative;
}

.book-hero__themes-list li::before {
	content: "•";
	position: absolute;
	left: 0;
	color: #333;
	font-weight: bold;
}

.book-hero__actions {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	margin-top: 1.5rem;
}

/* Book Buttons */
.book-button {
	display: inline-block;
	text-decoration: none;
	text-align: center;
}

.book-button-primary {
	display: inline-block;
	padding: 0.9rem 2.4rem;
	border-radius: 999px;
	font-size: 0.95rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 500;
	background: #b88755;
	color: #fff;
	border: none;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
	box-shadow: 0 7px 18px rgba(0, 0, 0, 0.16);
}

.book-button-primary:hover,
.book-button-primary:focus {
	background: #a0703f;
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
	color: #fff;
}

.book-button-secondary {
	background-color: transparent;
	color: #ff9900;
	border: 2px solid #ff9900;
}

.book-button-secondary:hover {
	background-color: #ff9900;
	color: #fff;
}

.book-button-link {
	background-color: transparent;
	color: #333;
	border: 2px solid #333;
}

.book-button-link:hover {
	background-color: #333;
	color: #fff;
}

.book-button-large {
	padding: 1rem 2rem;
	font-size: 1.1rem;
}

/* Single Book - Content Sections */
.book-about {
	padding: 3rem 0;
}

.book-about__title {
	margin-bottom: 1.5rem;
}

.book-about__content {
	line-height: 1.8;
}

.book-sample {
	background-color: #f9f9f9;
	padding: 3rem 0;
}

.book-sample__title {
	margin-bottom: 1.5rem;
}

.book-sample__content {
	line-height: 1.8;
}

/* Single Book - CTA Section */
.book-cta {
	padding: 3rem 0;
	background-color: #f5f5f5;
	text-align: center;
}

.book-cta__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.book-cta__back-link {
	color: #333;
	text-decoration: none;
	font-size: 1rem;
}

.book-cta__back-link:hover {
	color: #ff9900;
	text-decoration: underline;
}

/* ============================================
   Books Hub Page Styles (page-books.php)
   ============================================ */

.books-page {
	padding: 2rem 0;
}

.books-page-header {
	margin-bottom: 3rem;
}

.books-list {
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

/* Book Card Structure */
.book-card {
	margin-bottom: 0;
}

.book-card__inner {
	display: flex;
	gap: 3rem;
	align-items: flex-start;
}

.book-card__image {
	flex: 0 0 280px;
	max-width: 280px;
}

.book-card__cover {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.book-card__content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.book-card__title {
	margin: 0 0 0.5rem;
	font-size: 1.75rem;
	line-height: 1.3;
}

.book-card__subtitle {
	margin: 0 0 1rem;
	font-size: 1.125rem;
	color: #666;
	font-style: italic;
}

.book-card__summary {
	margin: 0 0 1rem;
	line-height: 1.7;
	color: #333;
}

.book-card__summary p {
	margin: 0 0 0.75rem;
}

.book-card__summary p:last-child {
	margin-bottom: 0;
}

.book-card__themes {
	margin: 0 0 1.5rem;
	font-size: 0.95rem;
	line-height: 1.6;
}

.book-card__themes-label {
	font-weight: 600;
	color: #333;
	margin-right: 0.5rem;
}

.book-card__themes-items {
	color: #666;
}

.book-card__cta {
	margin-top: auto;
	padding-top: 0.5rem;
}

/* Books Archive/Listing Legacy Styles (for archive-book.php) */
.books-listing-section,
.books-archive-grid {
	padding: 2rem 0;
}

.books-grid,
.books-archive-grid {
	display: grid;
	gap: 2rem;
}

.book-item {
	border-bottom: 1px solid #e0e0e0;
	padding-bottom: 2rem;
}

.book-item:last-child {
	border-bottom: none;
}

.book-item-content {
	display: flex;
	gap: 2rem;
	align-items: flex-start;
	flex-wrap: wrap;
}

.book-item-image {
	flex: 0 0 200px;
	max-width: 100%;
}

.book-item-image img {
	width: 100%;
	height: auto;
	display: block;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease;
}

.book-item-image img:hover {
	transform: scale(1.05);
}

.book-item-text {
	flex: 1;
	min-width: 300px;
}

.book-item-title {
	margin-bottom: 0.5rem;
}

.book-item-title a {
	text-decoration: none;
	color: inherit;
}

.book-item-title a:hover {
	color: #b88755;
}

.book-item-subtitle {
	font-size: 1.1rem;
	color: #666;
	margin-bottom: 1rem;
	font-style: italic;
}

.book-item-summary {
	margin-bottom: 1rem;
	line-height: 1.6;
}

.book-item-themes {
	margin-bottom: 1rem;
}

.book-item-themes-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}

.book-item-themes-list li {
	padding: 0.25rem 0;
	padding-left: 1.25rem;
	position: relative;
	font-size: 0.9rem;
}

.book-item-themes-list li::before {
	content: "•";
	position: absolute;
	left: 0;
	color: #666;
}

.book-item-actions {
	margin-top: 1rem;
}

.no-books-message {
	text-align: center;
	padding: 3rem 1rem;
	color: #666;
	font-size: 1.1rem;
}

/* ============================================
   Blog Page Styles
   ============================================ */

.blog-page {
	background-color: #f9f6f1;
}

/* Section 1: Intro Band (Blog Hero) */
.blog-hero {
	padding: 3rem 0 2rem;
	background-color: #f9f6f1;
}

.blog-hero .ast-container {
	max-width: 1200px;
}

.blog-hero-inner {
	display: flex;
	gap: 3rem;
	align-items: flex-start;
}

.blog-hero-left {
	flex: 0 0 auto;
}

.blog-hero-right {
	flex: 1;
	min-width: 0;
}

.blog-hero-eyebrow {
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #666;
	margin: 0 0 0.5rem;
	opacity: 0.7;
}

.blog-hero-title {
	margin: 0 0 0.75rem;
	font-size: 2.5rem;
	line-height: 1.2;
}

.blog-hero-tagline {
	font-size: 1.125rem;
	line-height: 1.7;
	color: #333;
	margin: 0;
	opacity: 0.9;
}

/* Section 2: Featured Story Hero */
.blog-featured {
	padding: 2.5rem 0;
	border-top: 1px solid rgba(0, 0, 0, 0.04);
	border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.blog-featured__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	align-items: stretch;
}

.blog-featured__image {
	flex: 0 0 320px;
	max-width: 320px;
}

.blog-featured__image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 6px;
}

.blog-featured__image a {
	display: block;
	transition: opacity 0.3s ease;
}

.blog-featured__image a:hover {
	opacity: 0.9;
}

.blog-featured__content {
	flex: 1 1 0;
	min-width: 0;
}

.blog-featured__category {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.75rem;
	margin: 0 0 0.5rem;
	opacity: 0.75;
	color: #666;
}

.blog-featured__title {
	margin: 0 0 0.5rem;
}

.blog-featured__title a {
	text-decoration: none;
	color: inherit;
	transition: color 0.3s ease;
}

.blog-featured__title a:hover {
	color: #b88755;
}

.blog-featured__meta {
	font-size: 0.8rem;
	opacity: 0.7;
	margin: 0 0 1rem;
	color: #666;
}

.blog-featured__excerpt {
	margin: 0 0 1.5rem;
	line-height: 1.7;
	color: #333;
}

.blog-featured__button {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	font-size: 0.9rem;
	text-decoration: none;
	border-radius: 999px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	background-color: transparent;
	color: #333;
	transition: all 0.3s ease;
}

.blog-featured__button:hover {
	background-color: #b88755;
	border-color: #b88755;
	color: #fff;
}

/* ====================================================================
   BLOG LIST LAYOUT - Clean vertical list with image left, text right
   ==================================================================== */

/* Override Astra's blog grid system for our custom layout */
.am-blog-list .ast-container {
	max-width: 100%;
}

/* Disable Astra's grid layout on our blog list */
.am-blog-list .ast-grid-3,
.am-blog-list .ast-grid-2,
.am-blog-list .ast-grid-4 {
	display: flex !important;
	flex-direction: column !important;
	gap: 2rem;
}

/* Blog list container */
.am-blog-list {
	padding: 2.5rem 0 3rem;
}

.am-blog-list__inner {
	display: flex !important;
	flex-direction: column !important;
	gap: 2rem;
	width: 100%;
}

/* Each blog post row - horizontal layout */
/* High specificity to override Astra's default blog styles */
.am-blog-list .am-blog-row,
.am-blog-list article.am-blog-row,
.am-blog-list .ast-article-post.am-blog-row {
	display: flex !important;
	flex-direction: row !important;
	align-items: stretch !important;
	padding: 1.5rem;
	background-color: #ffffff;
	border-radius: 6px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
	border: 1px solid rgba(0, 0, 0, 0.03);
	width: 100%;
}

/* Override any Astra grid/column classes */
.am-blog-list .am-blog-row.ast-grid-col-6,
.am-blog-list .am-blog-row.ast-grid-col-4,
.am-blog-list .am-blog-row.ast-grid-col-12 {
	width: 100% !important;
	max-width: 100% !important;
	flex-basis: 100% !important;
}

/* Link wrapper makes entire row clickable */
.am-blog-row__link {
	display: flex !important;
	flex-direction: row !important;
	align-items: stretch !important;
	gap: 2rem;
	width: 100%;
	text-decoration: none;
	color: inherit;
}

/* Left side: featured image column */
.am-blog-row__image {
	flex: 0 0 300px !important;
	max-width: 300px !important;
	min-width: 300px;
	overflow: hidden;
	border-radius: 6px;
}

/* The actual thumbnail image */
.am-blog-row__thumbnail {
	width: 100% !important;
	height: 220px !important;
	object-fit: cover !important;
	display: block;
}

/* Right side: text content column */
.am-blog-row__content {
	flex: 1 1 auto !important;
	display: flex !important;
	flex-direction: column !important;
	justify-content: space-between;
	padding-left: 1.5rem;
	border-left: 1px solid rgba(0, 0, 0, 0.06);
	min-width: 0; /* Allows flex item to shrink */
}

/* Category label */
.am-blog-row__category {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.75rem;
	margin: 0 0 0.5rem;
	opacity: 0.7;
	color: #666;
}

/* Post title */
.am-blog-row__title {
	margin: 0 0 0.25rem;
	font-size: 1.5rem;
	font-weight: 600;
}

/* Meta line (date) */
.am-blog-row__meta {
	margin: 0 0 0.75rem;
	font-size: 0.85rem;
	opacity: 0.7;
	color: #666;
}

/* Excerpt text */
.am-blog-row__excerpt {
	font-size: 0.95rem;
	line-height: 1.7;
	margin: 0;
	color: #333;
}

/* Pagination */
.am-blog-list__pagination {
	margin-top: 2.5rem;
	text-align: center;
	padding-top: 2rem;
	border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Stack vertically on mobile */
@media (max-width: 768px) {
	.am-blog-row,
	.am-blog-row__link {
		flex-direction: column !important;
	}

	.am-blog-row__image {
		max-width: 100% !important;
		flex: 0 0 auto !important;
		min-width: auto !important;
		border-radius: 6px 6px 0 0;
	}

	.am-blog-row__thumbnail {
		height: 220px !important;
	}

	.am-blog-row__content {
		border-left: none;
		padding-left: 0;
		padding-top: 1rem;
	}
}
