/* ==========================================================================
   «Контакты», третья версия — по макету Амира (30.09.2026).
   pages/contacts.blade.php, корень .ct3.

   ПК (по макету): крошки «Главная / Контакты»; лиловый блок r40
   «Свяжитесь с нами» — слева плитка с трубкой, заголовок 40 и пояснение,
   справа форма (подписи над полями, белые поля h68 r16, «+ Добавить
   комментарий», галочка согласия, кнопка «Отправить обращение ↗» h64);
   «Давайте знакомиться ближе / Мы рядом. И на связи.» 64 + иллюстрация
   (карточка чата «Команда КупиТак», фиолетовая плашка вопроса, кольца);
   «Ждём вас в гости» — карточки компаний с отметкой-кружком и офисы
   выбранной (карта, адрес, график, телефон, почта, мессенджеры).
   Телефон — те же блоки столбиком под шапкой page-mhead, без нижнего меню
   (как «Условия рассрочки» — экран поверх таббара).
   Цвета — токены vars.css; подложка блока формы = --accent 7 % по --light,
   выбранная компания = --accent 10 % по белому (сняты с макета).
   ========================================================================== */

.ct3 {
	--page-gutter: 15px;
	--ct3-line: color-mix(in srgb, var(--light-gray) 60%, var(--white));
	--ct3-tint: color-mix(in srgb, var(--accent) 10%, var(--white));
	color: var(--black);
}

body:has(.ct3),
main.content:has(.ct3) {
	background: var(--light);
}

.ct3 [hidden] {
	display: none !important;
}

.ct3 p,
.ct3 h1,
.ct3 h2,
.ct3 ul {
	margin: 0;
}

.ct3 ul {
	padding: 0;
	list-style: none;
}

.ct3 em {
	font-style: normal;
	color: var(--gray);
}

/* ---------- крошки (ПК) ---------- */
.ct3-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 24px;
	font-size: 16px;
	color: var(--gray);
}

.ct3-crumbs a {
	color: var(--gray);
	transition: color 0.2s ease;
}

.ct3-crumbs a:hover {
	color: var(--accent);
}

/* ==========================================================================
   Свяжитесь с нами
   ========================================================================== */
.ct3-feedback {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 552px);
	gap: 40px;
	padding: 42px 48px 48px;
	border-radius: 40px;
	background: color-mix(in srgb, var(--accent) 7%, var(--light));
}

.ct3-feedback-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 18px;
	background: var(--white);
	color: var(--accent);
}

.ct3-feedback-icon svg {
	width: 28px;
	height: 28px;
}

.ct3-feedback-title {
	margin-top: 28px;
	font-size: 40px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.5px;
}

.ct3-feedback-text {
	margin-top: 32px;
	font-size: 18px;
	line-height: 1.7;
	color: var(--gray);
}

/* форма */
.ct3-form {
	padding-top: 2px;
}

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

.ct3-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ct3-label {
	margin-bottom: 10px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.3;
}

.ct3 .c-feedback-input {
	width: 100%;
	height: 68px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: 16px;
	outline: none;
	background: var(--white);
	color: var(--black);
	font: inherit;
	font-size: 18px;
	transition: border-color 0.2s ease;
}

.ct3 textarea.c-feedback-input {
	height: auto;
	min-height: 104px;
	padding: 18px 20px;
	resize: vertical;
	line-height: 1.45;
}

.ct3 .c-feedback-input::placeholder {
	color: color-mix(in srgb, var(--black) 45%, transparent);
}

.ct3 .c-feedback-input:focus {
	border-color: var(--accent);
}

.ct3 .c-feedback-input.is-error {
	border-color: var(--badge-red);
}

.ct3-add-comment {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--gray);
	font: inherit;
	font-size: 16px;
	cursor: pointer;
	transition: color 0.2s ease;
}

.ct3-add-comment:hover {
	color: var(--accent);
}

.ct3-add-comment svg {
	width: 20px;
	height: 20px;
}

.ct3-comment {
	margin-top: 16px;
}

/* галочка согласия */
.ct3-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 16px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--gray);
	cursor: pointer;
}

