/**
 * Public styles
 *
 * @package    SocialBoards
 * @subpackage SocialBoards/public/css
 * @since      1.0.0
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
	--sb-primary: #002147;
	--sb-border: #dbdbdb;
	--sb-bg-secondary: #fafafa;
	--sb-text-primary: #262626;
	--sb-text-secondary: #8e8e8e;
	--sb-error: #ed4956;
	--sb-white: #ffffff;
	--sb-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
	--sb-radius: 8px;
	--sb-transition: all 0.3s ease;
	--sb-feed-video-max-height: 90vh;
}

/* ==========================================================================
   Z-Index Scale
   ========================================================================== */
/*
 * Z-Index Scale for consistent layering:
 *
 * 1-9:     Base elements (default stacking)
 * 10-19:   Video controls (play button: 10, volume: 12, progress: 11)
 * 20-49:   Lightbox elements (overlay: 20, nav: 20, close: 20)
 * 50-99:   Sidebars and overlays (content sidebar: 50)
 * 100+:    Fixed headers, modals (mobile header: 100, lightbox: 9999)
 */

/* ==========================================================================
   Global Styles
   ========================================================================== */

.sb-feed,
.sb-single-post {
	background: var(--sb-bg-secondary);
	min-height: 100vh;
}

/* ==========================================================================
   Feed Styles (Archive)
   ========================================================================== */

.sb-feed-container {
	max-width: 975px;
	margin: 0 auto;
	padding: 20px;
}

/* Feed Header */
.sb-feed-header {
	text-align: center;
	margin-bottom: 30px;
	padding: 20px 0;
}

.sb-feed-title {
	font-size: 28px;
	font-weight: 600;
	color: var(--sb-text-primary);
	margin: 0 0 10px 0;
}

.sb-feed-description {
	font-size: 14px;
	color: var(--sb-text-secondary);
	margin: 0;
}

/* Board Filter */
.sb-board-filter {
	background: var(--sb-white);
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius);
	padding: 12px;
	margin-bottom: 30px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.sb-filter-scroll {
	display: flex;
	gap: 8px;
	min-width: min-content;
}

.sb-filter-btn {
	padding: 8px 16px;
	background: var(--sb-bg-secondary);
	border: 1px solid var(--sb-border);
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--sb-text-primary);
	text-decoration: none;
	white-space: nowrap;
	transition: var(--sb-transition);
	cursor: pointer;
}

.sb-filter-btn:hover {
	background: #f0f0f0;
}

.sb-filter-btn.active {
	background: var(--sb-primary);
	color: var(--sb-white);
	border-color: var(--sb-primary);
}

/* ==========================================================================
   Board Archive Two-Column Layout (20% Sidebar + 80% Portrait Grid)
   ========================================================================== */

.sb-board-archive-two-column {
	display: grid;
	grid-template-columns: 20% 80%;
	min-height: 100vh;
	background: var(--sb-bg-secondary);
	gap: 0;
}

/* Board Archive Left Sidebar */
.sb-board-archive-sidebar {
	background: var(--sb-white);
	border-right: 1px solid var(--sb-border);
	padding: 32px 24px;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
}

/* Board Archive Content Area */
.sb-board-archive-content {
	padding: 40px;
	overflow-y: auto;
}

/* Board Archive Header */
.sb-archive-header {
	text-align: center;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--sb-border);
}

.sb-archive-title {
	font-size: 32px;
	font-weight: 700;
	color: var(--sb-text-primary);
	margin: 0 0 10px 0;
}

.sb-archive-description {
	font-size: 16px;
	color: var(--sb-text-secondary);
	margin: 0;
	line-height: 1.6;
}

/* Hide board filter on board archive pages with sidebar */
.sb-board-archive-two-column .sb-board-filter {
	display: none;
}

/* Dashboard container within sidebar layout */
.sb-board-archive-content .sb-dashboard-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

/* Form container within sidebar layout */
.sb-board-archive-content .sb-create-post-container {
	max-width: 800px;
	margin: 0 auto;
	padding: 20px;
}

/* Back link within sidebar layout */
.sb-board-archive-content .sb-back-link-container {
	max-width: 800px;
	margin: 0 auto;
	padding: 0 20px 20px;
}

/* Portrait Grid (9:16 aspect ratio) */
.sb-board-archive-two-column .sb-grid-item {
	aspect-ratio: 9 / 16;
}

/* Ensure images/videos fill portrait frame with crop */
.sb-board-archive-two-column .sb-grid-image {
	object-fit: cover;
}

.sb-board-archive-two-column .sb-grid-image img,
.sb-board-archive-two-column .sb-grid-image video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Post Grid - Default (3 columns) */
.sb-post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	margin-bottom: 40px;
}

/* Single Post Layout (Main Feed - One at a Time) */
.sb-layout-single {
	max-width: 600px;
}

.sb-layout-single .sb-post-grid {
	grid-template-columns: 1fr;
	gap: 40px;
	max-width: 100%;
}

.sb-layout-single .sb-grid-item {
	aspect-ratio: auto;
	max-height: none;
}

.sb-layout-single .sb-grid-image {
	aspect-ratio: 1;
	max-height: 600px;
}

.sb-layout-single .sb-grid-info {
	position: static;
	opacity: 1;
	background: none;
	padding: 16px;
}

.sb-layout-single .sb-grid-title {
	color: var(--sb-text-primary);
	font-size: 16px;
	white-space: normal;
	overflow: visible;
	text-overflow: initial;
}

.sb-layout-single .sb-grid-item:hover {
	transform: none;
}

/* 4-Column Grid Layout (Board Archives) */
.sb-layout-grid {
	max-width: 1200px;
}

.sb-layout-grid .sb-post-grid {
	grid-template-columns: repeat(4, 1fr);
	gap: 5px;
}

