/*
 * RoozRooz Theme Main Stylesheet
 * Font declarations and base styles
 * 
 * Note: reset.css and roozwind.css are loaded separately via WordPress enqueuing
 * to ensure proper path resolution in both frontend and block editor.
 */

/* Font Face Declarations */

/* Abar VF Font - For Headings */
@font-face {
	font-family: 'Abar VF';
	src: url('../fonts/Abar-VF.woff2') format('woff2'),
		 url('../fonts/Abar-VF.woff') format('woff');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
	font-variation-settings: "wght" 700, "CNTR" 0;
}

@font-face {
	font-family: 'Azar FaNum';
	src: url('../fonts/AzarFaNum.woff2') format('woff2'),
		 url('../fonts/AzarFaNum.woff') format('woff'); 
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

/* Estedad Font Family - For Body Text */

/* Estedad Thin */
@font-face {
	font-family: 'Estedad FD';
	src: url('../fonts/Estedad-FD-Thin.woff2') format('woff2');
	font-weight: 100;
	font-style: normal;
	font-display: swap;
}

/* Estedad ExtraLight */
@font-face {
	font-family: 'Estedad FD';
	src: url('../fonts/Estedad-FD-ExtraLight.woff2') format('woff2');
	font-weight: 200;
	font-style: normal;
	font-display: swap;
}

/* Estedad Light */
@font-face {
	font-family: 'Estedad FD';
	src: url('../fonts/Estedad-FD-Light.woff2') format('woff2');
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}

/* Estedad Regular */
@font-face {
	font-family: 'Estedad FD';
	src: url('../fonts/Estedad-FD-Regular.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

/* Estedad Medium */
@font-face {
	font-family: 'Estedad FD';
	src: url('../fonts/Estedad-FD-Medium.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

/* Estedad SemiBold */
@font-face {
	font-family: 'Estedad FD';
	src: url('../fonts/Estedad-FD-SemiBold.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

/* Estedad Bold */
@font-face {
	font-family: 'Estedad FD';
	src: url('../fonts/Estedad-FD-Bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* Estedad ExtraBold */
@font-face {
	font-family: 'Estedad FD';
	src: url('../fonts/Estedad-FD-ExtraBold.woff2') format('woff2');
	font-weight: 800;
	font-style: normal;
	font-display: swap;
}

/* Estedad Black */
@font-face {
	font-family: 'Estedad FD';
	src: url('../fonts/Estedad-FD-Black.woff2') format('woff2');
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

/* Base Typography */
:root {
	--font-heading: 'Abar VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-body: 'Estedad FD', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@layer base {
	:root {
		/* --crimson-50: #F7E8E8; */
		/* --crimson-100: #F2D1D1; */
		/* --crimson-200: #E5A3A3; */
		/* --crimson-300: #D97575; */
		/* --crimson-400: #CC4747; */
		/* --crimson-500: #C01919; */
		/* --crimson-600: #991414; */
		/* --crimson-700: #730F0F; */
		/* --crimson-800: #4C0A0A; */
		/* --crimson-900: #260505; */
		/* --crimson-950: #130202; */
		/* --yellow-50: #FFF9E6; */
		/* --yellow-100: #FFF3CC; */
		/* --yellow-200: #FFE799; */
		/* --yellow-300: #FFDB66; */
		/* --yellow-400: #FFCF33; */
		/* --yellow-500: #FFC300; */
		/* --yellow-600: #CC9900; */
		/* --yellow-700: #997300; */
		/* --yellow-800: #664C00; */
		/* --yellow-900: #332600; */
		/* --yellow-950: #191300; */
		--book-red-100: #fbd1da;
		--book-red-200: #f8a3b5;
		--book-red-300: #f47490;
		--book-red-400: #f1466b;
		--book-red-500: #ed1846;
		--book-red-600: #be1338;
		--book-red-700: #8e0e2a;
		--book-red-800: #5f0a1c;
		--book-red-900: #2f050e;

		--text-color-900: #2f1a1a;
		--text-color-800: #463434;
		--text-color-700: #5d4d4d;
		--text-color-600: #746767;
		--text-color-500: #8c8080;
		--text-color-400: #a39999;
		--text-color-300: #bab3b3;
		--text-color-200: #d1cccc;
		--text-color-100: #e8e6e6;
		--text-color-base: #180101;

		/* Semantic surface / text tokens (light) */
		--color-bg: #ffffff;
		--color-surface: #ffffff;
		--color-surface-muted: #f8f8f8;
		--color-text: var(--book-red-900);
		--color-header-bg: rgb(255 255 255 / 1);
		--color-header-bg-stuck: rgb(255 255 255 / 0.95);
		--color-overlay: hsl(from var(--text-color-base) h s l / 0.05);
		--color-overlay-strong: hsl(from var(--text-color-base) h s l / 0.25);

		/* WordPress preset aliases (follow theme mode) */
		--wp--preset--color--base: var(--color-bg);
		--wp--preset--color--contrast: var(--color-text);

		color-scheme: light;

		--weight-100: "wght" 100;
		--weight-200: "wght" 200;
		--weight-300: "wght" 300;
		--weight-400: "wght" 400;
		--weight-500: "wght" 500;
		--weight-600: "wght" 600;
		--weight-700: "wght" 700;
		--weight-800: "wght" 800;
		--weight-900: "wght" 900;
		--weight-950: "wght" 950;

		--contrast-0: "CNTR" 0;
		--contrast-10: "CNTR" 10;
		--contrast-20: "CNTR" 20;
		--contrast-30: "CNTR" 30;
		--contrast-40: "CNTR" 40;
		--contrast-50: "CNTR" 50;
		--contrast-60: "CNTR" 60;
		--contrast-70: "CNTR" 70;
		--contrast-80: "CNTR" 80;
		--contrast-90: "CNTR" 90;
		--contrast-100: "CNTR" 100;


		/* Transitions */
		--overshoot: linear(0, -0.004 4.9%, -0.02 9.4%, -0.124 26.4%, -0.126 30.5%, -0.104 34.1%, -0.027 38.8%, 0.108 43.1%, 0.299 47%, 0.817 55.2%, 0.97 59.1%, 1.071 63.4%, 1.118 67.7%, 1.127 72.6%, 1.108 77.2%, 1.019 90.7%, 1.004 95.2%, 1);
		--quart: cubic-bezier(0.78, 0, 0.22, 1);
		--cubic: cubic-bezier(0.66, 0, 0.34, 1);

		/* Radius */
		--radius-base: 4px;

		/* Line Color */
		--line-color: hsl(from var(--book-red-800) h s l / 0.2);
		
		/* Header */
		--header-height: 6rem;
		--header-stuck-height: 4rem;

		/* Font Sizes */
		--font-size-xs: 0.75rem;
		--font-size-sm: 0.875rem;
		--font-size-base: 1rem;
		--font-size-lg: 1.38rem;
		--font-size-xl: 1.75rem;
		--font-size-2xl: 2rem;
		--font-size-3xl: 2.5rem;
		--font-size-4xl: 3rem;
		--font-size-5xl: 3.5rem;
		--font-size-6xl: 4rem;
		--font-size-7xl: 4.5rem;
		--font-size-8xl: 5rem;
		--font-size-9xl: 5.5rem;

		/* Gaps */
		--gap-1: 0.25rem;
		--gap-2: 0.5rem;
		--gap-3: 0.75rem;
		--gap-4: 1rem;
		--gap-5: 1.25rem;
		--gap-6: 1.5rem;
		--gap-7: 1.75rem;
		--gap-8: 2rem;
		--gap-9: 2.25rem;
		--gap-10: 2.5rem;
		--gap-11: 2.75rem;
		--gap-12: 3rem;
		--gap-13: 3.25rem;
		--gap-14: 3.5rem;
		--gap-15: 3.75rem;
		--gap-16: 4rem;
		--gap-17: 4.25rem;
		--gap-18: 4.5rem;
		--gap-19: 4.75rem;
		--gap-20: 5rem;
	}

	@supports (color: oklch(0 0 0)) {
		:root {
			/* --crimson-50: oklch(0.934 0.033 17.81); */
			/* --crimson-100: oklch(0.871 0.069 18.59); */
			/* --crimson-200: oklch(0.751 0.15 21.28); */
			/* --crimson-300: oklch(0.593 0.257 29.23); */
			/* --crimson-400: oklch(0.482 0.198 29.23); */
			/* --crimson-500: oklch(0.342 0.14 29.23); */
			/* --crimson-600: oklch(0.3 0.123 29.23); */
			/* --crimson-700: oklch(0.264 0.108 29.23); */
			/* --crimson-800: oklch(0.226 0.093 29.23); */
			/* --crimson-900: oklch(0.174 0.071 29.23); */
			/* --crimson-950: oklch(0.137 0.056 29.23); */
			/* --yellow-50: oklch(0.983 0.011 63.39); */
			/* --yellow-100: oklch(0.966 0.023 65.47); */
			/* --yellow-200: oklch(0.924 0.055 68.81); */
			/* --yellow-300: oklch(0.892 0.086 72.57); */
			/* --yellow-400: oklch(0.849 0.133 76.15); */
			/* --yellow-500: oklch(0.811 0.166 79.87); */
			/* --yellow-600: oklch(0.678 0.139 79.79); */
			/* --yellow-700: oklch(0.547 0.112 80.39); */
			/* --yellow-800: oklch(0.408 0.083 80.49); */
			/* --yellow-900: oklch(0.277 0.056 78.27); */
			/* --yellow-950: oklch(0.208 0.043 79.58); */
			--text-color-900: oklch(0.246 0.034 19.8);
			--text-color-800: oklch(0.345 0.026 18.5);
			--text-color-700: oklch(0.436 0.022 18.0);
			--text-color-600: oklch(0.526 0.017 17.7);
			--text-color-500: oklch(0.611 0.015 17.6);
			--text-color-400: oklch(0.692 0.012 17.4);
			--text-color-300: oklch(0.773 0.008 17.3);
			--text-color-200: oklch(0.849 0.006 17.3);
			--text-color-100: oklch(0.926 0.002 17.2);
			--text-color-base: oklch(0.136 0.050 27.0);
		}
	}

	/* Dark mode: inverted text scale + warm near-black surfaces */
	[data-theme="dark"] {
		--text-color-900: #e8e6e6;
		--text-color-800: #d1cccc;
		--text-color-700: #bab3b3;
		--text-color-600: #a39999;
		--text-color-500: #8c8080;
		--text-color-400: #746767;
		--text-color-300: #5d4d4d;
		--text-color-200: #463434;
		--text-color-100: #2f1a1a;
		--text-color-base: #f5f0f0;

		--color-bg: #12090b;
		--color-surface: #1c1014;
		--color-surface-muted: #241418;
		--color-text: var(--text-color-base);
		--color-header-bg: rgb(18 9 11 / 1);
		--color-header-bg-stuck: rgb(18 9 11 / 0.92);
		--color-overlay: hsl(from var(--text-color-base) h s l / 0.08);
		--color-overlay-strong: hsl(from var(--text-color-base) h s l / 0.3);

		--line-color: hsl(from var(--book-red-300) h s l / 0.2);

		--wp--preset--color--base: var(--color-bg);
		--wp--preset--color--contrast: var(--color-text);

		color-scheme: dark;
	}

	@supports (color: oklch(0 0 0)) {
		[data-theme="dark"] {
			--text-color-900: oklch(0.926 0.002 17.2);
			--text-color-800: oklch(0.849 0.006 17.3);
			--text-color-700: oklch(0.773 0.008 17.3);
			--text-color-600: oklch(0.692 0.012 17.4);
			--text-color-500: oklch(0.611 0.015 17.6);
			--text-color-400: oklch(0.526 0.017 17.7);
			--text-color-300: oklch(0.436 0.022 18.0);
			--text-color-200: oklch(0.345 0.026 18.5);
			--text-color-100: oklch(0.246 0.034 19.8);
			--text-color-base: oklch(0.95 0.01 20);
		}
	}

	/* No-JS fallback: follow OS preference when data-theme is unset */
	@media (prefers-color-scheme: dark) {
		html:not([data-theme]) {
			--text-color-900: #e8e6e6;
			--text-color-800: #d1cccc;
			--text-color-700: #bab3b3;
			--text-color-600: #a39999;
			--text-color-500: #8c8080;
			--text-color-400: #746767;
			--text-color-300: #5d4d4d;
			--text-color-200: #463434;
			--text-color-100: #2f1a1a;
			--text-color-base: #f5f0f0;

			--color-bg: #12090b;
			--color-surface: #1c1014;
			--color-surface-muted: #241418;
			--color-text: var(--text-color-base);
			--color-header-bg: rgb(18 9 11 / 1);
			--color-header-bg-stuck: rgb(18 9 11 / 0.92);
			--color-overlay: hsl(from var(--text-color-base) h s l / 0.08);
			--color-overlay-strong: hsl(from var(--text-color-base) h s l / 0.3);

			--line-color: hsl(from var(--book-red-300) h s l / 0.2);

			--wp--preset--color--base: var(--color-bg);
			--wp--preset--color--contrast: var(--color-text);

			color-scheme: dark;
		}

		@supports (color: oklch(0 0 0)) {
			html:not([data-theme]) {
				--text-color-900: oklch(0.926 0.002 17.2);
				--text-color-800: oklch(0.849 0.006 17.3);
				--text-color-700: oklch(0.773 0.008 17.3);
				--text-color-600: oklch(0.692 0.012 17.4);
				--text-color-500: oklch(0.611 0.015 17.6);
				--text-color-400: oklch(0.526 0.017 17.7);
				--text-color-300: oklch(0.436 0.022 18.0);
				--text-color-200: oklch(0.345 0.026 18.5);
				--text-color-100: oklch(0.246 0.034 19.8);
				--text-color-base: oklch(0.95 0.01 20);
			}
		}
	}
}

/* Body Styles */
body {
	font-family: var(--font-body);
	font-weight: 400;
	font-size: 16px;
	color: var(--color-text);
	background-color: var(--color-bg);
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	border: 0;
	padding: 0;
	white-space: nowrap;
	clip-path: inset(100%);
	clip: rect(0 0 0 0);
	overflow: hidden;
}

::selection {
	background-color: var(--book-red-500);
	color: #ffffff;
}

/* Heading Styles */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	line-height: 1.2;
	color: var(--color-text);
}

/* RTL Support */
[dir="rtl"] {
	direction: rtl;
	text-align: right;
}

[dir="ltr"] {
	direction: ltr;
	text-align: left;
}

/* Link Styles */
a {
	color: inherit;
	transition: opacity 0.2s ease;
}

/* Image Styles */
img {
	height: auto;
}

/* WordPress Block Styles */
.wp-block-group {
	margin-top: 0;
	margin-bottom: 0;
}

/* Accessibility */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	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;
	color: #21759b;
	display: block;
	font-size: 14px;
	font-weight: bold;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}




/* Structure */
.site {
	width: 100vw;
	min-height: 100vh;
}

.site-inner {
	display: grid;

	width: calc(100% - 10rem);
	max-width: 1200px;
	margin-inline: auto;
	position: relative;

	.site-inner-lines {
		position: fixed;
		top: 0;
		left: 50%;
		transform: translateX(-50%);
		width: calc(100% - 12rem);
		max-width: 1200px;
		height: 100%;
		z-index: -1;

		&:before {
			content: '';
			position: absolute;
			top: 0;
			left: -4px;
			width: 1px;
			height: 100%;
			background-color: hsl(from var(--line-color) h s l / 0.1);
		}

		&:after {
			content: '';
			position: absolute;
			top: 0;
			right: -4px;
			width: 1px;
			height: 100%;
			background-color: hsl(from var(--line-color) h s l / 0.1);
		}
	}
}






/* Header Styles */
.site-header {
	height: var(--header-height);
	position: sticky;
	top: 0;
	z-index: 100;
	padding-inline: 1rem;
	border-bottom: 1px solid var(--line-color);
	background-color: var(--color-header-bg);
	transition: height 0.3s ease, background-color 0.2s ease, backdrop-filter 0.3s ease;
	will-change: height, backdrop-filter;

	&.is-stuck {
		height: var(--header-stuck-height);
		background-color: var(--color-header-bg-stuck);
		backdrop-filter: blur(15px) saturate(180%);
		.site-branding {
			transform: scale(0.9);
		}

		.full-page-menu {
			height: calc(100svh - var(--header-stuck-height));
		}
	}
}

.site-header-inner {
	width: 100%;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;

	> * {
		flex: 1;

		&:first-child {
			display: flex;
			justify-content: flex-start;
		}

		&:last-child {
			display: flex;
			justify-content: flex-end;
		}
	}

	nav.right-navigation {
		.menu-item-has-children {
			position: relative;

			> a::after {
				content: '';
				background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tZG93bi1pY29uIGx1Y2lkZS1jaGV2cm9uLWRvd24iPjxwYXRoIGQ9Im02IDkgNiA2IDYtNiIvPjwvc3ZnPg==) no-repeat center center / contain;
				width: 16px;
				height: 16px;
				display: inline-block;
				vertical-align: middle;
				margin-right: 0.25rem;
				transition: transform 0.2s ease;
			}

			ul.sub-menu {
				display: none;
				position: absolute;
				background-color: var(--color-surface);
				padding: var(--gap-4);
				min-width: 200px;
				border: 1px solid var(--line-color);

				a {
					display: block;
					padding-block: var(--gap-1);
				}
			}

			&:hover {
				> a::after {
					transform: rotate(180deg);
				}

				ul.sub-menu {
					display: block;
				}
			}
		}
	}
	
	/* Ensure menu button is positioned correctly */
	> button.header-menu-btn {
		flex: 0 0 auto; /* Don't shrink or grow */
		order: 999; /* Always last */
	}
	
	/* Center branding when menus are hidden */
	> .site-branding {
		z-index: 1;
	}

	nav > ul > li > a:hover {
		color: var(--book-red-500);
	}
}

.site-branding {
	text-align: center;
	width: 150px;
	height: 51px;
	max-width: 150px;
	transform-origin: center center;
	transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
	will-change: transform, width, height;

	.site-title {
		width: 100%;
		height: 100%;
		display: grid;
		place-items: center;

		a {
			display: grid;
			place-items: center;
		}
	}
}

/* Hamburger Menu Button - Shown on all screen sizes */
.header-menu-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	z-index: 102;
	position: relative;
	flex-shrink: 0;
	pointer-events: auto;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	/* Ensure button is always clickable */
	user-select: none;
	-webkit-user-select: none;
}

.header-menu-btn:focus {
	outline: 2px solid var(--book-red-500);
	outline-offset: 2px;
}

/* Theme toggle */
.theme-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	color: var(--color-text);
	flex-shrink: 0;
	position: relative;
	z-index: 102;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	user-select: none;
	-webkit-user-select: none;
	border-radius: var(--radius-base);
	transition: color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
	color: var(--book-red-500);
	background-color: hsl(from var(--book-red-500) h s l / 0.05);
}

.theme-toggle:focus {
	outline: 2px solid var(--book-red-500);
	outline-offset: 2px;
}

.theme-toggle-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.35rem;
	line-height: 1;
}

.theme-toggle-icon[hidden] {
	display: none;
}

.menu-icon {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 24px;
	height: 18px;
	position: relative;
}

.menu-icon span {
	display: block;
	width: 100%;
	height: 2px;
	background-color: var(--text-color-base);
	border-radius: 2px;
	transition: all 0.3s ease;
	transform-origin: center;
}

/* Animate hamburger to X when menu is open */
.site-header.menu-open .header-menu-btn .menu-icon span:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}

.site-header.menu-open .header-menu-btn .menu-icon span:nth-child(2) {
	opacity: 0;
	transform: scaleX(0);
}

.site-header.menu-open .header-menu-btn .menu-icon span:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}


/* Full Page Menu */
.full-page-menu {
    position: absolute;
    width: 100%;
    /* Flush under whatever the header height currently is */
    top: 100%;
    height: calc(100svh - var(--header-height));
    left: 0;
    background: hsl(from var(--color-surface-muted) h s l / 0.95);
	backdrop-filter: blur(55px);
	z-index: 99; /* Lower than header to keep button clickable */
	opacity: 0;
	visibility: hidden;
	display: grid;
	justify-items: center;
	transition: opacity 0.25s ease;
	will-change: opacity;

	&.is-open {
		opacity: 1;
		visibility: visible;
		z-index: 101; /* Higher when open to ensure it's above content */
	}

	.full-page-menu-inner {
		width: calc(100% - 10rem);
		padding-block: 2rem;
	}
}


.fpm-search {
	width: 100%;
	margin-inline: auto;
	height: 4rem;
	background-color: var(--color-surface);

	form {
		width: 100%;
		height: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		border: 1px solid var(--line-color);
		border-radius: calc(var(--radius-base) * 2);

		&:focus-within {
			border-color: var(--book-red-500);

			.search-submit {
				color: var(--book-red-500);
			}
		}

		label {
			width: 100%;
			height: 100%;
			flex: 1;

			input {
				width: 100%;
				height: 100%;
				border: none;
				outline: none;
				padding-inline: 2rem;
				background: transparent;
				color: var(--color-text);
			}
		}

		.search-submit {
			width: 5rem;
			height: 100%;
			display: grid;
			place-items: center;
			font-size: 1.5rem;
		}
	}
}

.fpm-content {
	margin-block: 4rem;

	> div {
		flex: 1;
	}
}

.fpm-menu-list ul {
	display: flex;
	flex-direction: column;
	gap: var(--gap-2);

	li {
		font-family: var(--font-heading);
		font-size: var(--font-size-xl);
	}
}


.fpm-menu-about {
	margin-top: 4rem;

	h2 {
		font-size: var(--font-size-xl);
		padding-bottom: var(--gap-4);
	}

	p {
		font-size: var(--font-size-base);
		opacity: 0.5;
	}
}

.fpm-content-left {
	
	h2 {
		font-size: var(--font-size-2xl);
		font-weight: 400;
	}

	.fpm-content-left-heading a {
		display: flex;
		align-items: center;
		gap: 0.5rem;
		font-size: var(--font-size-base);
		border: 1px solid var(--book-red-500);
		padding: 0.2rem 0.5rem;
		border-radius: 5rem;

		&:hover {
			background-color: var(--book-red-500);
			color: #ffffff;
		}
	}
}

/* Mobile bottom navigation - hidden by default, shown in mobile media query */
.mobile-bottom-nav {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	box-sizing: border-box;
	overflow-x: hidden;
	z-index: 102; /* Above full-page menu when open so central button stays clickable */
	background: var(--color-header-bg-stuck);
	backdrop-filter: blur(15px) saturate(180%);
	box-shadow: 0 -3px 24px 0px hsl(from var(--book-red-500) h s l / 0.05);
}

.mobile-bottom-nav-left,
.mobile-bottom-nav-right {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	min-width: 0;
	width: 100%;
}

.mobile-bottom-nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.125rem;
	padding: 0.25rem 0.375rem;
	color: hsl(from var(--text-color-400) h s l / 0.9);
	text-decoration: none;
	font-size: 0.625rem;
	font-family: var(--font-heading);
	min-height: 44px;
	min-width: 0;
	flex: 0 1 auto;
}

.mobile-bottom-nav-item:hover {
	color: var(--book-red-500);
}

.mobile-bottom-nav-icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.mobile-bottom-nav-icon svg {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
}

.mobile-bottom-nav-menu-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	min-width: 56px;
	min-height: 56px;
	border: none;
	background-color: var(--book-red-100);
	color: var(--book-red-500);
	cursor: pointer;
	position: relative;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mobile-bottom-nav-menu-btn:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 14px hsl(from var(--book-red-500) h s l / 0.4);
}

