.lgw-category-template {
	--lgw-category-navy: #0c2340;
	--lgw-category-blue: #2563eb;
	--lgw-category-text: #1a1a2e;
	--lgw-category-muted: #5c6578;
	--lgw-category-border: #e8ecf1;
	--lgw-category-soft: #f7f9fc;
	--lgw-category-shadow: 0 10px 30px rgba(12, 35, 64, 0.08);
	width: min(1180px, calc(100% - 40px));
	margin: 44px auto 72px;
	color: var(--lgw-category-text);
}

.lgw-category-template *,
.lgw-category-template *::before,
.lgw-category-template *::after {
	box-sizing: border-box;
}

.lgw-category-template-page .site-content {
	display: block;
}

.lgw-category-hero,
.lgw-category-posts,
.lgw-category-related-cta {
	background: #fff;
	border: 1px solid var(--lgw-category-border);
	border-radius: 18px;
	box-shadow: var(--lgw-category-shadow);
}

.lgw-category-hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	margin-bottom: 30px;
	padding: 48px;
}

.lgw-category-hero__eyebrow {
	margin: 0 0 10px;
	color: var(--lgw-category-blue);
	font-size: 13px;
	font-weight: 800;
	line-height: 1.2;
	text-transform: uppercase;
}

.lgw-category-hero__title {
	margin: 0;
	color: var(--lgw-category-navy);
	font-size: 46px;
	font-weight: 850;
	letter-spacing: 0;
	line-height: 1.15;
}

.lgw-category-hero__desc {
	max-width: 680px;
	margin: 16px 0 0;
	color: var(--lgw-category-muted);
	font-size: 18px;
	line-height: 1.75;
}

.lgw-category-hero__button,
.lgw-category-search__button,
.lgw-category-related-cta__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--lgw-category-navy);
	border: 0;
	border-radius: 12px;
	color: #fff;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

.lgw-category-hero__button {
	min-height: 48px;
	padding: 13px 18px;
	font-size: 15px;
}

.lgw-category-hero__button:hover,
.lgw-category-hero__button:focus,
.lgw-category-search__button:hover,
.lgw-category-search__button:focus,
.lgw-category-related-cta__button:hover,
.lgw-category-related-cta__button:focus {
	background: var(--lgw-category-blue);
	color: #fff;
	text-decoration: none;
}

.lgw-category-posts {
	margin-bottom: 30px;
	padding: 30px;
}

.lgw-category-posts__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 22px;
	margin-bottom: 20px;
}

.lgw-category-posts__head h2 {
	margin: 0;
	color: var(--lgw-category-navy);
	font-size: 22px;
	font-weight: 850;
	line-height: 1.3;
}

.lgw-category-search {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.lgw-category-search__select,
.lgw-category-search__input {
	min-height: 42px;
	background: #fff;
	border: 1px solid var(--lgw-category-border);
	border-radius: 10px;
	color: var(--lgw-category-text);
	font-size: 14px;
	line-height: 1.3;
}

.lgw-category-search__select {
	width: 132px;
	padding: 0 12px;
}

.lgw-category-search__input {
	width: min(260px, 28vw);
	padding: 0 14px;
}

.lgw-category-search__button {
	min-height: 42px;
	padding: 10px 16px;
	font-size: 14px;
	cursor: pointer;
}

.lgw-category-table-wrap {
	overflow-x: auto;
	border-top: 1px solid var(--lgw-category-border);
}

.lgw-category-table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
}

.lgw-category-table th,
.lgw-category-table td {
	padding: 18px 16px;
	border: 0;
	border-bottom: 1px solid var(--lgw-category-border);
	text-align: left;
	vertical-align: middle;
}

.lgw-category-table th {
	color: var(--lgw-category-navy);
	font-size: 14px;
	font-weight: 850;
	line-height: 1.3;
}

.lgw-category-table tbody tr:hover {
	background: var(--lgw-category-soft);
}

.lgw-category-table__type {
	width: 150px;
	color: var(--lgw-category-muted);
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}

.lgw-category-table__title a {
	color: #111827;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.45;
	text-decoration: none;
}

.lgw-category-table__title a:hover,
.lgw-category-table__title a:focus {
	color: var(--lgw-category-navy);
	text-decoration: none;
}