.sb-grid-item {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: var(--sb-radius);
	background: var(--sb-white);
	box-shadow: var(--sb-shadow);
	transition: transform 0.2s ease;
}

.sb-grid-item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sb-grid-link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.sb-grid-image {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	position: relative;
}

.sb-grid-overlay {
	position: absolute;
	top: 10px;
	right: 10px;
	background: rgba(0, 0, 0, 0.6);
	border-radius: 50%;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--sb-white);
}

.sb-media-icon svg {
	display: block;
}

.sb-grid-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--sb-bg-secondary);
	color: var(--sb-text-secondary);
}

.sb-grid-info {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 12px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.sb-grid-item:hover .sb-grid-info {
	opacity: 1;
}

.sb-grid-title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--sb-white);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* No Posts */
.sb-no-posts {
	text-align: center;
	padding: 60px 20px;
	color: var(--sb-text-secondary);
}

.sb-no-posts svg {
	margin-bottom: 20px;
	opacity: 0.5;
}

.sb-no-posts p {
	font-size: 18px;
	margin-bottom: 20px;
}

.sb-btn-primary {
	display: inline-block;
	padding: 10px 24px;
	background: var(--sb-primary);
	color: var(--sb-white);
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
	transition: var(--sb-transition);
}

.sb-btn-primary:hover {
	background: #001a38;
}

/* Load More */
.sb-load-more {
	text-align: center;
	padding: 20px;
}

.sb-btn-load-more {
	padding: 10px 32px;
	background: var(--sb-white);
	border: 1px solid var(--sb-border);
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--sb-text-primary);
	cursor: pointer;
	transition: var(--sb-transition);
}

.sb-btn-load-more:hover {
	background: var(--sb-bg-secondary);
}

.sb-loading {
	display: flex;
	justify-content: center;
	padding: 20px;
}

.sb-spinner {
	color: var(--sb-primary);
}

/* ==========================================================================
   Single Post Styles
   ========================================================================== */

.sb-single-container {
	max-width: 935px;
	margin: 40px auto;
	padding: 0 20px;
}

.sb-post-single {
	background: var(--sb-white);
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius);
	overflow: hidden;
	box-shadow: var(--sb-shadow);
	margin-bottom: 30px;
}

/* Post Header */
.sb-post-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px;
	border-bottom: 1px solid var(--sb-border);
}

.sb-post-author {
	display: flex;
	align-items: center;
	gap: 12px;
}

.sb-author-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid var(--sb-border);
}

.sb-author-info {
	display: flex;
	flex-direction: column;
}

.sb-author-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--sb-text-primary);
}

.sb-post-boards {
	font-size: 12px;
	color: var(--sb-text-secondary);
}

.sb-post-date {
	font-size: 12px;
	color: var(--sb-text-secondary);
}

/* Post Media */
.sb-post-media {
	position: relative;
	width: 100%;
	max-height: 700px;
	background: #000;
	overflow: hidden;
}

/* Gallery Slider */
.sb-gallery-slider {
	position: relative;
	width: 100%;
	aspect-ratio: 1;
}

.sb-gallery-slide {
	display: none;
	width: 100%;
	height: 100%;
}

.sb-gallery-slide.active {
	display: block;
}

.sb-gallery-slide img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
	cursor: zoom-in;
}

/* Gallery Navigation */
.sb-gallery-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: var(--sb-transition);
	z-index: 10;
	color: var(--sb-text-primary);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.15);
}

.sb-gallery-nav:hover {
	background: rgba(255, 255, 255, 1);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 3px 6px rgba(0, 0, 0, 0.2);
}

.sb-gallery-prev {
	left: 16px;
}

.sb-gallery-next {
	right: 16px;
}

/* Gallery Indicators */
.sb-gallery-indicators {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 6px;
	z-index: 10;
}

.sb-indicator {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	cursor: pointer;
	transition: var(--sb-transition);
}

.sb-indicator.active {
	background: rgba(255, 255, 255, 1);
	width: 10px;
	height: 10px;
}

/* Gallery Slide Animations */
.sb-gallery-slide.slide-in-left {
	animation: slideInLeft 0.4s ease-out forwards;
}

.sb-gallery-slide.slide-in-right {
	animation: slideInRight 0.4s ease-out forwards;
}

.sb-gallery-slide.slide-out-left {
	animation: slideOutLeft 0.4s ease-out forwards;
}

.sb-gallery-slide.slide-out-right {
	animation: slideOutRight 0.4s ease-out forwards;
}

@keyframes slideInLeft {
	from {
		transform: translateX(-100%);
		opacity: 0;
	}

	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes slideInRight {
	from {
		transform: translateX(100%);
		opacity: 0;
	}

	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes slideOutLeft {
	from {
		transform: translateX(0);
		opacity: 1;
	}

	to {
		transform: translateX(-100%);
		opacity: 0;
	}
}

@keyframes slideOutRight {
	from {
		transform: translateX(0);
		opacity: 1;
	}

	to {
		transform: translateX(100%);
		opacity: 0;
	}
}

/* Video Player */
.sb-video-player {
	position: relative;
	width: fit-content;
	max-width: 90%;
	margin: 0 auto;
	background: #fff;
	cursor: pointer;
	overflow: hidden;
	border-radius: 20px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.08);
}

.sb-video-player video {
	width: 100%;
	height: auto;
	display: block;
}

/* Play Button Overlay */
.sb-video-play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: none;
	border: none;
	cursor: pointer;
	z-index: 10;
	transition: opacity 0.3s ease, transform 0.2s ease;
	padding: 0;
	outline: none;
}

.sb-video-play-btn:hover {
	transform: translate(-50%, -50%) scale(1.1);
}

.sb-video-play-btn:active {
	transform: translate(-50%, -50%) scale(0.95);
}

