/*
Theme Name: Salient Child Theme
Description: This is a custom child theme for Salient
Theme URI:   https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266
Author: ThemeNectar
Author URI:  https://themeforest.net/user/themenectar
Template: salient
Version: 1.0
*/

/* ── Related Posts Grid — mobile carousel ────────────── */
@media (max-width: 1000px) {
	.related-posts-grid,
	.book-reviews-grid,
	.native-titles-grid {
		display: flex !important;
		flex-wrap: nowrap !important;
		overflow-x: auto;
		overflow-y: visible;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x mandatory;
		scrollbar-width: none; /* Firefox */
		gap: 16px;
		padding-bottom: 12px;
		/* Bleed off the right edge only, left stays in container */
		margin-right: -28px;
		padding-right: 28px;
		width: calc(100% + 28px);
		box-sizing: border-box;
		cursor: grab;
		user-select: none;
	}

	.related-posts-grid::-webkit-scrollbar,
	.book-reviews-grid::-webkit-scrollbar,
	.native-titles-grid::-webkit-scrollbar {
		display: none; /* Chrome/Safari */
	}

	.related-posts-grid.is-dragging,
	.book-reviews-grid.is-dragging,
	.native-titles-grid.is-dragging {
		cursor: grabbing;
	}

	.related-posts-grid .related-post-card,
	.book-reviews-grid .book-review-card,
	.native-titles-grid .native-title-card {
		flex: 0 0 70%;
		max-width: 75%;
		scroll-snap-align: start;
		margin: 25px;
	}
}
/* ── /Related Posts Grid — mobile carousel ───────────── */

/* ── Related Posts Grid ──────────────────────────────── */
.related-post-thumb {
	overflow: hidden;
	width: 100%;
	aspect-ratio: 16 / 9;
}

.related-post-thumb-bg {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	transform: scale(1);
	transition: transform 0.4s ease;
}

.related-post-link:hover .related-post-thumb-bg {
	transform: scale(1.2);
}

.related-post-title {
	transition: color 0.2s ease;
}

.related-post-link:hover .related-post-title {
	color: var(--yellow) !important;
}
/* ── /Related Posts Grid ─────────────────────────────── */

/* ── Related Book Reviews Grid ───────────────────────── */
.book-review-thumb {
	overflow: hidden;
	width: 100%;
	aspect-ratio: 3 / 4;
}

.book-review-thumb-bg {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	transform: scale(1);
	transition: transform 0.4s ease;
}

.book-review-link:hover .book-review-thumb-bg {
	transform: scale(1.1);
}
/* ── /Related Book Reviews Grid ──────────────────────── */

/* ── Header banner ───────────────────────────────────── */
#logo {
	transition: opacity 0.3s ease;
}

#logo.km-logo-hidden {
	opacity: 0;
	pointer-events: none;
}

@media (max-width: 1000px) {
	#logo.km-logo-hidden {
		opacity: 1;
		pointer-events: auto;
	}

	#header-outer .row .col.span_3 {
		padding-top: 30px;
	}
}

#km-header-banner {
	position: relative;
	z-index: 10001;
	width: 100%;
	height: 20vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	opacity: 1;
	background: linear-gradient(to bottom, #C82E1C 0%, #F39200 50%, #FBCC00 100%) !important;
	transition: height 0.4s ease, opacity 0.3s ease;
}

#km-header-banner.is-hidden {
	height: 0;
	opacity: 0;
}

.km-banner-link {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.km-banner-logo {
	max-height: 70% !important;
	width: auto;
	display: block;
}

@media (max-width: 1000px) {
	.km-banner-logo {
		width: 80%;
		max-height: none;
		height: auto;
	}
}

@media (max-width: 1000px) {
	/* Secondary header ticker */
	#header-secondary-outer .container {
		overflow: hidden;
		max-width: none;
		padding: 0;
	}

	.km-ticker-track {
		display: flex;
		width: max-content;
		animation: km-ticker 20s linear infinite;
	}

	.km-ticker-track .nectar-center-text,
	.km-ticker-track nav {
		white-space: nowrap;
		flex-shrink: 0;
		padding-right: 80px;
	}
}

@keyframes km-ticker {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}
/* ── /Header banner ──────────────────────────────────── */

/* ── Featured Book Review ─────────────────────────────── */
.km-featured-book-review {
	display: flex;
	flex-direction: row;
	gap: 48px;
	align-items: stretch;
	background: #fff;
}

