/* Pagina de contato (contato.php + atributos/includes/shortcodes/contato.php).
 *
 *   .contact-layout
 *     .contact-success              aviso de mensagem enviada (/contato/sucesso/)
 *     .contact-grid
 *       .contact-card--channels     "Fale com o Instituto Arte no Dique"   | lado a lado, mesma altura
 *       .contact-card--form         "Envie uma mensagem"                   |
 *       .contact-card--map          "Como chegar": largura total, embaixo
 *
 * Cores: verde = acao (links, botoes, foco, selo do WhatsApp); laranja = fio dos titulos;
 * verde-escuro = titulos; papel/verde-claro = fundos de apoio. Arquivo somente ASCII. */

.contact-page {
	--ct-ink: #1e2922;
	--ct-text: #2f3a34;
	--ct-muted: #5a665e;
	--ct-green: #329451;
	--ct-green-strong: #2a7f45;
	--ct-green-dark: #123e2e;
	--ct-green-soft: #e8f3eb;
	--ct-green-wash: #f4f9f5;
	--ct-orange: #ef8735;
	--ct-paper: #fffdf8;
	--ct-line: rgba(18, 62, 46, .13);
	--ct-field-line: #8a968e;
	--ct-danger: #b3261e;
	--ct-light: 'HelveticaNeue-Light', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	--ct-bold: 'HelveticaNeueBold', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	background: #fff;
}

/* ---------- Cabecalho (padrao das paginas internas) ---------- */

.contact-hero {
	background: #f7f3ec;
}

.contact-hero.has-bg {
	background-position: center;
}

.contact-hero.has-bg > .o-center {
	z-index: 1;
}

/* ---------- Folha ---------- */

/* Os cartoes ja tem margem interna: a folha branca cede espaco lateral para eles */
.contact-page > .site-page-hero + .site-page-surface.contact-content {
	padding: clamp(26px, 4vw, 56px) clamp(12px, 3.2vw, 64px) clamp(34px, 5vw, 72px) !important;
}

.contact-intro {
	max-width: 760px;
	margin: 0 auto clamp(24px, 3vw, 40px);
	color: var(--ct-text);
	font-size: 1.125rem;
	line-height: 1.6;
	text-align: center;
}

.contact-intro p {
	text-align: inherit;
}

.contact-layout {
	max-width: 1320px;
	margin: 0 auto;
	color: var(--ct-text);
	font-family: var(--ct-light);
	text-align: left;
}

.contact-layout *,
.contact-layout *::before,
.contact-layout *::after {
	box-sizing: border-box;
}

.contact-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(18px, 2vw, 28px);
}

/* ---------- Cartoes ---------- */

.contact-card {
	min-width: 0;
	padding: clamp(24px, 2.7vw, 40px);
	border: 1px solid var(--ct-line);
	border-radius: var(--arte-radius-lg, 24px);
	background: #fff;
	box-shadow: 0 14px 34px rgba(18, 62, 46, .08);
}

/* Canais e formulario: cabecalho + corpo. Com subgrid os dois cabecalhos dividem a mesma linha,
   entao os corpos comecam alinhados mesmo quando um titulo quebra em duas linhas. */
.contact-card--channels,
.contact-card--form {
	display: grid;
	grid-template-rows: auto 1fr;
}

@supports (grid-template-rows: subgrid) {
	.contact-card--channels,
	.contact-card--form {
		grid-row: span 2;
		grid-template-rows: subgrid;
		row-gap: 0;
	}
}

.contact-card--map {
	grid-column: 1 / -1;
}

.contact-card__head {
	min-width: 0;
	padding-bottom: clamp(20px, 2.2vw, 28px);
}

.contact-card__body {
	display: grid;
	min-width: 0;
}

.contact-kicker {
	display: block;
	margin: 0 0 10px;
	color: var(--ct-green-strong);
	font-family: var(--ct-bold);
	font-size: .78rem;
	font-weight: normal;
	letter-spacing: .14em;
	line-height: 1.3;
	text-transform: uppercase;
}