.mobile-bottom-nav-menu-btn:active {
	transform: scale(0.98);
}

.mobile-bottom-nav-menu-btn:focus {
	outline: 2px solid var(--book-red-500);
	outline-offset: 3px;
}

.mobile-bottom-nav-menu-btn-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mobile-bottom-nav-menu-btn-icon svg {
	width: 24px;
	height: 24px;
}

.mobile-bottom-nav-menu-btn-icon-close[hidden] {
	display: none !important;
}

.fpm-content-left-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--gap-8);

	/* 
		Flickering happens in this situation because:
		- When you hover .fpm-content-left-grid-item, the .fpm-content-left-grid-item-image transitions/rotates.
		- If the image overlaps its parent (especially due to transforms & z-index), the mouse may leave the parent .fpm-content-left-grid-item as the rotated .fpm-content-left-grid-item-image moves outside the parent's visual bounding box.
		- This causes the :hover to be rapidly toggled (flicker).
		- The position/z-index on .fpm-content-left-grid-item-image and the negative z-index on ::before/::after can contribute too.

		Fix: ensure that the elements never visually escape from their hover parent and stacking makes sense.
		Here is a rewrite to avoid flickering:

		- Use `overflow: visible` for the parent so transforms aren't clipped.
		- Ensure .fpm-content-left-grid-item-image never covers its parent (z-index fix, stacking context).
		- Put :hover on the image itself if you only want hover on the image, or add pointer-events: none to ::before/::after to prevent mouse interruption.
	*/

	.fpm-content-left-grid-item {
		position: relative;
		perspective: 1000px;
		transform-style: preserve-3d;
		perspective-origin: center right;
		overflow: visible; /* Allow children to transform without clipping */
		/* Create a stacking context to ensure proper z-index layering */
		isolation: isolate;

		&:hover {
			.fpm-content-left-grid-item-image {
				transform: rotateY(35deg);
				transform-origin: center right;
				box-shadow: -5px 0 10px -1px hsl(from var(--text-color-400) h s l / 0.8);
			}

			&::before {
				transform: translateY(-50%) translateX(5px) rotateY(20deg);
				transform-origin: center right;
				background-color: hsl(from var(--text-color-200) h s l / 0.7);
				z-index: 1;
			}

			&::after {
				transform: translateY(-50%) rotateY(10deg);
				transform-origin: center right;
				background-color: hsl(from var(--text-color-100) h s l / 0.5);
			}
		}

		&::before,
		&::after {
			pointer-events: none; /* So mouse never triggers these pseudo-elements and breaks hover */
		}

		&::before {
			content: '';
			position: absolute;
			top: 50%;
			left: -5px;
			transform: translateY(-50%);
			width: 100%;
			height: calc(100% - 10px);
			background-color: hsl(from var(--text-color-200) h s l / 0.5);
			z-index: 0; /* Changed from -1 to 0 to stay in same stacking context */
			border-radius: calc(var(--radius-base) * 2);
			transition: all 0.6s var(--cubic);
		}

		&::after {
			content: '';
			position: absolute;
			top: 50%;
			left: -10px;
			transform: translateY(-50%);
			width: 100%;
			height: calc(100% - 20px);
			background-color: hsl(from var(--text-color-200) h s l / 0.3);
			z-index: 0; /* Changed from -1 to 0 to stay in same stacking context */
			border-radius: calc(var(--radius-base) * 2);
			transition: all 0.6s var(--cubic);
		}
	}

	.fpm-content-left-grid-item-image {
		border-radius: calc(var(--radius-base) * 2);
		overflow: hidden;
		display: block;
		width: 100%;
		height: 100%;
		box-shadow: -3px 0 8px -2px hsl(from var(--text-color-400) h s l / 0.5);
		transition: all 0.4s var(--cubic);
		position: relative;
		z-index: 1; /* Explicitly above ::before/::after pseudo-elements */
		/* Ensure image stays on top even during transforms */
		transform-style: preserve-3d;
		transform-origin: left center;

		img {
			width: 100%;
			height: 100%;
			object-fit: cover;
			display: block;
			position: relative;
			z-index: 1; /* Ensure img stays on top */
		}
	}
}




