/**
 * FlyBlock Main Stylesheet & Design System
 * Zero-bloat, modern CSS Variables architecture
 *
 * @package FlyBlock
 */

/* ==========================================================================
   1. CSS Custom Properties / Design Tokens
   ========================================================================== */
:root {
	/* Colors */
	--fb-palette-primary: #3b82f6;
	--fb-palette-secondary: #1d4ed8;
	--fb-color-heading: #0f172a;
	--fb-color-text: #475569;
	--fb-color-background: #ffffff;
	--fb-color-surface: #f8fafc;
	--fb-color-border: #e2e8f0;
	--fb-color-muted: #94a3b8;

	/* Layout & Typography */
	--fb-container-width: 1200px;
	--fb-container-padding: 24px;
	--fb-font-base: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	--fb-font-base-size: 16px;
	--fb-line-height: 1.6;

	/* Elevation & Radius */
	--fb-radius-sm: 6px;
	--fb-radius-md: 10px;
	--fb-radius-lg: 16px;
	--fb-radius-full: 9999px;
	--fb-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--fb-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
	--fb-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
	--fb-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

	/* Transitions */
	--fb-transition-fast: 0.15s ease;
	--fb-transition-normal: 0.25s ease;
}

/* ==========================================================================
   2. Reset & Base Typography
   ========================================================================== */
*, *::before, *::after {
	box-sizing: border-box;
}

html {
	font-family: var(--fb-font-base);
	font-size: var(--fb-font-base-size);
	line-height: var(--fb-line-height);
	color: var(--fb-color-text);
	background-color: var(--fb-color-background);
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding: 0;
	background-color: var(--fb-color-background);
	color: var(--fb-color-text);
	overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--fb-color-heading);
	font-weight: 700;
	line-height: 1.25;
	margin-top: 0;
	margin-bottom: 0.75rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
	margin-top: 0;
	margin-bottom: 1.25rem;
}

a {
	color: var(--fb-palette-primary);
	text-decoration: none;
	transition: color var(--fb-transition-fast);
}

a:hover, a:focus {
	color: var(--fb-palette-secondary);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Screen Reader Text */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	clip-path: none;
	color: #21759b;
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* Container */
.fb-container {
	width: 100%;
	max-width: var(--fb-container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--fb-container-padding);
	padding-right: var(--fb-container-padding);
}

/* ==========================================================================
   3. Header Builder Rows & Elements
   ========================================================================== */
.site-header {
	background-color: var(--fb-color-background);
	border-bottom: 1px solid var(--fb-color-border);
	position: relative;
	z-index: 100;
	transition: all var(--fb-transition-normal);
}

.site-header.fb-header-sticky.is-sticky {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	box-shadow: var(--fb-shadow-md);
	animation: fbSlideDown 0.3s ease;
}

@keyframes fbSlideDown {
	from { transform: translateY(-100%); }
	to { transform: translateY(0); }
}

/* Header Rows */
.fb-header-row {
	display: flex;
	align-items: center;
	width: 100%;
}

.fb-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
}

/* Top Bar */
.fb-header-top-bar {
	background-color: var(--fb-color-surface);
	border-bottom: 1px solid var(--fb-color-border);
	font-size: 0.875rem;
	padding-top: 6px;
	padding-bottom: 6px;
}

.fb-top-nav ul {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 1rem;
}

