/* ==========================================================================
   Authoria - Core Design System & Theme Stylesheet
   Light, Elegant, Minimalist Social Theme for WordPress & Authors
   ========================================================================== */

:root {
	/* Color Palette */
	--bg-body: #F8FAFC;
	--bg-surface: #FFFFFF;
	--bg-glass: rgba(255, 255, 255, 0.92);
	--bg-muted: #F1F5F9;

	--text-main: #0F172A;
	--text-secondary: #475569;
	--text-muted: #64748B;
	--text-light: #94A3B8;

	--border-color: #E2E8F0;
	--border-hover: #CBD5E1;

	/* Accents */
	--accent-primary: #4F46E5;
	--accent-primary-hover: #4338CA;
	--accent-light: #EEF2FF;
	--accent-subtle: #C7D2FE;

	--accent-secondary: #0EA5E9;
	--accent-success: #10B981;
	--accent-warning: #F59E0B;
	--accent-rose: #F43F5E;

	/* Typography */
	--font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--font-serif: 'Playfair Display', Georgia, Cambria, "Times New Roman", serif;

	/* Shadows & Elevation */
	--shadow-xs: 0 1px 3px rgba(15, 23, 42, 0.03);
	--shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.04);
	--shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
	--shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.08);

	/* Radii */
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 20px;
	--radius-full: 9999px;

	/* Layout */
	--container-width: 1240px;
	--reading-width: 1240px;
	/* Matched with header & footer width */
	--header-height: 68px;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	overflow-x: hidden;
	margin-top: 0 !important;
}

body {
	overflow-x: clip;
	max-width: 100vw;
}

#wpadminbar {
	display: none !important;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-ui);
	background-color: var(--bg-body);
	color: var(--text-main);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	color: var(--accent-primary);
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
	color: var(--accent-primary-hover);
}

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

/* Site Wrapper */
.site-wrapper {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-content {
	flex: 1;
}

/* ==========================================================================
   Header & Sticky Navigation Bar (Compact & Clean)
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--bg-glass);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border-color);
	height: var(--header-height);
	transition: background-color 0.3s ease;
	will-change: transform;
	transform: translateZ(0);
}

/* WP Admin Bar adjustments for sticky header */
.admin-bar .site-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

.header-container {
	max-width: var(--container-width);
	margin: 0 auto;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	gap: 16px;
}

/* Site Branding & SVG Logo */
.site-branding {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.logo-link {
	display: flex;
	align-items: center;
	text-decoration: none;
}

.site-logo-img {
	height: 48px;
	width: auto;
	max-width: 200px;
	object-fit: contain;
}

/* Main Navigation */
.main-navigation {
	display: flex;
	align-items: center;
}

.main-navigation .nav-menu {
	display: flex;
	align-items: center;
	gap: 16px;
	list-style: none;
}

.main-navigation .nav-menu a {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--text-secondary);
	padding: 6px 12px;
	border-radius: var(--radius-sm);
	transition: all 0.2s ease;
}

.main-navigation .nav-menu a:hover,
.main-navigation .nav-menu .current-menu-item>a {
	color: var(--accent-primary);
	background: var(--accent-light);
}

.main-navigation .nav-menu .menu-item {
	position: relative;
}

.main-navigation .nav-menu .nav-arrow {
	font-size: 0.75rem;
	margin-left: 4px;
	transition: transform 0.2s ease;
	display: inline-block;
}

.main-navigation .nav-menu .menu-item-has-children:hover .nav-arrow {
	transform: rotate(180deg);
}

.main-navigation .nav-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 210px;
	max-height: 380px;
	overflow-y: auto;
	background: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	padding: 8px;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 1050;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.main-navigation .nav-menu .menu-item-has-children:hover .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(6px);
}

.main-navigation .nav-menu .sub-menu a {
	display: block;
	width: 100%;
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	font-size: 0.88rem;
	color: var(--text-main);
	white-space: nowrap;
}

.main-navigation .nav-menu .sub-menu a:hover,
.main-navigation .nav-menu .sub-menu .current-menu-item>a {
	background: var(--accent-light);
	color: var(--accent-primary);
}