.km-fbr-image {
	flex: 0 0 auto;
	width: 40%;
	max-width: 420px;
}

.km-fbr-image a {
	display: block;
	height: 100%;
}

.km-fbr-image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}

.km-fbr-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 8px 0;
}

.km-fbr-title a {
	font-family: Montserrat, sans-serif;
	font-size: 36px;
	line-height: 110%;
	font-weight: 600;
	color: #1a1a1a;
	text-decoration: none !important;
}

.km-fbr-title a:hover {
	color: #BE1622;
}

.km-fbr-footer {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.km-fbr-read-more {
	display: inline-block;
	font-family: Montserrat, sans-serif;
	font-size: 20px;
	line-height: 135%;
	font-weight: 600;
	color: var(--red) !important;
	text-decoration: none !important;
	margin-bottom: 4px;
}

.km-fbr-read-more:hover {
	color: #6e1414 !important;
}

.km-fbr-book-author,
.km-fbr-date {
	font-size: 14px;
	color: #444;
	margin: 0;
	padding: 0;
}

@media (max-width: 600px) {
	.km-featured-book-review {
		flex-direction: column;
		gap: 24px;
	}

	.km-fbr-image {
		width: 100%;
		max-width: none;
	}
}
/* ── /Featured Book Review ────────────────────────────── */


/* ── ACF Post Blocks ─────────────────────────────────── */
.km-post-blocks {
	margin-top: 40px;
}

.km-block {
	margin-bottom: 40px;
}

.km-block:last-child {
	margin-bottom: 0;
}

/* Text block — inherits theme prose styles */
.km-block-text {}

/* Gallery block — responsive grid */
.km-block-gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.km-gallery-item {
	margin: 0;
	overflow: hidden;
}

.km-gallery-item img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}

@media (max-width: 480px) {
	.km-block-gallery {
		grid-template-columns: 1fr;
	}
}

/* Single image block */
.km-block-single-image {
	margin: 0;
}

.km-block-single-image img {
	display: block;
	width: 100%;
	height: auto;
}

.km-image-caption {
	margin-top: 10px;
	padding-bottom: 30px;
	font-size: 14px;
	color: #666;
	font-style: italic;
}
/* ── /ACF Post Blocks ────────────────────────────────── */


/* ── Slide-out widget area above header ──────────────── */
#slide-out-widget-area {
	z-index: 99999 !important;
}
/* ── /Slide-out widget area above header ─────────────── */

/* ── OCM open: hide header, show close button ────────── */
#header-outer {
	transition: opacity 0.3s ease;
}

body:has(#slide-out-widget-area.open) #header-outer,
body:has(#slide-out-widget-area.open) #km-header-banner {
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Custom close button — fixed top-right, shown only when OCM is open */
.km-ocm-close {
	display: none;
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 100000;
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 8px;
	font-size: 32px;
	line-height: 1;
	font-weight: 300;
}
/* ── /OCM open: hide header, show close button ───────── */

/* ── Header nav vertical alignment ──────────────────── */
#header-outer #top nav > ul {
	display: inline-flex !important;
	align-items: center !important;
}

#header-outer #top nav > ul > li {
	float: none !important;
	display: flex !important;
	align-items: center !important;
}

#header-outer #top nav > .buttons {
	align-items: center !important;
}
/* ── /Header nav vertical alignment ─────────────────── */

/* ── Header Log In link ──────────────────────────────── */
#top nav ul #nectar-user-account a.km-login-link {
	width: auto !important;
	padding: 0 !important;
	white-space: nowrap;
	font-size: inherit;
	font-weight: 600;
	text-decoration: none !important;
	letter-spacing: 0.02em;
}

/* Allow the buttons bar to grow to fit the wider text */
#top nav > .buttons {
	overflow: visible !important;
	width: auto !important;
}
/* ── /Header Log In link ─────────────────────────────── */

/* ── PMPro gate message — overlaps bottom half of featured image ─ */
.km-gate-message {
	position: relative;
	z-index: 10;
	margin-top: -200px;
	padding: 0 20px;
}

.km-gate-overlay {
	position: absolute;
	bottom: 0;
	left: -100vw;
	right: -100vw;
	height: 100vh;
	background: linear-gradient(
		to top,
		rgba(255,255,255,1) 0%,
		rgba(255,255,255,1) 20%,
		rgba(255,255,255,0) 100%
	);
	z-index: -1;
	pointer-events: none;
}
/* ── /PMPro gate message ─────────────────────────────── */