.contact-card h2 {
	position: relative;
	display: block;
	margin: 0 !important;
	padding: 0 0 16px;
	color: var(--ct-green-dark);
	font-family: var(--ct-bold);
	font-size: clamp(1.45rem, 1.05rem + 1.05vw, 1.85rem);
	font-weight: normal;
	letter-spacing: -.02em;
	line-height: 1.15;
	text-align: left;
	text-wrap: balance;
}

.contact-card h2::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 44px;
	height: 4px;
	border-radius: 4px;
	background: var(--ct-orange);
}

.contact-lead {
	max-width: 46ch;
	margin: 16px 0 0;
	padding: 0;
	color: var(--ct-text);
	font-size: 1.0625rem;
	line-height: 1.55;
	text-align: left;
	text-wrap: balance;
}

.contact-svg {
	display: block;
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
}

/* ---------- Canais ---------- */

/* As linhas crescem juntas para acompanhar a altura do formulario, ate 132px cada
   (--ct-rows = quantidade de canais, vem do include) */
.contact-channels {
	display: grid;
	grid-auto-rows: minmax(78px, 1fr);
	gap: 12px;
	max-height: calc(var(--ct-rows, 4) * 144px - 12px);
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.contact-channels > li {
	display: flex;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.contact-channels > li::before {
	content: none;
}

.contact-channel {
	display: grid;
	flex: 1 1 auto;
	grid-template-columns: 52px minmax(0, 1fr) 24px;
	align-items: center;
	gap: 16px;
	min-width: 0;
	padding: 12px 18px 12px 13px;
	border: 1px solid var(--ct-line);
	border-radius: var(--arte-radius-md, 16px);
	background: #fff;
	color: var(--ct-ink);
	font-family: var(--ct-light);
	font-weight: normal;
	text-decoration: none;
	transition: border-color var(--arte-dur, .22s) var(--arte-ease, ease), background-color var(--arte-dur, .22s) var(--arte-ease, ease), box-shadow var(--arte-dur, .22s) var(--arte-ease, ease), transform var(--arte-dur, .22s) var(--arte-ease, ease);
}

.contact-channel__icon {
	display: grid;
	width: 52px;
	height: 52px;
	border-radius: var(--arte-radius-sm, 10px);
	background: var(--ct-green-soft);
	color: var(--ct-green-dark);
	place-items: center;
	transition: background-color var(--arte-dur, .22s) var(--arte-ease, ease), color var(--arte-dur, .22s) var(--arte-ease, ease);
}

.contact-channel__text {
	display: block;
	min-width: 0;
}

.contact-channel__label {
	display: block;
	color: var(--ct-muted);
	font-family: var(--ct-bold);
	font-size: .72rem;
	letter-spacing: .12em;
	line-height: 1.3;
	text-transform: uppercase;
}

.contact-channel__value {
	display: block;
	margin-top: 4px;
	color: var(--ct-ink);
	font-family: var(--ct-bold);
	font-size: 1.125rem;
	letter-spacing: -.005em;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.contact-channel--endereco .contact-channel__value {
	font-family: var(--ct-light);
	font-size: 1rem;
	letter-spacing: 0;
	line-height: 1.45;
}

/* Endereco em telas largas: linhas equilibradas (a cidade nao fica sozinha em uma linha) e o
   traco junto da palavra anterior. No celular a quebra natural ja e a melhor. */
@media (min-width: 641px) {
	.contact-channel--endereco .contact-channel__value {
		text-wrap: balance;
	}

	.contact-channel__nobreak {
		white-space: nowrap;
	}
}

.contact-channel__go {
	display: block;
	color: #7b877f;
	transition: transform var(--arte-dur, .22s) var(--arte-ease, ease), color var(--arte-dur, .22s) var(--arte-ease, ease);
}

/* WhatsApp: acao principal, selo verde cheio */
.contact-channel--whatsapp {
	border-color: rgba(50, 148, 81, .42);
	background: var(--ct-green-wash);
}

.contact-channel--whatsapp .contact-channel__icon {
	background: var(--ct-green-strong);
	color: #fff;
}

.contact-channel:hover,
.contact-channel:focus {
	border-color: var(--ct-green);
	background: var(--ct-green-wash);
	box-shadow: var(--arte-shadow-md, 0 10px 28px rgba(30, 41, 34, .12));
	color: var(--ct-ink);
	text-decoration: none;
	transform: translateY(-3px);
}

.contact-channel:hover .contact-channel__icon,
.contact-channel:focus .contact-channel__icon {
	background: var(--ct-green-strong);
	color: #fff;
}

.contact-channel--whatsapp:hover .contact-channel__icon,
.contact-channel--whatsapp:focus .contact-channel__icon {
	background: var(--ct-green-dark);
}

.contact-channel:hover .contact-channel__go,
.contact-channel:focus .contact-channel__go {
	color: var(--ct-green-strong);
	transform: translateX(3px);
}

.contact-channel:focus {
	outline: 0;
}

.contact-channel:focus-visible {
	outline: 3px solid var(--ct-green-strong);
	outline-offset: 2px;
}

/* ---------- Formulario ---------- */

.contact-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	grid-template-rows: auto auto 1fr auto;
	gap: 16px 18px;
	min-width: 0;
	margin: 0;
}

.contact-honeypot {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.contact-form .contact-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.contact-form .contact-field--msg,
.contact-form__foot {
	grid-column: 1 / -1;
}

.contact-form .contact-field > label {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0 6px;
	margin: 0 0 7px;
	padding: 0;
	color: var(--ct-ink);
	font-family: var(--ct-bold);
	font-size: .9rem;
	font-weight: normal;
	line-height: 1.3;
}

.contact-field__hint {
	color: var(--ct-muted);
	font-family: var(--ct-light);
	font-size: .85rem;
	line-height: 1;
}

.contact-form .form-control {
	display: block;
	width: 100%;
	height: auto;
	min-height: 52px;
	margin: 0;
	padding: 13px 15px;
	border: 1px solid var(--ct-field-line);
	border-radius: var(--arte-radius-sm, 10px);
	background: #fff;
	box-shadow: none;
	color: var(--ct-ink);
	font-family: var(--ct-light);
	font-size: 1rem;
	line-height: 1.4;
	transition: border-color var(--arte-dur, .22s) var(--arte-ease, ease), box-shadow var(--arte-dur, .22s) var(--arte-ease, ease), background-color var(--arte-dur, .22s) var(--arte-ease, ease);
	-webkit-appearance: none;
	appearance: none;
}

.contact-form textarea.form-control {
	flex: 1 1 auto;
	height: auto;
	min-height: 148px;
	resize: vertical;
}

.contact-form .form-control::placeholder {
	color: #6b766f;
	opacity: 1;
}

.contact-form .form-control:hover {
	border-color: var(--ct-green-dark);
}

.contact-form .form-control:focus {
	border-color: var(--arte-focus, #1a6277);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(26, 98, 119, .15);
	color: var(--ct-ink);
	outline: 2px solid transparent;
}

/* Aviso para leitores de tela (role="alert"), preenchido pelo script do include: fora da tela */
.contact-form__alert {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

/* Erro do validador do site: ele poe .alert-danger no campo e mostra a .callout do grupo
   (a caixa ja vem no HTML, com o texto do aviso) */
.contact-form .form-control.alert-danger,
.contact-form .form-control.alert-danger:hover {
	border-color: var(--ct-danger);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(179, 38, 30, .1);
	color: var(--ct-ink);
}

.contact-form .callout {
	position: relative;
	margin: 8px 0 0 !important;
	padding: 0 0 0 24px !important;
	border: 0 !important;
	border-radius: 0;
	background: none;
	color: var(--ct-danger);
	font-family: var(--ct-bold);
	font-size: .875rem;
	font-weight: normal;
	line-height: 1.35;
}

.contact-form .callout::before {
	content: "!";
	position: absolute;
	top: 1px;
	left: 0;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	background: var(--ct-danger);
	color: #fff;
	font-size: .75rem;
	line-height: 17px;
	text-align: center;
}

/* So para uma caixa criada pelo proprio validador (campo novo sem .callout no HTML) */
.contact-form .callout.is-required::after {
	content: "Preencha este campo.";
}

.contact-form__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px 20px;
	flex-wrap: wrap;
	padding-top: 4px;
}

.contact-form__note {
	flex: 1 1 150px;
	margin: 0;
	padding: 0;
	color: var(--ct-muted);
	font-size: .9rem;
	line-height: 1.4;
	text-align: left;
}

/* ---------- Botoes ---------- */

.contact-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	margin: 0;
	padding: 12px 26px;
	border: 1.5px solid transparent;
	border-radius: var(--arte-btn-radius, 12px);
	font-family: var(--ct-bold);
	font-size: 1rem;
	font-weight: normal;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--arte-dur, .22s) var(--arte-ease, ease), border-color var(--arte-dur, .22s) var(--arte-ease, ease), color var(--arte-dur, .22s) var(--arte-ease, ease), box-shadow var(--arte-dur, .22s) var(--arte-ease, ease), transform var(--arte-dur, .22s) var(--arte-ease, ease);
	-webkit-appearance: none;
	appearance: none;
}

.contact-btn .contact-svg {
	width: 20px;
	height: 20px;
	transition: transform var(--arte-dur, .22s) var(--arte-ease, ease);
}

.contact-btn--primary {
	border-color: var(--ct-green-strong);
	background: var(--ct-green-strong);
	box-shadow: 0 8px 18px rgba(42, 127, 69, .24);
	color: #fff;
}

.contact-btn--primary:hover,
.contact-btn--primary:focus {
	border-color: var(--ct-green-dark);
	background: var(--ct-green-dark);
	box-shadow: 0 10px 22px rgba(18, 62, 46, .26);
	color: #fff;
	text-decoration: none;
}

.contact-btn--outline {
	border-color: var(--ct-green-strong);
	background: #fff;
	color: var(--ct-green-strong);
}

.contact-btn--outline:hover,
.contact-btn--outline:focus {
	border-color: var(--ct-green-strong);
	background: var(--ct-green-strong);
	color: #fff;
	text-decoration: none;
}

.contact-btn:hover .contact-svg,
.contact-btn:focus .contact-svg {
	transform: translate(2px, -2px);
}

.contact-btn:hover,
.contact-btn:focus-visible {
	transform: translateY(-1px);
}

.contact-btn:active {
	transform: translateY(0) scale(.98);
}

.contact-btn:focus {
	outline: 0;
}

.contact-btn:focus-visible {
	outline: 3px solid var(--ct-green-strong);
	outline-offset: 3px;
}

/* ---------- Mapa ---------- */

.contact-map__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px 32px;
	flex-wrap: wrap;
}

.contact-map__head .contact-card__head {
	flex: 1 1 440px;
	padding-bottom: 0;
}

.contact-map__head .contact-btn {
	flex: 0 0 auto;
}

.contact-map__address {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 16px 0 0;
	padding: 0;
	color: var(--ct-text);
	font-size: 1.0625rem;
	line-height: 1.5;
	text-align: left;
}

.contact-map__pin {
	flex: 0 0 auto;
	margin-top: 1px;
	color: var(--ct-green-strong);
}

.contact-map__frame {
	position: relative;
	margin-top: clamp(20px, 2.4vw, 30px);
	border: 1px solid var(--ct-line);
	border-radius: var(--arte-radius-md, 16px);
	background: #eef3ef;
	line-height: 0;
	overflow: hidden;
}

.contact-map__frame iframe {
	display: block;
	width: 100% !important;
	max-width: none;
	height: clamp(380px, 40vw, 540px) !important;
	border: 0 !important;
}

/* ---------- Mensagem enviada ---------- */

.contact-success {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 clamp(18px, 2vw, 28px);
	padding: 18px 22px;
	border: 1px solid rgba(50, 148, 81, .42);
	border-radius: var(--arte-radius-md, 16px);
	background: var(--ct-green-soft);
	color: var(--ct-green-dark);
	scroll-margin: 110px 0;
}

.contact-success:focus {
	outline: 0;
}

.contact-success__icon {
	display: grid;
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--ct-green-strong);
	color: #fff;
	place-items: center;
}

