/**
 * Bharat Sampark — Mobile App-Like Experience (Dainik Bhaskar Grade UI)
 */

@media (max-width: 991px) {
	body {
		padding-bottom: 60px; /* Space for sticky bottom navigation */
	}

	.bs-container {
		padding-left: 12px;
		padding-right: 12px;
	}

	.bs-home-block {
		padding: 16px 0;
	}

	.bs-section-header {
		margin-bottom: 12px;
		padding-bottom: 6px;
	}
	.bs-section-title {
		font-size: 18px;
	}

	/* Mobile Header */
	.bs-mobile-header {
		position: sticky;
		top: 0;
		z-index: 95;
		background: var(--bs-header-bg);
		border-bottom: 1px solid var(--bs-border);
		box-shadow: 0 1px 4px rgba(0,0,0,0.05);
	}
	.bs-mobile-header-inner {
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 54px;
		padding: 0 12px;
	}
	.bs-mobile-btn {
		background: transparent;
		border: none;
		font-size: 22px;
		color: var(--bs-secondary);
		cursor: pointer;
		width: 42px;
		height: 42px;
		display: flex;
		align-items: center;
		justify-content: center;
		position: relative;
	}
	.bs-hamburger-icon {
		display: flex;
		flex-direction: column;
		gap: 4.5px;
		width: 20px;
	}
	.bs-hamburger-icon span {
		display: block;
		height: 2px;
		width: 100%;
		background: var(--bs-secondary);
		border-radius: 2px;
	}
	.bs-mobile-logo-img {
		max-height: 36px;
		width: auto;
	}
	.bs-mobile-logo-text {
		font-size: 20px;
		font-weight: 900;
		letter-spacing: -0.3px;
		color: var(--bs-primary);
	}
	.bs-mobile-actions {
		display: flex;
		align-items: center;
		gap: 4px;
	}

	/* Responsive block layout overrides */
	.bs-mobile-layout-news_list .bs-layout-four-cards,
	.bs-mobile-layout-news_list .bs-layout-three-cards,
	.bs-mobile-layout-news_list .bs-layout-main-plus-list,
	.bs-mobile-layout-news_list .bs-layout-magazine-grid {
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	/* Exclude Hero Slider from being collapsed into a list on mobile */
	.bs-layout-hero-slider-wrap {
		display: flex;
		flex-direction: column;
		gap: 14px;
	}
	.bs-layout-hero-slider-wrap .bs-hero-primary-col {
		width: 100%;
	}
	.bs-layout-hero-slider-wrap .bs-hero-slider-container {
		position: relative;
		width: 100%;
		aspect-ratio: 16/9;
		min-height: 220px;
		max-height: 340px;
		display: block;
		overflow: hidden;
		border-radius: 8px;
	}
	.bs-layout-hero-slider-wrap .bs-card-hero {
		position: relative;
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
		border: none;
		padding: 0;
	}
	.bs-layout-hero-slider-wrap .bs-hero-image-wrap {
		position: absolute;
		top: 0; left: 0; right: 0; bottom: 0;
		width: 100%;
		height: 100%;
		order: unset;
	}
	.bs-layout-hero-slider-wrap .bs-hero-overlay {
		display: block;
		position: absolute;
		top: 0; left: 0; right: 0; bottom: 0;
		background: linear-gradient(180deg, rgba(15,23,42,0.05) 0%, rgba(15,23,42,0.7) 60%, rgba(15,23,42,0.96) 100%);
	}
	.bs-layout-hero-slider-wrap .bs-hero-content {
		position: relative;
		z-index: 2;
		padding: 14px;
		color: #ffffff;
		order: unset;
	}
	.bs-layout-hero-slider-wrap .bs-hero-title {
		font-size: 16px;
		font-weight: 700;
		color: #ffffff;
		margin: 4px 0;
		line-height: 1.35;
	}
	.bs-layout-hero-slider-wrap .bs-hero-title a {
		color: #ffffff;
	}

	.bs-mobile-layout-news_list .bs-card-grid,
	.bs-mobile-layout-news_list .bs-card-magazine,
	.bs-mobile-layout-news_list .bs-card-list {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		height: auto;
		min-height: auto;
		padding: 10px 12px;
		border: 1px solid var(--bs-border);
		background: #ffffff;
		border-radius: var(--bs-radius);
	}

	.bs-mobile-layout-news_list .bs-mag-img-wrap,
	.bs-mobile-layout-news_list .bs-card-thumb-wrap {
		width: 100px;
		height: 75px;
		min-width: 100px;
		max-width: 100px;
		flex-shrink: 0;
		border-radius: 6px;
		overflow: hidden;
		order: 2;
		aspect-ratio: 4/3;
	}
	.bs-mobile-layout-news_list .bs-card-thumb-wrap img,
	.bs-mobile-layout-news_list .bs-mag-img-wrap img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
	}
	.bs-mobile-layout-news_list .bs-card-badge-overlay,
	.bs-mobile-layout-news_list .bs-mag-overlay {
		display: none;
	}
	.bs-mobile-layout-news_list .bs-card-body,
	.bs-mobile-layout-news_list .bs-mag-content {
		position: static;
		padding: 0 12px 0 0;
		color: var(--bs-text);
		order: 1;
		flex: 1;
	}
	.bs-mobile-layout-news_list .bs-card-title,
	.bs-mobile-layout-news_list .bs-mag-title {
		font-size: 14px;
		font-weight: 700;
		line-height: 1.35;
		color: var(--bs-text);
		margin-bottom: 4px;
	}
	.bs-mobile-layout-news_list .bs-card-title a,
	.bs-mobile-layout-news_list .bs-mag-title a {
		color: var(--bs-text);
	}
	.bs-mobile-layout-news_list .bs-card-footer-meta {
		padding-top: 4px;
		border-top: none;
	}

	/* Section Header Alignment on Mobile */
	.bs-section-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 8px;
		margin-bottom: 12px;
		padding-bottom: 6px;
	}
	.bs-section-title-wrap {
		display: flex;
		align-items: center;
		gap: 8px;
		min-width: 0;
	}
	.bs-section-title {
		font-size: 17px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.bs-section-more-link {
		font-size: 12px;
		font-weight: 700;
		white-space: nowrap;
		flex-shrink: 0;
	}

	/* Sticky Mobile Bottom Navigation Bar */
	.bs-mobile-bottom-nav {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 100;
		background: #ffffff;
		border-top: 1px solid var(--bs-border);
		box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
		height: 56px;
	}
	.bs-bottom-nav-inner {
		display: flex;
		justify-content: space-around;
		align-items: center;
		height: 100%;
	}
	.bs-bottom-tab {
		background: transparent;
		border: none;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
		color: #64748b;
		cursor: pointer;
		padding: 6px 12px;
		min-width: 60px;
		position: relative;
	}
	.bs-bottom-icon {
		font-size: 18px;
		line-height: 1;
	}
	.bs-bottom-label {
		font-size: 10px;
		font-weight: 600;
	}
	.bs-bottom-tab.is-active,
	.bs-bottom-tab:hover {
		color: var(--bs-primary);
	}
	.bs-bottom-tab.is-active .bs-bottom-label {
		font-weight: 800;
	}

	.bs-bookmark-count-badge {
		position: absolute;
		top: 2px;
		right: 12px;
		background: var(--bs-primary);
		color: #ffffff;
		font-size: 9px;
		font-weight: 800;
		border-radius: 10px;
		padding: 1px 5px;
	}
}