.menu-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
}

.hamburger-icon {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--text-main);
	position: relative;
}

.hamburger-icon::before,
.hamburger-icon::after {
	content: '';
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: var(--text-main);
	transition: all 0.2s ease;
}

.hamburger-icon::before {
	top: -6px;
}

.hamburger-icon::after {
	bottom: -6px;
}

/* Header User Actions */
.header-user-action {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.btn-write-story {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--accent-primary);
	color: #ffffff !important;
	padding: 6px 16px;
	border-radius: var(--radius-full);
	font-size: 0.85rem;
	font-weight: 600;
	box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
	transition: all 0.2s ease;
}

.btn-write-story:hover {
	background: var(--accent-primary-hover);
	transform: translateY(-1px);
}

/* BP Quick Icons */
.bp-quick-icons {
	display: flex;
	align-items: center;
	gap: 6px;
}

.bp-quick-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--radius-full);
	background: var(--bg-muted);
	color: var(--text-main);
	font-size: 1rem;
	transition: background-color 0.2s ease;
}

.bp-quick-btn:hover {
	background: var(--border-color);
}

.badge-count {
	position: absolute;
	top: -2px;
	right: -2px;
	background: var(--accent-rose);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	padding: 1px 5px;
	border-radius: var(--radius-full);
	border: 2px solid var(--bg-surface);
}

/* User Profile Dropdown */
.user-menu-dropdown {
	position: relative;
}

.user-avatar-trigger {
	display: flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 2px;
	border-radius: var(--radius-full);
	transition: background 0.2s ease;
}

.user-avatar-trigger:hover {
	background: var(--bg-muted);
}

.header-user-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
}

.dropdown-arrow {
	font-size: 0.75rem;
	color: var(--text-muted);
}

/* Dropdown Panel */
.dropdown-panel {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: 230px;
	background: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: all 0.2s ease;
	z-index: 1100;
}

.user-menu-dropdown.active .dropdown-panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.dropdown-header {
	padding: 14px;
	border-bottom: 1px solid var(--border-color);
}

.dropdown-user-name {
	font-weight: 700;
	color: var(--text-main);
	font-size: 0.9rem;
}

.dropdown-user-email {
	font-size: 0.78rem;
	color: var(--text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dropdown-links {
	list-style: none;
	padding: 6px 0;
}

.dropdown-links a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px;
	font-size: 0.85rem;
	color: var(--text-secondary);
	transition: background-color 0.2s ease;
}

.dropdown-links a:hover {
	background: var(--accent-light);
	color: var(--accent-primary);
}

.dropdown-links .divider {
	height: 1px;
	background: var(--border-color);
	margin: 4px 0;
}

.dropdown-links .logout-link {
	color: var(--accent-rose);
}

.dropdown-links .logout-link:hover {
	background: #FFF1F2;
}

/* Guest Auth Buttons */
.auth-buttons {
	display: flex;
	align-items: center;
	gap: 8px;
}

.btn-login {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text-secondary);
	padding: 6px 14px;
	border-radius: var(--radius-full);
}

.btn-login:hover {
	background: var(--bg-muted);
}

.btn-register {
	font-size: 0.85rem;
	font-weight: 600;
	color: #fff !important;
	background: var(--accent-primary);
	padding: 6px 16px;
	border-radius: var(--radius-full);
	box-shadow: var(--shadow-xs);
}

.btn-register:hover {
	background: var(--accent-primary-hover);
}

/* ==========================================================================
   Offcanvas Mobile Menu & Drawer
   ========================================================================== */
.mobile-header-actions {
	display: none;
	align-items: center;
	gap: 10px;
}

.btn-write-story-mobile {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--accent-primary);
	color: #ffffff !important;
	font-size: 1.1rem;
	box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
	transition: all 0.2s ease;
}

.btn-write-story-mobile:hover {
	background: var(--accent-primary-hover);
	transform: scale(1.05);
}

.offcanvas-toggle-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-sm);
	background: var(--bg-muted);
	border: 1px solid var(--border-color);
	cursor: pointer;
	padding: 0;
	transition: background 0.2s ease;
}

