/* Blog: sekcija na početnoj (kartice u vodoravnom nizu sa trakom napretka, po uzoru na rei.com), stranica Blog i članak. */

.sw-blog {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: var(--sw-container);
	margin: 0 auto;
	padding: 20px;
}

.sw-blog .sw-blog__head {
	padding: 0;
}

.sw-blog__track {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.sw-blog__track::-webkit-scrollbar {
	display: none;
}

.sw-blog__card {
	display: flex;
	flex: 0 0 calc((100% - 40px) / 3);
	flex-direction: column;
	gap: 14px;
	padding: 20px;
	border-radius: 12px;
	background-color: var(--e-global-color-primary);
	color: #fff;
	scroll-snap-align: start;
}

.sw-blog__image {
	display: block;
	overflow: hidden;
	border-radius: 8px;
	aspect-ratio: 4 / 3;
	background-color: rgba(255, 255, 255, 0.08);
}

.sw-blog__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.sw-blog__card:hover .sw-blog__image img {
	transform: scale(1.03);
}

.sw-blog__title {
	margin: 6px 0 0;
	font-family: var(--e-global-typography-primary-font-family), sans-serif;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.25;
	text-transform: uppercase;
}

.sw-blog__title a {
	color: #fff;
	text-decoration: none;
}

.sw-blog__excerpt {
	flex: 1;
	margin: 0;
	color: rgba(255, 255, 255, 0.88);
	font-family: var(--e-global-typography-text-font-family), sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

.sw-blog__button {
	align-self: flex-start;
	padding: 10px 22px;
	border-radius: 8px;
	background-color: #fff;
	color: var(--e-global-color-primary);
	font-family: var(--e-global-typography-text-font-family), sans-serif;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
}

.sw-blog__button:hover,
.sw-blog__button:focus {
	background-color: #039ee3;
	color: #fff;
}

.sw-blog__progress {
	position: relative;
	height: 3px;
	border-radius: 3px;
	background-color: #e6e1d8;
}

.sw-blog__progress span {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	border-radius: 3px;
	background-color: var(--e-global-color-primary);
	transition: left 0.1s linear;
}

@media (max-width: 1024px) {
	.sw-blog__card {
		flex-basis: calc((100% - 20px) / 2);
	}
}

@media (max-width: 767px) {
	.sw-blog {
		padding: 10px;
	}

	.sw-blog__track {
		gap: 14px;
	}

	.sw-blog__card {
		flex-basis: 84%;
		padding: 16px;
	}

	.sw-blog__title {
		font-size: 20px;
	}
}

/* ---- Stranica Blog (svi članci) ---- */

.sw-posts {
	max-width: var(--sw-container);
	margin: 0 auto;
	padding: 20px;
}

.sw-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.sw-posts .sw-blog__card {
	flex-basis: auto;
}

.sw-posts__empty {
	padding: 40px 0;
	text-align: center;
}

.sw-posts .sw-pagination {
	margin-top: 30px;
}

@media (max-width: 1024px) {
	.sw-posts__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.sw-posts {
		padding: 10px;
	}

	.sw-posts__grid {
		grid-template-columns: 1fr;
	}
}

/* ---- Članak ---- */

.sw-article {
	max-width: 820px;
	margin: 0 auto;
	padding: 30px 20px 50px;
}

.sw-article__meta {
	margin: 0 0 20px;
	color: #6b6b6b;
	font-size: 14px;
	text-align: center;
}

.sw-article__image {
	overflow: hidden;
	margin: 0 0 30px;
	border-radius: 12px;
}

.sw-article__image img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 480px;
	object-fit: cover;
}

.sw-article__content {
	color: var(--e-global-color-text);
	font-size: 17px;
	line-height: 1.7;
}

.sw-article__content h2,
.sw-article__content h3 {
	margin: 1.6em 0 0.6em;
	color: var(--e-global-color-primary);
	font-family: var(--e-global-typography-primary-font-family), sans-serif;
	text-transform: uppercase;
}

.sw-article__content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.sw-article__content a {
	color: var(--e-global-color-secondary);
}

.sw-article__back {
	display: inline-block;
	margin-top: 30px;
}