body.home .site-main .entry-content {
	display: grid;
	gap: 0;
}




/* Top Banner */
.top-banner[class*="wp-block"],
.soundcloud-banner[class*="wp-block"] {
	height: 130px;
	overflow: hidden;
	
	background-color: hsl(from var(--book-red-300) h s l / 0.1);
	border-bottom: 1px solid var(--line-color);

	> a {
		display: block;
		height: 100%;

		&:hover {
			background-color: hsl(from var(--book-red-300) h s l / 0.2);
			.wp-block-image {
				transform: rotate(0deg) translateY(20px) scale(1.2);
			}

			.banner-cta {
				background-color: var(--book-red-500);
				color: #ffffff;
			}
		}
	}

	.new-book-banner-inner {
		display: flex;
		width: 100%;
		align-items: center;
		justify-content: space-between;
		position: relative;
		overflow: hidden;
		height: 100%;
		background: hsl(from var(--color-surface) h s l / 0.7);
		padding-inline: 2rem;

		.banner-image-title {
			height: 100%;
			display: flex;
			align-items: center;
			justify-content: center;
			gap: 2rem;
			margin: 0 !important;
		}

		.wp-block-image {
			width: 150px;
			height: auto;
			position: relative;
			right: 0rem;
			top: 5rem;
			transform: rotate(10deg);
			transition: transform 0.6s var(--overshoot);

			&::before {
				content: '';
				position: absolute;
				top: 7px;
				right: 7px;
				width: 100%;
				height: 100%;
				background-color: hsl(from var(--book-red-500) h s l / 0.2);
				z-index: -1;
				border-radius: 4px;
			}

			&::after {
				content: '';
				position: absolute;
				top: 14px;
				right: 14px;
				width: 100%;
				height: 100%;
				background-color: hsl(from var(--book-red-500) h s l / 0.05);
				z-index: -1;
				border-radius: 4px;
			}

			img {
				width: 100%;
				height: 100%;
				border-radius: 4px;
			}
		}

		.banner-titles-group {

			* {
				margin: 0;
			}

			h2 {
				margin: 0;
				font-size: 1.5rem;
			}

			h4 {
				font-size: 1rem;
				opacity: 0.5;
				font-family: var(--font-body);
				padding-top: 0.5rem;
			}
		}

		.banner-cta {
			display: flex;
			flex-direction: row-reverse;
			align-items: center;
			gap: 0.5rem;
			margin: 0 !important;
			background-color: hsl(from var(--book-red-500) h s l / 0.05);
			color: var(--book-red-500);
			font-size: 1rem;
			padding: 0.5rem 1rem;

			svg {
				fill: currentColor;
			}
		}
	}
}