.offcanvas-toggle-btn:hover {
	background: var(--border-color);
}

/* Offcanvas Body Lock */
body.offcanvas-open {
	overflow: hidden !important;
	touch-action: none;
}

/* Offcanvas Overlay Backdrop */
.offcanvas-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 1998;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.offcanvas-overlay.offcanvas-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Offcanvas Drawer Panel */
.offcanvas-drawer {
	position: fixed;
	top: 0;
	right: 0;
	width: 85%;
	max-width: 360px;
	height: 100vh;
	height: 100dvh;
	background: var(--bg-surface);
	z-index: 1999;
	transform: translateX(100%);
	visibility: hidden;
	pointer-events: none;
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	display: flex;
	flex-direction: column;
	box-shadow: -10px 0 35px rgba(15, 23, 42, 0.15);
	overflow: hidden;
}

.offcanvas-drawer.offcanvas-active {
	transform: translateX(0);
	visibility: visible;
	pointer-events: auto;
}

@media (min-width: 769px) {

	.offcanvas-drawer,
	.offcanvas-overlay {
		display: none !important;
	}
}

.offcanvas-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--border-color);
	background: var(--bg-surface);
}

.offcanvas-logo {
	height: 32px;
	width: auto;
}

.offcanvas-close-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--bg-muted);
	border: 1px solid var(--border-color);
	font-size: 1.1rem;
	color: var(--text-main);
	cursor: pointer;
	transition: all 0.2s ease;
}

.offcanvas-close-btn:hover {
	background: var(--border-color);
	transform: rotate(90deg);
}

.offcanvas-content {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	-webkit-overflow-scrolling: touch;
}

/* Offcanvas User Card */
.offcanvas-user-card {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--bg-muted);
	padding: 16px;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-color);
	margin-bottom: 14px;
}

.offcanvas-user-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--accent-light);
}

.offcanvas-user-details {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.offcanvas-user-name {
	font-weight: 700;
	font-size: 1rem;
	color: var(--text-main);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.offcanvas-user-email {
	font-size: 0.82rem;
	color: var(--text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.offcanvas-write-wrapper {
	margin-bottom: 24px;
}

.offcanvas-write-btn {
	width: 100%;
	justify-content: center;
	padding: 12px 18px;
	font-size: 0.92rem;
}

.offcanvas-auth-card {
	background: var(--accent-light);
	border: 1px solid var(--accent-subtle);
	border-radius: var(--radius-md);
	padding: 20px 16px;
	text-align: center;
	margin-bottom: 24px;
}

.offcanvas-auth-text {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--text-main);
	margin-bottom: 16px;
}

.offcanvas-auth-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.offcanvas-auth-buttons a {
	display: block;
	width: 100%;
	text-align: center;
	padding: 10px;
	border-radius: var(--radius-full);
	font-weight: 600;
	font-size: 0.88rem;
}

/* Offcanvas Menu Sections */
.offcanvas-section {
	margin-bottom: 24px;
}

.offcanvas-section-title {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-muted);
	margin-bottom: 10px;
	padding-left: 4px;
}

.offcanvas-menu-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.offcanvas-menu-list li a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--text-main);
	transition: all 0.2s ease;
}

.offcanvas-menu-list li a:hover,
.offcanvas-menu-list li.active>a {
	background: var(--accent-light);
	color: var(--accent-primary);
}

.offcanvas-has-submenu {
	display: flex;
	flex-direction: column;
}

.offcanvas-submenu-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--text-main);
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	transition: all 0.2s ease;
}

.offcanvas-submenu-toggle .btn-inner {
	display: flex;
	align-items: center;
	gap: 12px;
}

.offcanvas-submenu-toggle .submenu-arrow {
	font-size: 0.8rem;
	color: var(--text-muted);
	transition: transform 0.25s ease;
}

.offcanvas-has-submenu.open .offcanvas-submenu-toggle .submenu-arrow {
	transform: rotate(180deg);
}

.offcanvas-submenu-toggle:hover,
.offcanvas-has-submenu.active .offcanvas-submenu-toggle {
	background: var(--accent-light);
	color: var(--accent-primary);
}

