/**
 * Bharat Sampark — Homepage Dynamic Blocks, Sliders & Layouts
 */

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

/* Card Base */
.bs-card-grid,
.bs-card-list,
.bs-card-compact,
.bs-card-magazine,
.bs-card-hero {
	position: relative;
	background: #ffffff;
	border-radius: var(--bs-radius);
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* -------------------------------------------------------------
 * Layout A: Hero Grid & Interactive Hero Slider
 * ------------------------------------------------------------- */
.bs-layout-hero-grid {
	display: grid;
	grid-template-columns: 1.65fr 1fr;
	gap: 20px;
	align-items: stretch;
}
@media (max-width: 900px) {
	.bs-layout-hero-grid {
		grid-template-columns: 1fr;
	}
}

.bs-hero-primary-col {
	position: relative;
	width: 100%;
}

.bs-hero-slider-container {
	position: relative;
	width: 100%;
	aspect-ratio: 16/9;
	min-height: 380px;
	max-height: 520px;
	border-radius: var(--bs-radius-lg);
	overflow: hidden;
	background: #0f172a;
}
@media (max-width: 768px) {
	.bs-hero-slider-container {
		min-height: 220px;
		max-height: 360px;
		aspect-ratio: 16/9;
	}
}

.bs-hero-slider-track {
	position: relative;
	width: 100%;
	height: 100%;
}

.bs-hero-slide-item {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.45s ease-in-out, visibility 0.45s ease-in-out;
	z-index: 1;
	pointer-events: none;
}
.bs-hero-slide-item.is-active {
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
	z-index: 3;
	pointer-events: auto;
}

.bs-card-hero {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.bs-hero-image-wrap {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	overflow: hidden;
}
.bs-hero-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}
.bs-card-hero:hover .bs-hero-img {
	transform: scale(1.03);
}
.bs-hero-overlay {
	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-hero-content {
	position: relative;
	z-index: 2;
	padding: 24px;
	color: #ffffff;
}
@media (max-width: 768px) {
	.bs-hero-content {
		padding: 14px 16px;
	}
}
.bs-hero-title {
	font-size: 24px;
	font-weight: 800;
	line-height: 1.35;
	margin: 8px 0;
	color: #ffffff;
}
@media (max-width: 768px) {
	.bs-hero-title {
		font-size: 17px;
		line-height: 1.3;
		margin: 6px 0;
	}
}
.bs-hero-title a {
	color: #ffffff;
}
.bs-hero-title a:hover {
	color: var(--bs-accent);
}
.bs-hero-subtitle {
	font-size: 14px;
	color: #e2e8f0;
	line-height: 1.5;
	margin-bottom: 12px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
@media (max-width: 768px) {
	.bs-hero-subtitle {
		display: none;
	}
}
.bs-card-meta-bottom {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 13px;
	color: #cbd5e1;
}

/* Hero Slider Arrows */
.bs-hero-nav-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 15;
	background: rgba(15,23,42,0.7);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	color: #ffffff;
	border: 1px solid rgba(255,255,255,0.3);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	line-height: 1;
	padding-bottom: 2px;
}
.bs-hero-nav-arrow:hover {
	background: var(--bs-primary);
	border-color: var(--bs-primary);
	transform: translateY(-50%) scale(1.1);
}
.bs-hero-prev {
	left: 14px;
}
.bs-hero-next {
	right: 14px;
}
@media (max-width: 768px) {
	.bs-hero-nav-arrow {
		width: 32px;
		height: 32px;
		font-size: 18px;
	}
	.bs-hero-prev {
		left: 8px;
	}
	.bs-hero-next {
		right: 8px;
	}
}

/* Hero Slider Dots */
.bs-hero-dots-wrap {
	position: absolute;
	bottom: 16px;
	right: 20px;
	z-index: 15;
	display: flex;
	gap: 6px;
	align-items: center;
}
@media (max-width: 768px) {
	.bs-hero-dots-wrap {
		bottom: 12px;
		right: 14px;
	}
}
.bs-hero-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255,255,255,0.45);
	border: none;
	cursor: pointer;
	padding: 0;
	transition: all 0.25s ease;
}
.bs-hero-dot.is-active {
	background: var(--bs-primary);
	width: 22px;
	border-radius: 5px;
}

