/* Равные консультанты /need-help/ravnye/. Префикс rv-.
   style.css задаёт font-size звёздочкой, поэтому кегль стоит на каждом текстовом
   теге, а вложенные теги получают font-size: inherit. */

.rv {
	--rv-radius: 1.88rem;
	--rv-gap: 1.88rem;
	padding-bottom: 5rem;
}

.rv :where(h1, h2, h3, p, ul, ol) {
	margin: 0;
}

.rv :where(*, *::before, *::after) {
	box-sizing: border-box;
}

/* --- Первый экран --- */

.rv-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--rv-gap);
	align-items: center;
	margin: 2.5rem 0 5rem;
}

.rv-hero__title {
	font-size: 5.75rem;
	line-height: 1;
	margin-bottom: 1.88rem;
}

.rv-hero__lead {
	font-size: 1rem;
	line-height: 1.45;
	margin-bottom: 1rem;
	max-width: 34rem;
}

.rv-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.88rem;
	margin-top: 1.88rem;
}

.rv-hero__more {
	font-size: 0.88rem;
	color: var(--black);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.rv-hero__more:hover {
	color: var(--red);
}

.rv-hero__pic {
	font-size: 0;
}

.rv-hero__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--rv-radius);
}

.rv-button {
	display: inline-flex;
	padding: 0 2rem;
}

/* --- Секции --- */

.rv-section {
	margin-bottom: 5rem;
}

.rv-section__title {
	font-size: 2.67rem;
	line-height: 1.2;
	margin-bottom: 1rem;
}

.rv-section__lead {
	font-size: 1rem;
	line-height: 1.45;
	max-width: 46rem;
	margin-bottom: 2.5rem;
}

/* --- Чем помогут: нумерованные карточки --- */

.rv-help {
	list-style: none;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
	gap: 1rem;
	counter-reset: rv-help;
	margin-bottom: 2.5rem;
}

.rv-help__item {
	counter-increment: rv-help;
	background: var(--light-grey);
	border-radius: var(--rv-radius);
	padding: 1.88rem;
	font-size: 0.88rem;
	line-height: 1.45;
}

.rv-help__item::before {
	content: counter(rv-help);
	display: block;
	font-size: 2.67rem;
	line-height: 1;
	color: var(--red);
	margin-bottom: 1rem;
}

.rv-facts {
	list-style: none;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 2.5rem;
}

.rv-facts__item {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.88rem;
}

.rv-facts__item span {
	font-size: inherit;
}

.rv-facts__icon {
	width: 1.1rem;
	height: 0.85rem;
	flex: none;
}

/* --- Консультанты --- */

.rv-people {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: var(--rv-gap);
}

.rv-people_collapsed .rv-person:nth-child(n + 9) {
	display: none;
}

.rv-people__more,
.rv-materials__more {
	display: inline-flex;
	margin-top: 2.5rem;
	padding: 0 2rem;
}

.rv-person {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.rv-person__photo {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: var(--rv-radius);
	margin-bottom: 1rem;
}

.rv-person__name {
	font-size: 1.14rem;
	line-height: 1.25;
	margin-bottom: 0.5rem;
}

.rv-person__role,
.rv-person__dia {
	font-size: 0.76rem;
	line-height: 1.4;
	color: #6b6b69;
	margin-bottom: 0.5rem;
}

.rv-person__story {
	margin-bottom: 0.75rem;
	width: 100%;
}

.rv-person__story-toggle {
	font-size: 0.76rem;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.rv-person__story-toggle:hover {
	color: var(--red);
}

.rv-person__story-text,
.rv-person__story-text * {
	font-size: 0.76rem;
	line-height: 1.45;
}

.rv-person__story-text p {
	margin: 0.5rem 0 0;
}

.rv-person__video {
	font-size: 0.76rem;
	line-height: 1.4;
	color: var(--red);
	margin-bottom: 0.75rem;
}

.rv-person__actions {
	margin-top: auto;
	padding-top: 0.5rem;
}

.rv-person__button {
	display: inline-flex;
}

/* --- Чаты --- */

.rv-chats {
	list-style: none;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
	gap: 1rem;
}

/* Кнопка под названием, а не справа: в строку не помещались длинные названия
   и кнопка, которой style.css на ≤1140px поднимает кегль. */
.rv-chat {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	align-content: center;
	gap: 0.63rem 1rem;
	background: var(--light-grey);
	border-radius: var(--rv-radius);
	padding: 1rem 1.25rem 1rem 1rem;
}

.rv-chat__pic {
	grid-row: 1 / span 2;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	object-fit: cover;
}

.rv-chat__name {
	grid-column: 2;
	font-size: 0.88rem;
	line-height: 1.35;
	/* в названиях из админки бывает «лейкозы.Взаимопомощь» без пробела */
	overflow-wrap: anywhere;
}

.rv-chat__button {
	grid-column: 2;
	justify-self: start;
	display: inline-flex;
}

/* --- Истории и материалы с портала --- */

.rv-materials {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: var(--rv-gap);
}

.rv-materials_collapsed .rv-material:nth-child(n + 7) {
	display: none;
}

.rv-material {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	color: var(--black);
	text-decoration: none;
}

.rv-material__pic {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--rv-radius);
	margin-bottom: 1rem;
}

.rv-material__type {
	font-size: 0.76rem;
	line-height: 1.4;
	color: var(--red);
	margin-bottom: 0.4rem;
}

.rv-material__name {
	font-size: 1rem;
	line-height: 1.3;
	transition: color 0.2s;
}

.rv-material:hover .rv-material__name {
	color: var(--red);
}

/* --- Как стать равным --- */

.rv-join {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--rv-gap);
	background: var(--black);
	color: var(--white);
	border-radius: var(--rv-radius);
	padding: 3.13rem;
}

.rv-join__title {
	font-size: 1.62rem;
	line-height: 1.25;
	margin-bottom: 1rem;
}

.rv-join__text {
	font-size: 0.88rem;
	line-height: 1.5;
	margin-bottom: 1rem;
	color: rgba(255, 255, 255, 0.82);
}

.rv-join .rv-button {
	margin-top: 0.5rem;
}

.rv-more {
	font-size: 0.88rem;
	line-height: 1.5;
}

.rv-more a {
	font-size: inherit;
	color: var(--red);
}

@media (max-width: 990px) {
	.rv-hero,
	.rv-join {
		grid-template-columns: minmax(0, 1fr);
	}

	.rv-hero__pic {
		order: -1;
	}

	.rv-hero__title {
		font-size: 3.5rem;
	}

	.rv-section__title {
		font-size: 2rem;
	}
}

@media (max-width: 600px) {
	.rv-hero {
		margin: 1.25rem 0 3.13rem;
	}

	.rv-section {
		margin-bottom: 3.13rem;
	}

	.rv-people,
	.rv-materials {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.25rem 0.75rem;
	}

	.rv-person__photo {
		border-radius: 1.25rem;
	}

	.rv-join {
		padding: 1.88rem 1.25rem;
	}
}
