/* /cards/ — полная ширина, стиль как у ИИ-карточек */

.page-cards .header__logo-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	text-decoration: none;
}

.page-cards .header__logo {
	flex-shrink: 0;
}

.page-cards .header__logo-suffix {
	flex-shrink: 0;
	margin-top: 6px;
	font-weight: 700;
	font-size: 17px;
	line-height: 1;
	color: #000c2d;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.page-cards a.header__button-login.fhhhei {
	margin-right: 0;
}

.page-cards .header__top-menu > .top-menu__item {
	margin-top: 1px;
}

@media screen and (min-width: 951px) {
	.page-cards .header__top-menu > .top-menu__item {
		margin-top: 11px;
	}
}

@media screen and (max-width: 950px) {
	.page-cards .header__logo-link {
		grid-column: 1 / 2;
		max-width: calc(100vw - 200px);
	}

	.page-cards .header__logo-suffix {
		font-size: 15px;
	}

	.page-cards .header__search {
		grid-column: 1 / -1;
		width: 100%;
		box-sizing: border-box;
	}

	.page-cards .header__search .form-search {
		flex: 1;
		min-width: 0;
		width: 100%;
	}

	.page-cards .header__search .search__input {
		flex: 1;
		width: auto;
		min-width: 0;
	}
}

@media screen and (max-width: 420px) {
	.page-cards .header__logo-link {
		gap: 6px;
		max-width: calc(100vw - 180px);
	}

	.page-cards .header__logo-suffix {
		font-size: 13px;
	}
}

body.page-cards {
	display: grid;
	grid-template-columns: 1fr minmax(0, 1060px) 1fr;
	grid-template-rows: auto 1fr auto;
	min-height: 100vh;
	min-height: 100dvh;
}

body.page-cards .header {
	grid-column: 1 / -1;
}

body.page-cards .content-sidebar.content-sidebar--full {
	grid-column: 2 / 3;
	grid-row: 2 / 3;
	width: 100%;
	max-width: none;
	align-items: stretch;
	align-self: start;
	padding-bottom: 48px;
	box-sizing: border-box;
}

body.page-cards footer.main5-footer {
	grid-column: 1 / -1;
	grid-row: 3 / 4;
}

.page-cards #dle-content {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.cards-page {
	width: 100%;
}

.cards-page__toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 36px;
}

.cards-page__nav {
	flex: 1 1 auto;
	min-width: 0;
}

.cards-page__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	align-items: center;
	line-height: 1.4;
}

.cards-page__pill {
	display: inline-block;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 0;
	font-size: .95rem;
	font-weight: 400;
	line-height: 1.4;
	color: #5a6474;
	background: none;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.15s;
}

.cards-page__pill:hover {
	color: #111827;
	background: none;
	border: none;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.cards-page__pill.is-active {
	color: #111827;
	font-weight: 600;
	background: none;
	border: none;
	text-decoration: none;
}

.cards-page__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex-shrink: 0;
}

.cards-page__actions .ii-test-btn-secondary {
	text-decoration: none;
}

.cards-page__body {
	width: 100%;
}

.cards-page--info .article2 {
	box-shadow: none;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafa;
}

.cards-page__list {
	display: grid;
	gap: 12px;
	margin-bottom: 8px;
}