.soundcloud-banner[class*="wp-block"] {
	background-color: hsl(from #FF5500 h s l / 0.1);
	border-block: 1px solid hsl(from #FF5500 h s l / 0.3);
	margin-block: var(--gap-12) var(--gap-8);
	height: 150px;
	padding-inline: 0;

	&:hover {
		background-color: hsl(from #FF5500 h s l / 0.4);
	}

	& > a {
		padding-inline: var(--gap-8);

        &:hover {
            .wp-block-image {
                transform: rotate(0deg) translateY(-20px);
            }
        }

		.new-book-banner-inner {
			padding-inline: 0;
			background: transparent;
		}
    }

	.new-book-banner-inner {
		.banner-image-title {
			justify-content: flex-start;
			flex: 1;
			min-width: 0;
		}

		.wp-block-image {
			width: 160px;
			aspect-ratio: 1 / 1;
			top: var(--gap-6);
			flex-shrink: 0;
			transform: rotate(0deg);

			&::before {
				width: 90%;
				height: 2px;
				background-color: #FF5500;
				top: -5px;
				right: 50%;
				transform: translateX(50%);
			}

			&::after {
				width: 80%;
				height: 1px;
				background-color: #FF5500;
				top: -10px;
				right: 50%;
				transform: translateX(50%);
			}

			img {
				aspect-ratio: 1 / 1;
				object-fit: cover;
				border-radius: 0;
			}
		}
	}

	.banner-titles-group {
		min-width: 0;

		h2.soundcloud-banner-static-title {
			font-size: var(--font-size-base);
			font-weight: 600;
			font-family: var(--font-body);
		}

		h4.soundcloud-banner-episode-title {
			font-family: var(--font-heading);
			overflow: hidden;
			opacity: 1;
			font-size: var(--font-size-lg);
			padding-top: var(--gap-4);
			word-spacing: -0.1rem;
		}
	}

	.banner-cta {
		flex-shrink: 0;
	}
}





/* Hero */
.hero[class*="wp-block"] {
	padding-block: var(--gap-2);
}

.hero-inner {
	display: flex;
	align-items: start;
	gap: 0;
	padding-inline: 0 !important;
	overflow: visible;

	> div {

		&.hero-main {
			flex: 1.5;
			gap: var(--gap-4);
			border-left: 1px solid var(--line-color);
			padding-inline: var(--gap-4);
			padding-block: var(--gap-8);

			.hero-section-title {
				font-size: var(--font-size-lg);
				font-variation-settings: var(--weight-900);
				color: var(--book-red-500);
				padding-right: 0;
				position: relative;

				&::before {
					content: '';
					display: block;
					width: 8px;
					height: auto;
					aspect-ratio: 1 / 4;
					position: absolute;
					top: 50%;
					right: -20px;
					transform: translateY(-60%) rotate(0);
					z-index: -1;
					background-color: var(--book-red-500);
					opacity: 0.35;
				}
			}
		}

		&.hero-extra {
			flex: 1;
			gap: 0;
			overflow-y: visible;
			padding-top: var(--gap-8);

			.hero-section-title {
				font-size: var(--font-size-lg);
				font-variation-settings: var(--weight-900);
				color: var(--book-red-500);
				padding-right: 20px;
				position: relative;

				&::before {
					content: '';
					display: block;
					width: 8px;
					height: auto;
					aspect-ratio: 1 / 4;
					background-color: var(--book-red-500);
					position: absolute;
					top: 50%;
					right: 0px;
					transform: translateY(-60%) rotate(0);
					z-index: -1;
					opacity: 0.35;
				}
			}
		}
	}
}

.hero-main {
	display: flex;
	justify-content: center;

	.roozrooz-post-link-wrapper {
		padding-bottom: 0;

			&:hover {
				.roozrooz-post-title {
					color: var(--book-red-500);
				}
			}
	}

	.roozrooz-post-content {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: start;
		text-align: right;
		gap: var(--gap-4);
	}

	.roozrooz-post-thumbnail {
		aspect-ratio: 4 / 3;
		overflow: hidden;
		width: 100%;

		img {
			width: 100%;
			height: 100%;
			object-fit: cover;
		}
	}

	.roozrooz-post-title {
		font-size: var(--font-size-3xl);
		line-height: 1.5;
		font-variation-settings: var(--weight-900);
		display: inline-block;
	}

	.roozrooz-custom-field-cotitle,
	.roozrooz-custom-field-undertitle {
		font-size: 1.25rem;
		margin-inline: auto;
		word-spacing: -0.1rem;
	}

	.roozrooz-post-meta {
		opacity: 0.5;
	}
}


/* Hero Extra */
.hero-extra[class*="wp-block"] {
	position: relative;
	overflow-y: clip;
	width: 100%;
	
	> ul {
		display: flex;
		flex-direction: column;
		margin-inline: auto;
		
	}
	

	li.roozrooz-posts-query-item {
		/* position: relative; */
		counter-increment: item;
		anchor-name: --extra-item;
		anchor-scope: --extra-item;
		padding-right: 0;

		&:not(:last-child) {
			border-bottom: 1px solid var(--line-color);
		}


		&:hover {
			anchor-name: --extra-item-hover;

			.roozrooz-post-title {
				color: var(--book-red-500);
			}
		}

		> a {
			display: grid;
			align-items: stretch;
			min-height: 80px;
			padding-inline: var(--gap-4);

			&:hover {
				background-color: hsl(from var(--book-red-500) h s l / 0.05);
			}
		}
	}

	article.roozrooz-post-item {
		height: 100%;
	}

	.roozrooz-post-content {
		display: flex;
		flex-direction: column;
		gap: 0;
		position: relative;
		padding-right: 0;
		align-items: flex-start;
		justify-content: center;
		height: 100%;
	}

	.roozrooz-post-title {
		font-size: calc(var(--font-size-base) * 1.2);
		margin-right: 0;
		line-height: 1.5;
	}

	.roozrooz-post-custom-fields {
		opacity: 0.5;
	}


	&.hero-extra-top {

		.roozrooz-posts-query-list {
			display: grid;
			grid-template-columns: 1fr 1fr;
			gap: 0;

			li.roozrooz-posts-query-item {
				padding: 0;

				&:nth-child(1) {
					grid-column: 1 / -1;

					.roozrooz-post-thumbnail {
						max-height: 200px;
					}
				}

				&:nth-child(2) {
					border-left: 1px solid var(--line-color);
				}

				&:nth-child(3) {
					border-bottom: 1px solid var(--line-color);
				}

				.roozrooz-post-link-wrapper {
					padding: var(--gap-4);
					height: 100%;
				}

				.roozrooz-post-content  {
					justify-content: flex-start;
				}

				.roozrooz-post-thumbnail {
					max-height: 100px;
					overflow: hidden;
					width: 100%;
					padding-bottom: var(--gap-4);

					img {
						height: 100%;
						width: 100%;
						object-fit: cover;
					}
				}
			}
		}
	}
}







/* Home Cat Sections */
.cat-section[class*="wp-block"] {
    padding-block: 0;
	padding-inline: 0;
	margin-block: var(--gap-16);
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--gap-8);

	:where(:not(.alignleft):not(.alignright):not(.alignfull)) {
		margin-inline: 0 !important;
	}
}

.cat-section-heading {
	display: flex;
	align-items: center;
	justify-content: start;
	position: relative;
	gap: var(--gap-4);

	h2 {
		font-size: var(--font-size-xl);
		font-variation-settings: var(--weight-900);
		color: var(--book-red-500);
		padding-right: 15px;
		position: relative;
		line-height: 1;

		&::before {
			content: '';
			display: block;
			width: 8px;
			height: auto;
			aspect-ratio: 1 / 5;
			background-color: var(--book-red-500);
			position: absolute;
			top: 50%;
			right: -4px;
			transform: translateY(-60%) rotate(0);
			opacity: 0.35;
		}
	}
}

.cat-section-archive-cta > a.group-link-wrapper {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 0.3rem;
	color: var(--book-red-500) !important;
	font-weight: 600;
	font-size: 1rem;
	padding-block: 0 var(--gap-2);
	border-bottom: 2px solid transparent;

	&:hover {
		border-bottom: 2px solid currentColor;
	}
}

.cat-section-inner {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.cat-section-main-post {
	padding-bottom: var(--gap-8) !important;
	border-bottom: 1px solid var(--line-color);

	.roozrooz-post-link-wrapper {

			&:hover {
				.roozrooz-post-title {
					color: var(--book-red-500);
				}
			}
	}
}

.cat-section-main-post .roozrooz-post-content {
	display: grid;
	gap: var(--gap-4) var(--gap-8);
	grid-template: max-content max-content max-content minmax(0, 1fr) / 1fr 1fr;
	min-height: 300px;
	align-items: start;
	align-content: start;

	.roozrooz-post-thumbnail {
		grid-column: 1 / 1;
		grid-row: 1 / -1;
		height: 0;
		min-height: 100%;
		overflow: hidden;
		width: 100%;

		img {
			width: 100%;
			height: 100%;
			object-fit: cover;
		}
	}

	.roozrooz-post-header {
		grid-column: 2 / 2;
		grid-row: 1 / 1;
		height: max-content;
		padding-top: var(--gap-8);

		h3 {
			font-size: var(--font-size-2xl);
			font-variation-settings: var(--weight-900);
			word-spacing: -0.1rem;
			line-height: 1.7;
		}
	}

	.roozrooz-post-custom-fields {
		grid-column: 2 / 2;
		grid-row: 2 / 2;
		height: max-content;
		padding-left: var(--gap-20);

		font-size: var(--font-size-base);
		color: hsl(from var(--text-color-base) h s l / 0.5);
	}

	.roozrooz-post-meta {
		grid-column: 2 / 2;
		grid-row: 3 / 3;
		height: max-content;
	}
}

.cat-section-extra-post .roozrooz-posts-query-list {
	display: grid;
	grid-template: auto / 1fr 1fr;
	gap: 0;

	.roozrooz-posts-query-item {
		border-left: 1px solid var(--line-color);
		border-bottom: 1px solid var(--line-color);
		display: grid;
		place-items: center;
		min-height: 180px;

		&:nth-child(2n) {
			border-left: 0;
		}

		&:nth-child(3), &:nth-child(4) {
			border-bottom: 0;
		}

		.roozrooz-post-link-wrapper {
			padding: var(--gap-4);
			height: 100%;
			display: flex;
			align-items: center;
			width: 100%;

			&:hover {
				background-color: hsl(from var(--book-red-500) h s l / 0.05);


				.roozrooz-post-title {
					color: var(--book-red-500);
				}
			}
		}
	}

	.roozrooz-post-item {
		/* height: 100%; */
		background-color: transparent;
	}

	.roozrooz-post-content {
		display: grid;
		gap: var(--gap-2) var(--gap-4);
		grid-template: auto / 100px 1fr;

		.roozrooz-post-thumbnail {
			grid-column: 1 / 1;
			grid-row: 1 / 3;
			aspect-ratio: 1 / 1;
			overflow: hidden;
			max-width: 100px;

			img {
				width: 100%;
				height: 100%;
				object-fit: cover;
			}
		}

		.roozrooz-post-header {
			grid-column: 2 / 2;
			grid-row: 1 / 1;
			height: fit-content;
			align-self: end;
			padding-left: var(--gap-2);

			h3 {
				font-size: var(--font-size-lg);
                line-height: 1.5;
                word-spacing: -0.1rem;
			}
		}

		.roozrooz-post-custom-fields {
			grid-column: 2 / 2;
			grid-row: 2 / 2;
			height: fit-content;
			align-self: start;
			padding-left: var(--gap-4);

			font-size: var(--font-size-base);
			color: hsl(from var(--text-color-base) h s l / 0.5);
		}

		.roozrooz-post-meta {
			grid-column: 2 / 2;
		}
	}

	
}






/* Main Pages + author/tag/search archives (same header treatment as category landings) */
body.page:not(.home):not([data-page-template="sports"]),
body.author,
body.tag,
body.search {
	header.page-header {
		min-height: 12rem;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 1rem;
		text-align: center;
		padding-block: var(--gap-8);

		h1 {
			font-size: var(--font-size-3xl);
			font-variation-settings: "wght" 900, "CNTR" 0;
			color: var(--book-red-500);
			word-spacing: -0.1rem;
		}

		.category-landing__title-visual {
			width: 100%;
			height: auto;
			max-width: 250px;

			svg {
				width: 100%;
				height: auto;
			}
		}

		.category-landing__description {
			max-width: 40rem;
			font-size: var(--font-size-base);
			color: hsl(from var(--text-color-base) h s l / 0.7);
		}
	}
}

.category-landing {
	padding-block: 0;


	.category-landing__posts {
		display: grid;
		grid-template-columns: repeat(3, minmax(300px, 1fr));
		gap: 0;
	}

	.category-landing__post {
		border-left: 1px solid var(--line-color);
		border-bottom: 1px solid var(--line-color);
		padding: var(--gap-4);

		&:nth-child(3n) {
			border-inline-end: 0;
		}

		&:nth-last-child(-n + 3) {
			border-block-end: 0;
		}
	}

	.category-landing__post-link {
		display: flex;
		flex-direction: column;
		gap: var(--gap-4);

		&:hover {
			.category-landing__post-title {
				color: var(--book-red-500);
			}
		}
	}

	.category-landing__thumb {
		aspect-ratio: 3 / 2;
		width: 100%;
		height: auto;
		overflow: hidden;

		img {
			width: 100%;
			height: 100%;
			object-fit: cover;
		}
	}

	.category-landing__post-title {
		font-size: var(--font-size-lg);
		font-variation-settings: var(--weight-800);
		word-spacing: -0.1rem;
		line-height: 1.5;
	}


	.category-landing__pagination {
		padding-block: var(--gap-8);
		border-block: 1px solid var(--line-color);
		display: grid;
		place-items: center;

		.page-numbers {
			display: flex;
			align-items: center;
			justify-content: center;
			gap: var(--gap-1);

			li {
				font-size: var(--font-size-md);

				& > * {
					display: grid;
					place-items: center;
					min-width: 40px;
					min-height: 40px;
				}

				.current {
					background-color: var(--book-red-500);
					color: #ffffff;
					aspect-ratio: 1 / 1;
					position: relative;
					font-weight: 700;

					&::before {
						content: '';
						display: block;
						width: 18px;
						height: 2px;
						background-color: #ffffff;
						position: absolute;
						bottom: 4px;
						left: 50%;
						transform: translateX(-50%);
					}
				}

				a:not(.next):not(.prev) {
					aspect-ratio: 1 / 1;
				}

				a:hover {
					background-color: var(--book-red-500);
					color: #ffffff;
				}

				.next, .prev {
					padding-inline: var(--gap-4);
				}
			}
		}
	}
}















/* Sports Page */
[data-page-template="sports"] {
	header.entry-header {
		height: 15rem;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 1rem;
		text-align: center;
		border-bottom: 1px solid var(--line-color);
		background-color: hsl(from var(--book-red-300) h s l / 0.05);
		backdrop-filter: blur(4px);
		border-right: 1px solid var(--line-color);
		border-left: 1px solid var(--line-color);

		h1 {
			font-size: var(--font-size-xl);
			color: hsl(from var(--text-color-base) h s l / 0.5);
		}

		h2 {
			font-size: var(--font-size-3xl);
		}
	}





}

/* League Selector Tabs */
.league-selector {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-block: 4rem;
}

.league-tab {
	padding: 0.75rem 1.5rem;
	border: 1px solid var(--line-color);
	background: transparent;
	border-radius: calc(var(--radius-base) * 20);
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	color: inherit;
	min-width: 120px;
	text-align: center;
}

.league-tab:hover {
	background: hsl(from var(--book-red-300) h s l / 0.05);
	border-color: hsl(from var(--book-red-300) h s l / 1);
	color: var(--book-red-300);
}

.league-tab.active {
	background: var(--book-red-300);
	color: #ffffff;
	border-color: var(--book-red-300);
	font-weight: 600;
}

/* Week Navigation */
.week-navigation {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--gap-8);
	margin-bottom: 2rem;
}

.week-nav-arrow {
	background: transparent;
	border: 1px solid var(--line-color);
	border-radius: calc(var(--radius-base) * 10);
	width: 60px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	color: hsl(from var(--text-color-base) h s l / 1);
	font-size: var(--font-size-lg);
	padding: 0;
}

.week-nav-arrow:hover {
	background: var(--color-overlay);
	border-color: var(--color-overlay-strong);
	color: var(--color-text);
}

.week-info {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	text-align: center;
}

.week-label {
	font-family: var(--font-body);
	font-size: var(--font-size-sm);
	color: var(--text-color-base);
	font-weight: 400;
}

.week-number {
	font-family: var(--font-body);
	font-size: var(--font-size-lg);
	color: var(--text-color-base);
	font-weight: 700;
}

.football-matches-content {
    display: flex;
	flex-direction: row-reverse;
	align-items: start;
	justify-content: space-between;

	> div {
		flex: 1;
	}
}

/* Matches List */
.matches-list {
	display: flex;
	flex-direction: column;
	padding-inline: var(--gap-4);
}

/* Match Box */
.match-box {
	background: var(--color-surface);
	border-bottom: 1px solid var(--line-color);
	transition: all 0.2s ease;
	min-height: 80px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-block: var(--gap-6);
	position: relative;
}

.match-box:hover {
	border-color: var(--color-overlay-strong);
	box-shadow: 0 2px 4px var(--color-overlay);
}

.match-box.live {
	background-color: hsl(from var(--book-red-300) h s l / 0.05);
}

.match-header {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: 0.75rem;
}

.match-label {
	font-family: 'Estedad', sans-serif;
	font-size: 0.875rem;
	font-weight: 600;
	color: hsl(from var(--color-text) h s l / 0.7);
}

.match-datetime {
	display: flex;
	gap: 0.5rem;
	font-family: 'Estedad', sans-serif;
	font-size: 0.8125rem;
	color: hsl(from var(--color-text) h s l / 0.5);
}

.match-content {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
}

.match-content .team {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex: 1;
	min-width: 0; /* Allow flex items to shrink below content size */
}

.match-content .team.home-team {
	justify-content: flex-end;
	text-align: right;
}

.match-content .team.home-team .team-logo {
	order: 3; /* Logo appears after team name */
}

.match-content .team.home-team .team-name {
	order: 2;
}

.match-content .team.home-team .team-score {
	order: 3;
}

.match-content .team.away-team {
	justify-content: flex-start;
	text-align: left;
}

.match-content .team.away-team .team-logo {
	order: 1; /* Logo appears after team name */
}

.match-content .team.away-team .team-name {
	order: 2;
}

.match-content .team.away-team .team-score {
	order: 1;
}

.match-content .team-name {
	font-size: 1rem;
	font-weight: 500;
	color: inherit;
	line-height: 1.4;
}

.match-content .team-score {
	font-size: 1rem;
	font-weight: 800;
	color: inherit;
	min-width: 30px;
	text-align: center;
}

.match-content .team-logo {
	width: 32px;
	height: 32px;
	min-width: 40px;
	object-fit: contain;
	flex-shrink: 0;
	border-radius: 4px;
	background: var(--color-overlay);
	padding: 2px;
	transition: transform 0.2s ease;
	display: block;
}

.match-content .team-logo:hover {
	transform: scale(1.05);
}

.match-content .team-name {
	flex: 1;
	min-width: 0; /* Allow text truncation if needed */
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.match-separator {
	font-family: var(--font-body);
	font-size: 1rem;
	color: hsl(from var(--text-color-base) h s l / 0.8);
	font-weight: 400;
	padding: 0 0.5rem;
}

.match-status-live {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: hsl(from var(--book-red-300) h s l / 1);
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	right: var(--gap-4);

}

.live-indicator {
	width: 8px;
	height: 8px;
	background: #ef4444;
	border-radius: 50%;
	animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.5;
		transform: scale(1.2);
	}
}

/* Loading State */
.loading-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 3rem 1rem;
	gap: 1rem;
}

.loading-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid var(--color-overlay);
	border-top-color: var(--color-overlay-strong);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.loading-state p {
	font-family: var(--font-body);
	font-size: 0.875rem;
	color: hsl(from var(--color-text) h s l / 0.6);
	margin: 0;
}

/* Error State */
.error-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 3rem 1rem;
	gap: 1rem;
	text-align: center;
}

