/**
 * Homepage-specific styles: hero, testimonials, home sections.
 *
 * @package MadUnicow_Author_Template
 */

/* ==========================================================================
   Litza Hero
   ========================================================================== */

/*
 * Layout strategy (simplified): give the media column a direct min-height so
 * the image has a container to fill via position:absolute. The hero inherits
 * its height from the media column. No flex chain — avoids conflicts with
 * WordPress's auto-generated Columns block CSS.
 */

.home-hero {
	background: #ffffff;
	position: relative;
	overflow: hidden;
}
/* Hero ornaments removed: the ornament PNGs have white backgrounds, so at
   low opacity they washed patches of the page (and the dark quote band) to
   gray. Keeping the sections clean/solid instead. */

/* Inner group: standard layout-wrap, z-index for ornaments */
.home-hero .home-hero__inner {
	position: relative;
	z-index: 1;
	padding-top: 0;
	padding-bottom: 0;
}

/* Columns block: columns stretch vertically to match the tallest sibling */
.home-hero .wp-block-columns.home-hero-cols {
	align-items: stretch !important;
	gap: 0 4rem !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* Text column: vertically centred with generous padding */
.home-hero .wp-block-column.home-hero__text,
.home-hero__text {
	display: flex !important;
	flex-direction: column;
	justify-content: center;
	gap: 1.1rem;
	padding: 5.5rem 0;
}

.home-hero__eyebrow {
	font-family: var(--font-serif);
	font-size: 1.1rem;
	font-style: italic;
	color: var(--madunicow-primary-alt);
	margin: 0;
}
.home-hero__heading {
	font-family: var(--font-serif);
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 400;
	color: var(--madunicow-primary);
	margin: 0;
	line-height: 1.15;
}
.home-hero__subtext {
	font-size: 1rem;
	color: var(--madunicow-smoky);
	line-height: 1.75;
	margin: 0;
	max-width: 48ch;
}
.home-hero__cta {
	display: inline-block;
	margin-top: 0.5rem;
	padding: 1rem 2.25rem;
	background: var(--madunicow-secondary);
	color: #ffffff !important;
	font-family: var(--font-sans);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	box-shadow: 4px 4px 0 var(--madunicow-light);
	transition: background 0.15s, box-shadow 0.15s;
	align-self: flex-start;
}
.home-hero__cta:hover {
	background: var(--madunicow-primary);
	color: #ffffff !important;
	box-shadow: none;
}

/*
 * Media column: explicit min-height gives the image its container height.
 * The image is position:absolute inside this, so the column must be
 * position:relative with overflow:hidden.
 */
.home-hero .wp-block-column.home-hero__media,
.home-hero__media {
	position: relative !important;
	overflow: hidden;
	min-height: min(82vh, 780px);
}

/* Author image: fills the full media column top-to-bottom */
.home-hero__author-img,
figure.home-hero__author-img {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0;
	z-index: 1;
}
.home-hero__author-img img,
figure.home-hero__author-img img {
	width: 100%;
	height: 100%;
	max-width: none !important;
	object-fit: cover;
	object-position: top center;
	display: block;
}

/* Book cover overlay */
.home-hero__book-cover,
figure.home-hero__book-cover {
	position: absolute;
	bottom: 2.5rem;
	left: 0;
	width: 130px;
	height: auto;
	z-index: 2;
	box-shadow: 4px 6px 16px rgba(0,0,0,0.22);
	margin: 0;
}
figure.home-hero__book-cover img {
	width: 100%;
	display: block;
}

/* Badge */
.home-hero__badge {
	position: absolute;
	bottom: 3.5rem;
	left: 8.5rem;
	width: 86px;
	height: 86px;
	background: var(--madunicow-primary-alt);
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 3;
	font-family: var(--font-serif);
	font-style: italic;
	color: #ffffff;
	font-size: 1rem;
	text-align: center;
	line-height: 1.25;
	padding: 0.5rem;
}

@media (max-width: 860px) {
	.home-hero .wp-block-columns.home-hero-cols {
		flex-direction: column !important;
		gap: 0 !important;
	}
	.home-hero .wp-block-column.home-hero__text {
		padding: 3rem 0;
		order: 1;
	}
	.home-hero .wp-block-column.home-hero__media {
		min-height: 360px;
		order: 0;
	}
}

/* ==========================================================================
   FAQ / Q&A spacing overrides (home page Gutenverse column blocks)
   ========================================================================== */

/* Override any Gutenverse-set section/spacer backgrounds in the home page content area.
   The front page template uses .home-editor-content, not .entry-content. */
.home-editor-content .guten-section,
.home-editor-content .guten-spacer,
.home-editor-content .guten-element.guten-spacer {
	background: #ffffff !important;
	background-color: #ffffff !important;
}

.wp-block-columns .faq-item,
.entry-content .faq-item {
	padding-top: 0.1rem;
	padding-bottom: 0.1rem;
}
.entry-content .faq-item__btn {
	padding: 1.1rem 0;
	font-size: 0.975rem;
}
/* Two-column FAQ gap */
.wp-block-columns:has(.faq-item) .wp-block-column {
	padding-right: 2rem;
}

/* ==========================================================================
   Testimonials section
   ========================================================================== */
.testimonials-section {
	background: #ffffff;
	padding: 5rem 0;
	position: relative;
	overflow: hidden;
}
.testimonials-section::after {
	content: "";
	position: absolute;
	top: 0; right: 0;
	width: min(340px, 30vw);
	height: 100%;
	background-image: url("../img/ornaments/ornament-accent.png");
	background-repeat: no-repeat;
	background-position: top right;
	background-size: contain;
	opacity: 0.12;
	pointer-events: none;
}
.testimonials-section__header {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: start;
	gap: 1rem 2rem;
	margin-bottom: 3rem;
}
@media (max-width: 600px) {
	.testimonials-section__header { grid-template-columns: 1fr; }
}
.testimonials-section__eyebrow {
	font-family: var(--font-serif);
	font-size: 1rem;
	font-style: italic;
	color: var(--madunicow-primary-alt);
	display: block;
	margin-bottom: 0.5rem;
}
.testimonials-section__heading {
	font-family: var(--font-serif);
	font-size: clamp(1.6rem, 3.5vw, 2.5rem);
	font-weight: 400;
	color: var(--madunicow-primary);
	margin: 0;
	line-height: 1.25;
}
.testimonials-section__rating-wrap {
	text-align: right;
	flex-shrink: 0;
	padding-top: 0.25rem;
}
.testimonials-section__rating-stars {
	color: #D4A017;
	font-size: 1.1rem;
	display: block;
	margin-bottom: 0.3rem;
}
.testimonials-section__rating-label {
	font-size: 0.85rem;
	color: var(--madunicow-smoky);
	white-space: nowrap;
}

.testimonials-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2.5rem 2rem;
}
@media (max-width: 860px) {
	.testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.testimonials-grid { grid-template-columns: 1fr; }
}
.testimonial-card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding-bottom: 1.5rem;
	border-bottom: 2px solid var(--madunicow-light);
}
.testimonial-card__text {
	font-size: 0.95rem;
	line-height: 1.8;
	color: var(--madunicow-smoky);
	margin: 0;
	flex: 1;
}
.testimonial-card__stars {
	color: #D4A017;
	font-size: 1rem;
	letter-spacing: 0.06em;
}
.testimonial-card__author {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.testimonial-card__avatar {
	border-radius: 50%;
	flex-shrink: 0;
	object-fit: cover;
	width: 48px;
	height: 48px;
}
.testimonial-card__name {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--madunicow-primary);
	display: block;
	margin-bottom: 0.1rem;
}
.testimonial-card__designation {
	font-size: 0.82rem;
	font-style: italic;
	color: var(--madunicow-primary-alt);
}