.offcanvas-submenu {
	display: none;
	flex-direction: column;
	gap: 2px;
	list-style: none;
	padding: 4px 0 6px 36px;
	margin: 0;
}

.offcanvas-submenu li a {
	padding: 8px 12px;
	font-size: 0.88rem;
	color: var(--text-secondary);
}

.offcanvas-submenu li a:hover,
.offcanvas-submenu li.active a {
	color: var(--accent-primary);
	background: var(--accent-light);
}

.offcanvas-menu-list li.divider {
	height: 1px;
	background: var(--border-color);
	margin: 8px 0;
}

.offcanvas-menu-list li a.logout-link {
	color: var(--accent-rose);
}

.offcanvas-menu-list li a.logout-link:hover {
	background: #FFE4E6;
}

/* ==========================================================================
   Homepage Hero & Feed Layout
   ========================================================================== */
.homepage-hero {
	background: linear-gradient(135deg, #EEF2FF 0%, #F8FAFC 50%, #F1F5F9 100%);
	border-bottom: 1px solid var(--border-color);
	padding: 50px 20px;
	text-align: center;
}

.hero-container {
	max-width: 800px;
	margin: 0 auto;
}

.hero-badge {
	display: inline-block;
	background: var(--bg-surface);
	color: var(--accent-primary);
	font-size: 0.8rem;
	font-weight: 600;
	padding: 5px 14px;
	border-radius: var(--radius-full);
	box-shadow: var(--shadow-xs);
	border: 1px solid var(--border-color);
	margin-bottom: 16px;
}

.hero-title {
	font-family: var(--font-serif);
	font-size: 2.25rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--text-main);
	margin-bottom: 14px;
	letter-spacing: -0.02em;
}

@media (min-width: 768px) {
	.hero-title {
		font-size: 2.75rem;
	}
}

.hero-subtitle {
	font-size: 1.05rem;
	color: var(--text-muted);
	line-height: 1.6;
	margin-bottom: 28px;
}

.hero-action-group {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
}

.hero-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 22px;
	border-radius: var(--radius-full);
	font-weight: 600;
	font-size: 0.9rem;
	transition: all 0.2s ease;
}

.hero-btn.primary {
	background: var(--accent-primary);
	color: #fff !important;
	box-shadow: 0 6px 20px rgba(79, 70, 229, 0.2);
}

.hero-btn.primary:hover {
	background: var(--accent-primary-hover);
	transform: translateY(-2px);
}

.hero-btn.secondary {
	background: var(--bg-surface);
	color: var(--text-main) !important;
	border: 1px solid var(--border-color);
	box-shadow: var(--shadow-xs);
}

.hero-btn.secondary:hover {
	background: var(--bg-muted);
}

/* Feed Main Container & Full Width */
.feed-layout-container {
	max-width: var(--container-width);
	margin: 36px auto;
	padding: 0 20px;
}

.feed-main-content.full-width-content {
	width: 100%;
}

/* Categories Filter Bar */
.feed-filter-bar {
	margin-bottom: 28px;
}

.feed-heading h2 {
	font-family: var(--font-serif);
	font-size: 1.6rem;
	margin-bottom: 14px;
}

.categories-scroll-list {
	display: flex;
	align-items: center;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 6px;
	scrollbar-width: thin;
}

.cat-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	background: var(--bg-surface);
	color: var(--text-secondary);
	border: 1px solid var(--border-color);
	padding: 6px 14px;
	border-radius: var(--radius-full);
	font-size: 0.82rem;
	font-weight: 500;
	transition: all 0.2s ease;
}

.cat-pill:hover,
.cat-pill.active {
	background: var(--accent-primary);
	color: #fff !important;
	border-color: var(--accent-primary);
}

.cat-pill .cat-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--bg-muted);
	color: var(--text-muted);
	border-radius: var(--radius-full);
	font-size: 0.72rem;
	font-weight: 600;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	line-height: 1;
	transition: all 0.2s ease;
}