.lgw-category-table__title time {
	display: block;
	margin-top: 6px;
	color: #7a8496;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

.lgw-category-card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.lgw-category-post-card {
	margin: 0;
}

.lgw-category-post-card__link {
	display: flex;
	min-height: 260px;
	padding: 26px;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--lgw-category-border);
	border-radius: 18px;
	box-shadow: var(--lgw-category-shadow);
	color: inherit;
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.lgw-category-post-card__link:hover,
.lgw-category-post-card__link:focus {
	color: inherit;
	text-decoration: none;
}

.lgw-category-post-card__badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	margin-bottom: 14px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(37, 99, 235, 0.08);
	color: var(--lgw-category-blue);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
}

.lgw-category-post-card__title {
	margin: 0 0 12px;
	font-size: 20px;
	line-height: 1.4;
	font-weight: 800;
	color: var(--lgw-category-navy);
}

.lgw-category-post-card__excerpt {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	font-size: 15px;
	line-height: 1.7;
	color: var(--lgw-category-muted);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.lgw-category-post-card__date {
	margin-top: auto;
	padding-top: 24px;
	font-size: 14px;
	font-weight: 600;
	color: #7a8496;
}

@media (hover: hover) and (min-width: 769px) {
	.lgw-category-post-card__link:hover,
	.lgw-category-post-card__link:focus {
		border-color: rgba(37, 99, 235, 0.35);
		box-shadow: 0 18px 42px rgba(12, 35, 64, 0.14);
		transform: translateY(-5px);
	}
}

.lgw-category-pagination {
	display: flex;
	justify-content: center;
	margin-top: 24px;
}

.lgw-category-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.lgw-category-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 8px 12px;
	background: #fff;
	border: 1px solid var(--lgw-category-border);
	border-radius: 10px;
	color: var(--lgw-category-muted);
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
}

.lgw-category-pagination .page-numbers.current,
.lgw-category-pagination a.page-numbers:hover,
.lgw-category-pagination a.page-numbers:focus {
	background: var(--lgw-category-navy);
	border-color: var(--lgw-category-navy);
	color: #fff;
	text-decoration: none;
}

.lgw-category-empty {
	margin: 0;
	padding: 28px;
	background: var(--lgw-category-soft);
	border-radius: 14px;
	color: var(--lgw-category-muted);
	text-align: center;
}

.lgw-category-related-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	padding: 38px;
}

.lgw-category-related-cta h2 {
	margin: 0;
	color: var(--lgw-category-navy);
	font-size: 28px;
	font-weight: 850;
	letter-spacing: 0;
	line-height: 1.3;
}

.lgw-category-related-cta p {
	max-width: 620px;
	margin: 10px 0 0;
	color: var(--lgw-category-muted);
	font-size: 16px;
	line-height: 1.75;
}

.lgw-category-related-cta__button {
	flex: 0 0 auto;
	min-height: 48px;
	padding: 13px 18px;
	font-size: 15px;
}

@media (max-width: 900px) {
	.lgw-category-template {
		width: min(100% - 32px, 1180px);
		margin-top: 30px;
	}

	.lgw-category-hero,
	.lgw-category-posts__head,
	.lgw-category-related-cta {
		align-items: stretch;
		flex-direction: column;
	}

	.lgw-category-hero {
		padding: 34px 28px;
	}

	.lgw-category-hero__title {
		font-size: 36px;
	}

	.lgw-category-hero__desc {
		font-size: 16px;
	}

	.lgw-category-hero__button,
	.lgw-category-related-cta__button {
		width: 100%;
	}

	.lgw-category-search {
		display: grid;
		grid-template-columns: 1fr;
	}

	.lgw-category-search__select,
	.lgw-category-search__input,
	.lgw-category-search__button {
		width: 100%;
	}

	.lgw-category-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.lgw-category-template {
		width: min(100% - 40px, 1180px);
		margin-bottom: 52px;
	}

	.lgw-category-posts,
	.lgw-category-related-cta {
		padding: 24px;
	}

	.lgw-category-table thead {
		display: none;
	}

	.lgw-category-table,
	.lgw-category-table tbody,
	.lgw-category-table tr,
	.lgw-category-table td {
		display: block;
		width: 100%;
	}

	.lgw-category-table tr {
		padding: 16px 0;
		border-bottom: 1px solid var(--lgw-category-border);
	}

	.lgw-category-table td {
		padding: 0;
		border-bottom: 0;
	}

	.lgw-category-table__type {
		margin-bottom: 8px;
		font-size: 13px;
	}

	.lgw-category-table__title a {
		font-size: 16px;
	}

	.lgw-category-card-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.lgw-category-post-card__link {
		padding: 18px;
	}

	.lgw-category-post-card__title {
		font-size: 18px;
	}
}