/* Carousel dots */
.testimonials-dots {
	display: flex;
	justify-content: flex-start;
	gap: 0.45rem;
	margin-top: 2rem;
}
.testimonials-dots__dot {
	width: 2.5rem;
	height: 3px;
	background: var(--madunicow-light);
	cursor: pointer;
	border: none;
	padding: 0;
	transition: background 0.15s;
}
.testimonials-dots__dot--active { background: var(--madunicow-primary); }

/* ==========================================================================
   Home-page book collections promo
   Layout: left card (cover image + heading + CTA) + right vertical tabs
   Mirrors the Canva card design (DAHJxJCWit4 / DAHJxHl_J-o).
   ========================================================================== */
.home-collections {
	background: #ffffff;
	padding: 5rem 0;
}

.home-collections__inner {
	display: grid;
	grid-template-columns: 1fr 220px;
	gap: 0;
	align-items: stretch;
	box-shadow: 0 4px 32px rgba(34, 48, 122, 0.10);
	overflow: hidden;
}

/* ---- Left card ---- */
.home-collections__card {
	display: flex;
	flex-direction: column;
	background: #EEF4FC;
}

.home-collections__cover {
	width: 100%;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--madunicow-primary);
}

.home-collections__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
}

.home-collections__cover-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 4rem;
	color: rgba(255,255,255,0.3);
}