.cat-pill:hover .cat-count,
.cat-pill.active .cat-count {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

/* ==========================================================================
   Archive & Category Header Styling
   ========================================================================== */
.page-archive-header {
	background: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	padding: 36px 36px 30px 36px;
	margin-bottom: 36px;
	box-shadow: var(--shadow-xs);
}

.archive-title {
	font-family: var(--font-serif);
	font-size: 2.2rem;
	font-weight: 700;
	color: var(--text-main);
	line-height: 1.25;
	margin-bottom: 0;
	letter-spacing: -0.02em;
}

.archive-description {
	font-size: 1.05rem;
	line-height: 1.65;
	color: var(--text-secondary);
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--border-color);
}

.archive-description p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   Author Story Cards Grid (HomePage & Archives - Full Width 3 Columns)
   ========================================================================== */
.story-cards-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

@media (min-width: 640px) {
	.story-cards-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {

	.feed-main-content.full-width-content .story-cards-grid,
	.story-cards-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Author Story Card Component */
.author-story-card {
	background: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	display: flex;
	flex-direction: column;
}

.author-story-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-md);
	border-color: var(--border-hover);
}

.card-media {
	position: relative;
	width: 100%;
	height: 300px;
	background: var(--bg-muted);
	overflow: hidden;
}

.card-media-link {
	display: block;
	width: 100%;
	height: 100%;
}

.card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.4s ease;
}

.author-story-card:hover .card-image {
	transform: scale(1.04);
}

.card-image-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.placeholder-icon {
	font-size: 2.8rem;
	opacity: 0.6;
}

.card-category-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: rgba(15, 23, 42, 0.75);
	backdrop-filter: blur(4px);
	color: #fff !important;
	font-size: 0.72rem;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: var(--radius-full);
	z-index: 2;
}

.card-reading-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	background: var(--bg-glass);
	backdrop-filter: blur(4px);
	color: var(--text-main);
	font-size: 0.72rem;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: var(--radius-full);
	z-index: 2;
	box-shadow: var(--shadow-xs);
}

/* Card Body */
.card-content {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.card-author-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.card-author-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--bg-surface);
	box-shadow: var(--shadow-xs);
}

.author-meta-text {
	display: flex;
	flex-direction: column;
}

.author-name-link {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--text-main);
	line-height: 1.2;
}

.author-name-link:hover {
	color: var(--accent-primary);
}

.post-date-text {
	font-size: 0.75rem;
	color: var(--text-muted);
}

.card-title {
	font-family: var(--font-serif);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.35;
	margin-bottom: 8px;
}

.card-title a {
	color: var(--text-main);
}

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

.card-excerpt {
	font-size: 0.9rem;
	color: var(--text-secondary);
	line-height: 1.5;
	margin-bottom: 16px;
	flex: 1;
}

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

.footer-stats {
	display: flex;
	align-items: center;
	gap: 12px;
}

.stat-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--text-muted);
	font-weight: 500;
}

.read-story-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--accent-primary);
}

.read-story-btn .arrow {
	transition: transform 0.2s ease;
}

.read-story-btn:hover .arrow {
	transform: translateX(4px);
}

/* Feed Pagination */
.feed-pagination {
	margin-top: 36px;
	display: flex;
	justify-content: center;
}

.feed-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	border-radius: var(--radius-md);
	background: var(--bg-surface);
	border: 1px solid var(--border-color);
	color: var(--text-main);
	font-weight: 600;
	font-size: 0.85rem;
	margin: 0 4px;
}

.feed-pagination .page-numbers.current,
.feed-pagination .page-numbers:hover {
	background: var(--accent-primary);
	color: #fff;
	border-color: var(--accent-primary);
}

/* ==========================================================================
   Single Story / Post Page Styling (Container Width Matched with Header & Footer)
   ========================================================================== */
.reading-progress-bar {
	position: fixed;
	top: var(--header-height);
	left: 0;
	right: 0;
	width: 100%;
	height: 3px;
	background: var(--accent-primary);
	z-index: 1001;
	transform-origin: left top;
	transform: scaleX(0);
	will-change: transform;
}

/* Adjust progress bar position for admin bar */
.admin-bar .reading-progress-bar {
	top: calc(var(--header-height) + 32px);
}