.sb-video-player.playing .sb-video-play-btn {
	opacity: 0;
	pointer-events: none;
}

.sb-video-player.paused .sb-video-play-btn {
	opacity: 1;
}

/* Loading Spinner */
.sb-video-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 9;
}

/* Volume Button */
.sb-video-volume-btn {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 12;
	background: rgba(0, 0, 0, 0.5);
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.3s ease;
	padding: 0;
	opacity: 0;
}

.sb-video-player:hover .sb-video-volume-btn,
.sb-video-player.paused .sb-video-volume-btn {
	opacity: 1;
}

.sb-video-volume-btn:hover {
	background: rgba(0, 0, 0, 0.7);
}

.sb-video-volume-btn svg {
	color: white;
}

.sb-video-volume-btn .volume-on {
	display: none;
}

.sb-video-volume-btn .volume-off {
	display: block;
}

.sb-video-player:not(.muted) .sb-video-volume-btn .volume-on {
	display: block;
}

.sb-video-player:not(.muted) .sb-video-volume-btn .volume-off {
	display: none;
}

/* Video Controls */
.sb-video-controls {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 0;
	z-index: 11;
	opacity: 0.5;
}

/* Progress Bar */
.sb-video-progress {
	position: relative;
	height: 6px;
	background: white;
	cursor: pointer;
	transition: height 0.2s ease;
}

.sb-video-player:hover .sb-video-progress,
.sb-video-player.seeking .sb-video-progress {
	height: 8px;
}

.sb-video-progress-filled {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background: #002147;
	width: 100%;
	transform: scaleX(0);
	transform-origin: left;
	will-change: transform;
	/* No transition for smooth real-time updates */
}

.sb-video-progress-handle {
	position: absolute;
	top: 50%;
	left: 0;
	width: 12px;
	height: 12px;
	background: #002147;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	opacity: 0;
	transition: opacity 0.2s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sb-video-player:hover .sb-video-progress-handle,
.sb-video-player.seeking .sb-video-progress-handle {
	opacity: 1;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
	.sb-video-play-btn svg {
		width: 60px;
		height: 60px;
	}

	.sb-video-progress {
		height: 8px;
	}

	.sb-video-progress-handle {
		width: 16px;
		height: 16px;
	}
}

/* Post Content */
.sb-post-content {
	padding: 20px;
}

.sb-post-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--sb-text-primary);
	margin: 0 0 12px 0;
}

.sb-post-caption {
	font-size: 14px;
	line-height: 1.6;
	color: var(--sb-text-primary);
	white-space: pre-wrap;
	word-wrap: break-word;
}

.sb-post-caption p {
	margin: 0 0 12px 0;
}

.sb-post-caption p:last-child {
	margin-bottom: 0;
}

/* Post Footer */
.sb-post-footer {
	padding: 0 20px 20px 20px;
	border-top: 1px solid var(--sb-border);
	margin-top: 16px;
	padding-top: 16px;
}

.sb-post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sb-board-tag {
	font-size: 14px;
	font-weight: 600;
	color: var(--sb-primary);
	text-decoration: none;
	transition: var(--sb-transition);
}

.sb-board-tag:hover {
	color: #001a38;
	text-decoration: underline;
}

/* Post Navigation */
.sb-post-navigation {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 20px 0;
}

.sb-nav-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: var(--sb-white);
	border: 1px solid var(--sb-border);
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--sb-text-primary);
	text-decoration: none;
	transition: var(--sb-transition);
}

.sb-nav-link:hover {
	background: var(--sb-bg-secondary);
	transform: translateY(-2px);
	box-shadow: var(--sb-shadow);
}

.sb-nav-link svg {
	flex-shrink: 0;
}

.sb-nav-feed {
	flex: 1;
	justify-content: center;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Large screens - 4-column becomes 3-column */
@media (max-width: 1024px) {
	.sb-layout-grid .sb-post-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	/* Board archive responsive: increase sidebar width */
	.sb-board-archive-two-column {
		grid-template-columns: 240px 1fr;
	}
}

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

	/* Default 3-column grid becomes 2 columns */
	.sb-post-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}

	/* 4-column grid becomes 2 columns */
	.sb-layout-grid .sb-post-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 5px;
	}

	/* Single column stays single column */
	.sb-layout-single .sb-post-grid {
		grid-template-columns: 1fr;
		gap: 30px;
	}

	.sb-feed-container {
		padding: 16px;
	}

	/* Board archive responsive: hide navigation, keep logo, use mobile menu */
	.sb-board-archive-two-column {
		grid-template-columns: 1fr;
		min-height: auto;
	}

	.sb-board-archive-sidebar {
		position: relative;
		height: auto;
		border-right: none;
		border-bottom: 1px solid var(--sb-border);
		padding: 16px;
		text-align: center;
	}

	.sb-board-archive-sidebar .sb-sidebar-content {
		position: static;
	}

	/* Hide navigation menus on mobile - use FAB menu instead */
	.sb-board-archive-sidebar .sb-board-navigation,
	.sb-board-archive-sidebar .sb-user-navigation {
		display: none;
	}

	.sb-board-archive-content {
		padding: 16px;
	}

	.sb-single-container {
		padding: 0;
		margin: 20px auto;
	}

	.sb-post-single {
		border-radius: 0;
		border-left: none;
		border-right: none;
	}

	.sb-gallery-nav {
		width: 32px;
		height: 32px;
	}

	.sb-gallery-prev {
		left: 8px;
	}

	.sb-gallery-next {
		right: 8px;
	}

	.sb-post-navigation {
		flex-wrap: wrap;
	}

	.sb-nav-link {
		flex: 1 1 100%;
	}
}

