/**
 * MIDHATI — Global site sidebar (white card design)
 * Desktop: fixed panel on the right, same position on every page.
 * Tablet/mobile: collapsible band above footer.
 */

.midhati-global-sidebar {
	position: relative;
	z-index: 200;
}

/* No gold/navy shell header — widgets are self-contained cards */
.midhati-global-sidebar::before {
	display: none !important;
	content: none !important;
}

/* ---- Desktop: fixed panel on the right ---- */
@media (min-width: 1280px) {
	body.midhati-has-global-sidebar {
		--midhati-sidebar-width: 292px;
		--midhati-sidebar-reserve: calc(var(--midhati-sidebar-width) + 32px); /* width + right gap */
		overflow-x: hidden;
	}

	body.midhati-has-global-sidebar .midhati-global-sidebar {
		position: fixed;
		top: calc(var(--header-height, 140px) + 16px);
		right: 16px;
		width: var(--midhati-sidebar-width);
		max-height: none;
		overflow: visible;
		pointer-events: none;
	}

	body.midhati-has-global-sidebar .midhati-global-sidebar__toggle {
		display: none !important;
	}

	body.midhati-has-global-sidebar .midhati-global-sidebar__panel {
		display: block !important;
		pointer-events: auto;
		overflow: visible;
		max-height: none;
	}

	/*
	 * Shrink main content column so fixed sidebar never covers content.
	 * Footer stays full-width and slides over the sidebar when scrolling.
	 */
	body.midhati-has-global-sidebar #content,
	body.midhati-has-global-sidebar .site-content {
		width: calc(100% - var(--midhati-sidebar-reserve));
		max-width: calc(100% - var(--midhati-sidebar-reserve));
		box-sizing: border-box;
	}

	body.midhati-has-global-sidebar .midhati-site-footer {
		position: relative;
		z-index: 250;
	}
}

/* ---- Tablet / mobile: band above footer ---- */
@media (max-width: 1279px) {
	.midhati-global-sidebar {
		background: var(--color-off-white, #f4f6f9);
		border-top: 1px solid var(--color-gold-border, rgba(201, 163, 45, 0.3));
		padding: 0 24px 40px;
	}

	.midhati-global-sidebar__toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		max-width: 1120px;
		margin: 0 auto;
		padding: 16px 0;
		background: none;
		border: none;
		border-bottom: 1px solid var(--color-gold-border, rgba(201, 163, 45, 0.3));
		font-family: var(--font-ui, 'Inter', sans-serif);
		font-size: 1rem;
		font-weight: 700;
		color: var(--color-navy-section, #1B3A61);
		cursor: pointer;
		text-align: left;
	}

	.midhati-global-sidebar__toggle::after {
		content: "+";
		font-size: 1.4rem;
		color: var(--color-gold, #C9A32D);
		line-height: 1;
	}

	.midhati-global-sidebar.is-open .midhati-global-sidebar__toggle::after {
		content: "−";
	}

	.midhati-global-sidebar__panel {
		display: none;
		max-width: 1120px;
		margin: 0 auto;
		padding-top: 20px;
	}

	.midhati-global-sidebar.is-open .midhati-global-sidebar__panel {
		display: block;
	}

	.midhati-global-sidebar__panel .midhati-blog-sidebar {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}
}

@media (max-width: 767px) {
	.midhati-global-sidebar {
		padding: 0 20px 32px;
	}

	.midhati-global-sidebar__panel .midhati-blog-sidebar {
		grid-template-columns: 1fr;
	}
}

/* ---- Sidebar widgets (white cards, navy headings) ---- */

.midhati-blog-sidebar {
	display: block;
}

.midhati-sidebar-widget {
	background: #fff;
	border: 1px solid var(--color-gold-border, rgba(201, 163, 45, 0.35));
	border-top: 3px solid var(--color-gold, #C9A32D);
	border-radius: 8px;
	padding: 20px 18px;
	margin-bottom: 16px;
	box-shadow: 0 2px 16px rgba(12, 31, 57, 0.06);
}

.midhati-sidebar-widget__title {
	font-family: var(--font-heading);
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--color-navy-section, #1B3A61);
	margin: 0 0 12px;
	line-height: 1.25;
	letter-spacing: 0.02em;
}

.midhati-sidebar-widget__title::before {
	display: none !important;
	content: none !important;
}

.midhati-sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.midhati-sidebar-list__item {
	border-bottom: 1px solid rgba(201, 163, 45, 0.2);
}

.midhati-sidebar-list__item:last-child {
	border-bottom: none;
}

.midhati-sidebar-list__link {
	display: block;
	padding: 10px 0;
	text-decoration: none;
	color: inherit;
	transition: color 0.2s ease;
}

.midhati-sidebar-list__link:hover .midhati-sidebar-list__label {
	color: var(--color-gold-hover, #b8891f);
}

.midhati-sidebar-list__label {
	display: block;
	font-family: var(--font-ui, 'Inter', sans-serif);
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--color-navy-section, #1B3A61);
	line-height: 1.35;
	margin-bottom: 3px;
}

.midhati-sidebar-list__meta {
	display: block;
	font-family: var(--font-ui, 'Inter', sans-serif);
	font-size: 0.76rem;
	color: var(--color-text-muted, #6b7280);
}

.midhati-sidebar-list__excerpt {
	display: block;
	font-family: var(--font-ui, 'Inter', sans-serif);
	font-size: 0.8rem;
	color: var(--color-text-muted, #6b7280);
	line-height: 1.4;
	margin-top: 2px;
}

.midhati-sidebar-list--texts .midhati-sidebar-list__item:first-child .midhati-sidebar-list__link {
	padding-top: 0;
}

.midhati-sidebar-more {
	display: inline-block;
	margin-top: 8px;
	font-family: var(--font-ui, 'Inter', sans-serif);
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--color-navy-section, #1B3A61);
	text-decoration: none;
}

.midhati-sidebar-more:hover {
	color: var(--color-gold-hover, #b8891f);
}

.midhati-sidebar-empty {
	font-size: 0.88rem;
	color: var(--color-text-muted, #6b7280);
	margin: 0;
	line-height: 1.5;
}

.midhati-sidebar-widget--cta {
	background: var(--color-off-white, #f4f6f9);
}

.midhati-sidebar-widget--cta p {
	font-size: 0.9rem;
	color: var(--color-text-dark, #2e2e2e);
	line-height: 1.55;
	margin: 0 0 14px;
}

.midhati-sidebar-cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 11px 14px;
	border-radius: 999px;
	background: var(--color-gold, #C9A32D);
	color: var(--color-navy-section, #1B3A61);
	font-family: var(--font-ui, 'Inter', sans-serif);
	font-size: 0.86rem;
	font-weight: 700;
	text-decoration: none;
	text-align: center;
	transition: background 0.2s ease;
}

.midhati-sidebar-cta-btn:hover {
	background: var(--color-gold-hover, #b8891f);
	color: var(--color-navy-section, #1B3A61);
}

@media (max-width: 1279px) {
	.midhati-sidebar-widget {
		margin-bottom: 0;
	}
}