/* ── PMPro subscribe button ──────────────────────────── */
.km-pmpro-subscribe-btn {
	display: inline-block;
	background: #BE1622;
	color: #fff !important;
	font-family: Montserrat, sans-serif;
	font-size: 16px;
	font-weight: 600;
	padding: 14px 28px;
	border-radius: 0;
	text-decoration: none !important;
	transition: background 0.2s ease;
}

.km-pmpro-subscribe-btn:hover {
	background: #6e1414;
	color: #fff !important;
}
/* ── /PMPro subscribe button ─────────────────────────── */

/* ── Editions toolbar search ─────────────────────────── */
.editions-toolbar__search-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	border-bottom: 1px solid #000;
	padding-bottom: 6px;
}

.editions-toolbar__search-icon {
	flex-shrink: 0;
	color: #000;
	pointer-events: none;
	display: block;
}

.editions-toolbar__search {
	flex: 1;
	padding: 0 !important;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	font-size: 16px !important;
	color: #000 !important;
	outline: none !important;
	appearance: none;
	-webkit-appearance: none;
	min-width: 0;
}

.editions-toolbar__search::placeholder {
	color: #000;
}

.editions-toolbar__search::-webkit-search-decoration,
.editions-toolbar__search::-webkit-search-cancel-button {
	-webkit-appearance: none;
}
/* ── /Editions toolbar search ────────────────────────── */

/* ── Featured Category Post ──────────────────────────── */

/* Outer wrap: position:relative so the overlay <a> fills it */
.km-fcp-wrap {
	position: relative;
	display: block;
}

/* Invisible full-cover link — sits on top so the whole card is clickable */
.km-fcp-link {
	position: absolute;
	inset: 0;
	z-index: 1;
	text-decoration: none !important;
}

/* Flex row lives on the inner div, never on an <a> */
.km-fcp-inner {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	min-height: 500px;
}

/* Left column — 1/3 */
.km-fcp-content {
	flex: 0 0 33.333%;
	width: 33.333%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding-right: 48px;
}

/* Right column — 2/3 */
.km-fcp-image {
	flex: 0 0 66.666%;
	width: 66.666%;
	overflow: hidden;
	border: 1px solid #000;
}

.km-fcp-image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	transition: transform 0.4s ease;
}

/* Title */
.km-fcp-title {
	font-family: Montserrat, sans-serif;
	font-size: 36px;
	line-height: 110%;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 48px;
	transition: color 0.2s ease;
}

/* Bottom meta */
.km-fcp-bottom {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.km-fcp-excerpt {
	margin: 0 0 16px;
	color: #1a1a1a;
}

.km-fcp-author {
	font-size: inherit;
	font-weight: 700;
	margin: 0;
	padding: 0;
	color: #1a1a1a;
}

.km-fcp-date {
	margin: 0;
	color: #1a1a1a;
}

/* Hover effects — triggered on the wrap since the <a> is the overlay */
.km-fcp-wrap:hover .km-fcp-title {
	color: var(--red);
}

.km-fcp-wrap:hover .km-fcp-image img {
	transform: scale(1.04);
}

@media (max-width: 1000px) {
	.km-fcp-inner {
		flex-direction: column;
	}

	.km-fcp-content {
		flex: none;
		width: 100%;
		padding-right: 0;
		padding-bottom: 24px;
		order: 2;
	}

	.km-fcp-image {
		flex: none;
		width: 100%;
		order: 1;
	}

	.km-fcp-image img {
		height: auto !important;
		margin-bottom: 0 !important;
		display: block;
	}

	.km-fcp-title {
		padding-top: 20px;
		font-size: 22px;
		line-height: 26px;
	}
}
/* ── Featured Category Post — green variant ──────────── */
.km-fcp-wrap--green {
	background: #685E2D;
	padding: 20px 20px;
}

.km-fcp-wrap--green .km-fcp-title {
	color: #fff;
}

.km-fcp-wrap--green .km-fcp-excerpt,
.km-fcp-wrap--green .km-fcp-author,
.km-fcp-wrap--green .km-fcp-date {
	color: #fff;
}

.km-fcp-wrap--green:hover .km-fcp-title {
	color: var(--yellow);
}

.km-fcp-wrap--green .km-fcp-image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}

@media (max-width: 1000px) {
	.km-fcp-wrap--green {
		padding: 20px 10px;
	}
}
/* ── /Featured Category Post — green variant ─────────── */

/* ── /Featured Category Post ─────────────────────────── */