/* Mobile */
@media (max-width: 480px) {

	/* All grids become single column on mobile */
	.sb-post-grid,
	.sb-layout-grid .sb-post-grid {
		grid-template-columns: 1fr;
		gap: 5px;
	}

	/* Single column maintains spacing */
	.sb-layout-single .sb-post-grid {
		gap: 20px;
	}

	.sb-feed-title {
		font-size: 24px;
	}

	.sb-board-filter {
		margin-left: -16px;
		margin-right: -16px;
		border-radius: 0;
		border-left: none;
		border-right: none;
	}

	.sb-post-title {
		font-size: 18px;
	}

	.sb-post-content {
		padding: 16px;
	}

	.sb-gallery-nav {
		width: 28px;
		height: 28px;
	}

	.sb-gallery-nav svg {
		width: 20px;
		height: 20px;
	}

	/* Board archive mobile styles */
	.sb-board-archive-sidebar {
		padding: 16px;
	}

	.sb-board-archive-content {
		padding: 16px;
	}

	.sb-board-archive-sidebar .sb-nav-heading {
		font-size: 14px;
		margin-bottom: 12px;
	}

	.sb-board-archive-sidebar .sb-board-link {
		padding: 6px 12px;
		font-size: 13px;
	}
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.sb-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
}

.sb-lightbox-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.95);
	cursor: zoom-out;
}

.sb-lightbox-content {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
}

.sb-lightbox-image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	position: relative;
	z-index: 10;
	cursor: zoom-out;
}

.sb-lightbox-close {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 20;
	background: rgba(255, 255, 255, 0.1);
	border: none;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--sb-white);
	cursor: pointer;
	transition: var(--sb-transition);
}

.sb-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.2);
}

.sb-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 20;
	background: rgba(255, 255, 255, 0.1);
	border: none;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--sb-white);
	cursor: pointer;
	transition: var(--sb-transition);
}

.sb-lightbox-nav:hover {
	background: rgba(255, 255, 255, 0.2);
}

.sb-lightbox-prev {
	left: 20px;
}

.sb-lightbox-next {
	right: 20px;
}