.bs-hero-secondary-col {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* -------------------------------------------------------------
 * Layout B & C: Four Cards & Three Cards Grids
 * ------------------------------------------------------------- */
.bs-layout-four-cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}
.bs-layout-three-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

@media (max-width: 1024px) {
	.bs-layout-four-cards {
		grid-template-columns: repeat(2, 1fr);
	}
	.bs-layout-three-cards {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 600px) {
	.bs-layout-four-cards,
	.bs-layout-three-cards {
		grid-template-columns: 1fr;
	}
}

.bs-card-grid {
	border: 1px solid var(--bs-border);
	display: flex;
	flex-direction: column;
}
.bs-card-grid:hover {
	box-shadow: var(--bs-shadow);
	transform: translateY(-2px);
}
.bs-card-thumb-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16/9;
	overflow: hidden;
	background: #0f172a;
}
.bs-card-thumb-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.bs-card-grid:hover .bs-card-thumb-wrap img {
	transform: scale(1.04);
}
.bs-card-badge-overlay {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
}
.bs-card-body {
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.bs-card-header-meta {
	margin-bottom: 6px;
}
.bs-card-title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	margin-bottom: 12px;
	flex: 1;
}
.bs-card-footer-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	color: var(--bs-text-muted);
	padding-top: 10px;
	border-top: 1px solid #f1f5f9;
}
.bs-quick-bookmark {
	background: transparent;
	border: none;
	cursor: pointer;
	font-size: 15px;
	padding: 2px 4px;
	border-radius: 3px;
	color: #94a3b8;
	transition: all 0.15s;
}
.bs-quick-bookmark:hover {
	color: var(--bs-primary);
}

/* -------------------------------------------------------------
 * Layout D: Main + List
 * ------------------------------------------------------------- */
.bs-layout-main-plus-list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}
@media (max-width: 850px) {
	.bs-layout-main-plus-list {
		grid-template-columns: 1fr;
	}
}
.bs-list-col {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Horizontal List Card */
.bs-card-list {
	display: flex;
	gap: 14px;
	padding: 12px;
	border: 1px solid var(--bs-border);
	align-items: center;
}
.bs-card-list:hover {
	box-shadow: var(--bs-shadow-sm);
	border-color: #cbd5e1;
}
.bs-card-list-thumb {
	width: 120px;
	height: 85px;
	flex-shrink: 0;
	border-radius: 4px;
	overflow: hidden;
}
.bs-card-list-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.bs-card-list-content {
	flex: 1;
}
.bs-card-list-meta-top {
	margin-bottom: 4px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.bs-card-list-title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	margin-bottom: 6px;
}
.bs-card-list-meta-bottom {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	color: var(--bs-text-muted);
}

/* -------------------------------------------------------------
 * Layout E: Compact News Feed List (App-like Feed)
 * ------------------------------------------------------------- */
.bs-layout-news-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.bs-card-compact {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	border: 1px solid var(--bs-border);
	background: #ffffff;
}
.bs-card-compact:hover {
	border-color: #cbd5e1;
	background: #fdfdfd;
}
.bs-compact-left {
	flex: 1;
}
.bs-compact-badge-wrap {
	margin-bottom: 4px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.bs-compact-title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	margin-bottom: 6px;
}
.bs-compact-footer {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 12px;
	color: var(--bs-text-muted);
}
.bs-quick-share {
	background: transparent;
	border: none;
	cursor: pointer;
	color: #64748b;
	font-size: 16px;
}
.bs-compact-right {
	width: 95px;
	height: 72px;
	flex-shrink: 0;
	border-radius: 6px;
	overflow: hidden;
}
.bs-compact-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* -------------------------------------------------------------
 * Layout F: Magazine Visual Grid
 * ------------------------------------------------------------- */
.bs-layout-magazine-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	grid-auto-rows: 240px;
	gap: 16px;
}
@media (max-width: 900px) {
	.bs-layout-magazine-grid {
		grid-template-columns: 1fr 1fr;
		grid-auto-rows: 200px;
	}
}
@media (max-width: 550px) {
	.bs-layout-magazine-grid {
		grid-template-columns: 1fr;
		grid-auto-rows: auto;
	}
}
.bs-mag-item.bs-mag-lead {
	grid-row: span 2;
}
.bs-card-magazine {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 180px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}
.bs-mag-img-wrap {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
}
.bs-mag-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.bs-mag-overlay {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: linear-gradient(180deg, transparent 20%, rgba(15,23,42,0.92) 100%);
}
.bs-mag-content {
	position: relative;
	z-index: 2;
	padding: 16px;
	color: #ffffff;
}
.bs-mag-title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	margin: 6px 0;
	color: #ffffff;
}
.bs-mag-time {
	font-size: 12px;
	color: #cbd5e1;
}

