/*
Theme Name: Blocksy Sidebar Child
Theme URI: https://creativethemes.com/blocksy/
Description: A Blocksy child theme with a fixed sidebar navigation and logo panel.
Author: Codex
Template: blocksy
Version: 1.0.0
Text Domain: blocksy-sidebar-child
*/

:root {
	--bsc-sidebar-width: 294px;
	--bsc-sidebar-bg: #141845;
	--bsc-sidebar-bg-alt: #1d225a;
	--bsc-sidebar-text: rgba(255, 255, 255, 0.82);
	--bsc-sidebar-heading: #ffffff;
	--bsc-accent: #ff8a1c;
	--bsc-accent-dark: #222c8f;
	--bsc-page-bg: #f6f7fb;
	--bsc-card-bg: #ffffff;
	--bsc-border: rgba(20, 24, 69, 0.08);
	--bsc-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
}

body.blocksy-sidebar-child-layout {
	background: var(--bsc-page-bg);
}

body.blocksy-sidebar-child-layout #main-container {
	min-height: 100vh;
}

.bsc-shell {
	display: flex;
	align-items: stretch;
	min-height: 100vh;
	background:
		radial-gradient(circle at top right, rgba(255, 138, 28, 0.1), transparent 32%),
	linear-gradient(180deg, #fbfcff 0%, #f5f7fc 100%);
}

.bsc-mobile-toggle,
.bsc-overlay {
	display: none;
}

.bsc-mobile-header {
	display: none;
}

.bsc-sidebar {
	position: sticky;
	top: 0;
	display: flex;
	flex-direction: column;
	width: var(--bsc-sidebar-width);
	min-width: var(--bsc-sidebar-width);
	height: 100vh;
	background:
		linear-gradient(180deg, var(--bsc-sidebar-bg) 0%, #11153f 100%);
	color: var(--bsc-sidebar-text);
	box-shadow: 20px 0 40px rgba(11, 16, 49, 0.12);
}

.bsc-brand {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 22px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bsc-brand-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: 16px;
	background: linear-gradient(135deg, #ff9d2f 0%, #ff7a00 100%);
	color: #10143d;
	box-shadow: 0 12px 24px rgba(255, 122, 0, 0.28);
	flex-shrink: 0;
}

.bsc-brand-mark svg {
	width: 28px;
	height: 28px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.bsc-brand-mark img,
.bsc-brand-mark .bsc-brand-image {
	width: 28px;
	height: 28px;
	object-fit: contain;
	border-radius: 8px;
	display: block;
}

.bsc-brand-text {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.bsc-site-title {
	margin: 0;
	color: var(--bsc-sidebar-heading);
	font-size: 1.25rem;
	line-height: 1.15;
	font-weight: 700;
	word-break: break-word;
}

.bsc-site-title a {
	color: inherit;
	text-decoration: none;
}

.bsc-site-tagline {
	margin: 0;
	color: rgba(255, 255, 255, 0.62);
	font-size: 0.83rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.bsc-sidebar-nav {
	padding: 18px 8px 24px;
	overflow-y: auto;
	flex: 1 1 auto;
}

.bsc-sidebar-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bsc-sidebar-nav li + li {
	margin-top: 6px;
}

.bsc-sidebar-nav .menu-item-has-children {
	position: relative;
}

.bsc-sidebar-nav a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	border-radius: 18px;
	color: var(--bsc-sidebar-text);
	font-size: 1rem;
	font-weight: 500;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.bsc-sidebar-nav a::before {
	content: "";
	width: 22px;
	height: 22px;
	border-radius: 7px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.04);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
	flex-shrink: 0;
}

.bsc-sidebar-nav a .bsc-menu-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	color: rgba(255, 255, 255, 0.9);
	flex-shrink: 0;
}

.bsc-sidebar-nav a .bsc-menu-icon svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.bsc-sidebar-nav a .bsc-menu-label {
	min-width: 0;
}

.bsc-sidebar-nav .bsc-has-icon > a::before {
	display: none;
}

.bsc-sidebar-nav a:hover,
.bsc-sidebar-nav .current-menu-item > a,
.bsc-sidebar-nav .current-menu-ancestor > a,
.bsc-sidebar-nav .current_page_item > a,
.bsc-sidebar-nav .current_page_ancestor > a {
	background: rgba(112, 126, 255, 0.2);
	color: #ffffff;
	transform: translateX(2px);
	box-shadow: inset 0 0 0 1px rgba(134, 147, 255, 0.18);
}

.bsc-submenu-toggle {
	position: absolute;
	top: 8px;
	right: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: rgba(255, 255, 255, 0.7);
	cursor: pointer;
}

.bsc-submenu-toggle span {
	position: absolute;
	width: 12px;
	height: 2px;
	border-radius: 999px;
	background: currentColor;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.bsc-submenu-toggle span:last-child {
	transform: rotate(90deg);
}

.bsc-submenu-open > .bsc-submenu-toggle span:last-child {
	transform: rotate(180deg);
	opacity: 0;
}

.bsc-sidebar-nav .sub-menu {
	margin: 8px 0 0;
	padding-left: 14px;
	display: none;
}

.bsc-sidebar-nav .bsc-submenu-open > .sub-menu {
	display: block;
}

.bsc-sidebar-nav .sub-menu a {
	padding-top: 10px;
	padding-bottom: 10px;
	border-radius: 14px;
	font-size: 0.95rem;
}

.bsc-sidebar-footer {
	padding: 18px 20px 22px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.58);
}

.bsc-sidebar-sections {
	padding: 0 16px 20px;
	display: grid;
	gap: 12px;
}

.bsc-sidebar-section {
	padding: 16px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.bsc-sidebar-section-button,
.bsc-sidebar-section-link {
	background: transparent;
	border-style: dashed;
}

.bsc-sidebar-section-card {
	background: linear-gradient(180deg, rgba(87, 104, 255, 0.18), rgba(255, 255, 255, 0.06));
}

.bsc-sidebar-section-title {
	margin: 0 0 6px;
	font-size: 0.98rem;
	line-height: 1.3;
	color: #ffffff;
}

.bsc-sidebar-section-text {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.72);
}

.bsc-sidebar-button,
.bsc-sidebar-inline-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 12px;
	text-decoration: none;
}

.bsc-sidebar-button {
	padding: 11px 14px;
	border-radius: 14px;
	background: linear-gradient(135deg, #ff982e 0%, #ff7b00 100%);
	color: #11153f;
	font-weight: 700;
}

.bsc-sidebar-inline-link {
	color: #ffffff;
	font-weight: 600;
	gap: 8px;
}

.bsc-sidebar-inline-link::after {
	content: ">";
	opacity: 0.8;
}

.bsc-page-shell {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
	padding: 0;
	position: relative;
	z-index: 1;
}

body.blocksy-sidebar-child-layout main#main {
	flex: 1 1 auto;
	padding: 42px 38px 48px;
}

body.blocksy-sidebar-child-layout [data-prefix="single_page"] .hero-section[data-type="type-2"],
body.blocksy-sidebar-child-layout [data-prefix="single_post"] .hero-section[data-type="type-2"],
body.blocksy-sidebar-child-layout .hero-section[data-type="type-2"] {
	margin-top: 0;
	border-radius: 0 0 26px 26px;
}

body.blocksy-sidebar-child-layout .ct-container-full,
body.blocksy-sidebar-child-layout .ct-container,
body.blocksy-sidebar-child-layout .ct-container-narrow {
	max-width: 100%;
}

body.blocksy-sidebar-child-layout .site-main > *:first-child,
body.blocksy-sidebar-child-layout main#main > *:first-child {
	margin-top: 0;
}

body.blocksy-sidebar-child-layout article,
body.blocksy-sidebar-child-layout .ct-comments,
body.blocksy-sidebar-child-layout .ct-related-posts-container {
	background: var(--bsc-card-bg);
	border: 1px solid var(--bsc-border);
	border-radius: 28px;
	box-shadow: var(--bsc-shadow);
}

body.blocksy-sidebar-child-layout article,
body.blocksy-sidebar-child-layout .ct-comments {
	padding: clamp(24px, 3vw, 36px);
}

body.blocksy-sidebar-child-layout #footer {
	margin: 0 38px 38px;
	padding: 0;
}

body.blocksy-sidebar-child-layout #footer > * {
	background: var(--bsc-card-bg);
	border: 1px solid var(--bsc-border);
	border-radius: 28px;
	box-shadow: var(--bsc-shadow);
}

