/**
 * Booknetic for Theme V4 — Site shell.
 *
 * Site header, footer and a few page-shell primitives that complete the
 * base experience built on top of the Design System.
 *
 * Loaded via wp_enqueue_scripts when bft-v4 body class is present.
 */

body.bft-v4 {
	background: var(--ds-color-bg);
	color: var(--ds-color-text);
	font-family: var(--ds-font-sans);
	line-height: var(--ds-leading-normal);
	min-height: 100vh;
	overflow-x: hidden;
}

/* Atmospheric mesh that lives behind all content */
body.bft-v4::before {
	content: "";
	position: fixed;
	inset: 0;
	background: var(--ds-gradient-mesh);
	pointer-events: none;
	z-index: 0;
}
body.bft-v4 > * { position: relative; z-index: 1; }

/* ============================================================ */
/* HEADER                                                        */
/* ============================================================ */

.bft-site-header {
	position: sticky;
	top: 0;
	z-index: var(--ds-z-header);
	padding: var(--ds-space-3) 0;
	background: rgba(10, 6, 19, 0.78);
	backdrop-filter: blur(var(--ds-blur-md));
	border-bottom: 1px solid var(--ds-color-border-subtle);
}
html[data-color-scheme="light"] .bft-site-header {
	background: rgba(255, 255, 255, 0.84);
}

.bft-site-header .ds-split { gap: var(--ds-space-5); }

/* Brand mark + name */
.bft-brand {
	display: inline-flex;
	align-items: center;
	gap: var(--ds-space-2);
	color: var(--ds-color-text);
	text-decoration: none;
	min-width: 0;
}
.bft-brand__mark {
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--ds-radius-md);
	background: var(--ds-gradient-cta);
	color: var(--ds-color-primary-contrast);
	box-shadow: var(--ds-shadow-cta);
	flex-shrink: 0;
}
.bft-brand__name {
	font-family: var(--ds-font-display);
	font-size: var(--ds-text-md);
	font-weight: var(--ds-font-bold);
	letter-spacing: var(--ds-tracking-tight);
}
.bft-brand .custom-logo {
	max-height: 36px;
	width: auto;
}

/* Primary nav */
.bft-primary-nav__list {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: var(--ds-space-2);
	align-items: center;
}
@media (min-width: 1024px) {
	.bft-primary-nav__list { display: inline-flex; }
}
.bft-primary-nav__list a {
	padding: var(--ds-space-2) var(--ds-space-3);
	border-radius: var(--ds-radius-sm);
	color: var(--ds-color-text-muted);
	font-size: var(--ds-text-sm);
	font-weight: var(--ds-font-medium);
	text-decoration: none;
	transition: var(--ds-transition-color), var(--ds-transition-bg);
}
.bft-primary-nav__list a:hover,
.bft-primary-nav__list .current-menu-item > a {
	color: var(--ds-color-text);
	background: var(--ds-color-surface);
}

.bft-header-cta {
	display: inline-flex;
	gap: var(--ds-space-2);
	align-items: center;
}

/* ============================================================ */
/* MAIN                                                          */
/* ============================================================ */

.bft-main {
	min-height: calc(100vh - 140px);
}

/* ============================================================ */
/* FOOTER                                                        */
/* ============================================================ */

.bft-site-footer {
	margin-top: var(--ds-section-y);
	padding: var(--ds-space-10) 0 var(--ds-space-8);
	background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.25) 100%);
	border-top: 1px solid var(--ds-color-border-subtle);
}

.bft-footer-nav__list {
	display: inline-flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: var(--ds-space-5);
}
.bft-footer-nav__list a {
	color: var(--ds-color-text-muted);
	font-size: var(--ds-text-sm);
	text-decoration: none;
	transition: var(--ds-transition-color);
}
.bft-footer-nav__list a:hover { color: var(--ds-color-text); }

/* ============================================================ */
/* SINGLE / PAGE                                                 */
/* ============================================================ */

.bft-single-thumb {
	margin: 0;
	border-radius: var(--ds-radius-card-lg);
	overflow: hidden;
}
.bft-single-thumb__img {
	width: 100%;
	height: auto;
	display: block;
}

/* ============================================================ */
/* PAGINATION                                                    */
/* ============================================================ */

.bft-pagination .page-numbers,
.bft-pagination a.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 var(--ds-space-3);
	background: var(--ds-color-surface);
	border: 1px solid var(--ds-color-border-subtle);
	border-radius: var(--ds-radius-sm);
	color: var(--ds-color-text-muted);
	font: 600 var(--ds-text-sm)/1 var(--ds-font-sans);
	text-decoration: none;
	transition: var(--ds-transition-all);
}
.bft-pagination a.page-numbers:hover {
	background: var(--ds-color-surface-hover);
	color: var(--ds-color-text);
}
.bft-pagination .page-numbers.current {
	background: var(--ds-gradient-cta);
	color: var(--ds-color-primary-contrast);
	border-color: transparent;
}

/* ============================================================ */
/* SEARCH FORM                                                   */
/* ============================================================ */

.bft-searchform { width: 100%; max-width: 480px; }
