/*
 * Первая продающая секция внутри статьи.
 * Файл: /article-sales/article-sales-first.css
 */

.article-sales-first,
.article-sales-first * {
	box-sizing: border-box;
}

.article-sales-first {
	/*
	 * Используются уже существующие иконки дочерней темы.
	 * Позже пути можно заменить на отдельный комплект иконок секции.
	 */
	--asf-icon-heading: url("../assets/images/icons/author/shield_scales.svg");
	--asf-icon-consultation: url("../assets/images/icons/CTA_article/tab-person-gold.svg");
	--asf-icon-inspection: url("../assets/images/icons/CTA_article/risk-gold.svg");
	--asf-icon-arbitration: url("../assets/images/icons/author/shield_scales.svg");
	--asf-icon-accounting: url("../assets/images/icons/author/briefcase.svg");
	--asf-icon-other: url("../assets/images/icons/author/documents.svg");
	--asf-icon-phone: url("../assets/images/icons/CTA_article/audit-gold.svg");

	position: relative;
	isolation: isolate;
	width: 100%;
	container-type: inline-size;
	container-name: article-sales-first;
	margin: 34px 0;
	padding: 22px 28px 20px;
	overflow: hidden;

	color: #071436;
	background:
		radial-gradient(circle at 0% 50%, rgba(210, 165, 76, 0.08), transparent 28%),
		radial-gradient(circle at 100% 55%, rgba(11, 150, 198, 0.05), transparent 32%),
		linear-gradient(135deg, #fffefa 0%, #ffffff 58%, #fbfdff 100%);

	border: 1px solid rgba(197, 145, 45, 0.68);
	border-radius: 16px;
	box-shadow:
		0 16px 38px rgba(7, 31, 99, 0.08),
		0 1px 0 rgba(255, 255, 255, 0.86) inset;

	font-family: inherit;
}

.article-sales-first::before,
.article-sales-first::after {
	content: "";
	position: absolute;
	z-index: -1;
	pointer-events: none;
	opacity: 0.055;
}

.article-sales-first::before {
	left: -38px;
	top: 40px;
	width: 150px;
	height: 270px;
	border: 16px double #b98a32;
	border-bottom: 0;
	border-radius: 52px 52px 0 0;
	transform: skewY(-2deg);
}

.article-sales-first::after {
	right: -36px;
	top: 92px;
	width: 170px;
	height: 170px;
	border: 2px solid #b98a32;
	border-radius: 50%;
	box-shadow:
		0 0 0 18px rgba(185, 138, 50, 0.24),
		0 0 0 42px rgba(185, 138, 50, 0.14);
}

.article-sales-first__ornament {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 24px;
	margin: 0 0 6px;
}

.article-sales-first__ornament-line {
	width: min(15vw, 150px);
	height: 1px;
	background:
		linear-gradient(
			90deg,
			transparent,
			rgba(185, 138, 50, 0.72) 18%,
			rgba(185, 138, 50, 0.72) 82%,
			transparent
		);
}

.article-sales-first__ornament-icon,
.article-sales-first__service-icon,
.article-sales-first__phone-icon {
	display: inline-block;
	flex: 0 0 auto;
	background-color: #b68a38;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.article-sales-first__ornament-icon {
	width: 25px;
	height: 25px;
	-webkit-mask-image: var(--asf-icon-heading);
	mask-image: var(--asf-icon-heading);
}

.article-sales-first__title {
	max-width: 1040px;
	margin: 0 auto;
	color: #071f63;
	font-size: clamp(27px, 2.4vw, 38px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.025em;
	text-align: center;
	text-wrap: balance;
}

.article-sales-first__services {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0;
	width: min(88%, 1040px);
	margin: 19px auto 20px;
}

.article-sales-first__services-column {
	display: grid;
	align-content: start;
	gap: 2px;
	min-width: 0;
}

.article-sales-first__services-column:first-child {
	padding-right: 38px;
	border-right: 1px solid rgba(185, 138, 50, 0.30);
}

.article-sales-first__services-column:last-child {
	padding-left: 38px;
}

.article-sales-first .article-sales-first__service-link,
.blog-single__content .article-sales-first__service-link {
	display: grid;
	grid-template-columns: 27px minmax(0, 1fr) 12px;
	gap: 11px;
	align-items: center;
	min-width: 0;
	min-height: 42px;
	padding: 7px 2px;

	color: #122446;
	font-size: clamp(14px, 1.05vw, 16px);
	font-weight: 500;
	line-height: 1.32;
	text-decoration: none;
	border-bottom: 1px solid rgba(7, 31, 99, 0.08);

	transition:
		color 0.18s ease,
		transform 0.18s ease,
		border-color 0.18s ease;
}

.article-sales-first__services-column .article-sales-first__service-link:last-child {
	border-bottom-color: transparent;
}

.article-sales-first .article-sales-first__service-link:hover,
.article-sales-first .article-sales-first__service-link:focus-visible,
.blog-single__content .article-sales-first__service-link:hover,
.blog-single__content .article-sales-first__service-link:focus-visible {
	color: #0759c8;
	border-bottom-color: rgba(7, 89, 200, 0.22);
	text-decoration: none;
	transform: translateX(2px);
	outline: none;
}

.article-sales-first__service-icon {
	width: 25px;
	height: 25px;
}

.article-sales-first__service-icon--consultation {
	-webkit-mask-image: var(--asf-icon-consultation);
	mask-image: var(--asf-icon-consultation);
}

.article-sales-first__service-icon--inspection {
	-webkit-mask-image: var(--asf-icon-inspection);
	mask-image: var(--asf-icon-inspection);
}

.article-sales-first__service-icon--arbitration {
	-webkit-mask-image: var(--asf-icon-arbitration);
	mask-image: var(--asf-icon-arbitration);
}

.article-sales-first__service-icon--accounting {
	-webkit-mask-image: var(--asf-icon-accounting);
	mask-image: var(--asf-icon-accounting);
}

.article-sales-first__service-icon--other {
	-webkit-mask-image: var(--asf-icon-other);
	mask-image: var(--asf-icon-other);
}

.article-sales-first__service-label {
	min-width: 0;
}

.article-sales-first__service-arrow {
	color: #b68a38;
	font-size: 24px;
	font-weight: 400;
	line-height: 1;
}

.article-sales-first__form {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns:
		minmax(220px, 1fr)
		minmax(280px, 1.18fr)
		minmax(230px, 0.94fr);
	gap: 14px;
	align-items: center;
	width: min(82%, 1040px);
	margin: 0 auto;
	padding: 12px 14px;

	background: rgba(255, 255, 255, 0.90);
	border: 1px solid rgba(185, 138, 50, 0.42);
	border-radius: 12px;
	box-shadow:
		0 12px 26px rgba(7, 31, 99, 0.07),
		0 1px 0 rgba(255, 255, 255, 0.82) inset;
}

.article-sales-first__form > * {
	min-width: 0;
}

.article-sales-first__phone {
	position: relative;
	display: block;
	min-width: 0;
	margin: 0;
}

.article-sales-first__phone-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	z-index: 1;
	width: 20px;
	height: 20px;
	background-color: rgba(7, 31, 99, 0.48);
	-webkit-mask-image: var(--asf-icon-phone);
	mask-image: var(--asf-icon-phone);
	transform: translateY(-50%);
	pointer-events: none;
}

.article-sales-first__phone input {
	display: block;
	width: 100%;
	min-width: 0;
	height: 52px;
	margin: 0;
	padding: 0 14px 0 46px;

	color: #071436;
	background: #ffffff;
	border: 1px solid rgba(7, 31, 99, 0.26);
	border-radius: 8px;
	outline: none;
	box-shadow: none;
	appearance: none;

	font: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.2;
}

.article-sales-first__phone input::placeholder {
	color: rgba(21, 27, 42, 0.44);
	opacity: 1;
}

.article-sales-first__phone input:focus {
	border-color: #0b96c6;
	box-shadow: 0 0 0 3px rgba(11, 150, 198, 0.12);
}

.article-sales-first__consent {
	min-width: 0;
}

.article-sales-first__consent .form-consent {
	display: grid;
	grid-template-columns: 18px minmax(0, 1fr);
	gap: 9px;
	align-items: start;
	margin: 0;

	color: rgba(7, 20, 54, 0.74);
	font-size: 11px;
	font-weight: 400;
	line-height: 1.35;
	letter-spacing: 0;
}

.article-sales-first__consent .form-consent input {
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: #0759c8;
	cursor: pointer;
}

.article-sales-first__consent .form-consent span {
	min-width: 0;
	overflow-wrap: anywhere;
}

.article-sales-first .article-sales-first__consent .form-consent a,
.blog-single__content .article-sales-first__consent .form-consent a {
	color: #0759c8;
	font-weight: 500;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.article-sales-first__submit {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	min-height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 12px 17px;

	color: #ffffff;
	background:
		linear-gradient(135deg, #0b397c 0%, #071f63 58%, #04143d 100%);
	border: 1px solid rgba(218, 171, 76, 0.86);
	border-radius: 9px;
	box-shadow:
		0 10px 20px rgba(7, 31, 99, 0.22),
		0 1px 0 rgba(255, 255, 255, 0.12) inset;

	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.15;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;

	transition:
		transform 0.18s ease,
		filter 0.18s ease,
		box-shadow 0.18s ease;
}

.article-sales-first__submit:hover,
.article-sales-first__submit:focus-visible {
	color: #ffffff;
	filter: brightness(1.06);
	transform: translateY(-1px);
	box-shadow:
		0 14px 26px rgba(7, 31, 99, 0.28),
		0 1px 0 rgba(255, 255, 255, 0.14) inset;
	outline: none;
}

.article-sales-first__submit-arrow {
	color: #dbad52;
	font-size: 20px;
	font-weight: 400;
	line-height: 1;
	transition: transform 0.18s ease;
}

.article-sales-first__submit:hover .article-sales-first__submit-arrow {
	transform: translateX(3px);
}

.article-sales-first__website {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.article-sales-first__status {
	width: min(70%, 930px);
	margin: 12px auto 0;
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.4;
	text-align: center;
}

.article-sales-first__status.is-success {
	color: #0d6a47;
	background: #eefaf4;
	border: 1px solid rgba(13, 106, 71, 0.16);
}

.article-sales-first__status.is-error {
	color: #a52d2d;
	background: #fff4f4;
	border: 1px solid rgba(165, 45, 45, 0.16);
}


/* =========================================================
   Адаптация формы по реальной ширине секции
   ========================================================= */

/*
 * При средней ширине телефон и кнопка стоят в одной строке,
 * а согласие занимает всю вторую строку.
 */
@container article-sales-first (max-width: 1050px) {
	.article-sales-first__form {
		grid-template-columns: minmax(220px, 1fr) minmax(230px, 1fr);
		grid-template-areas:
			"phone submit"
			"consent consent";
		gap: 11px 14px;
		width: min(92%, 930px);
	}

	.article-sales-first__phone {
		grid-area: phone;
	}

	.article-sales-first__consent {
		grid-area: consent;
	}

	.article-sales-first__submit {
		grid-area: submit;
		width: 100%;
		justify-self: stretch;
	}
}

/*
 * На узкой области статьи все элементы формы идут одной колонкой.
 */
@container article-sales-first (max-width: 720px) {
	.article-sales-first__form {
		grid-template-columns: 1fr;
		grid-template-areas:
			"phone"
			"consent"
			"submit";
		width: 100%;
		gap: 11px;
		padding: 13px;
	}

	.article-sales-first__submit {
		white-space: normal;
	}
}

/*
 * Резервный вариант для старых браузеров без container queries.
 */
@supports not (container-type: inline-size) {
	@media (max-width: 1380px) {
		.article-sales-first__form {
			grid-template-columns: minmax(220px, 1fr) minmax(230px, 1fr);
			grid-template-areas:
				"phone submit"
				"consent consent";
			gap: 11px 14px;
			width: min(92%, 930px);
		}

		.article-sales-first__phone {
			grid-area: phone;
		}

		.article-sales-first__consent {
			grid-area: consent;
		}

		.article-sales-first__submit {
			grid-area: submit;
			width: 100%;
		}
	}

	@media (max-width: 760px) {
		.article-sales-first__form {
			grid-template-columns: 1fr;
			grid-template-areas:
				"phone"
				"consent"
				"submit";
			width: 100%;
		}

		.article-sales-first__submit {
			white-space: normal;
		}
	}
}

@media (max-width: 820px) {
	.article-sales-first {
		padding: 21px 20px 19px;
	}

	.article-sales-first__services {
		width: 100%;
	}

	.article-sales-first__services-column:first-child {
		padding-right: 24px;
	}

	.article-sales-first__services-column:last-child {
		padding-left: 24px;
	}

}

@media (max-width: 680px) {
	.article-sales-first {
		margin: 28px 0;
		padding: 18px 16px 16px;
		border-radius: 14px;
	}

	.article-sales-first::before,
	.article-sales-first::after {
		display: none;
	}

	.article-sales-first__ornament {
		margin-bottom: 4px;
	}

	.article-sales-first__title {
		font-size: 27px;
		line-height: 1.17;
	}

	.article-sales-first__services {
		grid-template-columns: 1fr;
		gap: 0;
		margin: 15px auto 17px;
	}

	.article-sales-first__services-column:first-child,
	.article-sales-first__services-column:last-child {
		padding: 0;
		border-right: 0;
	}

	.article-sales-first .article-sales-first__service-link,
	.blog-single__content .article-sales-first__service-link {
		min-height: 44px;
		padding: 8px 2px;
		font-size: 15px;
	}

	.article-sales-first__form {
		grid-template-columns: 1fr;
		grid-template-areas:
			"phone"
			"consent"
			"submit";
		gap: 11px;
		width: 100%;
		padding: 13px;
	}

	.article-sales-first__phone {
		grid-area: phone;
	}

	.article-sales-first__consent {
		grid-area: consent;
	}

	.article-sales-first__submit {
		grid-area: submit;
		white-space: normal;
	}

	.article-sales-first__phone input,
	.article-sales-first__submit {
		height: 54px;
		min-height: 54px;
		font-size: 16px;
	}

	.article-sales-first__submit {
		grid-column: auto;
		width: 100%;
	}

	.article-sales-first__consent .form-consent {
		font-size: 11px;
		line-height: 1.38;
	}

	.article-sales-first__status {
		width: 100%;
	}
}

@media (max-width: 420px) {
	.article-sales-first {
		padding-left: 13px;
		padding-right: 13px;
	}

	.article-sales-first__title {
		font-size: 24px;
	}

	.article-sales-first__service-icon {
		width: 23px;
		height: 23px;
	}

	.article-sales-first .article-sales-first__service-link,
	.blog-single__content .article-sales-first__service-link {
		grid-template-columns: 25px minmax(0, 1fr) 10px;
		gap: 9px;
		font-size: 14.5px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.article-sales-first__service-link,
	.article-sales-first__submit,
	.article-sales-first__submit-arrow {
		transition: none;
	}

	.article-sales-first__service-link:hover,
	.article-sales-first__submit:hover {
		transform: none;
	}
}
