/**
 * Multi Blocks CSS - News Steam
 * Modern responsive styles for Layout 1 to Layout 28, Matrix, Overlay & Trending
 * Adapted from GenerateNew & MbakyuPress magazine layouts
 */

.news-steam-multi-block {
	margin-bottom: 2.8rem;
	position: relative;
}

/* Fallback image when post has no featured image */
.news-steam-image-fallback {
	width: 100%;
	height: 100%;
	min-height: 180px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
	color: rgba(255, 255, 255, 0.4);
	position: relative;
	overflow: hidden;
}

.news-steam-image-fallback .fallback-letter {
	font-size: 3.5rem;
	font-weight: 800;
	opacity: 0.15;
	position: absolute;
	right: 15px;
	bottom: 5px;
	line-height: 1;
	user-select: none;
}

.news-steam-image-fallback .fallback-icon {
	font-size: 2rem;
	opacity: 0.5;
}

/* Block Header */
.ns-block-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 0.85rem;
	margin-bottom: 1.5rem;
	border-bottom: 2px solid #e2e8f0;
	position: relative;
	flex-wrap: wrap;
	gap: 10px;
}

.ns-block-header::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 60px;
	height: 3px;
	background: var(--primary-color, #ff9d23);
	border-radius: 3px;
}

.ns-block-header-title-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.ns-header-badge-bar {
	width: 5px;
	height: 24px;
	background: var(--primary-color, #ff9d23);
	border-radius: 4px;
	display: inline-block;
}

.ns-block-title {
	font-size: 1.45rem;
	font-weight: 800;
	margin: 0;
	line-height: 1.25;
	color: #0f172a;
	text-transform: capitalize;
}

.ns-block-subtitle {
	font-size: 0.88rem;
	color: #64748b;
	font-weight: 400;
	margin-left: 6px;
}

.ns-view-all-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.82rem;
	font-weight: 700;
	color: #0f172a;
	background: #f1f5f9;
	padding: 5px 14px;
	border-radius: 20px;
	transition: all 0.25s ease;
	text-decoration: none;
}