.contact-success__text {
	min-width: 0;
}

.contact-success strong {
	display: block;
	color: var(--ct-green-dark);
	font-family: var(--ct-bold);
	font-size: 1.2rem;
	font-weight: normal;
	letter-spacing: -.01em;
	line-height: 1.25;
}

.contact-success p {
	margin: 3px 0 0;
	padding: 0;
	color: var(--ct-green-dark);
	font-size: 1.0625rem;
	line-height: 1.5;
	text-align: left;
}

/* ---------- Telas menores ---------- */

/* Cartoes lado a lado, ainda estreitos: a dica do rotulo sai da tela (continua para leitores de tela) */
@media (min-width: 1200px) and (max-width: 1379px) {
	.contact-field__hint {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
}

/* Uma coluna: canais, formulario, mapa */
@media (max-width: 1199px) {
	.contact-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.contact-card--channels,
	.contact-card--form {
		display: block;
		grid-row: auto;
	}

	.contact-card__head {
		padding-bottom: 26px;
	}

	.contact-channels {
		grid-auto-rows: auto;
		max-height: none;
	}

	.contact-channel {
		min-height: 78px;
	}

	.contact-form {
		grid-template-rows: none;
	}

	.contact-lead {
		max-width: 62ch;
	}
}

/* Faixa intermediaria: canais em duas colunas */
@media (min-width: 1000px) and (max-width: 1199px) {
	.contact-channels {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.contact-channels > li:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

	/* coluna estreita: com 1rem o e-mail cabe em uma linha desde 1000px */
	.contact-channel__value {
		font-size: 1rem;
	}
}

@media (max-width: 640px) {
	.contact-card {
		padding: 22px 18px 20px;
		border-radius: var(--arte-radius-md, 16px);
	}

	.contact-card__head {
		padding-bottom: 22px;
	}

	.contact-form {
		grid-template-columns: minmax(0, 1fr);
	}

	.contact-channel {
		grid-template-columns: 48px minmax(0, 1fr) 22px;
		gap: 13px;
		min-height: 74px;
		padding: 11px 13px 11px 11px;
	}

	.contact-channel__icon {
		width: 48px;
		height: 48px;
	}

	.contact-channel__value {
		font-size: 1.0625rem;
	}

	.contact-form__foot {
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 12px;
	}

	.contact-form__note {
		flex: 0 0 auto;
		text-align: center;
	}

	.contact-btn {
		width: 100%;
	}

	.contact-map__head {
		align-items: stretch;
	}

	.contact-map__frame iframe {
		height: 380px !important;
	}

	.contact-success {
		align-items: flex-start;
		padding: 16px;
	}
}

/* Telas bem estreitas: sem a seta, para o e-mail caber em duas linhas */
@media (max-width: 380px) {
	.contact-channel {
		grid-template-columns: 48px minmax(0, 1fr);
	}

	.contact-channel__go {
		display: none;
	}
}

/* Celulares de 320 a 340px: o e-mail continua em duas linhas e o botao do mapa em uma */
@media (max-width: 340px) {
	.contact-channel {
		grid-template-columns: 44px minmax(0, 1fr);
		gap: 11px;
		padding-right: 11px;
		padding-left: 10px;
	}

	.contact-channel__icon {
		width: 44px;
		height: 44px;
	}

	.contact-channel__value {
		font-size: .9375rem;
	}

	.contact-btn {
		padding-right: 16px;
		padding-left: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.contact-channel,
	.contact-channel__icon,
	.contact-channel__go,
	.contact-form .form-control,
	.contact-btn,
	.contact-btn .contact-svg {
		transition: none;
	}

	.contact-channel:hover .contact-channel__go,
	.contact-channel:focus .contact-channel__go,
	.contact-btn:hover .contact-svg,
	.contact-btn:focus .contact-svg,
	.contact-channel:hover,
	.contact-channel:focus,
	.contact-btn:hover,
	.contact-btn:focus-visible,
	.contact-btn:active {
		transform: none;
	}
}