.error-message {
	font-family: var(--font-body);
	font-size: 0.875rem;
	color: rgba(239, 68, 68, 0.8);
	margin: 0;
	font-weight: 600;
}

.error-details {
	font-family: var(--font-body);
	font-size: 0.8125rem;
	color: hsl(from var(--color-text) h s l / 0.6);
	margin: 0.5rem 0 0 0;
}

.retry-button {
	padding: 0.5rem 1.25rem;
	border: 1px solid rgba(239, 68, 68, 0.3);
	background: rgba(239, 68, 68, 0.1);
	border-radius: var(--radius-base, 0.5rem);
	font-family: var(--font-body);
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	color: #ef4444;
}

.retry-button:hover {
	background: rgba(239, 68, 68, 0.2);
	border-color: rgba(239, 68, 68, 0.5);
}

/* League Standings */
.league-standings-container {
	padding-inline: var(--gap-4);
}

.standings-table {
	display: flex;
	flex-direction: column;
	gap: var(--gap-4);
}

.standings-table-body {
	display: flex;
	flex-direction: column;

	> div {
		padding-block: var(--gap-2);

		&:hover {
			background-color: hsl(from var(--text-color-base) h s l / 0.05);
		}
	}
}

.standings-table-row {
	display: flex;
	align-items: center;
	justify-content: start;

	> div {
		flex: 1;
		max-width: 50px;
		text-align: center;
	}

	.col-team {
		display: flex;
		align-items: center;
		justify-content: flex-start;
		gap: var(--gap-4);
		min-width: 250px;
	
		.team-logo-small {
			width: 24px;
			height: 24px;
			object-fit: contain;
			padding: 2px;
		}
	}
}









/* No Matches */
.no-matches {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem 1rem;
	text-align: center;
}

.no-matches p {
	font-family: var(--font-body);
	font-size: 0.875rem;
	color: hsl(from var(--color-text) h s l / 0.6);
	margin: 0;
}

/* RTL Support */
[dir="rtl"] .match-content .team.home-team {
	justify-content: flex-end;
	text-align: left;
}

[dir="rtl"] .match-content .team.away-team {
	justify-content: flex-start;
	text-align: right;
}

[dir="rtl"] .match-box.live {
	border-right-width: 2px;
	border-left-width: 1px;
}










/* Single Post */
.single-breadcrumbs {
	padding-block: var(--gap-4); 
	border-bottom: 1px solid var(--line-color);
	padding-inline: var(--gap-4);
}

.single-top-section {
	display: grid;
    margin-inline: auto;
    margin-block: 0 var(--gap-8);
    overflow: hidden;
    min-height: 700px;
	gap: var(--gap-8);

	.post-thumbnail-wrapper {
		display: flex;
		align-items: center;
		justify-content: center;
		max-height: 700px;
		flex: 1 1 70%;
	}

	.post-thumbnail {
		max-width: 100%;
		height: 100%;
		overflow: hidden;
		width: 100%;

		img {
			width: 100%;
			height: 100%;
			object-fit: cover;
		}
	}

	/* Local missing-media fallback: keep layout when uploads are absent */
	img.roozrooz-media-placeholder {
		object-fit: cover;
		background-color: var(--color-surface-muted);
		color: transparent; /* hide alt text if load fails */
		font-size: 0;
	}

	.related-post-thumbnail img.roozrooz-media-placeholder,
	.post-thumbnail img.roozrooz-media-placeholder {
		min-height: 100%;
		display: block;
	}

	.single-header-wrapper {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: start;
		gap: var(--gap-1);
		flex: 1 1 50%;
		padding-inline: var(--gap-4);

		.entry-meta {
			display: flex;
			align-items: center;
			justify-content: start;
			gap: var(--gap-2);
			font-size: var(--font-size-base);
			color: hsl(from var(--text-color-base) h s l / 0.7);
			margin-top: var(--gap-4);

			.separator {
				font-size: var(--font-size-base);
				color: hsl(from var(--text-color-base) h s l / 0.3);
			}

			a {
				color: var(--book-red-500);

				&:hover {
					color: var(--book-red-500);
					text-decoration: underline;
					text-decoration-color: var(--book-red-500);
					text-decoration-thickness: 1px;
					text-underline-offset: 6px;
				}
			}
		}

		> header {
			padding-block: var(--gap-8) 0;

			h1 {
				font-size: var(--font-size-3xl);
				font-variation-settings: var(--weight-950);
				margin-bottom: var(--gap-2);
				padding-left: 25%;
				line-height: 1.6;
			}

			.entry-subtitle {
				font-size: var(--font-size-lg);
				color: hsl(from var(--text-color-base) h s l / 0.7);
				padding-left: 25%;
			}
		}
	}
}

