.articles {
	background: var(--dr-hug-bg);
	font-family: var(--dr-hug-font-family);
	padding: 0 0 100px;
}

.articles__inner {
	max-width: var(--dr-hug-content-width);
	margin: 0 auto;
	padding: 0 var(--dr-hug-content-gutter);
}

.articles__section {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding-top: 0;
}

.articles .dr-hug-breadcrumbs {
	margin: 0;
}

.articles__title {
	margin: 0;
	font-size: var(--dr-hug-font-size-xxl);
	font-weight: var(--dr-hug-font-weight-bold);
	line-height: 1.4;
	color: var(--dr-hug-black);
}

.poleznoe-categories-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	width: 100%;
}

.poleznoe-category-card {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	height: 272px;
	overflow: hidden;
	border-radius: 24px;
	background: var(--card-bg, var(--dr-hug-primary-warm-ivory));
	text-decoration: none;
	color: inherit;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dr-hug-card-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	border-radius: inherit;
	overflow: hidden;
}

.dr-hug-card-bg__color {
	position: absolute;
	inset: 0;
	background: var(--card-bg, transparent);
}

.dr-hug-card-bg__graphic {
	position: absolute;
	inset: 0;
	background: var(--card-graphic, color-mix(in srgb, var(--card-bg, #ede1da) 80%, white));
	-webkit-mask-size: cover;
	mask-size: cover;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

.poleznoe-category-card--no-image {
	grid-template-columns: 1fr;
}

.poleznoe-category-card__block {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 24px 12px 24px 24px;
}

.poleznoe-category-card__title {
	margin: 0;
	width: 100%;
	font-size: 28px;
	font-weight: var(--dr-hug-font-weight-bold);
	line-height: 1.4;
	color: var(--dr-hug-black);
}

.poleznoe-category-card__media {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	align-self: stretch;
	padding: 0 24px 0 12px;
	min-height: 0;
}

.poleznoe-category-card__img {
	position: relative;
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
}

.poleznoe-category-card__img img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center bottom;
	pointer-events: none;
}

.articles__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}

.articles__empty {
	margin: 0;
	font-size: var(--dr-hug-font-size-base);
	font-weight: var(--dr-hug-font-weight-medium);
	color: var(--dr-hug-grey);
}

.article-card {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr);
	min-height: 354px;
	border-radius: 24px;
	background: var(--dr-hug-white);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.article-card--no-image {
	grid-template-columns: 1fr;
}

.article-card--feature,
.article-card--palette {
	background: var(--card-bg, var(--dr-hug-feature-tone-0));
}

.article-card--feature {
	min-height: 272px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-card--tone-0 {
	--card-bg: var(--dr-hug-feature-tone-0);
}

.article-card--tone-1 {
	--card-bg: var(--dr-hug-feature-tone-1);
}

.article-card--tone-2 {
	--card-bg: var(--dr-hug-feature-tone-2);
}

.article-card--tone-3 {
	--card-bg: var(--dr-hug-feature-tone-3);
}

.article-card--feature .article-card__body,
.article-card--palette .article-card__body {
	position: relative;
	z-index: 1;
}

.article-card--feature .article-card__media,
.article-card--palette .article-card__media {
	position: relative;
	z-index: 1;
}

.article-card--feature .article-card__body {
	padding: 24px 4px 24px 24px;
}

.article-card--feature .article-card__title {
	font-family: var(--dr-hug-font-family);
	font-size: 28px;
	font-weight: var(--dr-hug-font-weight-bold);
	line-height: 1.4;
}

.article-card--feature .article-card__description {
	font-family: var(--dr-hug-font-family);
	font-size: var(--dr-hug-font-size-base);
	font-weight: var(--dr-hug-font-weight-medium);
	line-height: 1.4;
	color: var(--dr-hug-black);
	opacity: 1;
}

.article-card--feature .article-card__image {
	min-height: 272px;
	object-fit: contain;
}

.article-card--related.article-card--tone-0 {
	--card-bg: var(--dr-hug-related-tone-0);
}

.article-card--related.article-card--tone-1 {
	--card-bg: var(--dr-hug-related-tone-1);
}

.article-card--related.article-card--tone-2 {
	--card-bg: var(--dr-hug-related-tone-2);
}

.article-card--related.article-card--tone-3 {
	--card-bg: var(--dr-hug-related-tone-0);
}

.article-card--related .article-card__title,
.article-card--related .article-card__description,
.article-card--text-light .article-card__title,
.article-card--text-light .article-card__description {
	color: var(--dr-hug-white);
	opacity: 1;
}

.article-card--palette.article-card--text-light .article-card__button {
	background: transparent;
	border-color: var(--dr-hug-white);
	color: var(--dr-hug-white);
}

.article-card.is-hidden {
	display: none;
}

.article-card.is-appearing {
	animation: dr-hug-card-in 0.3s ease both;
}

@keyframes dr-hug-card-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.article-card,
	.article-card.is-appearing,
	.poleznoe-category-card {
		animation: none;
		transition: none;
		opacity: 1;
		transform: none;
	}
}

.article-card__body {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 24px 12px 24px 24px;
}

.article-card__content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
	min-height: 0;
}

.article-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.article-card__tag {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	justify-content: center;
	padding: 6px 10px 8px;
	border-radius: 24px;
	background: var(--dr-hug-pink-bg);
	color: var(--dr-hug-pink);
	font-size: var(--dr-hug-font-size-xs);
	font-weight: var(--dr-hug-font-weight-bold);
	line-height: 1;
	white-space: nowrap;
}

.article-card__title {
	margin: 0;
	font-family: var(--dr-hug-font-family);
	font-size: var(--dr-hug-font-size-xl);
	font-weight: var(--dr-hug-font-weight-bold);
	line-height: 1.4;
	color: var(--dr-hug-black);
}

.article-card__description {
	margin: 0;
	font-family: var(--dr-hug-font-family);
	font-size: var(--dr-hug-font-size-base);
	font-weight: var(--dr-hug-font-weight-medium);
	line-height: 1.4;
	color: var(--dr-hug-grey);
}

.article-card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	min-width: 167px;
	min-height: 48px;
	padding: 12px 16px;
	border: 2px solid var(--dr-hug-pink-light);
	border-radius: 12px;
	background: var(--dr-hug-white);
	color: var(--dr-hug-pink);
	font-size: var(--dr-hug-font-size-base);
	font-weight: var(--dr-hug-font-weight-bold);
	line-height: 24px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.article-card:hover .article-card__button,
.article-card:focus .article-card__button {
	background: var(--dr-hug-pink-bg);
}

.article-card__media {
	display: flex;
	align-items: center;
	align-self: stretch;
	min-height: 0;
}

.article-card__image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 354px;
	object-fit: contain;
	object-position: center right;
}

@media screen and (max-width: 768px) {
	.poleznoe-categories-grid,
	.articles__grid {
		grid-template-columns: 1fr;
	}

	.articles__title {
		font-size: 20px;
	}

	.poleznoe-category-card,
	.article-card,
	.article-card--feature {
		grid-template-columns: 1fr;
		height: auto;
		min-height: auto;
	}

	.poleznoe-category-card {
		min-height: 320px;
	}

	.poleznoe-category-card__block {
		padding: 20px 20px 0;
	}

	.poleznoe-category-card__media {
		overflow: hidden;
		min-height: 240px;
		padding: 0 12px 20px;
	}

	.poleznoe-category-card__img img {
		width: 100%;
		height: 100%;
		inset: 0;
		object-fit: contain;
		object-position: center center;
		transform: scale(1.12);
		transform-origin: center center;
	}

	.article-card__media {
		order: -1;
	}

	.article-card__image,
	.article-card--feature .article-card__image {
		min-height: 220px;
	}

	.article-card__button {
		width: 100%;
	}

	.poleznoe-category-card__title,
	.article-card--feature .article-card__title {
		font-size: 20px;
	}
}