@media screen and (max-width: 782px) {
	.admin-bar .reading-progress-bar {
		top: calc(var(--header-height) + 46px);
	}

	#wpdcom .wpd-form-head {
		flex-direction: column !important;
		align-content: flex-start !important;
		gap: 15px !important;
	}
}

.single-story-article {
	background: var(--bg-surface);
	max-width: var(--container-width);
	margin: 36px auto;
	border-radius: var(--radius-lg);
	border: 1px solid var(--border-color);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
}

.single-article-header {
	padding: 36px 36px 20px 36px;
}

.single-category {
	margin-bottom: 14px;
}

.single-story-title {
	font-family: var(--font-serif);
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--text-main);
	margin-bottom: 14px;
	letter-spacing: -0.02em;
}

.single-story-subtitle {
	font-size: 1.15rem;
	color: var(--text-muted);
	line-height: 1.5;
	margin-bottom: 20px;
}

.single-meta-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 18px;
	border-top: 1px solid var(--border-color);
}

.meta-author-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.single-author-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
}

.author-text {
	display: flex;
	flex-direction: column;
}

.single-author-name {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--text-main);
}

.meta-date-info {
	font-size: 0.82rem;
	color: var(--text-muted);
}

.meta-divider {
	margin: 0 4px;
}

/* Single Featured Image */
.single-featured-media {
	width: 100%;
	max-height: 520px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bg-muted);
}

.featured-story-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Article Body Typography */
.single-story-content-wrapper {
	padding: 36px 48px;
}

.single-story-body {
	font-size: 1.125rem;
	line-height: 1.8;
	color: var(--text-main);
}

.single-story-body p {
	margin-bottom: 1.7em;
}

.single-story-body h2 {
	font-family: var(--font-serif);
	font-size: 1.85rem;
	margin: 1.8em 0 0.8em 0;
}

.single-story-body h3 {
	font-family: var(--font-serif);
	font-size: 1.4rem;
	margin: 1.6em 0 0.6em 0;
}

.single-story-body blockquote {
	border-left: 4px solid var(--accent-primary);
	padding: 16px 24px;
	margin: 1.8em 0;
	background: var(--accent-light);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 1.2rem;
	color: var(--text-main);
}

/* Tags & Author Bio Box */
.single-story-footer {
	margin-top: 36px;
	padding-top: 20px;
	border-top: 1px solid var(--border-color);
}

.story-tags-list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.tag-pill {
	background: var(--bg-muted);
	color: var(--text-secondary);
	padding: 5px 12px;
	border-radius: var(--radius-full);
	font-size: 0.8rem;
	font-weight: 500;
}

/* Author Bio Box Component */
.author-bio-box {
	background: var(--bg-muted);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 28px;
	margin: 36px 0;
}

.author-bio-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 12px;
}

.author-bio-avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
}

.author-label {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--accent-primary);
}

.author-bio-name {
	font-size: 1.15rem;
	font-weight: 700;
}

.author-bio-name a {
	color: var(--text-main);
}

.author-handle {
	font-size: 0.85rem;
	color: var(--text-muted);
}

.author-bio-text {
	font-size: 0.92rem;
	color: var(--text-secondary);
	margin-bottom: 16px;
}

.author-bio-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
}

.stat-pill {
	background: var(--bg-surface);
	padding: 5px 12px;
	border-radius: var(--radius-full);
	font-size: 0.82rem;
	border: 1px solid var(--border-color);
}

.author-bio-actions {
	display: flex;
	gap: 8px;
}

.btn-author-profile,
.btn-author-message {
	padding: 6px 14px;
	border-radius: var(--radius-full);
	font-size: 0.82rem;
	font-weight: 600;
}

.btn-author-profile {
	background: var(--bg-surface);
	color: var(--text-main) !important;
	border: 1px solid var(--border-color);
}

.btn-author-message {
	background: var(--accent-primary);
	color: #fff !important;
}

/* Post Navigation */
.single-post-navigation {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin: 36px 0;
}

.nav-previous,
.nav-next {
	background: var(--bg-muted);
	padding: 14px 18px;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-color);
}

.nav-label {
	display: block;
	font-size: 0.75rem;
	color: var(--text-muted);
	margin-bottom: 4px;
}

