/**
 * =========================================================
 * BLOG
 * =========================================================
 */

.section-blog {
	padding: 80px 0 100px;
}


/**
 * =========================================================
 * HEADER
 * =========================================================
 */

.section-blog .blog-header {
	margin-bottom: 45px;
}

.section-blog .blog-header > .heading {
	margin: 0 0 18px;
}

.section-blog .blog-header > .text {
	max-width: 760px;
	margin: 0 0 30px;
}


/**
 * =========================================================
 * CATEGORIES
 * =========================================================
 */

.blog-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 30px;
}

.blog-categories .button {
	background: transparent;
	border: 1px solid rgba(20, 54, 66, .18);
	color: var(--th-color-primary);
}

.blog-categories .button:hover,
.blog-categories .button:focus,
.blog-categories .button.is-active {
	background: var(--th-color-primary);
	border-color: var(--th-color-primary);
	color: #fff;
}


/**
 * =========================================================
 * TOOLBAR
 * =========================================================
 */

.blog-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 25px;
	margin-bottom: 35px;
}

.blog-results {
	color: var(--th-color-muted);
}


/**
 * =========================================================
 * TAG FILTER
 * =========================================================
 */

.blog-tag-filter {
	width: 100%;
	max-width: 260px;
}

.blog-tag-filter .field-input {
	width: 100%;
}


/**
 * =========================================================
 * GRID
 * =========================================================
 */

.blog-grid {
	margin-top: 0;
}


/**
 * =========================================================
 * POST CARD
 * =========================================================
 */

/**
 * =========================================================
 * BLOG POST CARD
 * =========================================================
 */

.card-post {
	position: relative;
	overflow: hidden;
	background: #fff;
	border-radius: 28px;
	box-shadow: 0 18px 45px rgba(20, 54, 66, .08);
}


/**
 * Link.
 */
.card-post .card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: var(--th-color-text);
	text-decoration: none;
}


/**
 * Image.
 */
.card-post .card-media {
	position: relative;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 0;
}

.card-post .card-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.card-post:hover .card-image {
	transform: scale(1.04);
}


/**
 * Content.
 */
.card-post .card-content {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1;
	padding: 52px 40px 38px;
}


/**
 * Category.
 *
 * Liigub pildi ja sisu piiri peale.
 */
.card-post-category {
	position: absolute;
	top: 0;
	left: 40px;
	transform: translateY(-50%);

	display: inline-flex;
	align-items: center;

	min-height: 44px;
	padding: 0 16px;

	background: var(--th-color-primary);
	border-radius: 8px;

	color: #fff;

	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .08em;
	text-transform: none;
}


/**
 * Heading.
 */
.card-post .heading {
	margin: 0 0 20px;
}


/**
 * Excerpt.
 */
.card-post .text {
	margin: 0 0 25px;
}


/**
 * Date.
 */
.card-post-meta {
	margin-top: auto;
	padding-top: 5px;

	color: var(--th-color-muted);

	font-size: 13px;
	line-height: 1.4;
}


/**
 * =========================================================
 * MOBILE
 * =========================================================
 */

@media (max-width: 700px) {

	.card-post {
		border-radius: 22px;
	}

	.card-post .card-content {
		padding:
			45px
			24px
			28px;
	}

	.card-post-category {
		left: 24px;
		min-height: 40px;
		padding: 0 14px;
		font-size: 13px;
	}

}


/**
 * =========================================================
 * PAGINATION
 * =========================================================
 */

.blog-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 70px;
}

.blog-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: 1px solid rgba(20, 54, 66, .15);
	border-radius: 10px;
	color: var(--th-color-primary);
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition:
		background-color .2s ease,
		color .2s ease,
		border-color .2s ease;
}

.blog-pagination a.page-numbers:hover,
.blog-pagination .page-numbers.current {
	background: var(--th-color-primary);
	border-color: var(--th-color-primary);
	color: #fff;
}


/**
 * =========================================================
 * EMPTY STATE
 * =========================================================
 */

.blog-empty {
	padding: 70px 0;
	text-align: center;
}

.blog-empty .heading {
	margin-bottom: 10px;
}


/**
 * =========================================================
 * TABLET
 * =========================================================
 */

@media (max-width: 900px) {

	.section-blog {
		padding: 70px 0 85px;
	}

	.blog-toolbar {
		margin-bottom: 30px;
	}

}


/**
 * =========================================================
 * MOBILE
 * =========================================================
 */

@media (max-width: 700px) {

	.section-blog {
		padding: 55px 0 70px;
	}

	.section-blog .blog-header {
		margin-bottom: 35px;
	}

	.section-blog .blog-header > .text {
		margin-bottom: 24px;
	}

	.blog-categories {
		gap: 8px;
		margin-top: 24px;
	}

	.blog-toolbar {
		align-items: stretch;
		flex-direction: column;
		gap: 15px;
		margin-bottom: 30px;
	}

	.blog-tag-filter {
		max-width: none;
	}

	.card-post .card-content {
		padding-top: 16px;
	}

	.blog-pagination {
		margin-top: 50px;
	}

}