/* ==========================================================================
   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, body {
	overflow-x: hidden;
	max-width: 100vw;
}

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);
}

.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: 36px;
	width: auto;
	max-width: 170px;
	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);
}

.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-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-block;
	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);
}

/* ==========================================================================
   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: 200px;
	background: var(--bg-muted);
	overflow: hidden;
}

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

.card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	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;
}

.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;
}

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

/* 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: 12px;
}

.footer-tagline {
	font-size: 0.88rem;
	color: var(--text-muted);
	max-width: 380px;
}

.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;
}

/* ==========================================================================
   BuddyPress High-End Design System & Overrides (Authoria Theme)
   ========================================================================== */

/* BP Container Layout */
.buddypress-layout-container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 40px 24px 80px;
}

.bp-container-card {
	background: var(--bg-surface);
	border-radius: 20px;
	border: 1px solid var(--border-color);
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
	padding: 48px;
}

/* BP Page Header */
.bp-page-header {
	margin-bottom: 36px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--border-color);
}

.bp-page-title {
	font-family: var(--font-serif);
	font-size: 2.2rem;
	font-weight: 700;
	color: var(--text-main);
	letter-spacing: -0.02em;
	margin: 0;
}

/* Global #buddypress Container */
#buddypress {
	font-family: var(--font-ui) !important;
	font-size: 0.95rem;
	color: var(--text-main);
	line-height: 1.6;
}

/* ---- BuddyPress Navigation & Tabs (Pill Style) ---- */
#buddypress .bp-navs,
#buddypress nav.bp-navs,
#buddypress div.item-list-tabs,
#buddypress #subnav {
	background: transparent;
	margin-bottom: 28px;
	border: none;
}

#buddypress .bp-navs ul,
#buddypress div.item-list-tabs ul,
#buddypress #subnav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 6px;
	margin: 0;
	background: var(--bg-body);
	border: 1px solid var(--border-color);
	border-radius: 14px;
}

#buddypress .bp-navs li,
#buddypress div.item-list-tabs li,
#buddypress #subnav li {
	margin: 0;
	padding: 0;
}

#buddypress .bp-navs li a,
#buddypress div.item-list-tabs li a,
#buddypress #subnav li a {
	display: inline-flex;
	align-items: center;
	padding: 10px 20px;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--text-secondary);
	text-decoration: none;
	border-radius: 10px;
	border: none;
	background: transparent;
	transition: all 0.2s ease;
	white-space: nowrap;
}

#buddypress .bp-navs li a:hover,
#buddypress div.item-list-tabs li a:hover,
#buddypress #subnav li a:hover {
	color: var(--accent-primary);
	background: rgba(79, 70, 229, 0.06);
}

#buddypress .bp-navs li.current a,
#buddypress .bp-navs li.selected a,
#buddypress div.item-list-tabs li.current a,
#buddypress div.item-list-tabs li.selected a {
	color: #FFFFFF !important;
	background: var(--accent-primary) !important;
	box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
	font-weight: 600;
}

#buddypress .bp-navs li .count,
#buddypress div.item-list-tabs li .count,
#buddypress .bp-navs li a span,
#buddypress div.item-list-tabs li a span {
	background: rgba(15, 23, 42, 0.08);
	color: inherit;
	font-size: 0.76rem;
	font-weight: 700;
	padding: 2px 9px;
	border-radius: 9999px;
	margin-left: 8px;
}

#buddypress .bp-navs li.current a .count,
#buddypress div.item-list-tabs li.current a .count {
	background: rgba(255, 255, 255, 0.25);
	color: #FFFFFF;
}

/* ---- High-End Form Inputs & Controls ---- */
#buddypress input[type="text"],
#buddypress input[type="email"],
#buddypress input[type="password"],
#buddypress input[type="url"],
#buddypress input[type="search"],
#buddypress textarea,
#buddypress select {
	font-family: var(--font-ui);
	font-size: 0.92rem;
	padding: 12px 16px;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	background: var(--bg-body);
	color: var(--text-main);
	width: 100%;
	max-width: 100%;
	transition: all 0.2s ease;
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

#buddypress input[type="text"]:focus,
#buddypress input[type="email"]:focus,
#buddypress input[type="password"]:focus,
#buddypress textarea:focus,
#buddypress select:focus {
	outline: none;
	border-color: var(--accent-primary);
	background: #FFFFFF;
	box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

#buddypress label {
	display: block;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--text-main);
	margin-bottom: 8px;
}

#buddypress .field-visibility-settings-toggle,
#buddypress .field-visibility-settings {
	font-size: 0.82rem;
	color: var(--text-muted);
	margin-top: 6px;
}

/* ---- Modern Buttons & Actions ---- */
#buddypress input[type="submit"],
#buddypress input[type="button"],
#buddypress button[type="submit"],
#buddypress .generic-button a,
#buddypress a.button,
#buddypress .btn,
#buddypress submit {
	font-family: var(--font-ui);
	font-size: 0.9rem;
	font-weight: 600;
	padding: 12px 28px;
	border-radius: 12px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.2s ease;
	background: linear-gradient(135deg, var(--accent-primary) 0%, #6366F1 100%);
	color: #FFFFFF !important;
	box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

#buddypress input[type="submit"]:hover,
#buddypress input[type="button"]:hover,
#buddypress button[type="submit"]:hover,
#buddypress .generic-button a:hover,
#buddypress a.button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
	color: #FFFFFF !important;
}

