/* ===== Сетка решений ===== */
.sfw-grid-holder {
	position: relative;
}

.sfw-grid {
	display: grid;
	grid-template-columns: repeat(var(--sfw-columns, 3), 1fr);
	gap: 30px;
	align-items: stretch;
}

@media (max-width: 1024px) {
	.sfw-grid {
		grid-template-columns: repeat(var(--sfw-columns-tablet, 2), 1fr);
		gap: 20px;
	}
}

@media (max-width: 768px) {
	.sfw-grid {
		grid-template-columns: repeat(var(--sfw-columns-mobile, 1), 1fr);
	}
}

/* ===== Карточка ===== */
.sfw-item {
	display: flex;
	height: 100%;
}

.sfw-item-inner {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.sfw-item-inner:hover {
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
	transform: translateY(-4px);
}

.sfw-item-thumb {
	display: block;
	flex-shrink: 0;
	overflow: hidden;
	background-color: #f0f0f0;
	aspect-ratio: 16 / 9;
}

.sfw-item-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.sfw-item-inner:hover .sfw-item-thumb img {
	transform: scale(1.08);
}

.sfw-item-info {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 18px 18px 24px;
	min-height: 0;
}

.sfw-item-title {
	margin-bottom: 6px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
	
	/* Ограничение заголовка 2 строками */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	min-height: calc(17px * 1.4 * 2);
}

.sfw-item-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.sfw-item-title a:hover {
	color: #007cba;
}

.sfw-item-cats {
	margin-top: 2px;
	font-size: 13px;
	opacity: 0.7;
	
	/* Ограничение категорий 1 строкой */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sfw-item-cats a {
	color: inherit;
	text-decoration: none;
}

.sfw-item-cats a:hover {
	opacity: 1;
}

.sfw-item-excerpt {
	margin-top: 12px;
	font-size: 14px;
	line-height: 1.6;
	color: #555;
	
	/* Ограничение описания 3 строками */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	flex-shrink: 0;
}

/* ===== Кнопка "Подробнее" (опционально) ===== */
.sfw-item-more {
	margin-top: auto;
	padding-top: 15px;
}

.sfw-item-more a {
	display: inline-block;
	font-size: 14px;
	font-weight: 500;
	color: #007cba;
	text-decoration: none;
	transition: all 0.3s ease;
}

.sfw-item-more a::after {
	content: " →";
	transition: transform 0.3s ease;
	display: inline-block;
}

.sfw-item-more a:hover::after {
	transform: translateX(4px);
}

/* ===== Фильтры (стиль подчёркивания, как в портфолио) ===== */
.sfw-filters {
	margin-bottom: 35px;
}

.sfw-filters-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sfw-filters-list > li > a {
	position: relative;
	display: inline-block;
	padding: 5px 0;
	text-transform: uppercase;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.5px;
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

.sfw-filters-list > li > a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 2px;
	background-color: currentColor;
	transition: width 0.3s ease;
}

.sfw-filters-list > li.wd-active > a {
	color: #007cba;
}

.sfw-filters-list > li.wd-active > a::after,
.sfw-filters-list > li > a:hover::after {
	width: 100%;
}

.sfw-filters-list > li > a:hover {
	color: #007cba;
}

/* ===== Загрузка ===== */
.sfw-loader {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: none;
	background-color: rgba(255, 255, 255, 0.75);
	backdrop-filter: blur(2px);
}

.sfw-loading .sfw-loader {
	display: block;
}

.sfw-loading .sfw-grid {
	opacity: 0.3;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.sfw-loader-spinner {
	position: sticky;
	top: 45%;
	display: block;
	margin: 40px auto;
	width: 36px;
	height: 36px;
	border: 3px solid rgba(0, 0, 0, 0.1);
	border-top-color: #007cba;
	border-radius: 50%;
	animation: sfw-spin 0.7s linear infinite;
}

@keyframes sfw-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ===== Прочее ===== */
.sfw-empty {
	grid-column: 1 / -1;
	padding: 60px 0;
	text-align: center;
	font-size: 16px;
	color: #888;
}

.sfw-load-more-wrapper {
	margin-top: 40px;
	text-align: center;
}

.sfw-load-more-wrapper .button {
	padding: 12px 40px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 30px;
	transition: all 0.3s ease;
}

.sfw-load-more-wrapper .button:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.sfw-pagination-links ul {
	display: flex;
	justify-content: center;
	gap: 8px;
	list-style: none;
	margin: 30px 0 0;
	padding: 0;
}

.sfw-pagination-links ul li a,
.sfw-pagination-links ul li span {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	background: #fff;
	color: #333;
	text-decoration: none;
	transition: all 0.3s ease;
}

.sfw-pagination-links ul li a:hover {
	background: #f5f5f5;
	border-color: #ccc;
}

.sfw-pagination-links ul li span.current {
	background: #007cba;
	border-color: #007cba;
	color: #fff;
}