.single-entry-content {
	max-width: 100%;
	margin-inline: auto;
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: var(--gap-8);
	padding-block: 0 var(--gap-8);
	padding-inline: var(--gap-4);

	.entry-content-main {
		flex: 1 1 70%;
		font-size: var(--font-size-base);
		line-height: 1.8;

		> * {
			margin-bottom: var(--gap-4);
		}

		ul {
			list-style: disc;
			margin-right: var(--gap-6);
			padding-left: var(--gap-6);
		}

		ol {
			list-style: persian;
			margin-right: var(--gap-6);
			padding-left: var(--gap-6);
		}

		blockquote {
			padding: var(--gap-8) var(--gap-16);
			background-color: hsl(from var(--book-red-900) h s l / 0.03);
			font-size: calc(var(--font-size-base) * 1.2);
			margin-block: var(--gap-8);
			position: relative;

			&::before {
				content: '\efbe';
				font-family: 'tabler-icons', 'tabler-icons-filled', 'tabler-icons-outline', sans-serif;
				position: absolute;
				right: var(--gap-4);
				top: var(--gap-4);
				font-size: 32px;
				width: 32px;
				height: 32px;
			}

			&::after {
				content: '';
				position: absolute;
				width: 1px;
				height: calc(100% - var(--gap-20));
				background-color: hsl(from var(--book-red-900) h s l / 0.3);
				right: var(--gap-8);
				top: var(--gap-18);
			}
		}

		h2 {
			font-size: var(--font-size-2xl);
		}

		h3 {
			font-size: var(--font-size-xl);
		}

		h4 {
			font-size: var(--font-size-lg);
		}

		h5 {
			font-size: var(--font-size-base);
		}

		h6 {
			font-size: var(--font-size-sm);
		}

		a {
			color: var(--book-red-300);

			&:hover {
				color: var(--book-red-300);
				text-decoration: underline;
				text-decoration-color: var(--book-red-300);
				text-decoration-thickness: 1px;
				text-underline-offset: 6px;
			}
		}
	}

	.entry-content-sidebar {
		flex: 1 1 30%;


		.book-details {
			display: flex;
			flex-direction: column;
			gap: var(--gap-4);
			align-items: stretch;
			padding-block: var(--gap-4);
			margin-bottom: var(--gap-8);
			background-color: hsl(from var(--book-red-500) h s l / 0.05);
			border-bottom: 1px solid var(--line-color);

			.book-details__cover-wrapper {
				flex: 0 0 auto;
				transform: scale(1);
				position: relative;
				max-width: 140px;
				margin-inline: auto;
				margin-top: -50px;

				&::before {
					content: '';
					position: absolute;
					z-index: 1;
					top: 0;
					left: 0;
					width: 100%;
					height: 100%;
					background-color: hsl(from var(--book-red-500) h s 1 / 0.3);
					transform: rotate(-3deg) scale(1);
					border-radius: var(--radius-base);
					box-shadow: 0 8px 24px hsl(from var(--book-red-900) h s l / 0.12);
				}

				&::after {
					content: '';
					position: absolute;
					z-index: 2;
					top: 0;
					left: 0;
					width: 100%;
					height: 100%;
					background-color: hsl(from var(--book-red-500) h s 1 / 0.2);
					transform: rotate(-6deg) scale(1);
					border-radius: var(--radius-base);
					box-shadow: 0 8px 24px hsl(from var(--book-red-900) h s l / 0.12);
				}

				.book-details__cover {
					overflow: hidden;
					border-radius: var(--radius-base);
					transform: rotateX(-10deg);
					z-index: 3;
					position: relative;
					max-width: 100%;
					height: 100%;

					img {
						display: block;
						width: 100%;
						height: 100%;
						box-shadow: 0 8px 24px hsl(from var(--book-red-900) h s l / 0.12);
						object-fit: cover;
					}
				}

			}

			.book-details__content {
				flex: 1 1 auto;
				min-width: 0;
				text-align: center;
				padding-inline: var(--gap-4);
			}

			.book-details__title {
				font-size: var(--font-size-lg);
				margin: 0 0 var(--gap-2);
				color: var(--color-text);
			}

			.book-details__meta {
				display: flex;
				flex-direction: column;
				gap: 0;
				margin: 0;
			}

			.book-details__row {
				display: flex;
				gap: var(--gap-2);
				align-items: baseline;
				justify-content: center;
				margin: 0;
				border-bottom: 1px solid hsl(from var(--line-color) h s l / 0.1);
				padding-block: var(--gap-1);

				&:last-child {
					border-bottom: none;
				}

				dt {
					flex: 0 0 auto;
					margin: 0;
					color: hsl(from var(--color-text) h s l / 0.55);
					font-size: var(--font-size-sm);
				}

				dd {
					margin: 0;
					color: var(--color-text);
				}

				dt::after {
					content: ':';
				}
			}

			.book-details__quote {
				margin-top: var(--gap-6);
				font-size: calc(var(--font-size-base) * 1);
				line-height: 1.7;
				color: hsl(from var(--color-text) h s l / 0.85);

				> *:last-child {
					margin-bottom: 0;
				}
			}
		}
		
		> .sidebar {
			position: relative;
			top: var(--header-stuck-height);
			padding-top: 0;
		}

		.popular-posts {
			display: flex;
			flex-direction: column;
			gap: var(--gap-2);

			h2 {
				font-size: var(--font-size-lg);
			}

			ul {
				display: flex;
				flex-direction: column;
				gap: 0;
			}

			li {
				display: flex;
				font-family: var(--font-body);
				font-size: calc(var(--font-size-base) * 1);
				border-bottom: 1px solid var(--line-color);
				position: relative;
				counter-increment: popular-posts-counter;

				&:last-child {
					border-bottom: none;
				}

				&::before {
					content: counter(popular-posts-counter, persian) ' |';
					font-family: var(--font-body);
					font-size: var(--font-size-lg);
					color: hsl(from var(--book-red-900) h s l / 0.3);
					position: absolute;
					right: var(--gap-2);
					top: 50%;
					transform: translateY(-50%);
				}

				&:has(a:hover) {
					&::before {
						color: var(--book-red-500);
					}
				}

				a {
					padding-right: var(--gap-10);
					display: block;
					position: relative;
					z-index: 1;
					padding-block: var(--gap-3);
					width: 100%;

					&:hover {
						background-color: hsl(from var(--book-red-500) h s l / 0.05);
						color: var(--book-red-500);
					}
				}
			}
		}
	}
}

.single-bottom-section {
	padding-block: var(--gap-8);
	border-top: 1px solid hsl(from var(--line-color) h s l / 0.1);
	padding-inline: var(--gap-4);

	.single-tags {
		display: flex;
		flex-direction: column;
		gap: var(--gap-4);

		h2 {
			font-size: var(--font-size-xl);
		}
		
		.tags-list {
			display: flex;
			flex-wrap: wrap;
			gap: var(--gap-2);

			a {
				display: inline-block;
				padding: var(--gap-1) var(--gap-3);
				font-size: var(--font-size-sm);
				background-color: hsl(from var(--line-color) h s l / 0.1);
				color: hsl(from var(--text-color-base) h s l / 0.5);

				&:hover {
					background-color: var(--book-red-500);
					color: #fff;
				}
		}
	}
}
}


.single-related-posts {
	border-top: 1px solid hsl(from var(--line-color) h s l / 0.1);
	border-bottom: 1px solid hsl(from var(--line-color) h s l / 0.1);
	padding-block: var(--gap-8);
	padding-inline: var(--gap-4);

	.related-posts-title {
		font-size: var(--font-size-xl);
		margin-bottom: var(--gap-8);
	}

	.related-posts-grid {
		display: grid;

		.related-post-link:last-child {
			.related-post-item {
				border-bottom: none;
			}
		}

		.related-post-item {
			display: flex;
			align-items: center;
			border-bottom: 1px solid hsl(from var(--line-color) h s l / 0.1);
			padding-block: var(--gap-4);	
			gap: var(--gap-4);
		}

		.related-post-link {
			display: block;

			&:hover {
				background-color: hsl(from var(--line-color) h s l / 0.05);
			}
		}

		.related-post-thumbnail {
			flex: 0.5;
		}

		.related-post-thumbnail {
			aspect-ratio: 3 / 1;
			overflow: hidden;
			display: block;
			width: 300px;

			img {
				width: 100%;
				height: 100%;
				object-fit: cover;
			}
		}

		.related-post-content {
			flex: 2;

			h3 {
				font-size: var(--font-size-lg);
				padding-bottom: var(--gap-2);
			}
		}
	}
}






.comments-area {
	padding-block: var(--gap-16);
	padding-inline: 0;
}

.comments-title {
	font-size: var(--font-size-2xl);
	margin-bottom: var(--gap-16);
}

.comments-list-wrapper {
	display: flex;
	align-items: start;
}

.comment-list {
	flex: 1;
	border-left: 1px solid hsl(from var(--line-color) h s l / 0.1);
	padding-left: var(--gap-8);

	> li.comment {
		border-bottom: 1px solid hsl(from var(--line-color) h s l / 0.3);
		padding-bottom: var(--gap-4);
		margin-bottom: var(--gap-4);

		>div {
			display: grid;
		}
	}

	.comment-meta {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: var(--gap-4);

		cite {
			font-style: normal;
			font-size: var(--font-size-base);
			font-weight: 600;
			display: flex;
			align-items: center;
			gap: 0;

			i {
				font-size: var(--font-size-xl);
				color: hsl(from var(--text-color-base) h s l / 0.5);
			}
		}

		.comment-date a {
			display: flex;
			align-items: center;
			gap: var(--gap-1);
			font-size: var(--font-size-sm);
			color: hsl(from var(--text-color-base) h s l / 0.5);
			border-bottom: 1px dotted hsl(from var(--line-color) h s l / 0.3);
		}
	}

	.comment-content {
		line-height: 1.8;
		margin-bottom: var(--gap-4);
		color: hsl(from var(--text-color-base) h s l / 0.9);
	}

	.reply {
		margin-block: var(--gap-4);

		a {
			display: grid;
			place-items: center;
			border: 1px solid hsl(from var(--line-color) h s l / 0.1);
			width: 48px;
			padding-block: var(--gap-1);

			&:hover {
				border-color: var(--book-red-300);
				color: var(--book-red-300);
			}
		}
	}
}

.comments-area:not(:has(.comment-list)) .comment-respond {
    max-width: 50%;
    padding: 0;
    margin: 0 auto;
}

.comment-respond {
	flex: 0.5;
	padding-right: var(--gap-8);
	position: sticky;
	top: calc(var(--header-stuck-height) + var(--gap-8));
	max-width: 400px;

	p {
		box-sizing: border-box;
	}

	.comment-notes {
		font-size: var(--font-size-sm);
		color: hsl(from var(--text-color-base) h s l / 0.5);
	}

	.comment-form-comment {
		margin-block: var(--gap-4);
		border: 1px solid hsl(from var(--line-color) h s l / 0.3);
		display: flex;
		flex-direction: column;
		padding: var(--gap-2);

		&:focus-within {
			border-color: var(--book-red-300);
			outline: none;

			label {
				color: var(--book-red-300);
			}
		}

		label {
			font-size: var(--font-size-sm);
			color: hsl(from var(--text-color-base) h s l / 0.5);
		}

		textarea {
			height: 120px;
			resize: vertical;

			&:focus {
				outline: none;
			}
		}
		
	}

	.comment-form-author, .comment-form-email {
		display: flex;
		gap: var(--gap-1);
		border: 1px solid hsl(from var(--line-color) h s l / 0.3);
		padding: var(--gap-3) var(--gap-2);
		margin-bottom: var(--gap-4);
		align-items: center;

		&:focus-within {
			border-color: var(--book-red-300);
			outline: none;

			label {
				color: var(--book-red-300);
			}
		}

		label {
			font-size: var(--font-size-sm);
			color: hsl(from var(--text-color-base) h s l / 0.5);
			flex: 0 0 fit-content;
		}

		input {
			outline: none;
			width: 100%;

			&[type="email"] {
				text-align: left;
				direction: ltr;
			}
		}
	}

	.form-submit input {
		background-color: var(--book-red-500);
		color: #fff;
		width: 150px;
		text-align: center;
		border: none;
		padding-block: var(--gap-3);
		cursor: pointer;

			&:hover {
				background-color: var(--book-red-300);
			}
	}
}








