/* home.css */

.section-home {
	padding-top: 28px;
}

.section-home .home-top-container {
	margin-bottom: 32px;
}

/** Headline Grid **/
.home-headline-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-template-rows: repeat(2, 220px);
	gap: 16px;
}

.home-headline-item {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
	isolation: isolate;
	border-radius: var(--rs-radius);
	background-color: var(--rs-space);
	box-shadow: var(--rs-shadow);
}

.home-headline-item-main {
	grid-column: span 2;
	grid-row: span 2;
}

.home-headline-image {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s ease;
}

.home-headline-item:hover .home-headline-image {
	transform: scale(1.05);
}

/* The overlay is not positioned so the title's stretched link covers the whole card. */
.home-headline-overlay {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 60px 18px 18px;
	background: linear-gradient(to top, rgba(8, 11, 28, .94) 0%, rgba(8, 11, 28, .6) 55%, transparent 100%);
	color: #fff;
}

.home-headline-overlay .post-category-badge {
	align-self: flex-start;
	background-color: var(--rs-brand);
	color: #fff;
}

.home-headline-title {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.45;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.home-headline-title a {
	color: #fff !important;
}

.home-headline-item-main .home-headline-overlay {
	padding: 90px 26px 24px;
}

.home-headline-item-main .home-headline-title {
	font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
	-webkit-line-clamp: 3;
}

.home-headline-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	color: rgba(255, 255, 255, .75);
	font-size: .8rem;
}

.home-headline-meta i {
	margin-right: 5px;
}

/* Fill the grid nicely when there are less than 5 headline posts. */
.home-headline-count-1 {
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: 440px;
}

.home-headline-count-1 .home-headline-item-main {
	grid-column: auto;
	grid-row: auto;
}

.home-headline-count-2 .home-headline-item:not(.home-headline-item-main) {
	grid-column: span 2;
	grid-row: span 2;
}

.home-headline-count-3 .home-headline-item:not(.home-headline-item-main),
.home-headline-count-4 .home-headline-item:last-child {
	grid-column: span 2;
}

@media (max-width: 991.98px) {
	.home-headline-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: 340px;
		grid-auto-rows: 200px;
	}

	.home-headline-item-main {
		grid-column: span 2;
		grid-row: auto;
	}

	.home-headline-count-1 {
		grid-template-columns: minmax(0, 1fr);
	}

	.home-headline-count-1 .home-headline-item-main {
		grid-column: auto;
	}

	.home-headline-count-2 .home-headline-item:not(.home-headline-item-main) {
		grid-row: auto;
	}

	.home-headline-count-3 .home-headline-item:not(.home-headline-item-main) {
		grid-column: auto;
	}
}

@media (max-width: 575.98px) {
	.section-home {
		padding-top: 18px;
	}

	.home-headline-grid {
		gap: 10px;
		grid-template-rows: 250px;
		grid-auto-rows: 160px;
	}

	.home-headline-overlay {
		padding: 40px 12px 12px;
		gap: 6px;
	}

	.home-headline-item-main .home-headline-overlay {
		padding: 60px 16px 16px;
	}

	.home-headline-title {
		font-size: .9rem;
	}

	.home-headline-item:not(.home-headline-item-main) .home-headline-meta,
	.home-headline-item:not(.home-headline-item-main) .post-category-badge {
		display: none;
	}
}

/** Category Tabs **/
.section-home .home-bottom-container {
	position: relative;
	padding: 8px 20px 24px;
	border: 1px solid var(--rs-border);
	border-radius: var(--rs-radius);
	background-color: var(--rs-surface);
	box-shadow: var(--rs-shadow-sm);
}

.home-tabs-scroller {
	margin: 0 -20px 18px;
	padding: 0 12px;
	border-bottom: 1px solid var(--rs-border);
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.home-tabs-scroller::-webkit-scrollbar {
	display: none;
}

.home-tabs {
	flex-wrap: nowrap;
	gap: 2px;
	border: 0;
}

.home-tabs .nav-link {
	position: relative;
	padding: 14px 14px;
	border: 0;
	border-radius: 0;
	background-color: transparent;
	color: var(--rs-text-muted);
	font-weight: 600;
	white-space: nowrap;
}

.home-tabs .nav-link::after {
	content: '';
	position: absolute;
	right: 14px;
	bottom: -1px;
	left: 14px;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: var(--rs-brand-gradient);
	transform: scaleX(0);
	transition: transform .25s ease;
}

.home-tabs .nav-link:hover {
	color: var(--rs-text);
}

.home-tabs .nav-link.active {
	color: var(--rs-text);
	background-color: transparent;
}

.home-tabs .nav-link.active::after {
	transform: scaleX(1);
}

.home-bottom-showallcat-container {
	display: block;
	position: relative;
	margin-top: 24px;
	text-align: center;
}

.home-bottom-showallcat {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 26px;
	border-radius: 999px;
	background-color: var(--rs-primary-soft);
	color: var(--rs-primary) !important;
	font-weight: 600;
}

.home-bottom-showallcat:hover {
	background-color: var(--rs-brand);
	color: #fff !important;
}

@media (max-width: 575.98px) {
	.section-home .home-bottom-container {
		padding: 4px 12px 18px;
	}

	.home-tabs-scroller {
		margin: 0 -12px 14px;
		padding: 0 4px;
	}

	.home-tabs .nav-link {
		padding: 12px 12px;
	}
}