@media (max-width: 768px) {
	.sb-lightbox-content {
		padding: 40px 10px;
	}

	.sb-lightbox-close {
		top: 10px;
		right: 10px;
		width: 40px;
		height: 40px;
	}

	.sb-lightbox-nav {
		width: 40px;
		height: 40px;
	}

	.sb-lightbox-prev {
		left: 10px;
	}

	.sb-lightbox-next {
		right: 10px;
	}
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.sb-hidden {
	display: none !important;
}

.sb-visible {
	display: block !important;
}

/* ==========================================================================
   Full-Screen Feed (TikTok-Style)
   ========================================================================== */

.sb-feed-fullscreen {
	background: #000;
	min-height: 100vh;
}

/* Sticky Header */
.sb-feed-sticky-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(10px);
	padding: 12px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sb-feed-sticky-title {
	font-size: 20px;
	font-weight: 700;
	color: white;
	margin: 0;
}

.sb-board-filter-compact select {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: white;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	outline: none;
}

.sb-board-filter-compact select:hover {
	background: rgba(255, 255, 255, 0.2);
}

.sb-board-filter-compact select option {
	background: #1a1a1a;
	color: white;
}

/* Posts Scroll Container */
.sb-posts-scroll-container {
	padding-top: 60px;
	scroll-snap-type: y mandatory;
	overflow-y: scroll;
	height: 100vh;
	-webkit-overflow-scrolling: touch;
}

/* Individual Full-Screen Post */
.sb-post-fullscreen {
	min-height: 100vh;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	display: flex;
	flex-direction: column;
	position: relative;
	background: #000;
}

/* Post Header Inline */
.sb-post-header-inline {
	position: absolute;
	top: 80px;
	left: 20px;
	right: 20px;
	z-index: 10;
}

.sb-post-author {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sb-author-avatar-inline {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.3);
}

.sb-author-info-inline {
	display: flex;
	flex-direction: column;
}

.sb-author-name-inline {
	font-size: 14px;
	font-weight: 600;
	color: white;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.sb-post-date-inline {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.8);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Post Media Fullscreen */
.sb-post-media-fullscreen {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	position: relative;
	background: #000;
}

.sb-post-media-fullscreen .sb-gallery-slider,
.sb-post-media-fullscreen .sb-video-player {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sb-post-media-fullscreen .sb-gallery-slide img {
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
}

.sb-post-media-fullscreen video {
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
}

/* Post Content Inline */
.sb-post-content-inline {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 20px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
	z-index: 10;
	max-height: 40vh;
	overflow-y: auto;
}

.sb-post-title-inline {
	font-size: 18px;
	font-weight: 700;
	color: white;
	margin: 0 0 8px 0;
}

.sb-post-caption-inline {
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.95);
	margin-bottom: 12px;
}

.sb-post-caption-inline p {
	margin: 0 0 8px 0;
}

.sb-post-caption-inline p:last-child {
	margin-bottom: 0;
}

.sb-post-tags-inline {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sb-board-tag-inline {
	font-size: 14px;
	font-weight: 600;
	color: #002147;
	text-decoration: none;
	transition: opacity 0.2s;
}

.sb-board-tag-inline:hover {
	opacity: 0.8;
}

/* No Posts Fullscreen */
.sb-no-posts-fullscreen {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.6);
	text-align: center;
	padding: 40px;
}

.sb-no-posts-fullscreen svg {
	margin-bottom: 20px;
	opacity: 0.4;
}

.sb-no-posts-fullscreen p {
	font-size: 18px;
	margin: 0;
}

/* Mobile Optimizations for Fullscreen */
@media (max-width: 768px) {
	.sb-feed-sticky-header {
		padding: 10px 16px;
	}

	.sb-feed-sticky-title {
		font-size: 18px;
	}

	.sb-post-header-inline {
		top: 70px;
		left: 16px;
		right: 16px;
	}

	.sb-post-content-inline {
		padding: 16px;
		max-height: 50vh;
	}

	.sb-post-title-inline {
		font-size: 16px;
	}

	.sb-post-caption-inline {
		font-size: 13px;
	}
}

/* ==========================================================================
   Three-Column Feed Layout (Instagram/TikTok Style)
   ========================================================================== */

.sb-feed-three-column {
	display: grid;
	grid-template-columns: 20% 60% 20%;
	height: 100vh;
	overflow: hidden;
	background: #fafafa;
	gap: 0;
}

/* Left Sidebar: Site Title & Navigation */
.sb-feed-sidebar-left {
	background: #ffffff;
	border-right: 1px solid #dbdbdb;
	overflow-y: auto;
	padding: 32px 24px;
	position: sticky;
	top: 0;
	height: 100vh;
}

.sb-sidebar-content {
	position: sticky;
	top: 32px;
}

.sb-site-title {
	font-size: 28px;
	font-weight: 700;
	color: #262626;
	margin: 0 0 32px 0;
	padding-bottom: 24px;
	border-bottom: 1px solid #dbdbdb;
}

/* Custom Logo */
.custom-logo-link {
	display: block;
	margin: 0 0 32px 0;
	padding-bottom: 24px;
	border-bottom: 1px solid #dbdbdb;
	text-decoration: none;
}

.custom-logo {
	width: 100%;
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
	object-fit: contain;
}

.sb-board-navigation {
	margin: 0;
}

.sb-nav-heading {
	font-size: 16px;
	font-weight: 600;
	color: #8e8e8e;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 0 0 16px 0;
}

.sb-board-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sb-board-list li {
	margin-bottom: 4px;
}

.sb-board-link {
	display: block;
	padding: 12px 16px;
	font-size: 16px;
	font-weight: 500;
	color: #262626;
	text-decoration: none;
	border-radius: 8px;
	transition: all 0.2s ease;
}

.sb-board-link:hover {
	background: #fafafa;
	color: #002147;
}

.sb-board-link.active {
	background: #002147;
	color: #ffffff;
	font-weight: 600;
}

/* Center Column: Media Feed */
.sb-feed-center {
	overflow-y: scroll;
	height: 100vh;
	background: #ffffff;
	scroll-behavior: smooth;
	position: relative;
	scroll-snap-type: y mandatory;
	-webkit-overflow-scrolling: touch;
}

/* Hide gallery indicators in three-column layout */
.sb-feed-three-column .sb-gallery-indicators {
	display: none;
}

/* Individual Post Item */
.sb-post-item {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	height: 100vh;
	min-height: 100vh;
	max-height: 100vh;
	background: #ffffff;
	position: relative;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	z-index: 10;
	isolation: isolate;
}

/* Active post has higher z-index to cover overlapping next post */
.sb-post-item.sb-post-in-view {
	z-index: 100;
}

/* Post Media Container */
.sb-post-media-container {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	position: relative;
	width: 100%;
	flex-shrink: 0;
}

.sb-post-media-container .sb-gallery-slider {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sb-post-media-container .sb-video-player {
	display: flex;
	align-items: center;
	justify-content: center;
}

.sb-post-media-container .sb-gallery-slide {
	display: none;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 0;
	left: 0;
}

.sb-post-media-container .sb-gallery-slide.active {
	display: flex;
}

.sb-post-media-container .sb-gallery-slide img {
	max-width: 90%;
	max-height: var(--sb-feed-video-max-height);
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 20px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.08);
}

.sb-post-media-container video {
	width: auto;
	max-width: 100%;
	max-height: 90vh;
	height: auto;
	object-fit: contain;
	display: block;
}

/* Right Sidebar: Post Content */
.sb-post-content-sidebar {
	position: fixed;
	right: 0;
	top: 0;
	width: 20%;
	height: 100vh;
	background: #ffffff;
	border-left: 1px solid #dbdbdb;
	padding: 80px 24px 32px 24px;
	overflow-y: auto;
	z-index: 50;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sb-post-content-sidebar.active {
	opacity: 1;
	visibility: visible;
}

/* Compact Post Header */
.sb-post-header-compact {
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid #efefef;
}

.sb-post-author-compact {
	display: flex;
	align-items: center;
	gap: 12px;
}

.sb-author-avatar-compact {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid #dbdbdb;
}

.sb-author-info-compact {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.sb-author-name-compact {
	font-size: 14px;
	font-weight: 600;
	color: #262626;
	line-height: 1.3;
}

.sb-post-date-compact {
	font-size: 12px;
	color: #8e8e8e;
	line-height: 1.3;
}

/* Compact Post Title */
.sb-post-title-compact {
	font-size: 20px;
	font-weight: 700;
	color: #262626;
	margin: 0 0 16px 0;
	line-height: 1.4;
	word-wrap: break-word;
}

/* Compact Post Caption */
.sb-post-caption-compact {
	font-size: 14px;
	line-height: 1.6;
	color: #262626;
	margin-bottom: 16px;
	word-wrap: break-word;
}

.sb-post-caption-compact p {
	margin: 0 0 12px 0;
}

.sb-post-caption-compact p:last-child {
	margin-bottom: 0;
}

/* Compact Post Tags */
.sb-post-tags-compact {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #efefef;
}

.sb-board-tag-compact {
	font-size: 14px;
	font-weight: 600;
	color: #002147;
	text-decoration: none;
	transition: color 0.2s ease;
}

.sb-board-tag-compact:hover {
	color: #001a38;
	text-decoration: underline;
}

/* Scrollbar Styling for Feed Center */
.sb-feed-center::-webkit-scrollbar {
	width: 8px;
}

.sb-feed-center::-webkit-scrollbar-track {
	background: #fafafa;
}

.sb-feed-center::-webkit-scrollbar-thumb {
	background: #dbdbdb;
	border-radius: 4px;
}

.sb-feed-center::-webkit-scrollbar-thumb:hover {
	background: #c0c0c0;
}

/* Scrollbar Styling for Right Sidebar */
.sb-post-content-sidebar::-webkit-scrollbar {
	width: 6px;
}

.sb-post-content-sidebar::-webkit-scrollbar-track {
	background: #fafafa;
}

.sb-post-content-sidebar::-webkit-scrollbar-thumb {
	background: #dbdbdb;
	border-radius: 3px;
}

.sb-post-content-sidebar::-webkit-scrollbar-thumb:hover {
	background: #c0c0c0;
}

/* Single Post Three-Column Layout */
.sb-single-post-center {
	overflow-y: auto;
	scroll-snap-type: none;
	padding: 40px 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.sb-single-post-article {
	width: 100%;
	max-width: 1200px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 32px;
}

/* Single Post Media Container */
.sb-single-media-container {
	width: 100%;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	background: #ffffff;
	padding: 20px;
}

.sb-single-media-container .sb-gallery-slider {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 80vw;
	height: 80vh;
	aspect-ratio: unset;
}

.sb-single-media-container .sb-gallery-slide {
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
	z-index: 1;
}

.sb-single-media-container .sb-gallery-slide.active {
	opacity: 1;
	z-index: 2;
}

.sb-single-media-container .sb-gallery-slide img {
	max-width: 80vw;
	max-height: 80vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	background: transparent;
	cursor: default;
}

/* Single post gallery: Use fade transitions instead of slide animations */
.sb-single-media-container .sb-gallery-slide.slide-in-left,
.sb-single-media-container .sb-gallery-slide.slide-in-right,
.sb-single-media-container .sb-gallery-slide.slide-out-left,
.sb-single-media-container .sb-gallery-slide.slide-out-right {
	animation: none !important;
	transform: none !important;
}

/* Gallery navigation buttons for single post */
.sb-single-media-container .sb-gallery-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 20;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid #dbdbdb;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sb-single-media-container .sb-gallery-nav:hover {
	background: #ffffff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sb-single-media-container .sb-gallery-prev {
	left: 20px;
}

.sb-single-media-container .sb-gallery-next {
	right: 20px;
}

/* Show gallery indicators on single post */
.sb-single-media-container .sb-gallery-indicators {
	display: flex;
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	gap: 8px;
	z-index: 10;
}

.sb-single-media-container .sb-video-player {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: center;
}

.sb-single-media-container .sb-video-player video {
	max-width: 80vw;
	max-height: 80vh;
	object-fit: contain;
	border-radius: 12px;
}

/* Single Post Navigation */
.sb-single-post-navigation {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	width: 100%;
	max-width: 800px;
	padding: 20px 0;
}

.sb-single-nav-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	background: #ffffff;
	border: 1px solid #dbdbdb;
	border-radius: 8px;
	color: #262626;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
	cursor: pointer;
	min-width: 120px;
	justify-content: center;
}

.sb-single-nav-link:hover {
	background: #fafafa;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sb-single-nav-link svg {
	flex-shrink: 0;
}

.sb-single-nav-disabled {
	opacity: 0;
	pointer-events: none;
	visibility: hidden;
}

.sb-single-nav-board {
	flex: 1;
	max-width: 300px;
}

/* Related Posts Grid */
.sb-single-related-posts {
	width: 100%;
	max-width: 900px;
	padding: 40px 0;
}

.sb-single-related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.sb-single-related-item {
	display: block;
	aspect-ratio: 1;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sb-single-related-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.sb-single-related-thumb {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
}

.sb-single-related-placeholder {
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #dbdbdb;
}

/* ==================================================================
   SINGLE POST GALLERY - Clean implementation with unique classes
   ================================================================== */

.sb-single-gallery-wrapper {
	position: relative;
	width: 80vw;
	max-width: 1200px;
	height: 80vh;
	max-height: 800px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
}

.sb-single-gallery-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 1;
}

.sb-single-gallery-item.active {
	opacity: 1;
	z-index: 2;
}

.sb-single-gallery-item img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.sb-single-gallery-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid #dbdbdb;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	z-index: 10;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.sb-single-gallery-nav:hover {
	background: #ffffff;
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.sb-single-gallery-nav svg {
	color: #262626;
}

.sb-single-gallery-prev {
	left: 20px;
}

.sb-single-gallery-next {
	right: 20px;
}

.sb-single-gallery-dots {
	position: absolute;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	z-index: 10;
}

.sb-single-gallery-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.sb-single-gallery-dot:hover {
	background: rgba(255, 255, 255, 0.8);
	transform: scale(1.2);
}

.sb-single-gallery-dot.active {
	background: #ffffff;
	width: 24px;
	border-radius: 4px;
}

/* Right Sidebar for Single Post */
.sb-single-sidebar-right {
	position: fixed;
	right: 0;
	top: 0;
	width: 20%;
	height: 100vh;
	background: #ffffff;
	border-left: 1px solid #dbdbdb;
	padding: 80px 24px 32px 24px;
	overflow-y: auto;
	z-index: 50;
}

.sb-single-sidebar-content {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.sb-single-post-title {
	font-size: 24px;
	font-weight: 700;
	color: #262626;
	margin: 0;
	line-height: 1.3;
	word-wrap: break-word;
}

.sb-single-post-caption {
	font-size: 15px;
	line-height: 1.6;
	color: #262626;
	word-wrap: break-word;
}

.sb-single-post-caption p {
	margin: 0 0 12px 0;
}

.sb-single-post-caption p:last-child {
	margin-bottom: 0;
}

.sb-single-post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding-top: 16px;
	border-top: 1px solid #efefef;
}

.sb-single-board-tag {
	display: inline-block;
	padding: 6px 12px;
	background: #fafafa;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #002147;
	text-decoration: none;
	transition: background 0.2s ease;
}

.sb-single-board-tag:hover {
	background: #002147;
	color: #ffffff;
}

.sb-single-post-meta {
	padding-top: 16px;
	border-top: 1px solid #efefef;
	font-size: 13px;
	color: #8e8e8e;
}

/* No Posts in Three-Column */
.sb-feed-center .sb-no-posts-fullscreen {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #8e8e8e;
	text-align: center;
	padding: 40px;
}

/* Load More Button in Three-Column */
.sb-feed-three-column .sb-load-more {
	background: #ffffff;
	padding: 40px 20px;
	text-align: center;
}

.sb-feed-three-column .sb-btn-load-more {
	background: #ffffff;
	border: 1px solid #dbdbdb;
	color: #262626;
	padding: 12px 32px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sb-feed-three-column .sb-btn-load-more:hover {
	background: #fafafa;
	transform: translateY(-1px);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Responsive Adjustments for Three-Column Layout */
@media (max-width: 1400px) {
	.sb-feed-three-column {
		grid-template-columns: 20% 60% 20%;
	}

	.sb-post-content-sidebar {
		width: 20%;
	}

	.sb-site-title {
		font-size: 24px;
	}

	.sb-board-link {
		font-size: 15px;
		padding: 10px 14px;
	}
}

@media (max-width: 1024px) {


	.sb-post-content-sidebar {
		width: 280px;
	}

	.sb-feed-sidebar-left {
		padding: 24px 16px;
	}

	.sb-site-title {
		font-size: 22px;
	}
}

@media (max-width: 768px) {
	.sb-feed-three-column {
		grid-template-columns: 1fr;
		height: 100vh;
	}

	.sb-feed-sidebar-left {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		height: auto;
		max-height: 80px;
		border-right: none;
		border-bottom: 1px solid #dbdbdb;
		padding: 12px 16px;
		background: #ffffff;
		z-index: 1000;
		overflow: hidden;
	}

	.sb-sidebar-content {
		position: static;
	}

	.sb-site-title {
		font-size: 18px;
		margin-bottom: 0;
		padding-bottom: 0;
		border-bottom: none;
		color: #ffffff;
	}

	.custom-logo-link {
		margin-bottom: 0;
		padding-bottom: 0;
		border-bottom: none;
	}

	.custom-logo {
		max-height: 40px;
		width: auto;
	}

	.sb-board-navigation {
		display: none;
	}

	.sb-feed-center {
		height: 100vh;
		min-height: 100vh;
		scroll-snap-type: y mandatory;
		padding-top: 80px;
	}

	.sb-post-item {
		height: 100vh;
		min-height: 100vh;
		max-height: 100vh;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		margin-bottom: 0;
		background: #000000;
		border: none;
		border-radius: 0;
		overflow: visible;
		scroll-snap-align: start;
		scroll-snap-stop: always;
		z-index: 10;
		isolation: isolate;
	}

	.sb-post-media-container {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: auto;
		max-height: none;
		background: #000000;
	}

	.sb-post-media-container .sb-gallery-slide img,
	.sb-post-media-container video {
		max-height: 85vh;
		max-width: 100%;
	}

	.sb-post-media-container .sb-gallery-slide img {
		border-radius: 12px;
	}

	.sb-video-player {
		border-radius: 12px;
	}

	.sb-post-content-sidebar {
		position: absolute;
		top: auto;
		bottom: 0;
		left: 0;
		right: 0;
		width: 100%;
		height: auto;
		max-height: 40vh;
		border-left: none;
		border-top: none;
		padding: 20px 16px calc(40px + env(safe-area-inset-bottom, 0px)) 16px;
		background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
		opacity: 1;
		visibility: visible;
		overflow-y: auto;
		z-index: 10;
	}

	.sb-post-header-compact {
		margin-bottom: 12px;
		padding-bottom: 12px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}

	.sb-author-name-compact {
		color: #ffffff;
	}

	.sb-post-date-compact {
		color: rgba(255, 255, 255, 0.7);
	}

	.sb-post-title-compact {
		font-size: 18px;
		font-weight: 700;
		margin-bottom: 12px;
		color: #ffffff;
	}

	.sb-post-caption-compact {
		font-size: 12px;
		font-weight: 400;
		margin-bottom: 12px;
		color: rgba(255, 255, 255, 0.95);
		line-height: 1.5;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		cursor: pointer;
	}

	.sb-post-caption-compact.expanded {
		-webkit-line-clamp: unset;
		display: block;
	}

	.sb-post-tags-compact {
		margin-top: 12px;
		padding-top: 12px;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
	}

	.sb-board-tag-compact {
		color: #ffffff;
		background: none;
		padding: 0 8px 0 0;
		border-radius: 0;
		font-weight: 400;
		display: inline;
	}

	.sb-board-tag-compact:hover {
		background: none;
		color: #ffffff;
		text-decoration: underline;
	}

	/* Single post mobile adjustments */
	.sb-single-three-column .sb-post-item {
		padding: 0 0 140px 0;
		min-height: auto;
		justify-content: flex-start;
	}

	.sb-single-three-column .sb-post-media-container {
		height: auto;
		max-height: calc(100vh - 220px);
		margin-top: 80px;
	}

	.sb-single-three-column .sb-post-navigation {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		width: 100%;
		max-width: 100%;
		padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) 16px;
		background: rgba(0, 0, 0, 0.95);
		backdrop-filter: blur(10px);
		z-index: 100;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
	}

	.sb-single-three-column .sb-nav-link {
		background: rgba(255, 255, 255, 0.1);
		border-color: rgba(255, 255, 255, 0.2);
		color: #ffffff;
	}

	.sb-single-three-column .sb-nav-link svg {
		stroke: #ffffff;
	}
}

@media (max-width: 480px) {
	.sb-feed-sidebar-left {
		padding: 10px 12px;
		max-height: 60px;
	}

	.sb-site-title {
		font-size: 16px;
		margin-bottom: 0;
		padding-bottom: 0;
	}

	.custom-logo {
		max-height: 35px;
	}

	.sb-feed-center {
		padding-top: 60px;
	}

	.sb-post-media-container .sb-gallery-slide img,
	.sb-post-media-container video {
		max-height: 85vh;
	}

	.sb-post-media-container .sb-gallery-slide img {
		border-radius: 10px;
	}

	.sb-video-player {
		border-radius: 10px;
	}

	.sb-post-content-sidebar {
		padding: 16px 12px calc(40px + env(safe-area-inset-bottom, 0px)) 12px;
		max-height: 45vh;
	}

	.sb-post-title-compact {
		font-size: 16px;
		font-weight: 700;
	}

	.sb-post-caption-compact {
		font-size: 12px;
		font-weight: 400;
	}

	.sb-board-tag-compact {
		font-size: 12px;
		padding: 0 8px 0 0;
		background: none;
		font-weight: 400;
	}
}

/* ==========================================================================
   Mobile Boards Menu
   ========================================================================== */

.sb-mobile-menu-btn {
	display: none;
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 56px;
	height: 56px;
	background: #002147;
	border-radius: 50%;
	border: none;
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	z-index: 1000;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, background 0.2s ease;
}

.sb-mobile-menu-btn:hover {
	transform: scale(1.05);
	background: #001a38;
}

.sb-mobile-menu-btn:active {
	transform: scale(0.95);
}

.sb-mobile-menu-overlay {
	position: fixed;
	top: 80px;
	/* Below the header */
	left: 0;
	right: 0;
	bottom: 0;
	background: #ffffff;
	z-index: 999;
	/* Below header (1000) but above content */
	display: flex;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	overflow-y: auto;
}

.sb-mobile-menu-overlay.active {
	opacity: 1;
	visibility: visible;
}

.sb-mobile-menu-content {
	width: 100%;
	max-width: 400px;
	text-align: center;
	padding-bottom: 80px;
	/* Space for FAB */
}

.sb-mobile-menu-content .sb-nav-heading {
	font-size: 18px;
	margin-bottom: 24px;
	color: #8e8e8e;
}

.sb-mobile-menu-content .sb-board-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sb-mobile-menu-content .sb-board-link {
	font-size: 18px;
	padding: 16px;
	background: #fafafa;
	border: 1px solid #dbdbdb;
}

.sb-mobile-menu-content .sb-board-link.active {
	background: #002147;
	color: #ffffff;
	border-color: #002147;
}

@media (max-width: 768px) {
	.sb-mobile-menu-btn {
		display: flex;
	}

	.sb-mobile-menu-overlay {
		top: 60px;
		/* Adjust for smaller mobile header */
	}
}

/* ==========================================================================
   Mobile Single Post Layout
   ========================================================================== */

.sb-mobile-nav-bar {
	display: none;
}

@media (max-width: 768px) {

	/* Hide desktop sidebars - BUT keep left sidebar visible for header/logo */
	.sb-single-post-page .sb-single-sidebar-right {
		display: none !important;
	}

	/* Ensure left sidebar behaves as header */
	.sb-single-post-page .sb-feed-sidebar-left {
		display: block !important;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		height: auto;
		max-height: 80px;
		border-right: none;
		border-bottom: 1px solid #dbdbdb;
		padding: 12px 16px;
		background: #ffffff;
		z-index: 1000;
		overflow: hidden;
	}

	/* Full screen center column */
	.sb-single-post-page .sb-feed-center {
		width: 100%;
		height: 100vh;
		padding: 0;
		/* padding-top: 80px; Removed as per user request */
		overflow: hidden;
		background: #ffffff;
		/* Changed from black */
		position: fixed;
		top: 0;
		left: 0;
		z-index: 10;
	}

	.sb-single-post-page .sb-single-post-article {
		height: 100%;
		width: 100%;
		max-width: none;
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 0;
	}

	.sb-single-post-page .sb-single-media-container {
		height: 100%;
		width: 100%;
		padding: 0;
		background: transparent;
		/* Removed black background */
		align-items: center;
		margin-top: 0;
		max-height: none;
	}

	.sb-single-post-page .sb-single-media-container img,
	.sb-single-post-page .sb-single-media-container video {
		max-height: calc(100vh - 140px);
		/* Space for header and bottom nav */
		width: 100%;
		object-fit: contain;
	}

	.sb-single-post-page .sb-single-gallery-wrapper {
		width: 100%;
		height: 100%;
		max-height: calc(100vh - 140px);
	}

	/* Hide default navigation and related posts */
	.sb-single-post-page .sb-single-post-navigation,
	.sb-single-post-page .sb-single-related-posts {
		display: none !important;
	}

	/* Mobile Bottom Nav Bar */
	.sb-mobile-nav-bar {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		height: 60px;
		background: #ffffff;
		border-top: 1px solid #dbdbdb;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 20px;
		z-index: 1001;
		padding-bottom: env(safe-area-inset-bottom, 0px);
		height: calc(60px + env(safe-area-inset-bottom, 0px));
	}

	.sb-mobile-nav-item {
		color: #262626;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		text-decoration: none;
	}

	.sb-mobile-nav-disabled {
		opacity: 0.3;
		pointer-events: none;
	}

	/* Override FAB styles for inline menu button */
	.sb-single-post-page #sb-mobile-menu-btn {
		display: flex;
		position: static;
		width: auto;
		height: auto;
		background: none;
		border-radius: 0;
		box-shadow: none;
		color: #262626;
		padding: 8px;
	}

	.sb-single-post-page #sb-mobile-menu-btn:hover {
		transform: none;
		background: none;
	}
}