.home-collections__card-body {
	padding: 2rem 2.5rem 2.5rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.home-collections__heading {
	font-family: var(--font-serif);
	font-size: clamp(1.25rem, 2.5vw, 2rem);
	font-weight: 400;
	color: var(--madunicow-primary);
	margin: 0;
	line-height: 1.3;
}

.home-collections__subtext {
	font-size: 0.95rem;
	color: var(--madunicow-smoky);
	line-height: 1.7;
	margin: 0;
}

.home-collections__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--madunicow-secondary) !important;
	font-family: var(--font-sans);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	margin-top: auto;
	transition: color 0.15s, gap 0.15s;
}

.home-collections__cta:hover {
	color: var(--madunicow-primary) !important;
	gap: 0.65rem;
	text-decoration: none;
}

/* ---- Right vertical tabs ---- */
.home-collections__tabs {
	display: flex;
	flex-direction: column;
}

.home-collections__tab {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem 1rem;
	background: var(--madunicow-primary);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	text-decoration: none;
	transition: background 0.2s;
	writing-mode: vertical-rl;
	text-orientation: mixed;
}

.home-collections__tab:last-child {
	border-bottom: none;
}

.home-collections__tab--active {
	background: var(--madunicow-secondary);
}

.home-collections__tab:hover {
	background: var(--madunicow-hover);
	text-decoration: none;
}

.home-collections__tab-label {
	display: block;
	font-family: var(--font-sans);
	font-size: 0.75rem;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.45);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	filter: blur(1.5px);
	transition: filter 0.2s, color 0.2s;
	user-select: none;
}

.home-collections__tab--active .home-collections__tab-label,
.home-collections__tab:hover .home-collections__tab-label {
	filter: blur(0);
	color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 860px) {
	.home-collections__inner {
		grid-template-columns: 1fr;
	}
	.home-collections__tabs {
		flex-direction: row;
		writing-mode: initial;
	}
	.home-collections__tab {
		writing-mode: initial;
		padding: 0.9rem 0.75rem;
	}
	.home-collections__tab-label {
		font-size: 0.7rem;
	}
}

/* ==========================================================================
   Home-page featured books strip
   ========================================================================== */
.home-books {
	background: #EEF4FC;
	padding: 5rem 0;
	position: relative;
	overflow: hidden;
}
.home-books::after {
	content: "";
	position: absolute;
	top: 0; right: 0;
	width: min(180px, 16vw);
	height: 100%;
	background-image: url("../img/ornaments/ornament-7.png");
	background-repeat: repeat-y;
	background-position: top right;
	opacity: 0.06;
	pointer-events: none;
}
.home-books__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 2.5rem;
	position: relative;
	z-index: 1;
}
.home-books__eyebrow {
	font-family: var(--font-serif);
	font-size: 1rem;
	font-style: italic;
	color: var(--madunicow-primary-alt);
	display: block;
	margin-bottom: 0.35rem;
}
.home-books__heading {
	font-family: var(--font-serif);
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: 400;
	color: var(--madunicow-primary);
	margin: 0;
}
.home-books__view-all {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--madunicow-secondary);
	text-decoration: none;
	letter-spacing: 0.04em;
	white-space: nowrap;
	position: relative;
	z-index: 1;
}
.home-books__view-all:hover { color: var(--madunicow-primary); }