/* -------------------------------------------------------------
 * Layout G: Category Carousel Slider (Smooth, No Scrollbars)
 * ------------------------------------------------------------- */
.bs-category-carousel-wrapper {
	position: relative;
	width: 100%;
	padding: 0 4px;
}

.bs-category-carousel-track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	padding: 6px 2px 14px 2px;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE/Edge */
}
.bs-category-carousel-track::-webkit-scrollbar {
	display: none; /* Chrome/Safari/Brave */
}

.bs-carousel-card-item {
	flex: 0 0 calc(25% - 12px);
	min-width: 250px;
}
@media (max-width: 1024px) {
	.bs-carousel-card-item {
		flex: 0 0 calc(33.333% - 11px);
		min-width: 230px;
	}
}
@media (max-width: 768px) {
	.bs-carousel-card-item {
		flex: 0 0 calc(75% - 10px);
		min-width: 210px;
	}
}

.bs-carousel-nav-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	background: #ffffff;
	border: 1px solid var(--bs-border);
	box-shadow: 0 4px 14px rgba(0,0,0,0.18);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #0f172a;
	transition: all 0.2s ease;
	line-height: 1;
	padding-bottom: 2px;
}
.bs-carousel-nav-btn:hover {
	background: var(--bs-primary);
	color: #ffffff;
	border-color: var(--bs-primary);
	transform: translateY(-50%) scale(1.1);
}
.bs-carousel-nav-prev {
	left: -18px;
}
.bs-carousel-nav-next {
	right: -18px;
}
@media (max-width: 768px) {
	.bs-carousel-nav-prev {
		left: -8px;
	}
	.bs-carousel-nav-next {
		right: -8px;
	}
}

/* -------------------------------------------------------------
 * Advertisements & CLS Prevention
 * ------------------------------------------------------------- */
.bs-ad-slot {
	background: #f8fafc;
	border: 1px dashed var(--bs-border);
	border-radius: var(--bs-radius);
	padding: 10px;
	margin: 20px auto;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.bs-ad-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--bs-text-muted);
	margin-bottom: 6px;
	font-weight: 600;
}
.bs-ad-content {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
}
.bs-ad-image-link img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	margin: 0 auto;
}
.bs-ad-header_top {
	min-height: 90px;
	max-width: 728px;
}
.bs-ad-below_header {
	min-height: 90px;
	max-width: 970px;
}
.bs-ad-below_hero,
.bs-ad-between_blocks {
	min-height: 90px;
	max-width: 970px;
}
.bs-ad-sidebar_top,
.bs-ad-sidebar_bottom {
	min-height: 250px;
	max-width: 300px;
}
.bs-ad-article_top,
.bs-ad-article_middle,
.bs-ad-article_bottom {
	min-height: 100px;
	max-width: 728px;
}
.bs-sticky-mobile-banner {
	position: fixed;
	bottom: 56px;
	left: 0;
	right: 0;
	z-index: 85;
	background: #ffffff;
	border-top: 1px solid var(--bs-border);
	box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
	margin: 0;
	padding: 4px 0;
	min-height: 50px;
}