.cards-page__item {
	display: block;
	padding: 16px 18px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafa;
	color: inherit;
	transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.cards-page__item:hover {
	border-color: rgba(0, 96, 137, 0.28);
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.cards-page__item-title {
	margin: 0 0 8px;
	font-size: 1.15rem;
	line-height: 1.35;
	font-weight: 700;
}

.cards-page__item-link {
	color: #111827;
	text-decoration: none;
}

.cards-page__item-link:hover {
	color: #006089;
}

.cards-page__item-meta {
	margin: 0 0 8px;
	font-size: .875rem;
	color: #5a6474;
}

.cards-page__item-meta a {
	color: #006089;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.cards-page__item-meta a:hover {
	color: #004f70;
}

.cards-page__item-desc {
	margin: 0;
	font-size: .95rem;
	line-height: 1.45;
	color: #374151;
}

.cards-page__description {
	margin: 0 0 18px;
	padding: 14px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafa;
	line-height: 1.45;
	color: #374151;
}

.cards-page__manage {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 20px 0 12px;
}

.cards-page__manage-delete {
	color: #b91c1c;
	border-color: #fecaca;
	background: #fef2f2;
}

.cards-page__manage-delete:hover {
	background: #fee2e2;
	border-color: #fca5a5;
}

/* Пагинация: в style.css у .bottom-nav opacity: 0 */
.page-cards .bottom-nav {
	opacity: 1;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #e5e7eb;
}

.page-cards .nav-load {
	margin-bottom: 12px;
}

.page-cards .nav-load a,
.page-cards .bottom-nav > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	border: 2px solid #006089;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	color: #006089;
	background: #f9fafa;
	text-decoration: none;
}

.page-cards .nav-load a:hover,
.page-cards .bottom-nav > a:hover {
	background: #006089;
	color: #ffeded;
}

.page-cards .navigation {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 12px;
}

.page-cards .navigation a,
.page-cards .navigation span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 8px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	font-size: 14px;
	text-decoration: none;
}

.page-cards .navigation a {
	color: #006089;
	background: #fff;
}

.page-cards .navigation a:hover {
	border-color: rgba(0, 96, 137, 0.35);
	background: rgba(0, 96, 137, 0.05);
}

.page-cards .navigation span {
	color: #fff;
	background: #006089;
	border-color: #006089;
	font-weight: 700;
}

.page-cards .navigation .nav_ext {
	border: none;
	background: transparent;
	color: #5a6474;
	min-width: 0;
	padding: 0 4px;
}

.cards-page--form .ii-plan-card,
.cards-page--form .alert {
	max-width: none;
}

.cards-page--form .vcard-form {
	position: relative;
	background: #f9fafa;
	padding: 16px;
	margin-bottom: 16px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
}

.cards-page--form .vcard-form__btn_delete {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid #fecaca;
	border-radius: 4px;
	background: #fef2f2;
	color: #b91c1c;
	font: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.cards-page--form .vcard-form__btn_delete:hover {
	background: #fee2e2;
	border-color: #fca5a5;
}

.cards-page--form .vcard-form__header {
	border-bottom: 1px solid #e5e7eb;
	padding-bottom: 10px;
	font-weight: 700;
	color: #006089;
}

.cards-page--form .vcard-form__body .form-group {
	margin-top: 14px;
}

.cards-page--form .cards-page__form-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
}

.cards-page--form .cards-page__form-actions .ii-test-btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 4px 14px;
	font: inherit;
	font-size: 13px;
	line-height: 1.35;
	box-sizing: border-box;
	vertical-align: middle;
}

.cards-page--form .alert_error {
	color: #721c24;
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	border-radius: 8px;
	padding: .75rem 1rem;
	margin: 0 0 16px;
}

@media screen and (max-width: 1120px) {
	body.page-cards {
		grid-template-columns: 20px minmax(0, 1fr) 20px;
	}

	body.page-cards .content-sidebar.content-sidebar--full {
		grid-column: 2 / 3;
	}
}

@media screen and (max-width: 720px) {
	body.page-cards {
		grid-template-columns: 16px minmax(0, 1fr) 16px;
	}

	.cards-page__toolbar {
		margin-left: -16px;
		margin-right: -16px;
		margin-bottom: 28px;
	}

	.cards-page__nav {
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		overscroll-behavior-x: contain;
	}

	.cards-page__nav::-webkit-scrollbar {
		display: none;
	}

	.cards-page__categories {
		flex-wrap: nowrap;
		width: max-content;
		min-width: 100%;
		padding: 0 16px 2px;
		gap: 12px;
	}

	.cards-page__pill {
		flex-shrink: 0;
		font-size: .9rem;
	}

	.cards-page__actions {
		padding: 0 16px;
	}
}