/* Main Bar */
.fb-header-main-bar {
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.fb-header-col {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

/* Logo */
.site-branding {
	display: flex;
	flex-direction: column;
}

.site-title {
	font-size: 1.5rem;
	font-weight: 800;
	margin: 0;
	line-height: 1.2;
}

.site-title a {
	color: var(--fb-color-heading);
}

.site-description {
	font-size: 0.8125rem;
	color: var(--fb-color-muted);
	margin: 0;
}

.custom-logo-link img {
	max-height: 50px;
	width: auto;
}

/* Navigation Menu */
.main-navigation .fb-nav-menu {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0.5rem;
}

.fb-nav-menu li {
	position: relative;
}

.fb-nav-menu a {
	display: block;
	padding: 0.5rem 0.875rem;
	font-weight: 500;
	color: var(--fb-color-heading);
	border-radius: var(--fb-radius-sm);
	transition: all var(--fb-transition-fast);
}

.fb-nav-menu a:hover,
.fb-nav-menu li.current-menu-item > a {
	color: var(--fb-palette-primary);
	background-color: var(--fb-color-surface);
}

/* Dropdown Menus */
.fb-nav-menu ul {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background-color: var(--fb-color-background);
	border: 1px solid var(--fb-color-border);
	border-radius: var(--fb-radius-md);
	box-shadow: var(--fb-shadow-lg);
	list-style: none;
	padding: 0.5rem 0;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all var(--fb-transition-fast);
	z-index: 1000;
}

.fb-nav-menu li:hover > ul,
.fb-nav-menu li:focus-within > ul {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.fb-nav-menu ul a {
	padding: 0.5rem 1.25rem;
	font-size: 0.9375rem;
}

/* Header Actions */
.fb-header-actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.fb-icon-btn {
	background: none;
	border: none;
	color: var(--fb-color-heading);
	cursor: pointer;
	padding: 8px;
	border-radius: var(--fb-radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all var(--fb-transition-fast);
}

.fb-icon-btn:hover {
	background-color: var(--fb-color-surface);
	color: var(--fb-palette-primary);
}

.fb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 0.9375rem;
	padding: 0.625rem 1.25rem;
	border-radius: var(--fb-radius-sm);
	transition: all var(--fb-transition-fast);
	cursor: pointer;
	border: 1px solid transparent;
}

.fb-btn-primary {
	background-color: var(--fb-palette-primary);
	color: #ffffff;
}

.fb-btn-primary:hover {
	background-color: var(--fb-palette-secondary);
	color: #ffffff;
	box-shadow: var(--fb-shadow-md);
}

/* Hamburger Toggle */
.fb-menu-toggle {
	display: none;
}

.fb-hamburger-box {
	width: 22px;
	height: 16px;
	display: inline-block;
	position: relative;
}

.fb-hamburger-inner,
.fb-hamburger-inner::before,
.fb-hamburger-inner::after {
	width: 22px;
	height: 2px;
	background-color: currentColor;
	border-radius: 2px;
	position: absolute;
	transition: transform 0.2s ease;
}

.fb-hamburger-inner {
	top: 50%;
	transform: translateY(-50%);
}

.fb-hamburger-inner::before {
	content: '';
	top: -6px;
}

.fb-hamburger-inner::after {
	content: '';
	bottom: -6px;
}

/* ==========================================================================
   4. Mobile Off-Canvas Drawer & Modals
   ========================================================================== */
.fb-mobile-drawer {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10000;
	display: flex;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fb-mobile-drawer.is-active {
	visibility: visible;
	opacity: 1;
}

.fb-drawer-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(4px);
}

.fb-drawer-panel {
	position: relative;
	width: 85%;
	max-width: 320px;
	height: 100%;
	background-color: var(--fb-color-background);
	box-shadow: var(--fb-shadow-xl);
	display: flex;
	flex-direction: column;
	transform: translateX(-100%);
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 1;
}

.fb-mobile-drawer.is-active .fb-drawer-panel {
	transform: translateX(0);
}

.fb-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem;
	border-bottom: 1px solid var(--fb-color-border);
}

.fb-drawer-logo {
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--fb-color-heading);
}

.fb-drawer-body {
	padding: 1.25rem;
	overflow-y: auto;
}

.fb-mobile-menu-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.fb-mobile-menu-list a {
	display: block;
	padding: 0.75rem 0;
	font-size: 1.05rem;
	font-weight: 500;
	color: var(--fb-color-heading);
	border-bottom: 1px solid var(--fb-color-border);
}

/* Search Modal */
.fb-search-modal {
	position: fixed;
	inset: 0;
	z-index: 10001;
	display: flex;
	align-items: center;
	justify-content: center;
	visibility: hidden;
	opacity: 0;
	transition: all 0.25s ease;
}

.fb-search-modal.is-active {
	visibility: visible;
	opacity: 1;
}

.fb-search-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.75);
	backdrop-filter: blur(6px);
}