@media (max-width: 999px) {
	:root {
		--bsc-sidebar-width: 100%;
	}

	.bsc-shell {
		display: block;
	}

	.bsc-mobile-header {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		z-index: 1002;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
		padding: 10px 14px;
		background: rgba(255, 255, 255, 0.98);
		border-bottom: 1px solid rgba(20, 24, 69, 0.08);
		box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
		backdrop-filter: blur(10px);
	}

	.bsc-mobile-brand {
		display: inline-flex;
		align-items: center;
		gap: 12px;
		min-width: 0;
		text-decoration: none;
		color: #1c2344;
	}

	.bsc-mobile-brand-mark {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 50px;
		height: 50px;
		border-radius: 14px;
		overflow: hidden;
		background: linear-gradient(135deg, #2b3aa8 0%, #4a5bd1 100%);
		flex-shrink: 0;
		box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
	}

	.bsc-mobile-brand-mark img,
	.bsc-mobile-brand-mark .bsc-brand-image {
		width: 28px;
		height: 28px;
		object-fit: contain;
		display: block;
	}

	.bsc-mobile-brand-mark svg {
		width: 24px;
		height: 24px;
		color: #ffffff;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.75;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

	.bsc-mobile-brand-text {
		display: grid;
		min-width: 0;
	}

	.bsc-mobile-brand-name {
		font-size: 1.08rem;
		line-height: 1.05;
		font-weight: 700;
		font-family: Georgia, "Times New Roman", serif;
		color: #151c38;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.bsc-mobile-brand-tagline {
		margin-top: 2px;
		font-size: 0.8rem;
		line-height: 1.2;
		text-transform: uppercase;
		letter-spacing: 0.12em;
		color: rgba(28, 35, 68, 0.58);
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.bsc-mobile-toggle {
		display: inline-flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 4px;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: 12px;
		background: transparent;
		box-shadow: none;
		flex-shrink: 0;
	}

	.bsc-mobile-toggle span {
		display: block;
		width: 22px;
		height: 2.5px;
		border-radius: 999px;
		background: #1a213f;
		transition: transform 0.2s ease, opacity 0.2s ease;
	}

	body.blocksy-sidebar-open .bsc-mobile-toggle span:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}

	body.blocksy-sidebar-open .bsc-mobile-toggle span:nth-child(2) {
		opacity: 0;
	}

	body.blocksy-sidebar-open .bsc-mobile-toggle span:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}

	.bsc-overlay {
		position: fixed;
		inset: 0;
		z-index: 1000;
		background: rgba(10, 14, 38, 0.52);
		backdrop-filter: blur(4px);
	}

	body.blocksy-sidebar-open .bsc-overlay {
		display: block;
	}

	.bsc-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		z-index: 1001;
		width: min(86vw, 320px);
		min-width: min(86vw, 320px);
		height: 100vh;
		transform: translateX(-100%);
		transition: transform 0.25s ease;
	}

	body.blocksy-sidebar-open .bsc-sidebar {
		transform: translateX(0);
	}

	.bsc-brand {
		padding: 22px 18px 20px;
	}

	.bsc-sidebar-nav {
		padding-top: 10px;
		padding-bottom: 18px;
	}

	.bsc-sidebar-sections {
		padding-bottom: 16px;
	}

	body.blocksy-sidebar-child-layout main#main {
		padding: 86px 18px 30px;
	}

	body.blocksy-sidebar-child-layout #footer {
		margin: 0 18px 18px;
	}
}

@media (max-width: 640px) {
	.bsc-brand {
		align-items: flex-start;
	}

	.bsc-mobile-toggle {
		width: 42px;
		height: 42px;
		border-radius: 10px;
	}

	.bsc-brand-mark {
		width: 46px;
		height: 46px;
		border-radius: 14px;
	}

	.bsc-site-title {
		font-size: 1.05rem;
	}

	.bsc-sidebar-nav a {
		padding: 12px 14px;
		font-size: 0.95rem;
	}
}