/* Footer */
.site-footer {
	margin-block-start: calc(var(--gap-16) * 2);
	overflow-y: clip;
	border-top: 1px solid var(--line-color);

	.site-footer-inner {
		display: grid;
		gap: var(--gap-8);
		width: calc(100% - 0rem);
		max-width: 1200px;
		margin: 0 auto;
		padding-inline: var(--gap-4);
	}

	.footer-top {
		display: flex;
		padding-block: var(--gap-16);
		border-bottom: 1px solid var(--line-color);

		> div {
			flex: 1;
		}

		.footer-navigation-container {
			display: flex;
			gap: var(--gap-8);

			> nav {
				flex: 1;
			}

			ul {
				display: flex;
				flex-direction: column;
				gap: var(--gap-2);
			}
		}

		.footer-info-container {
			display: grid;
			gap: var(--gap-2);

			p {
				font-size: var(--font-size-base);
				line-height: 1.8;
			}

			ul {
				display: flex;
				gap: var(--gap-4);
			}

			a {
				display: grid;
				place-items: center;
				font-size: var(--font-size-lg);
			}
		}
	}


	.footer-bottom {
		display: grid;
		gap: var(--gap-16);

		.site-info {
			padding-block: var(--gap-2);

			p {
				font-size: var(--font-size-base);
				line-height: 1.8;
				display: flex;
				justify-content: space-between;
				align-items: center;
				gap: var(--gap-4);
			}
		}

		.footer-logo {
			filter: grayscale(100%);
			display: grid;
			place-items: center;
			transform: translateY(5rem);

			svg {
				width: 50%;
				opacity: 0.2;
			}
		}
	}
}

/* Footer logo: lighten maroon fills in dark mode (visible before grayscale) */
[data-theme="dark"] .footer-logo path[fill="#700000"] {
	fill: var(--book-red-400);
}

@media (prefers-color-scheme: dark) {
	html:not([data-theme]) .footer-logo path[fill="#700000"] {
		fill: var(--book-red-400);
	}
}

/* Back to top — sibling of #page so overflow on .site cannot clip it */
.back-to-top {
	position: fixed;
	z-index: 103;
	inset-inline-end: 1.25rem;
	bottom: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: var(--book-red-500);
	color: #ffffff;
	cursor: pointer;
	box-shadow: 0 4px 16px hsl(from var(--book-red-500) h s l / 0.35);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(0.5rem);
	transition:
		opacity 0.25s var(--cubic),
		visibility 0.25s var(--cubic),
		transform 0.25s var(--cubic),
		background-color 0.2s ease;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

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

.back-to-top:hover {
	background-color: var(--book-red-600);
}

.back-to-top:active {
	transform: scale(0.96);
}

.back-to-top:focus-visible {
	outline: 2px solid var(--book-red-500);
	outline-offset: 3px;
}

.back-to-top-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.35rem;
	line-height: 1;
}

body:has(.full-page-menu.is-open) .back-to-top {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}