.fb-search-box {
	position: relative;
	width: 90%;
	max-width: 600px;
	background: var(--fb-color-background);
	border-radius: var(--fb-radius-lg);
	padding: 2.5rem;
	box-shadow: var(--fb-shadow-xl);
	z-index: 1;
	transform: scale(0.95);
	transition: transform 0.25s ease;
}

.fb-search-modal.is-active .fb-search-box {
	transform: scale(1);
}

.fb-search-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
}

.fb-search-box .search-field {
	width: 100%;
	padding: 1rem 1.25rem;
	font-size: 1.25rem;
	border: 2px solid var(--fb-color-border);
	border-radius: var(--fb-radius-md);
	outline: none;
	transition: border-color var(--fb-transition-fast);
}

.fb-search-box .search-field:focus {
	border-color: var(--fb-palette-primary);
}

/* ==========================================================================
   5. Main Content Layout & Sidebar
   ========================================================================== */
.fb-main-wrapper {
	display: grid;
	gap: 2.5rem;
	padding-top: 3.5rem;
	padding-bottom: 4rem;
	width: 100%;
	box-sizing: border-box;
}

/* Page Structure Classes */
.fb-structure-normal {
	grid-template-columns: 1fr;
	max-width: var(--fb-container-width, 1200px);
	margin-left: auto;
	margin-right: auto;
}

.fb-structure-narrow {
	grid-template-columns: 1fr;
	max-width: 820px;
	margin-left: auto;
	margin-right: auto;
}