.ns-view-all-btn:hover {
	background: var(--primary-color, #ff9d23);
	color: #ffffff;
	transform: translateX(3px);
}

.ns-view-all-btn i {
	font-size: 0.72rem;
	transition: transform 0.2s ease;
}

/* Category Badge */
.ns-cat-badge {
	background: var(--primary-color, #ff9d23);
	color: #ffffff !important;
	font-size: 0.72rem;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: inline-block;
	text-decoration: none;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.ns-list-cat-label {
	display: inline-block;
	margin-bottom: 4px;
}

.ns-list-cat-label a {
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--primary-color, #ff9d23);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	text-decoration: none;
}

/* Metadata */
.ns-card-meta {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 0.8rem;
	color: #64748b;
	margin-bottom: 6px;
}

.ns-card-meta i {
	margin-right: 4px;
	color: #94a3b8;
}

/* ==============================================================
   CARDS GENERAL
   ============================================================== */

/* 1. HERO CARD */
.ns-card-hero-item {
	background: #ffffff;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid #f1f5f9;
	height: 100%;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ns-card-hero-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

.ns-card-hero-thumb {
	position: relative;
	aspect-ratio: 16 / 10;
	background: #0f172a;
	overflow: hidden;
}

.ns-card-hero-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}

.ns-card-hero-item:hover .ns-card-hero-thumb img {
	transform: scale(1.06);
}

.ns-card-badge-wrap {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
}

.ns-card-hero-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.ns-card-hero-title {
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1.3;
	margin: 0 0 10px 0;
}

.ns-card-hero-title a {
	color: #0f172a;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ns-card-hero-title a:hover {
	color: var(--primary-color, #ff9d23);
}

.ns-card-hero-excerpt {
	font-size: 0.92rem;
	color: #475569;
	line-height: 1.55;
	margin-top: 6px;
}

/* 2. LARGE CARD */
.ns-card-large-item {
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid #f1f5f9;
	transition: all 0.3s ease;
}

.ns-card-large-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.ns-card-large-thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #0f172a;
}

.ns-card-large-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.ns-card-large-item:hover .ns-card-large-thumb img {
	transform: scale(1.06);
}

.ns-card-large-body {
	padding: 14px;
}

.ns-card-large-title {
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 8px 0;
}

.ns-card-large-title a {
	color: #0f172a;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ns-card-large-title a:hover {
	color: var(--primary-color, #ff9d23);
}

/* 3. GRID (MEDIUM) CARD */
.ns-card-grid-item {
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid #f1f5f9;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ns-card-grid-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.ns-card-grid-thumb {
	position: relative;
	aspect-ratio: 16 / 10;
	background: #0f172a;
	overflow: hidden;
}

.ns-card-grid-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}

.ns-card-grid-item:hover .ns-card-grid-thumb img {
	transform: scale(1.06);
}

.ns-card-grid-body {
	padding: 14px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.ns-card-grid-title {
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 8px 0;
}

.ns-card-grid-title a {
	color: #0f172a;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ns-card-grid-title a:hover {
	color: var(--primary-color, #ff9d23);
}

.ns-card-grid-excerpt {
	font-size: 0.86rem;
	color: #475569;
	line-height: 1.5;
	margin-top: 4px;
}

/* 4. LIST CARD (CLASSIC) */
.ns-card-list-item {
	display: flex;
	gap: 16px;
	padding: 14px;
	border-radius: 10px;
	background: #ffffff;
	border: 1px solid #f1f5f9;
	margin-bottom: 12px;
	transition: all 0.25s ease;
	align-items: center;
}

.ns-card-list-item:hover {
	background: #f8fafc;
	transform: translateX(4px);
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.ns-card-list-thumb {
	width: 140px;
	height: 100px;
	flex-shrink: 0;
	border-radius: 8px;
	overflow: hidden;
	background: #0f172a;
}

.ns-card-list-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ns-card-list-body {
	flex: 1;
	min-width: 0;
}

.ns-card-list-title {
	font-size: 1.08rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 2px 0 6px 0;
}

.ns-card-list-title a {
	color: #0f172a;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ns-card-list-title a:hover {
	color: var(--primary-color, #ff9d23);
}

.ns-card-list-excerpt {
	font-size: 0.88rem;
	color: #475569;
	line-height: 1.45;
	margin-bottom: 6px;
}

/* 5. LIST SMALL (COMPACT) */
.ns-card-list-small {
	display: flex;
	gap: 12px;
	padding: 10px;
	border-radius: 8px;
	background: #ffffff;
	border: 1px solid #f1f5f9;
	margin-bottom: 8px;
	transition: all 0.25s ease;
	align-items: center;
}

.ns-card-list-small:hover {
	background: #f8fafc;
	transform: translateX(4px);
}

.ns-list-small-thumb {
	width: 85px;
	height: 65px;
	flex-shrink: 0;
	border-radius: 6px;
	overflow: hidden;
	background: #0f172a;
}

.ns-list-small-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ns-list-small-body {
	flex: 1;
	min-width: 0;
}

.ns-list-small-title {
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 2px 0 4px 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ns-list-small-title a {
	color: #0f172a;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ns-list-small-title a:hover {
	color: var(--primary-color, #ff9d23);
}

/* ==============================================================
   LAYOUT CONFIGURATIONS (Layout 1 - Layout 8 + Matrix)
   ============================================================== */

/* Layout 1: 1 Hero Left + 6 List Right */
.ns-layout-1-wrap {
	display: grid;
	grid-template-columns: 1.35fr 1fr;
	gap: 24px;
}

.ns-col-list {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

/* Layout 2: 2 Large Left + 4 Grid (2x2) Right */
.ns-layout-2-wrap {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.ns-col-stacked {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ns-col-2x2-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

/* Layout 3: 8 Equal Grid (4 Cols) */
.ns-grid-4-cols {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

/* Layout 4: Asymmetric (2 Hero Top + 3 Grid Bottom) */
.ns-layout-asymmetric-wrap {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ns-top-2-hero {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.ns-bottom-3-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

/* Layout 5: 1 Hero Left (Span 2) + 3 List Right */
.ns-layout-5-wrap {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 24px;
}

/* Layout 6: Centerpiece (2 List Left, 1 Hero Center, 2 List Right) */
.ns-layout-centerpiece-wrap {
	display: grid;
	grid-template-columns: 1fr 1.6fr 1fr;
	gap: 18px;
	align-items: center;
}

.ns-col-side {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* Layout 7: Carousel Slider */
.ns-slider-wrapper {
	position: relative;
}

.ns-posts-carousel .ns-carousel-slide {
	padding: 0 10px;
}

.ns-posts-carousel .slick-prev,
.ns-posts-carousel .slick-next {
	width: 42px;
	height: 42px;
	background: #ffffff;
	border-radius: 50%;
	z-index: 10;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
	transition: all 0.25s ease;
}

.ns-posts-carousel .slick-prev:hover,
.ns-posts-carousel .slick-next:hover {
	background: var(--primary-color, #ff9d23);
	color: #ffffff;
}

.ns-posts-carousel .slick-prev::before,
.ns-posts-carousel .slick-next::before {
	color: #0f172a;
	font-size: 20px;
	opacity: 1;
}

.ns-posts-carousel .slick-prev:hover::before,
.ns-posts-carousel .slick-next:hover::before {
	color: #ffffff;
}

.ns-posts-carousel .slick-prev { left: -15px; }
.ns-posts-carousel .slick-next { right: -15px; }

/* Layout 8: Classic List */
.ns-layout-classic-list {
	display: flex;
	flex-direction: column;
}

/* Matrix Layout (Layout 9 - 28) */
.ns-layout-matrix-wrap {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 24px;
}

.ns-layout-matrix-multi {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ns-matrix-heroes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 20px;
}

.ns-matrix-lists {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 14px;
}

/* Overlay Magazine Tiles */
.ns-overlay-tiles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
}

.ns-tile-item {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	background: #0f172a;
	min-height: 260px;
}

.ns-tile-bg-link {
	position: absolute;
	inset: 0;
	z-index: 1;
	overflow: hidden;
}

.ns-tile-bg-link img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.ns-tile-item:hover .ns-tile-bg-link img {
	transform: scale(1.08);
}

.ns-tile-overlay-gradient {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.45) 50%, rgba(15, 23, 42, 0.92) 100%);
}

.ns-tile-content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 18px;
	z-index: 2;
	pointer-events: none;
}

.ns-tile-content a {
	pointer-events: auto;
}

.ns-tile-category a {
	background: var(--primary-color, #ff9d23);
	color: #ffffff;
	font-size: 0.72rem;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
	text-transform: uppercase;
	display: inline-block;
	margin-bottom: 6px;
	text-decoration: none;
}

.ns-tile-title {
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 6px 0;
}

.ns-tile-title a {
	color: #ffffff;
	text-decoration: none;
	text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.ns-tile-meta {
	font-size: 0.78rem;
	color: rgba(255, 255, 255, 0.8);
}

/* Numbered Trending List */
.ns-numbered-list-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
}

.ns-numbered-item {
	display: flex;
	align-items: center;
	gap: 14px;
	background: #ffffff;
	border: 1px solid #f1f5f9;
	border-radius: 12px;
	padding: 12px;
	transition: all 0.25s ease;
}

.ns-numbered-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.ns-number-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: #f8fafc;
	border-radius: 10px;
	border: 1px solid #e2e8f0;
	flex-shrink: 0;
}

.ns-rank-num {
	font-size: 1.15rem;
	font-weight: 800;
	color: #0f172a;
	line-height: 1;
}

.ns-hot-icon {
	font-size: 0.65rem;
	color: #ef4444;
	margin-top: 2px;
}

.ns-numbered-thumb {
	width: 80px;
	height: 60px;
	border-radius: 8px;
	overflow: hidden;
	flex-shrink: 0;
	background: #0f172a;
}

.ns-numbered-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ns-numbered-content {
	flex: 1;
	min-width: 0;
}

.ns-numbered-title {
	font-size: 0.95rem;
	font-weight: 700;
	margin: 2px 0 4px 0;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ns-numbered-title a {
	color: #0f172a;
	text-decoration: none;
}

/* ==============================================================
   RESPONSIVE QUERIES
   ============================================================== */
@media (max-width: 1024px) {
	.ns-grid-4-cols {
		grid-template-columns: repeat(2, 1fr);
	}
	.ns-layout-centerpiece-wrap {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 860px) {
	.ns-layout-1-wrap,
	.ns-layout-2-wrap,
	.ns-layout-5-wrap,
	.ns-layout-matrix-wrap {
		grid-template-columns: 1fr;
	}
	.ns-top-2-hero,
	.ns-bottom-3-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.ns-grid-4-cols,
	.ns-col-2x2-grid {
		grid-template-columns: 1fr;
	}
	.ns-card-list-item {
		flex-direction: column;
		align-items: flex-start;
	}
	.ns-card-list-thumb {
		width: 100%;
		height: 160px;
	}
}

/* ==============================================================
   ARCHIVE SEBELUM & SESUDAH LIST SPECIFIC
   ============================================================== */
.ns-archive-block-before {
	margin-top: 1rem;
	margin-bottom: 2.2rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px dashed #cbd5e1;
}

.ns-archive-block-after {
	margin-top: 2.5rem;
	margin-bottom: 2rem;
	padding-top: 1.5rem;
	border-top: 1px dashed #cbd5e1;
}

/* ==============================================================
   DARK MODE COMPATIBILITY
   ============================================================== */
.dark-mode .ns-block-title { color: #f8fafc; }
.dark-mode .ns-view-all-btn { background: #1e293b; color: #e2e8f0; }

.dark-mode .ns-card-hero-item,
.dark-mode .ns-card-large-item,
.dark-mode .ns-card-grid-item,
.dark-mode .ns-card-list-item,
.dark-mode .ns-card-list-small,
.dark-mode .ns-numbered-item {
	background: #1e293b;
	border-color: #334155;
}

.dark-mode .ns-card-hero-title a,
.dark-mode .ns-card-large-title a,
.dark-mode .ns-card-grid-title a,
.dark-mode .ns-card-list-title a,
.dark-mode .ns-list-small-title a,
.dark-mode .ns-numbered-title a,
.dark-mode .ns-rank-num {
	color: #f1f5f9;
}

.dark-mode .ns-card-meta,
.dark-mode .ns-block-subtitle { color: #94a3b8; }
.dark-mode .ns-card-hero-excerpt,
.dark-mode .ns-card-grid-excerpt,
.dark-mode .ns-card-list-excerpt { color: #cbd5e1; }
.dark-mode .ns-number-badge { background: #0f172a; border-color: #334155; }