/* -------------------------------------------------------------
 * Slide-out Drawer Panel
 * ------------------------------------------------------------- */
.bs-drawer-backdrop {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(15,23,42,0.6);
	backdrop-filter: blur(2px);
	z-index: 998;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}
.bs-drawer-backdrop.is-visible {
	opacity: 1;
	visibility: visible;
}

.bs-drawer-panel {
	position: fixed;
	top: 0; left: 0; bottom: 0;
	width: 320px;
	max-width: 85vw;
	background: #ffffff;
	z-index: 999;
	transform: translateX(-100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 5px 0 25px rgba(0,0,0,0.15);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}
.bs-drawer-panel.is-open {
	transform: translateX(0);
}
.bs-drawer-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid var(--bs-border);
	background: #f8fafc;
}
.bs-drawer-logo {
	max-height: 38px;
}
.bs-drawer-logo-text {
	font-size: 18px;
	font-weight: 900;
	color: var(--bs-primary);
}
.bs-drawer-close {
	background: transparent;
	border: none;
	font-size: 20px;
	color: #64748b;
	cursor: pointer;
	padding: 4px;
}
.bs-drawer-whatsapp-cta {
	padding: 12px 16px;
	background: #ecfdf5;
	border-bottom: 1px solid #a7f3d0;
}
.bs-wa-cta-btn {
	display: flex;
	align-items: center;
	gap: 10px;
}
.bs-wa-icon {
	font-size: 24px;
}
.bs-wa-text {
	display: flex;
	flex-direction: column;
	flex: 1;
}
.bs-wa-text strong {
	font-size: 13px;
	color: #065f46;
}
.bs-wa-text span {
	font-size: 11px;
	color: #047857;
}
.bs-wa-arrow {
	color: #059669;
	font-weight: bold;
}
.bs-drawer-content {
	padding: 20px;
	flex: 1;
}
.bs-drawer-heading {
	font-size: 14px;
	font-weight: 700;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 12px;
}
.bs-drawer-categories-list li a,
.bs-drawer-static-links li a {
	display: block;
	padding: 10px 12px;
	font-size: 15px;
	font-weight: 600;
	color: var(--bs-text);
	border-radius: 6px;
	margin-bottom: 4px;
}
.bs-drawer-categories-list li.is-active a,
.bs-drawer-categories-list li a:hover {
	background: var(--bs-primary-light);
	color: var(--bs-primary);
}
.bs-drawer-divider {
	border: 0;
	border-top: 1px solid var(--bs-border);
	margin: 20px 0;
}