.fb-structure-full-width,
.fb-main-wrapper.fb-container-fluid {
	grid-template-columns: 1fr;
	max-width: 100% !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.fb-structure-full-width .fb-content-area,
.fb-structure-full-width .entry-content {
	width: 100% !important;
	max-width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.fb-structure-full-width .entry-content > * {
	max-width: 100%;
}

/* In full-width structure, completely unbox the article */
.fb-structure-full-width .fb-content-area article,
.fb-structure-full-width.fb-content-boxed .fb-content-area article,
.fb-structure-full-width .fb-single-page {
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	box-shadow: none !important;
	max-width: 100% !important;
	width: 100% !important;
}

.fb-structure-full-width .entry-header {
	max-width: var(--fb-container-width, 1200px);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--fb-container-padding, 24px);
	padding-right: var(--fb-container-padding, 24px);
}

.fb-sidebar-right {
	grid-template-columns: 1fr 320px;
}

.fb-sidebar-left {
	grid-template-columns: 320px 1fr;
}

.fb-sidebar-left .fb-content-area {
	order: 2;
}

.fb-sidebar-left .fb-sidebar {
	order: 1;
}

.fb-sidebar-none:not(.fb-structure-full-width):not(.fb-structure-narrow) {
	grid-template-columns: 1fr;
	max-width: var(--fb-container-width, 1200px);
	margin-left: auto;
	margin-right: auto;
}

/* Vertical Spacing: Disabled (0px Padding for flush full page widgets & heroes) */
.fb-no-vertical-spacing,
.fb-no-vertical-spacing.fb-main-wrapper {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	gap: 0 !important;
}

.fb-no-vertical-spacing .site-main,
.fb-no-vertical-spacing .fb-content-area article,
.fb-no-vertical-spacing .entry-content {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

/* Content Area Style: Boxed (applies when not full-width) */
.fb-content-boxed:not(.fb-structure-full-width) .fb-content-area article {
	background: var(--fb-color-surface, #ffffff);
	border: 1px solid var(--fb-color-border, #e2e8f0);
	border-radius: var(--fb-radius-lg, 16px);
	padding: 2.5rem;
	box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

/* Gutenberg Alignments: Alignwide & Alignfull */
.alignwide {
	max-width: min(calc(100vw - 48px), 1400px);
	margin-left: auto;
	margin-right: auto;
}

.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.fb-structure-full-width .alignfull,
.fb-structure-full-width .entry-content > .alignfull,
.fb-structure-full-width .entry-content > .wp-block-group.alignfull {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Sidebar Widgets */
.fb-sidebar .widget {
	background: var(--fb-color-surface);
	border: 1px solid var(--fb-color-border);
	border-radius: var(--fb-radius-md);
	padding: 1.5rem;
	margin-bottom: 2rem;
}

.widget-title {
	font-size: 1.15rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--fb-palette-primary);
	margin-bottom: 1.25rem;
}

.widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.widget li {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--fb-color-border);
}

.widget li:last-child {
	border-bottom: none;
}

/* ==========================================================================
   6. Blog Posts Loop & Card System
   ========================================================================== */
.fb-posts-loop.fb-loop-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2rem;
}

.fb-posts-loop.fb-loop-classic {
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

/* Post Card */
.fb-post-card {
	background: var(--fb-color-background);
	border: 1px solid var(--fb-color-border);
	border-radius: var(--fb-radius-md);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform var(--fb-transition-fast), box-shadow var(--fb-transition-fast), border-color var(--fb-transition-fast);
}

.fb-post-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--fb-shadow-lg);
	border-color: rgba(59, 130, 246, 0.3);
}

.fb-card-media {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: var(--fb-color-surface);
}

.fb-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.fb-post-card:hover .fb-card-img {
	transform: scale(1.04);
}

.fb-card-body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.fb-card-meta-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.8125rem;
	margin-bottom: 0.75rem;
}

.fb-card-category a {
	background-color: rgba(59, 130, 246, 0.1);
	color: var(--fb-palette-primary);
	padding: 3px 10px;
	border-radius: var(--fb-radius-full);
	font-weight: 600;
}

.fb-card-title {
	font-size: 1.35rem;
	line-height: 1.35;
	margin-bottom: 0.75rem;
}

.fb-card-title a {
	color: var(--fb-color-heading);
}

.fb-card-title a:hover {
	color: var(--fb-palette-primary);
}

.fb-card-excerpt {
	font-size: 0.9375rem;
	color: var(--fb-color-text);
	flex-grow: 1;
	margin-bottom: 1.25rem;
}

.fb-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 1rem;
	border-top: 1px solid var(--fb-color-border);
}

.fb-card-author-info {
	display: flex;
	align-items: center;
	gap: 0.625rem;
}

.fb-author-avatar {
	border-radius: 50%;
}

.fb-author-details {
	display: flex;
	flex-direction: column;
	font-size: 0.75rem;
}

.fb-author-name {
	font-weight: 600;
	color: var(--fb-color-heading);
}

.fb-card-date {
	color: var(--fb-color-muted);
}

.fb-read-more {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background-color: var(--fb-color-surface);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--fb-palette-primary);
	transition: all var(--fb-transition-fast);
}

.fb-post-card:hover .fb-read-more {
	background-color: var(--fb-palette-primary);
	color: #ffffff;
}

/* Pagination */
.pagination, .navigation.pagination {
	margin-top: 3rem;
}

.nav-links {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
}

.nav-links .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 0.75rem;
	border-radius: var(--fb-radius-sm);
	border: 1px solid var(--fb-color-border);
	font-weight: 600;
	color: var(--fb-color-heading);
	transition: all var(--fb-transition-fast);
}

.nav-links .page-numbers.current,
.nav-links .page-numbers:hover {
	background-color: var(--fb-palette-primary);
	border-color: var(--fb-palette-primary);
	color: #ffffff;
}

/* ==========================================================================
   7. Single Post & Prose Typography
   ========================================================================== */