body[class*="contact-us"] {
	.entry-content {
		max-width: 600px;
		margin-inline: auto;
		display: grid;
		gap: var(--gap-8);

		.wp-block-paragraph {
			text-align: center;
		}
	}

	.wpcf7-form {
		display: flex;
		flex-direction: column;
		gap: var(--gap-4);
		margin-block: var(--gap-16);
		margin-inline: auto;
		max-width: 600px;

		label {
			width: 100%;
			display: flex;
			flex-direction: column;
			border: 1px solid var(--line-color);
			padding: 0;
			gap: 0;
			justify-content: space-between;

			&:focus-within {
				border-color: var(--book-red-500);
				background-color: hsl(from var(--book-red-500) h s l / 0.05);
				outline: none;

				span:not([class]) {
					color: var(--book-red-500);
					font-weight: 600;
					transform: translateY(-1px) scale(0.75);
					transform-origin: center right;
				}
			}

			&:has(input:not(:placeholder-shown), textarea:not(:placeholder-shown)) {
				border-color: var(--book-red-500);

				span:not([class]) {
					color: var(--book-red-500);
					font-weight: 600;
					transform: translateY(-1px) scale(0.75);
					transform-origin: center right;
				}
			}

			br {
				display: none;
			}

			span:not([class]) {
				display: inline-block;
				width: fit-content;
				padding-inline: var(--gap-2);
				padding-block: var(--gap-1);
			}

			input {
				outline: none;
				border: none;
				width: 100%;
				height: 1.5lh;
				padding: var(--gap-2);
			}

			textarea {
				outline: none;
				border: none;
				width: 100%;
				height: 5lh;
				padding: var(--gap-2);
				resize: vertical;
			}
		}

		.wpcf7-submit {
			background-color: var(--book-red-500);
			color: #fff;
			width: 150px;
			text-align: center;
			border: none;
			padding-block: var(--gap-3);
			cursor: pointer;

			&:hover {
				background-color: var(--book-red-300);
			}
		}

		.wpcf7-response-output {
			padding-block: var(--gap-4);
			border: none;
			background-color: hsl(from #46b450 h s l / 0.1);
			width: 100%;
			margin-inline: 0;
		}
	}
}




body[class*="about"] {
	.entry-content {
		max-width: 600px;
		margin-inline: auto;
	}
}











/* Responsive Design */
@media (max-width: 768px) {
	/* Header Mobile Optimizations */
	:root {
		--header-height: 3.5rem; /* Reduced from 10rem for mobile */
		--header-stuck-height: 1rem; /* Reduced from 5rem for mobile */
	}

	.site-inner {
		width: 100%;
		max-width: 100%;

		.site-inner-lines {
			position: fixed;
			top: 0;
			left: 50%;
			transform: translateX(-50%);
			width: calc(100% - 1rem);
			max-width: 1200px;
			height: 100%;
			z-index: -1;
		}
	}

	.site-header {
		height: var(--header-height);
		padding-inline: 1rem;
	}

	.site-header-inner {
		position: relative;
		width: 100%;
		justify-content: space-between;
		display: flex; /* Ensure flex layout */
		align-items: center;
	}

	/* Mobile-specific header adjustments */
	.site-header-inner {
		position: relative;
		width: 100%;
		justify-content: center;

		> * {
			&.right-navigation {
				display: none;
			}

			&.left-navigation {
				display: flex;
				position: absolute;
				inset-inline-end: 0;
				top: 50%;
				transform: translateY(-50%);
				z-index: 102;
				gap: 0;
				flex: 0 0 auto;

				.main-navigation {
					display: none;
				}

				.header-menu-btn {
					display: none;
				}
			}
		}
	}

	/* Site Branding Mobile */
	.site-branding {
		width: 70px;
		height: auto;
		max-width: 70px;
		flex-shrink: 0;
	}

	.site-branding .site-title svg {
		width: 100%;
		height: auto;
		transform: translateX(0) !important;
	}

	/* Full Page Menu Mobile Optimizations */
	.full-page-menu {
		top: 100%;
		height: calc(100svh - var(--header-height));
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		
		.full-page-menu-inner {
			width: 100%;
			padding-inline: 1.5rem;
			padding-block: 1.5rem;
			max-width: 100%;
		}
	}

	.full-page-menu.is-open {
		z-index: 101; /* Higher when open on mobile */
	}

	/* Hide header hamburger on mobile; menu from bottom nav only */
	.site-header-inner .header-menu-btn {
		display: none;
	}

	/* Prevent horizontal scroll on mobile */
	html,
	body {
		overflow-x: hidden;
		max-width: 100%;
	}

	#page {
		overflow-x: hidden;
		max-width: 100%;
	}

	/* Mobile bottom nav: grid so left/right columns are equal and center is centered */
	.mobile-bottom-nav {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
		justify-items: center;
		padding-inline: max(0.5rem, env(safe-area-inset-left)) max(0.5rem, env(safe-area-inset-right));
		padding-top: 0.5rem;
		padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
		border-radius: 0;
		gap: 0;

		.mobile-bottom-nav-icon {
			font-size: var(--font-size-lg);
			padding-bottom: 2px
		}

		.mobile-bottom-nav-label {
			font-size: var(--font-size-sm);
			font-family: var(--font-body);
		}
	}

	.mobile-bottom-nav-left {
		justify-self: start;
		justify-content: center;
		gap: 0.25rem;
		padding-inline: 1rem 1.5rem;
	}

	.mobile-bottom-nav-right {
		justify-self: end;
		justify-content: center;
		gap: 0.25rem;
		padding-inline: 1.5rem 1rem;
	}

	.mobile-bottom-nav .mobile-bottom-nav-item {
		padding-inline: 0.25rem;
	}

	/* Reserve space so content is not hidden behind fixed bottom nav */
	.site-inner {
		padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
	}

	.back-to-top {
		bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
		inset-inline-end: 1rem;
		width: 2.5rem;
		height: 2.5rem;
	}

	.back-to-top-icon {
		font-size: 1.2rem;
	}

	/* Full Page Menu Search Mobile */
	.fpm-search {
		height: 3.5rem;
		margin-bottom: 1.5rem;
	}

	.fpm-search form {
		border-radius: calc(var(--radius-base) * 1.5);
	}

	.fpm-search input {
		padding-inline: 1rem;
		font-size: 0.9375rem;
	}

	.fpm-search .search-submit {
		width: 3.5rem;
		font-size: 1.25rem;
	}

	/* Full Page Menu Content Mobile */
	.fpm-content {
		flex-direction: column;
		gap: 2rem;
		margin-block: 2rem;
	}

	.fpm-content-right {
		width: 100%;
		order: 1;
	}

	.fpm-content-left {
		width: 100%;
		order: 2;
	}

	/* Full Page Menu List Mobile */
	.fpm-menu-list ul {
		gap: var(--gap-2);
		border: 1px solid var(--line-color);
		
		li {
			font-size: var(--font-size-xl);
			border-bottom: 1px solid var(--line-color);
			
			a {
				padding-inline: var(--gap-4);
			}
		}
	}


	.fpm-menu-list li:last-child {
		border-bottom: none;
	}

	.fpm-menu-list a {
		display: block;
		padding: 0.5rem 0;
	}

	/* Full Page Menu About Mobile */
	.fpm-menu-about {
		margin-top: 2rem;
	}

	.fpm-menu-about h2 {
		font-size: var(--font-size-xl);
		margin-bottom: 0.75rem;
	}

	.fpm-menu-about p {
		font-size: 0.9375rem;
		line-height: 1.6;
	}

	/* Full Page Menu Book Grid Mobile */
	.fpm-content-left-heading {
		margin-bottom: 1rem;
	}

	.fpm-content-left-heading h2 {
		font-size: var(--font-size-xl);
	}

	.fpm-content-left-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--gap-4);
	}

	.fpm-content-left-grid-item {
		aspect-ratio: 3 / 4;
	}

	.fpm-content-left-grid-item-image img {
		object-fit: cover;
	}

	.site-header.is-stuck .site-branding {
		width: 70px;
		height: 30px;
		max-width: 70px;
		transform: none;
	}

	body.single .site-main {
		max-width: calc(100vw - var(--gap-8));
		margin-inline: auto;
	}

	.hero-inner {
		& > div {
			&.hero-main {
				padding: var(--gap-4);
				border-bottom: 1px solid var(--line-color);
				border-left: 0;

				.hero-section-title {
					font-size: var(--font-size-lg);
					font-variation-settings: var(--weight-900);
					color: var(--book-red-500);
					padding-right: 0;
					position: relative;
				}
			}
		}
	}

	.cat-section[class*="wp-block"] {
		padding-inline: var(--gap-4);

		.cat-section-heading {
			h2 {
				font-size: var(--font-size-lg);
			}
		}

		.cat-section-archive-cta > a.group-link-wrapper {
			padding: 0;
		}

		.cat-section-main-post .roozrooz-post-content {
			.roozrooz-post-custom-fields {
				padding-left: var(--gap-4);
			}
		}

		.cat-section-extra-post .roozrooz-posts-query-list {
			.roozrooz-posts-query-item {
				border-left: 0;
				border-bottom: 1px solid var(--line-color);
				display: grid;
				place-items: center;
				min-height: 150px;

				.roozrooz-post-link-wrapper {
					padding-inline: 0;
				}
			}
		}
	}

	.cat-section-main-post .roozrooz-post-content {
		.roozrooz-post-header {
			padding: 0;
			align-self: start;

			h3 {
				font-size: var(--font-size-lg);
				line-height: 1.5;
			}
		}
	}

	.cat-section-extra-post .roozrooz-posts-query-list {
		& .roozrooz-post-content {
			& .roozrooz-post-header {
				h3 {
					font-size: var(--font-size-md);
					line-height: 1.5;
				}
			}
		}
	}

	.hero-extra[class*="wp-block"] {
		.roozrooz-post-title {
			font-size: calc(var(--font-size-base) * 1.1);
			margin-right: 0;
			line-height: 1.6;
		}
	}

	.league-selector {
		gap: 0.375rem;
		overflow-x: auto;
		padding-bottom: 0.5rem;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.league-selector::-webkit-scrollbar {
		display: none;
	}

	.league-tab {
		padding: 0.625rem 1rem;
		font-size: 0.875rem;
		min-width: 80px;
		flex-shrink: 0;
	}

	.week-navigation {
		gap: 1rem;
		padding: 0.75rem 0;
	}

	.week-nav-arrow {
		width: 36px;
		height: 36px;
	}

	.week-nav-arrow svg {
		width: 18px;
		height: 18px;
	}

	.week-label {
		font-size: 0.8125rem;
	}

	.week-number {
		font-size: 0.9375rem;
	}

	.match-box {
		padding: 1rem 1.25rem;
		min-height: 70px;
	}

	.match-header {
		margin-bottom: 0.625rem;
	}

	.match-label {
		font-size: 0.8125rem;
	}

	.match-datetime {
		font-size: 0.75rem;
		gap: 0.375rem;
	}

	.match-content {
		gap: 0.75rem;
	}

	.match-content .team-name {
		font-size: 0.9375rem;
	}

	.match-content .team-score {
		font-size: 1.125rem;
		min-width: 25px;
	}

	.match-separator {
		font-size: 0.9375rem;
		padding: 0 0.375rem;
	}

	.hero {
		padding-block: 0 !important;
	}

	.hero-inner {
		flex-direction: column;
		padding-inline: 0 !important;
	}

	.hero-main {

		.roozrooz-post-thumbnail {
			order: 2;
		}

		.roozrooz-post-header {
			padding-top: 0;
			order: 1;
		}

		.roozrooz-post-title {
			font-size: var(--font-size-xl);
			line-height: 1.5;
		}

		.roozrooz-post-custom-fields {
			order: 3;
		}

		.roozrooz-custom-field-cotitle,
		.roozrooz-custom-field-undertitle {
			font-size: 1rem;
			width: 100%;
			margin-inline: auto;
			word-spacing: -0.1rem;
		}

		.roozrooz-post-meta {
			order: 4;
		}
	}

	.cat-section-main-post .roozrooz-post-content {
		display: flex;
		gap: var(--gap-4);
		flex-direction: column;

		.roozrooz-post-thumbnail {
			height: auto;
			min-height: 0;
			aspect-ratio: 5 / 2.5;
		}
	}

	.cat-section-extra-post .roozrooz-posts-query-list {
		display: flex;
		flex-direction: column;
		gap: var(--gap-4);
	}

	.skeleton-lines {
		width: 100vw;
		max-width: 100%;
		height: 100vh;
		z-index: -1;
	}

	.top-banner[class*="wp-block"] {
		height: 100px;
		
		.new-book-banner-inner {
			padding-inline: 0;

			.banner-titles-group {
				display: none;
			}

			.wp-block-image {
				width: 150px;
				height: auto;
				position: relative;
				right: 1rem;
				top: 5rem;
				transform: rotate(10deg);
				transition: transform 0.6s var(--overshoot);
			}
		}
	}

	.soundcloud-banner[class*="wp-block"] {
		height: 110px;

		.new-book-banner-inner {
			padding-inline: var(--gap-4);
			gap: var(--gap-3);

			.banner-image-title {
				gap: var(--gap-4);
				justify-content: flex-start;
				min-width: 0;
			}

			.banner-titles-group {
				display: flex;
				flex-direction: column;

				h2 {
					font-size: 1rem;
				}

				h4 {
					font-size: 0.875rem;
					padding-top: 0.25rem;
				}
			}

			.wp-block-image {
				width: 88px;
				top: 2rem;
				right: 0;
			}

			.banner-cta {
				display: none;
			}
		}
	}

	.single-top-section {
		width: 100%;
		flex-direction: column-reverse;
		min-height: auto;

		.single-header-wrapper {
			padding-top: 0;
			padding-bottom: 0;
			flex: 1;
			translate: 0 0;

			header {
				padding: var(--gap-6) 0 0;

				.entry-subtitle {
					padding: 0;
				}
			}

			header h1 {
				font-size: var(--font-size-xl);
				line-height: 1.5;
				padding-left: 0;
			}
		}
	}

	.single-entry-content {
		flex-direction: column;
		width: 100%;
		max-width: 100%;
		padding-inline: 0;

		.entry-content-main {
			.book-details {
				flex-direction: column;
				align-items: center;
				text-align: center;

				.book-details__cover-wrapper {
					flex: 0 0 140px;
					transform: translateX(0) scale(0.85);
					perspective: 800px;
					transform-style: preserve-3d;
					transform-origin: center center;
					position: relative;
					max-width: 200px;
	
					&::before {
						content: '';
						position: absolute;
						z-index: 1;
						top: 0;
						left: -20px;
						width: 100%;
						height: 100%;
						background-color: hsl(from var(--color-surface) h s l / 0.8);
						transform: rotateY(15deg) scale(0.95);
						border-radius: var(--radius-base);
						box-shadow: 0 8px 24px hsl(from var(--book-red-900) h s l / 0.12);
					}
	
					&::after {
						content: '';
						position: absolute;
						z-index: 2;
						top: 0;
						left: -40px;
						width: 100%;
						height: 100%;
						background-color: hsl(from var(--color-surface) h s l / 1);
						transform: rotateY(15deg) scale(0.9);
						border-radius: var(--radius-base);
						box-shadow: 0 8px 24px hsl(from var(--book-red-900) h s l / 0.12);
					}
	
					.book-details__cover {
						overflow: hidden;
						border-radius: var(--radius-base);
						transform: rotateY(15deg);
						z-index: 3;
	
						img {
							display: block;
							width: 100%;
							height: auto;
							box-shadow: 0 8px 24px hsl(from var(--book-red-900) h s l / 0.12);
						}
					}
	
				}

				.book-details__content {
					padding-left: 0;
				}

				.book-details__row {
					justify-content: center;
				}
			}

			blockquote {
				padding: var(--gap-16) var(--gap-8);
				background-color: hsl(from var(--book-red-900) h s l / 0.03);
				font-size: calc(var(--font-size-base) * 1.1);
				margin-block: var(--gap-8);
				position: relative;

				&::before {
					top: var(--gap-3);
				}

				&::after {
					height: 1px;
					width: calc(100% - var(--gap-20));
					top: var(--gap-10);
					left: var(--gap-8);
					right: initial;
				}
			}

			h2 {
				font-size: var(--font-size-lg);
				line-height: 1.5;
			}

			h3 {
				font-size: var(--font-size-lg);
				line-height: 1.5;
			}
		}

		.entry-content-sidebar {
			.popular-posts {
				li {
					font-size: calc(var(--font-size-base) * 1);
					border-bottom: none;

					&::before {
						font-size: var(--font-size-xl);
						font-family: var(--font-body);
					}
				}
			}

		}

	}

	.single-related-posts {
		.related-posts-title {
			font-size: var(--font-size-lg);
			margin-bottom: var(--gap-8);
		}

		.related-posts-grid {
			.related-post-item {
				display: flex;
				flex-direction: column;
				align-items: stretch;
				border-bottom: 1px solid hsl(from var(--line-color) h s l / 0.1);
				padding-block: var(--gap-4);
				gap: var(--gap-4);

				.related-post-thumbnail {
					aspect-ratio: 3 / 1;
					overflow: hidden;
					display: block;
					width: auto;
					max-width: 100%;
				}

				.related-post-content {
					h3 {
						font-size: var(--font-size-base);
						padding-bottom: var(--gap-2);
						line-height: 1.5;
					}
				}
			}
		}
	}

	.comments-area {
		padding-block: var(--gap-8);
		padding-inline: 0;

		.comments-title {
			font-size: var(--font-size-lg);
			margin-bottom: var(--gap-8);
			line-height: 1.5;
		}
	}

	.comments-list-wrapper {
		flex-direction: column;
		
		.comment-list {
			border-bottom: 1px solid hsl(from var(--line-color) h s l / 0.3);
			padding-bottom: var(--gap-8);
			border-left: none;
			padding-left: 0;
		}

		.comment-respond {
			padding-right: 0;
			padding-block: var(--gap-8);
			max-width: 100%;
			border: none;
			position: relative;
			top: 0;
			flex: 1;
		}

		.comment-form-comment {
			padding: 0;
			overflow-x: hidden;
			box-sizing: border-box;
			width: 100%;
			max-width: 100%;

			> * {
				box-sizing: border-box;
				padding: var(--gap-4);
				max-width: 100%;
			}

			textarea,
			input[type="text"],
			input[type="email"] {
				box-sizing: border-box;
				max-width: 100%;
				width: 100%;
			}
		}
	}

	.comments-area:not(:has(.comment-list)) .comment-respond {
		max-width: 100%;
		padding: 0;
		margin: 0 auto;
	}

	.site-footer {
		.site-footer-inner {
			display: grid;
			gap: var(--gap-8);
			width: calc(100vw - var(--gap-8));
			max-width: 1200px;
			margin: 0 auto;
		}
		
		.footer-top {
			display: flex;
			flex-direction: column;
			gap: var(--gap-8);
			padding-block: var(--gap-8);
			border-bottom: 1px solid var(--line-color);
		}

		.footer-bottom {
			.site-info {
				padding-block: var(--gap-2);

				p {
					flex-direction: column;
					text-align: center;
				}
			}
		}
	}


	.category-landing {
		.category-landing__posts {
			display: grid;
			grid-template-columns: 1fr;
			gap: 0;
		}
	}


	body[class*="about"], body[class*="contact-us"] {
		.entry-content {
			max-width: calc(100vw - var(--gap-8));
			margin-inline: auto;
		}
	}



}