.nav-title {
	font-family: var(--font-serif);
	font-weight: 600;
	color: var(--text-main);
}

/* ==========================================================================
   WordPress Comments Section
   ========================================================================== */
.comments-area {
	margin-top: 50px;
	padding-top: 36px;
	border-top: 2px solid var(--border-color);
}

.comments-title {
	font-family: var(--font-serif);
	font-size: 1.5rem;
	margin-bottom: 24px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.comments-count-badge {
	background: var(--accent-light);
	color: var(--accent-primary);
	padding: 2px 8px;
	border-radius: var(--radius-full);
	font-family: var(--font-ui);
	font-size: 0.85rem;
}

.comment-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-bottom: 36px;
}

.comment-list .children {
	list-style: none;
	padding-left: 24px;
	margin-top: 16px;
	border-left: 2px solid var(--border-color);
}

.comment-body {
	display: flex;
	gap: 14px;
	background: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 16px;
}

.comment-user-avatar {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	object-fit: cover;
}

.comment-content-wrapper {
	flex: 1;
}

.comment-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.comment-author-name {
	font-weight: 700;
	color: var(--text-main);
	font-size: 0.92rem;
}

.author-badge {
	background: var(--accent-primary);
	color: #fff;
	font-size: 0.68rem;
	padding: 2px 6px;
	border-radius: var(--radius-full);
	margin-left: 6px;
}

.comment-metadata {
	font-size: 0.78rem;
	color: var(--text-muted);
}

.comment-text {
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--text-secondary);
	margin-bottom: 10px;
}

.comment-reply a {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--accent-primary);
}

/* Comment Form Styling */
.comment-respond {
	background: var(--bg-muted);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	padding: 28px;
}

.comment-reply-title {
	font-family: var(--font-serif);
	font-size: 1.3rem;
	margin-bottom: 16px;
}

.comment-form-field {
	margin-bottom: 16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.comment-form-field label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text-main);
}

.comment-form-field input,
.comment-form-field textarea {
	width: 100%;
	padding: 10px 14px;
	background: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	font-family: var(--font-ui);
	font-size: 0.92rem;
	color: var(--text-main);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form-field input:focus,
.comment-form-field textarea:focus {
	outline: none;
	border-color: var(--accent-primary);
	box-shadow: 0 0 0 3px var(--accent-light);
}

.btn-submit-comment {
	background: var(--accent-primary);
	color: #fff;
	border: none;
	padding: 10px 24px;
	border-radius: var(--radius-full);
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.btn-submit-comment:hover {
	background: var(--accent-primary-hover);
}

.logged-in-as-box {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
	font-size: 0.88rem;
}

.form-user-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
	background: var(--bg-surface);
	border-top: 1px solid var(--border-color);
	padding: 50px 20px 24px 20px;
	margin-top: 50px;
}

.footer-container {
	max-width: var(--container-width);
	margin: 0 auto;
}

.footer-widgets {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	margin-bottom: 32px;
}

@media (min-width: 768px) {
	.footer-widgets {
		grid-template-columns: 2fr 1fr 1fr;
	}
}

.footer-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

.footer-logo-img {
	height: 48px;
	width: auto;
	max-width: 210px;
	object-fit: contain;
}

.footer-tagline {
	font-size: 0.88rem;
	line-height: 1.55;
	color: var(--text-muted);
	max-width: 380px;
	margin-bottom: 16px;
}

.footer-socials {
	display: flex;
	align-items: center;
	gap: 14px;
}

.social-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	padding: 0;
	color: var(--text-muted);
	transition: all 0.2s ease;
	text-decoration: none;
}

.social-btn:hover {
	transform: translateY(-2px);
}

.social-btn.vk-btn:hover {
	color: #0077FF;
}

.social-btn.tg-btn:hover {
	color: #24A1DE;
}

.social-svg {
	display: block;
	width: 20px;
	height: 20px;
	transition: transform 0.2s ease;
}

.social-btn:hover .social-svg {
	transform: scale(1.1);
}

.footer-column h4 {
	font-size: 0.95rem;
	font-weight: 700;
	margin-bottom: 14px;
}