#buddypress .generic-button.secondary a,
#buddypress a.button.secondary,
#buddypress a.button.outline {
	background: var(--bg-body) !important;
	color: var(--text-secondary) !important;
	border: 1px solid var(--border-color) !important;
	box-shadow: none !important;
}

#buddypress .generic-button.secondary a:hover,
#buddypress a.button.secondary:hover {
	background: var(--bg-muted) !important;
	color: var(--accent-primary) !important;
	border-color: var(--accent-subtle) !important;
}

/* ---- Registration Page (`/registracziya/`) ---- */
#buddypress #register-page,
#buddypress .register-page,
.buddypress #signup_form,
#buddypress #signup-form {
	max-width: 100%;
}

#buddypress .register-section,
#buddypress #basic-details-section,
#buddypress #profile-details-section {
	background: var(--bg-body);
	border: 1px solid var(--border-color);
	border-radius: 16px;
	padding: 32px;
	margin-bottom: 28px;
}

#buddypress .register-section h2,
#buddypress #register-page h2,
#buddypress .register-section-title,
#buddypress #basic-details-section h4,
#buddypress #profile-details-section h4 {
	font-family: var(--font-serif);
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--text-main);
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--accent-light);
}

#buddypress .register-section .editfield {
	margin-bottom: 20px;
}

/* Fix registration password meter */
#buddypress .bp-password-verify,
#buddypress #pass-strength-result {
	font-size: 0.84rem;
	font-weight: 600;
	padding: 8px 16px;
	border-radius: 8px;
	margin-top: 10px;
	display: inline-block;
	background: var(--bg-muted);
}

#buddypress #pass-strength-result.strong {
	background: #D1FAE5;
	color: #065F46;
}

#buddypress #pass-strength-result.short,
#buddypress #pass-strength-result.bad {
	background: #FEE2E2;
	color: #991B1B;
}

/* Fix SVG upload icon on Registration page */
#buddypress svg,
#buddypress img.svg,
.bp-avatar-upload-content svg,
.avatar-crop-management svg,
#signup_form svg,
#buddypress form svg {
	max-width: 56px !important;
	max-height: 56px !important;
	height: auto !important;
	display: block;
	margin: 16px auto;
	fill: var(--accent-primary);
}

#buddypress #signup_submit_wrapper,
#buddypress .submit {
	margin-top: 32px;
	text-align: center;
}

#buddypress #signup_submit_wrapper input[type="submit"],
#buddypress .submit input[type="submit"] {
	font-size: 1.05rem;
	padding: 14px 42px;
	border-radius: 14px;
}

/* ---- Activity Stream (`/aktivnost/`) ---- */
#buddypress #whats-new-form,
#buddypress form#whats-new-form {
	background: var(--bg-body);
	border: 1px solid var(--border-color);
	border-radius: 16px;
	padding: 24px;
	margin-bottom: 32px;
	box-shadow: var(--shadow-xs);
}

#buddypress #whats-new-avatar {
	float: left;
	margin-right: 16px;
}

#buddypress #whats-new-avatar img {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	border: 2px solid #FFFFFF;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

#buddypress #whats-new-content {
	overflow: hidden;
}

#buddypress #whats-new {
	width: 100%;
	min-height: 90px;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 14px 18px;
	font-family: var(--font-ui);
	font-size: 0.95rem;
	resize: vertical;
	background: #FFFFFF;
}

#buddypress #whats-new-options {
	margin-top: 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

#buddypress .activity-list,
#buddypress ul.activity-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

#buddypress .activity-list li.activity-item {
	background: #FFFFFF;
	border: 1px solid var(--border-color);
	border-radius: 16px;
	padding: 24px;
	margin-bottom: 20px;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

#buddypress .activity-list li.activity-item:hover {
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

#buddypress .activity-avatar {
	float: left;
	margin-right: 18px;
}

#buddypress .activity-avatar a img {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--accent-light);
}

#buddypress .activity-content {
	overflow: hidden;
}

#buddypress .activity-header {
	font-size: 0.92rem;
	color: var(--text-secondary);
	margin-bottom: 10px;
	line-height: 1.5;
}

#buddypress .activity-header a {
	color: var(--text-main);
	font-weight: 700;
	text-decoration: none;
	transition: color 0.2s ease;
}

#buddypress .activity-header a:hover {
	color: var(--accent-primary);
}

#buddypress .activity-header .time-since {
	color: var(--text-muted);
	font-size: 0.82rem;
	font-weight: 400;
}

#buddypress .activity-inner {
	font-size: 0.96rem;
	line-height: 1.65;
	color: var(--text-main);
	margin: 12px 0;
	padding: 14px 18px;
	background: var(--bg-body);
	border-radius: 12px;
	border-left: 3px solid var(--accent-primary);
}