.fb-single-post .entry-header {
	margin-bottom: 2rem;
}

.fb-single-post .entry-title {
	font-size: 2.5rem;
	line-height: 1.2;
	margin-bottom: 1rem;
}

.entry-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1.25rem;
	font-size: 0.875rem;
	color: var(--fb-color-muted);
}

.fb-icon {
	vertical-align: -2px;
	margin-right: 4px;
}

.single-featured-image {
	margin-bottom: 2.5rem;
	border-radius: var(--fb-radius-lg);
	overflow: hidden;
}

.fb-prose {
	font-size: 1.125rem;
	line-height: 1.8;
}

.fb-prose h2, .fb-prose h3 {
	margin-top: 2rem;
}

.fb-prose blockquote {
	border-left: 4px solid var(--fb-palette-primary);
	margin-left: 0;
	padding-left: 1.5rem;
	font-style: italic;
	color: var(--fb-color-heading);
}

.fb-prose pre, .fb-prose code {
	background: var(--fb-color-surface);
	border-radius: var(--fb-radius-sm);
	padding: 0.2rem 0.4rem;
	font-size: 0.9em;
}

.fb-prose pre {
	padding: 1.25rem;
	overflow-x: auto;
}

/* Post Navigation */
.post-navigation {
	border-top: 1px solid var(--fb-color-border);
	border-bottom: 1px solid var(--fb-color-border);
	padding: 1.5rem 0;
	margin: 3rem 0;
}

.post-navigation .nav-links {
	display: flex;
	justify-content: space-between;
}

.nav-subtitle {
	display: block;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--fb-color-muted);
}

.nav-title {
	font-weight: 600;
	color: var(--fb-color-heading);
}

/* Comments Section */
.fb-comments-wrapper {
	margin-top: 4rem;
	padding-top: 2.5rem;
	border-top: 1px solid var(--fb-color-border);
}

.comments-title {
	font-size: 1.5rem;
	margin-bottom: 2rem;
}

.comment-list {
	list-style: none;
	padding: 0;
	margin: 0 0 3rem 0;
}

.comment-body {
	background: var(--fb-color-surface);
	border-radius: var(--fb-radius-md);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.comment-author img {
	border-radius: 50%;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid var(--fb-color-border);
	border-radius: var(--fb-radius-sm);
	font-family: inherit;
	font-size: 1rem;
	margin-bottom: 1rem;
	outline: none;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--fb-palette-primary);
}

.form-submit input[type="submit"] {
	background: var(--fb-palette-primary);
	color: #ffffff;
	border: none;
	padding: 0.75rem 1.75rem;
	font-weight: 600;
	border-radius: var(--fb-radius-sm);
	cursor: pointer;
	transition: background var(--fb-transition-fast);
}

.form-submit input[type="submit"]:hover {
	background: var(--fb-palette-secondary);
}

/* ==========================================================================
   8. Footer Rows & Back to Top
   ========================================================================== */
.site-footer {
	background-color: var(--fb-color-surface);
	border-top: 1px solid var(--fb-color-border);
	color: var(--fb-color-text);
}

.fb-footer-widgets {
	padding-top: 4rem;
	padding-bottom: 3rem;
}

.fb-footer-grid {
	display: grid;
	gap: 2.5rem;
}

.fb-footer-cols-1 .fb-footer-grid { grid-template-columns: 1fr; }
.fb-footer-cols-2 .fb-footer-grid { grid-template-columns: repeat(2, 1fr); }
.fb-footer-cols-3 .fb-footer-grid { grid-template-columns: repeat(3, 1fr); }
.fb-footer-cols-4 .fb-footer-grid { grid-template-columns: repeat(4, 1fr); }

.fb-footer-bottom-bar {
	border-top: 1px solid var(--fb-color-border);
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
	font-size: 0.875rem;
}

.fb-footer-bottom-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.fb-footer-menu-list {
	display: flex;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 1.5rem;
}