.ct3-consent input {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	border: 1.5px solid color-mix(in srgb, var(--black) 35%, transparent);
	border-radius: 6px;
	background: var(--white) center / 14px no-repeat;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.ct3-consent input:checked {
	border-color: var(--accent);
	background-color: var(--accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.ct3-consent input:focus-visible {
	outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
	outline-offset: 2px;
}

.ct3-consent a {
	color: var(--gray);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ct3-consent a:hover {
	color: var(--accent);
}

/* «Отправить обращение ↗» — стрелка псевдоэлементом: скрипт формы меняет
   текст кнопки через textContent (разметку внутри стёр бы) */
.ct3 .c-feedback-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	height: 64px;
	margin-top: 22px;
	padding: 0 26px;
	border: 0;
	border-radius: 16px;
	background: var(--accent);
	color: var(--white);
	font: inherit;
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease;
}

.ct3 .c-feedback-btn::after {
	content: "";
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ct3 .c-feedback-btn:hover:not(:disabled) {
	background: var(--accent-alternate);
}

.ct3 .c-feedback-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.ct3 .c-feedback-status {
	margin-top: 12px;
	font-size: 14px;
	line-height: 1.4;
}

.ct3 .c-feedback-status.is-success {
	color: var(--call-green);
	font-weight: 600;
}

.ct3 .c-feedback-status.is-error {
	color: var(--badge-red);
}

/* ==========================================================================
   Мы рядом. И на связи.
   ========================================================================== */
.ct3-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: 40px;
	margin-top: 56px;
}

.ct3-eyebrow {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--accent);
}

.ct3-hero-title {
	margin-top: 24px;
	font-size: 64px;
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -1.5px;
}

.ct3-hero-title span {
	color: var(--accent);
}

.ct3-hero-sub {
	margin-top: 40px;
	font-size: 20px;
	line-height: 1.8;
	color: var(--gray);
}

.ct3-hero-link {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-top: 36px;
	color: var(--black);
	font-size: 20px;
	font-weight: 600;
	transition: color 0.2s ease;
}

.ct3-hero-link:hover {
	color: var(--accent);
}

.ct3-hero-link svg {
	width: 22px;
	height: 22px;
}

/* иллюстрация: все размеры — в cqw от её ширины (на ПК ≈ 520 px),
   поэтому на телефоне она просто пропорционально уменьшается */
.ct3-art {
	position: relative;
	container-type: inline-size;
	aspect-ratio: 520 / 400;
}

.ct3-art-ring {
	position: absolute;
	top: 50%;
	left: 55%;
	border: 1px solid color-mix(in srgb, var(--accent) 12%, transparent);
	border-radius: 50%;
	transform: translate(-50%, -50%);
}

.ct3-art-ring--1 {
	width: 76cqw;
	height: 76cqw;
}

.ct3-art-ring--2 {
	width: 50cqw;
	height: 50cqw;
}

.ct3-art-card {
	position: absolute;
	top: 17%;
	left: 4%;
	width: 84%;
	padding: 6.4cqw 6.6cqw 9.5cqw;
	border-radius: 4.6cqw;
	background: var(--white);
	box-shadow: 0 5cqw 12cqw color-mix(in srgb, var(--accent) 12%, transparent);
	transform: rotate(-2.2deg);
}

.ct3-art-from {
	display: flex;
	align-items: center;
	gap: 2.7cqw;
	font-size: 3.5cqw;
	font-weight: 600;
	color: var(--gray);
}

.ct3-art-from img {
	width: 9.4cqw;
	height: 9.4cqw;
	border-radius: 2.6cqw;
}

.ct3-art-hello {
	margin-top: 5cqw;
	font-size: 6.3cqw;
	font-weight: 700;
	line-height: 1.35;
	color: var(--black);
}

.ct3-art-pill {
	position: absolute;
	top: 63%;
	right: 0;
	padding: 4.4cqw 6.2cqw;
	border-radius: 3.4cqw;
	background: var(--accent);
	color: var(--white);
	font-size: 4.1cqw;
	font-weight: 600;
	white-space: nowrap;
	box-shadow: 0 3cqw 8cqw color-mix(in srgb, var(--accent) 30%, transparent);
	transform: rotate(2.6deg);
}

.ct3-art-chat {
	position: absolute;
	top: 0;
	right: 1%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 15.4cqw;
	height: 15.4cqw;
	border-radius: 4.2cqw;
	background: color-mix(in srgb, var(--accent) 16%, var(--white));
	color: var(--accent);
	transform: rotate(9deg);
}

.ct3-art-chat svg {
	width: 6.4cqw;
	height: 6.4cqw;
}

.ct3-art-spark {
	position: absolute;
	bottom: 6%;
	left: 13%;
	width: 6cqw;
	height: 6cqw;
	color: var(--pink);
}

.ct3-art-spark svg {
	width: 100%;
	height: 100%;
}

/* ==========================================================================
   Ждём вас в гости
   ========================================================================== */
.ct3-offices {
	scroll-margin-top: 144px; /* якорь «Выбрать удобный офис» под шапкой ПК */
	margin-top: 64px;
}

.ct3-section-title {
	font-size: 40px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.5px;
}

.ct3-section-sub {
	margin-top: 14px;
	font-size: 18px;
	color: var(--gray);
}

/* карточки компаний с отметкой-кружком */
.ct3-companies {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	margin-top: 28px;
}

.ct3 .c-region-btn {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	min-width: 0;
	height: 150px;
	padding: 0 20px;
	border: 1px solid var(--ct3-line);
	border-radius: 24px;
	background: var(--white);
	color: var(--gray);
	font: inherit;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.ct3 .c-region-btn:not(.active):hover {
	border-color: color-mix(in srgb, var(--accent) 30%, var(--white));
}

.ct3 .c-region-btn.active {
	border-color: color-mix(in srgb, var(--accent) 45%, var(--white));
	background: var(--ct3-tint);
}

.ct3 .c-logo-kupitak {
	width: auto;
	height: 36px;
	max-width: 80%;
}

.ct3 .c-logo-fincity {
	width: auto;
	height: 30px;
	max-width: 80%;
	object-fit: contain;
}

.ct3 .c-region-sub {
	font-size: 18px;
	line-height: 1.3;
	text-align: center;
}

.ct3-radio {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 28px;
	height: 28px;
	border: 1.5px solid var(--light-gray);
	border-radius: 50%;
	background: var(--white) center / 16px no-repeat;
}

.ct3 .c-region-btn.active .ct3-radio {
	border-color: var(--accent);
	background-color: var(--accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

/* офисы выбранной компании */
.ct3-pane {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	margin-top: 24px;
}

.ct3-office {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--ct3-line);
	border-radius: 28px;
	background: var(--white);
}

/* один офис (FinCity) — во всю ширину: карта слева, сведения справа */
.ct3-pane:has(> .ct3-office:only-child) {
	grid-template-columns: minmax(0, 1fr);
}

.ct3-office:only-child {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.ct3 .c-card--map {
	height: 240px;
	background: var(--light);
}

.ct3-office:only-child .c-card--map {
	height: auto;
	min-height: 320px;
}

.ct3 .c-map-script,
.ct3 .c-card--map iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.ct3-office-info {
	padding: 26px 28px 28px;
}

.ct3-office-city {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent);
}

.ct3-office-addr {
	margin-top: 6px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
}

.ct3-office-addr em {
	font-size: 16px;
	font-weight: 500;
}

.ct3-rows {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 20px;
}

.ct3-rows li {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 17px;
	line-height: 1.35;
}

.ct3-rows svg {
	flex-shrink: 0;
	box-sizing: content-box;
	width: 20px;
	height: 20px;
	padding: 10px;
	border-radius: 12px;
	background: var(--ct3-tint);
	color: var(--accent);
}

.ct3-rows a {
	color: var(--black);
	word-break: break-word;
	transition: color 0.2s ease;
}

.ct3-rows a:hover {
	color: var(--accent);
}

.ct3 .c-soc-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

.ct3 .c-soc-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 18px;
	border-radius: 14px;
	background: var(--light);
	color: var(--black);
	font-size: 15px;
	font-weight: 600;
	transition: background 0.2s ease;
}

.ct3 .c-soc-btn:hover {
	background: var(--card-lilac);
}

.ct3 .c-soc-btn svg {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
}

.ct3 .c-soc-btn.is-primary {
	background: var(--accent);
	color: var(--white);
}

.ct3 .c-soc-btn.is-primary:hover {
	background: var(--accent-alternate);
}

/* ==========================================================================
   ПК
   ========================================================================== */
@media (min-width: 769px) {
	.ct3 {
		padding: 24px 0 72px;
	}
}

/* узкий ПК: форма под заголовком, иллюстрация уже */
@media (min-width: 769px) and (max-width: 1100px) {
	.ct3-feedback {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.ct3-feedback-title br,
	.ct3-feedback-text br {
		display: none;
	}

	.ct3-hero-title {
		font-size: 52px;
	}
}

/* ==========================================================================
   Телефон — блоки столбиком под шапкой page-mhead, без нижнего меню
   ========================================================================== */
@media (max-width: 768px) {
	body:has(.ct3) .mobile-menu {
		display: none;
	}

	body:has(.ct3) .footer {
		margin-bottom: max(24px, env(safe-area-inset-bottom));
	}

	.ct3 .page-msheet {
		padding: 20px 15px 40px;
	}

	/* переносы макета — только ПК; в заголовке «Мы рядом. / И на связи.» и
	   в иллюстрации остаются */
	.ct3-feedback br,
	.ct3-hero-sub br {
		display: none;
	}

	.ct3-crumbs {
		display: none;
	}

	/* Свяжитесь с нами */
	.ct3-feedback {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
		padding: 20px;
		border-radius: 24px;
	}

	.ct3-feedback-icon {
		width: 48px;
		height: 48px;
		border-radius: 14px;
	}

	.ct3-feedback-icon svg {
		width: 22px;
		height: 22px;
	}

	.ct3-feedback-title {
		margin-top: 16px;
		font-size: 26px;
		line-height: 1.2;
	}

	.ct3-feedback-text {
		margin-top: 8px;
		font-size: 14px;
		line-height: 1.5;
	}

	.ct3-fields {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.ct3-label {
		margin-bottom: 6px;
		font-size: 13px;
	}

	.ct3 .c-feedback-input {
		height: 52px;
		padding: 0 16px;
		font-size: 15px;
	}

	.ct3 textarea.c-feedback-input {
		min-height: 90px;
		padding: 14px 16px;
	}

	.ct3-add-comment {
		margin-top: 14px;
		font-size: 14px;
	}

	.ct3-consent {
		margin-top: 14px;
		font-size: 12px;
	}

	.ct3 .c-feedback-btn {
		height: 52px;
		margin-top: 18px;
		padding: 0 20px;
		font-size: 16px;
	}

	/* Мы рядом */
	.ct3-hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
		margin-top: 36px;
	}

	.ct3-eyebrow {
		font-size: 12px;
	}

	.ct3-hero-title {
		margin-top: 12px;
		font-size: 34px;
		letter-spacing: -0.5px;
	}

	.ct3-hero-sub {
		margin-top: 14px;
		font-size: 15px;
		line-height: 1.55;
	}

	.ct3-hero-link {
		margin-top: 16px;
		font-size: 16px;
	}

	.ct3-hero-link svg {
		width: 18px;
		height: 18px;
	}

	/* Ждём вас в гости */
	.ct3-offices {
		scroll-margin-top: 16px;
		margin-top: 36px;
	}

	.ct3-section-title {
		font-size: 24px;
		letter-spacing: 0;
	}

	.ct3-section-sub {
		margin-top: 6px;
		font-size: 14px;
	}

	.ct3-companies {
		gap: 8px;
		margin-top: 16px;
	}

	.ct3 .c-region-btn {
		gap: 10px;
		height: 108px;
		padding: 0 10px;
		border-radius: 20px;
	}

	.ct3 .c-logo-kupitak {
		height: 24px;
	}

	.ct3 .c-logo-fincity {
		height: 20px;
	}

	.ct3 .c-region-sub {
		font-size: 12px;
	}

	.ct3-radio {
		top: 10px;
		right: 10px;
		width: 20px;
		height: 20px;
		background-size: 12px;
	}

	.ct3-pane {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
		margin-top: 12px;
	}

	.ct3-office {
		border-radius: 24px;
	}

	.ct3-office:only-child {
		display: flex;
	}

	.ct3 .c-card--map,
	.ct3-office:only-child .c-card--map {
		height: 180px;
		min-height: 0;
	}

	.ct3-office-info {
		padding: 18px;
	}

	.ct3-office-city {
		font-size: 12px;
	}

	.ct3-office-addr {
		margin-top: 4px;
		font-size: 19px;
	}

	.ct3-office-addr em {
		font-size: 14px;
	}

	.ct3-rows {
		gap: 10px;
		margin-top: 14px;
	}

	.ct3-rows li {
		font-size: 15px;
	}

	.ct3-rows svg {
		width: 18px;
		height: 18px;
		padding: 9px;
		border-radius: 11px;
	}

	.ct3 .c-soc-row {
		gap: 8px;
		margin-top: 16px;
	}

	.ct3 .c-soc-btn {
		height: 40px;
		padding: 0 14px;
		border-radius: 12px;
		font-size: 14px;
	}
}