.footer-links {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.footer-links a {
	font-size: 0.85rem;
	color: var(--text-secondary);
}

.footer-links a:hover {
	color: var(--accent-primary);
}

.footer-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 20px;
	border-top: 1px solid var(--border-color);
	font-size: 0.82rem;
	color: var(--text-muted);
}

.back-to-top {
	background: var(--bg-muted);
	border: 1px solid var(--border-color);
	width: 34px;
	height: 34px;
	border-radius: 50%;
	cursor: pointer;
	font-weight: 700;
}


/* ---- Responsive Tweaks ---- */
@media (max-width: 768px) {

	/* Header Mobile Adaptations */
	.site-header {
		backdrop-filter: blur(8px);
		-webkit-backdrop-filter: blur(8px);
		background: rgba(255, 255, 255, 0.97);
	}

	.header-container {
		padding: 0 14px;
	}

	.desktop-user-action,
	.main-navigation {
		display: none !important;
	}

	.mobile-header-actions {
		display: flex !important;
	}

	/* Single Story / Post Header Mobile Adaptation */
	.single-story-article {
		margin: 14px 10px 24px 10px;
		border-radius: 16px;
	}

	.single-article-header {
		padding: 20px 16px 16px 16px;
	}

	.single-story-title {
		font-size: 1.65rem;
		line-height: 1.3;
		margin-bottom: 10px;
	}

	.single-story-subtitle {
		font-size: 0.98rem;
		line-height: 1.45;
		margin-bottom: 14px;
	}

	.single-meta-bar {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		padding-top: 14px;
	}

	.meta-author-info {
		width: 100%;
		gap: 12px;
	}

	.single-author-avatar {
		width: 40px;
		height: 40px;
	}

	.single-author-name {
		font-size: 0.95rem;
		line-height: 1.3;
	}

	.meta-date-info {
		font-size: 0.8rem;
		margin-top: 2px;
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		gap: 4px;
	}

	.meta-stats-info {
		width: 100%;
		border-top: 1px dashed var(--border-color);
		padding-top: 10px;
		margin-top: 2px;
	}

	.comments-scroll-btn {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		font-size: 0.82rem;
		color: var(--text-secondary);
		background: var(--bg-muted);
		padding: 6px 14px;
		border-radius: var(--radius-full);
		border: 1px solid var(--border-color);
	}

	.single-story-content-wrapper {
		padding: 20px 16px 32px 16px;
	}

	.single-story-body {
		font-size: 1.025rem;
		line-height: 1.7;
	}

	.single-featured-media {
		max-height: 280px;
	}

	/* Feed & Categories Scroll List on Mobile */
	.categories-scroll-list {
		display: flex;
		gap: 8px;
		overflow-x: auto;
		padding-bottom: 6px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.categories-scroll-list::-webkit-scrollbar {
		display: none;
	}

	.homepage-hero {
		padding: 28px 16px;
		border-radius: 16px;
		margin-bottom: 24px;
	}

	.hero-title {
		font-size: 1.65rem;
		line-height: 1.3;
	}

	.hero-subtitle {
		font-size: 0.95rem;
	}

	.hero-action-group {
		flex-direction: column;
		width: 100%;
	}

	.hero-btn {
		width: 100%;
		justify-content: center;
	}

	.story-cards-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.footer-widgets {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.bp-container-card {
		padding: 24px 18px;
		border-radius: 14px;
	}

	.bp-page-title {
		font-size: 1.6rem;
	}

	#buddypress .bp-navs ul,
	#buddypress div.item-list-tabs ul {
		flex-direction: column;
		border-radius: 12px;
	}

	#buddypress .bp-navs li a,
	#buddypress div.item-list-tabs li a {
		width: 100%;
		justify-content: space-between;
	}

	#buddypress #item-header {
		flex-direction: column;
		text-align: center;
		padding: 24px;
	}

	#buddypress #members-list,
	#buddypress ul.members-list,
	#buddypress #groups-list {
		grid-template-columns: 1fr;
	}

	.buddypress-layout-container {
		padding: 20px 12px 40px;
	}
}