#buddypress .activity-meta {
	margin-top: 14px;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	border-top: 1px solid var(--border-color);
	padding-top: 12px;
}

#buddypress .activity-meta a {
	font-size: 0.84rem;
	font-weight: 600;
	color: var(--text-secondary);
	text-decoration: none;
	padding: 6px 14px;
	border-radius: 8px;
	background: var(--bg-body);
	transition: all 0.2s ease;
}

#buddypress .activity-meta a:hover {
	color: var(--accent-primary);
	background: var(--accent-light);
}

/* ---- Members & Authors Directory (`/uchastniki/` / `/authors/`) ---- */
#buddypress #members-list,
#buddypress ul.members-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
	gap: 24px;
}

#buddypress #members-list li,
#buddypress ul.members-list li {
	background: #FFFFFF;
	border: 1px solid var(--border-color);
	border-radius: 18px;
	padding: 28px 24px;
	text-align: center;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
	transition: all 0.25s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
}

#buddypress #members-list li:hover,
#buddypress ul.members-list li:hover {
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
	transform: translateY(-4px);
	border-color: var(--accent-subtle);
}

#buddypress #members-list li .item-avatar,
#buddypress ul.members-list li .item-avatar {
	margin-bottom: 16px;
}

#buddypress #members-list li .item-avatar a img,
#buddypress ul.members-list li .item-avatar a img {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--accent-light);
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
	transition: transform 0.2s ease;
}

#buddypress #members-list li:hover .item-avatar a img {
	transform: scale(1.05);
}

#buddypress #members-list li .item .item-title,
#buddypress ul.members-list li .item .item-title {
	font-weight: 700;
	font-size: 1.05rem;
	margin-bottom: 6px;
}

#buddypress #members-list li .item .item-title a {
	color: var(--text-main);
	text-decoration: none;
	transition: color 0.2s ease;
}

#buddypress #members-list li .item .item-title a:hover {
	color: var(--accent-primary);
}

#buddypress #members-list li .item .item-meta,
#buddypress ul.members-list li .item .item-meta {
	font-size: 0.82rem;
	color: var(--text-muted);
	margin-bottom: 16px;
}

#buddypress #members-list li .action,
#buddypress ul.members-list li .action {
	margin-top: auto;
	width: 100%;
}

#buddypress #members-list li .action a,
#buddypress ul.members-list li .action a {
	width: 100%;
	padding: 10px 16px;
	font-size: 0.85rem;
}

/* ---- Groups / Literary Clubs Directory (`/kluby/` / `/groups/`) ---- */
#buddypress #groups-list,
#buddypress ul.groups-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

#buddypress #groups-list li,
#buddypress ul.groups-list li {
	background: #FFFFFF;
	border: 1px solid var(--border-color);
	border-radius: 18px;
	padding: 28px;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
	transition: all 0.25s ease;
}

#buddypress #groups-list li:hover {
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
	transform: translateY(-4px);
}

/* ---- Single User Profile Header (`/members/name/`) ---- */
#buddypress #item-header {
	background: var(--bg-body);
	border: 1px solid var(--border-color);
	border-radius: 20px;
	padding: 32px;
	margin-bottom: 32px;
	display: flex;
	align-items: center;
	gap: 28px;
}

#buddypress #item-header-avatar a img,
#buddypress #item-header .avatar {
	width: 110px;
	height: 110px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid #FFFFFF;
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
}

#buddypress #item-header-content h2,
#buddypress #item-header-content .user-nicename {
	font-family: var(--font-serif);
	font-size: 1.8rem;
	font-weight: 700;
	color: var(--text-main);
	margin-bottom: 6px;
}

#buddypress #item-header-content .item-meta {
	font-size: 0.88rem;
	color: var(--text-muted);
}

/* ---- Directory Search Bars ---- */
#buddypress .dir-search,
#buddypress .bp-search,
#buddypress div.dir-search {
	margin-bottom: 24px;
	float: none;
}

#buddypress .dir-search form,
#buddypress .bp-search form {
	display: flex;
	gap: 10px;
}

#buddypress .dir-search input[type="search"],
#buddypress .dir-search input[type="text"],
#buddypress .bp-search input[type="search"] {
	flex: 1;
	padding: 12px 20px;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	font-size: 0.92rem;
	background: var(--bg-body);
}

#buddypress .dir-search input[type="submit"],
#buddypress .bp-search input[type="submit"] {
	padding: 12px 24px;
}

/* ---- Pagination Controls ---- */
#buddypress .bp-pagination,
#buddypress .pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 24px;
	font-size: 0.88rem;
	color: var(--text-muted);
	border-top: 1px solid var(--border-color);
	margin-top: 32px;
}

/* ---- Notifications & Messages ---- */
#buddypress .bp-feedback {
	background: var(--accent-light);
	border: 1px solid var(--accent-subtle);
	border-radius: 12px;
	padding: 16px 24px;
	margin-bottom: 28px;
	display: flex;
	align-items: center;
	gap: 14px;
}

#buddypress .bp-feedback p {
	margin: 0;
	font-size: 0.92rem;
	font-weight: 500;
	color: var(--accent-primary);
}

/* ---- 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;
	}
}