/* -------------------------------------------------------------
 * Modals (Search & Bookmarks Sheets)
 * ------------------------------------------------------------- */
.bs-modal-overlay {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(15,23,42,0.7);
	backdrop-filter: blur(4px);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: all 0.25s ease;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 20px;
}
.bs-modal-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}
.bs-search-modal-inner,
.bs-bookmarks-modal-inner {
	background: #ffffff;
	width: 100%;
	max-width: 640px;
	border-radius: 12px;
	box-shadow: 0 20px 40px rgba(0,0,0,0.25);
	overflow: hidden;
	margin-top: 40px;
	animation: bsModalSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes bsModalSlide {
	from { transform: translateY(-20px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
	.bs-modal-overlay {
		padding: 0;
		align-items: flex-end;
	}
	.bs-search-modal-inner,
	.bs-bookmarks-modal-inner {
		margin-top: 0;
		border-radius: 16px 16px 0 0;
		max-height: 85vh;
		display: flex;
		flex-direction: column;
	}
}

.bs-search-header {
	padding: 16px 20px;
	border-bottom: 1px solid var(--bs-border);
}
.bs-search-modal-form {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f1f5f9;
	border-radius: 8px;
	padding: 6px 14px;
}
.bs-search-modal-input {
	flex: 1;
	border: none;
	background: transparent;
	font-size: 16px;
	outline: none;
	padding: 6px 0;
}
.bs-search-modal-close,
.bs-modal-close {
	background: transparent;
	border: none;
	font-size: 18px;
	color: #64748b;
	cursor: pointer;
	padding: 4px 8px;
}
.bs-search-body,
.bs-bookmarks-body {
	padding: 20px;
	max-height: 60vh;
	overflow-y: auto;
}
.bs-search-trending-tags {
	margin-bottom: 16px;
}
.bs-search-tag-title {
	font-size: 13px;
	font-weight: 700;
	color: #64748b;
	display: block;
	margin-bottom: 8px;
}
.bs-tags-pills-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.bs-tag-pill {
	background: #f1f5f9;
	padding: 5px 12px;
	border-radius: 15px;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
}
.bs-tag-pill:hover {
	background: var(--bs-primary);
	color: #ffffff;
}

/* Bookmarks Modal Title */
.bs-modal-title-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid var(--bs-border);
	background: #f8fafc;
}
.bs-modal-title-left {
	display: flex;
	align-items: center;
	gap: 8px;
}
.bs-modal-title-left h3 {
	font-size: 16px;
	font-weight: 700;
	margin: 0;
}
.bs-modal-title-right {
	display: flex;
	align-items: center;
	gap: 10px;
}
.bs-btn-clear-all {
	color: #ef4444;
	font-size: 13px;
	font-weight: 600;
	background: none;
	border: none;
	cursor: pointer;
}
.bs-bookmarks-empty-state {
	text-align: center;
	padding: 40px 20px;
	color: #64748b;
}
.bs-empty-icon {
	font-size: 40px;
	display: block;
	margin-bottom: 10px;
}