/* Back to Top Button */
.fb-back-to-top {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background-color: var(--fb-palette-primary);
	color: #ffffff;
	border: none;
	box-shadow: var(--fb-shadow-lg);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(15px);
	transition: all var(--fb-transition-normal);
	z-index: 999;
}

.fb-back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.fb-back-to-top:hover {
	background-color: var(--fb-palette-secondary);
	transform: translateY(-3px);
}

/* ==========================================================================
   9. Responsive Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
	.main-navigation {
		display: none;
	}

	.fb-menu-toggle {
		display: flex;
	}

	.fb-sidebar-right,
	.fb-sidebar-left {
		grid-template-columns: 1fr;
	}

	.fb-footer-cols-3 .fb-footer-grid,
	.fb-footer-cols-4 .fb-footer-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.fb-posts-loop.fb-loop-grid {
		grid-template-columns: 1fr;
	}

	.fb-footer-cols-2 .fb-footer-grid,
	.fb-footer-cols-3 .fb-footer-grid,
	.fb-footer-cols-4 .fb-footer-grid {
		grid-template-columns: 1fr;
	}

	.fb-footer-bottom-inner {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}

	.fb-single-post .entry-title {
		font-size: 1.85rem;
	}
}

/* ==========================================================================
   Advanced Header — Transparent, Sticky Shrink, Overlay
   ========================================================================== */

/* Transparent header: bg transparent, text white until scrolled */
.fb-header-transparent:not(.is-scrolled) {
	background-color: transparent !important;
	border-bottom-color: transparent !important;
	position: absolute;
	width: 100%;
	top: 0;
	left: 0;
	z-index: 999;
}

.fb-header-transparent:not(.is-scrolled) .site-title a,
.fb-header-transparent:not(.is-scrolled) .fb-nav-menu a,
.fb-header-transparent:not(.is-scrolled) .fb-icon-btn {
	color: #ffffff;
}

.fb-header-transparent:not(.is-scrolled) .fb-hamburger-inner,
.fb-header-transparent:not(.is-scrolled) .fb-hamburger-inner::before,
.fb-header-transparent:not(.is-scrolled) .fb-hamburger-inner::after {
	background-color: #ffffff;
}

/* Smooth transition when scrolled state applied */
.site-header {
	transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

/* Sticky scrolled state */
.site-header.is-sticky {
	position: sticky;
	top: 0;
	z-index: 999;
	background-color: var(--fb-color-background);
	box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

/* Shrink on scroll: reduce main bar padding and logo size */
.site-header.is-shrunk .fb-header-main-bar {
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

.site-header.is-shrunk .site-branding img,
.site-header.is-shrunk .custom-logo {
	max-height: 36px;
	transition: max-height 0.3s ease;
}

.site-header.is-scrolled {
	background-color: var(--fb-color-background);
	box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

/* Footer social icons */
.fb-footer-social {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	flex-wrap: wrap;
}

.fb-footer-social-link {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background-color: rgba(255,255,255,0.1);
	color: currentColor;
	text-decoration: none;
	transition: all var(--fb-transition-fast);
}

.fb-footer-social-link:hover {
	background-color: var(--fb-palette-primary);
	color: #ffffff;
	transform: translateY(-2px);
}

/* Pre-footer CTA strip */
.fb-pre-footer {
	background-color: var(--fb-palette-primary);
	color: #ffffff;
	text-align: center;
	padding: 2.5rem 1.5rem;
}

.fb-pre-footer-title {
	font-size: clamp(1.4rem, 3vw, 2rem);
	margin: 0 0 1rem;
	color: #ffffff;
}

.fb-pre-footer-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background-color: #ffffff;
	color: var(--fb-palette-primary);
	padding: 0.75rem 2rem;
	border-radius: var(--fb-radius-md);
	font-weight: 700;
	text-decoration: none;
	transition: all var(--fb-transition-fast);
}

.fb-pre-footer-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

