/* /contatti (inc/contatti.php, content from staging/tools/contatti-rebuild.php, T-5226).
   Pink page, white type (base.css rules). Lede at the /servizi scale; the form on white paper like the landing;
   direct lines in white on pink beside it; the OSM map full width; the jobs line last.
   WordPress constrained layout centres children with margin-inline auto !important: set only margin-block here. */

/* ---------- 0. Shell ---------- */
/* Additional CSS (Customizer) makes the old page a two-column grid: undo it here. */
body.cj-contatti #main .entry-content {
	display: block;
	max-width: none;
	margin: 0;
}
.cj-contatti .entry-content > * { max-width: none; }
.cj-contatti .entry-content :is([id], .cj-ct-form) { scroll-margin-top: calc(var(--header-height, 90px) + 1rem); }

/* ---------- 0b. Page title: the site H1 now lives in base.css §1 for every Blocksy page title (2026-11-12). ---------- */

/* ---------- 1. Lede ---------- */
/* .cj-ct-intro padding: base.css page box (--cj-atl-gap / --cj-atl-bottom) */
.cj-contatti .entry-content .cj-ct-lede {
	max-width: var(--cj-lede-measure);
	margin-block: 0;
	font-size: var(--cj-lede-size);
	font-weight: 500;
	line-height: var(--cj-lede-leading);
	letter-spacing: var(--cj-lede-tracking);
	text-wrap: balance;
}

/* ---------- 2. Form + direct lines ---------- */
.cj-contatti .entry-content .cj-ct-main {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: clamp(1.5rem, 5vw, 5rem);
	align-items: start;
	padding-bottom: clamp(3rem, 9vh, 6rem);
}
@media (max-width: 899px) {
	.cj-contatti .entry-content .cj-ct-main { grid-template-columns: minmax(0, 1fr); }
}

/* The form: white paper, anthracite type, pink slab submit (as on the landing). */
.cj-contatti .entry-content .cj-ct-form {
	margin-block: 0;
	padding: clamp(1.5rem, 3.5vw, 3rem);
	border-radius: 4px;
	background: var(--cj-white);
	color: var(--cj-anthracite);
	box-shadow: 0 30px 60px -30px rgba(80, 0, 35, 0.6);
}
.cj-contatti .entry-content .cj-ct-form h2 {
	margin-block: 0 0.5rem;
	font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.75rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
	text-transform: none;
	color: var(--cj-anthracite);
}
.cj-contatti .entry-content .cj-ct-form__intro {
	margin-block: 0 1.5rem;
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 1.45;
	color: var(--cj-slate);
}

/* CF7 inside the panel. The legacy Additional CSS styles .wpcf7-form inputs (transparent, square, teal focus): override. */
.cj-ct-form .wpcf7 p { margin: 0 0 1rem; }
/* Additional CSS "Contact form" lays .page-contatti .wpcf7-form out as a 2-column grid: undo it (the pairs below do the columns). */
.cj-contatti .cj-ct-form .wpcf7-form { display: block; }
.cj-ct-form .wpcf7 .cj-ct-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
@media (max-width: 599px) { .cj-ct-form .wpcf7 .cj-ct-pair { grid-template-columns: minmax(0, 1fr); } }
.cj-ct-form .wpcf7 label { display: block; font-size: 0.875rem; font-weight: 700; line-height: 1.4; color: var(--cj-anthracite); }
.cj-ct-form .wpcf7 .cj-ct-hint { display: block; font-weight: 500; color: var(--cj-slate); }
.cj-ct-form .wpcf7-form :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], select, textarea) {
	display: block;
	width: 100%;
	margin-top: 0.3rem;
	padding: 0.8rem 0.9rem;
	border: 1.5px solid #c9ccd1;
	border-radius: 4px;
	background: var(--cj-white);
	color: var(--cj-anthracite);
	height: auto;
	min-height: 3.1rem;
	font: 500 1.0625rem/1.3 var(--cj-font);
	box-shadow: none;
}
.cj-ct-form .wpcf7-form textarea { min-height: 8.5rem; resize: vertical; }
.cj-ct-form .wpcf7-form select {
	appearance: none;
	padding-right: 2.5rem;
	background: var(--cj-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231e2022' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
}
.cj-ct-form .wpcf7-form :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], select, textarea):focus {
	outline: 2px solid var(--cj-pink-20);
	outline-offset: 1px;
	border-color: var(--cj-pink-20);
}
.cj-ct-form .wpcf7 .wpcf7-acceptance label { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.875rem; font-weight: 700; }
.cj-ct-form .wpcf7 .wpcf7-acceptance input { width: 1.15rem; height: 1.15rem; margin: 0.1rem 0 0; accent-color: var(--cj-pink-20); flex: none; }
.cj-ct-form .wpcf7 .wpcf7-list-item { margin: 0; }
.cj-ct-form .wpcf7 a { color: var(--cj-pink-20); }
.cj-ct-form .wpcf7 .recaptchalgl { font-size: 0.75rem; font-weight: 700; line-height: 1.4; color: var(--cj-slate); }
.cj-ct-form .wpcf7 input[type="submit"] {
	width: 100%;
	margin-top: 0.5rem;
	padding: 1.05em 1.35em;
	border: 0;
	border-radius: 4px;
	background: linear-gradient(var(--cj-pink-40), var(--cj-pink-40)) no-repeat left / 0% 100%, var(--cj-pink-20);
	color: var(--cj-white);
	font: 700 1rem/1.2 var(--cj-font);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-size 0.4s cubic-bezier(0.2, 0.7, 0.1, 1);
}
.cj-ct-form .wpcf7 input[type="submit"]:is(:hover, :focus-visible) { background-size: 100% 100%, auto; }
.cj-ct-form .wpcf7 input[type="submit"]:focus-visible { outline: 2px solid var(--cj-anthracite); outline-offset: 3px; }
.cj-ct-form .wpcf7 .wpcf7-spinner { display: block; margin: 0.5rem auto 0; }
.cj-ct-form .wpcf7 .wpcf7-not-valid-tip { margin-top: 0.3rem; font-size: 0.8125rem; font-weight: 700; color: var(--cj-pink-40); }
.cj-ct-form .wpcf7 form .wpcf7-response-output {
	margin: 1rem 0 0;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	background: none;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--cj-anthracite);
}
.cj-ct-form .grecaptcha-badge { visibility: hidden; }
/* /lavora-con-noi (T-5232): CV upload and the English half of bilingual labels and lines. */
.cj-ct-form .wpcf7-form input[type="file"] {
	display: block;
	width: 100%;
	margin-top: 0.3rem;
	padding: 0.7rem;
	border: 1.5px dashed #c9ccd1;
	border-radius: 4px;
	background: var(--cj-surface);
	color: var(--cj-anthracite);
	font: 500 0.9375rem/1.3 var(--cj-font);
}
.cj-ct-form .wpcf7-form input[type="file"]::file-selector-button {
	margin-right: 0.75rem;
	padding: 0.55rem 0.9rem;
	border: 0;
	border-radius: 4px;
	background: var(--cj-anthracite);
	color: var(--cj-white);
	font: 700 0.8125rem/1.2 var(--cj-font);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
}
.cj-ct-en { font-weight: 500; }
.cj-ct-form .wpcf7 .cj-ct-links { margin: 0 0 0.25rem; padding: 0; border: 0; min-width: 0; }
.cj-ct-form .wpcf7 .cj-ct-links legend { margin-bottom: 0.5rem; padding: 0; font-size: 0.875rem; font-weight: 700; line-height: 1.4; color: var(--cj-anthracite); }
.cj-contatti .entry-content .cj-ct-direct .cj-ct-en { display: block; margin-top: 0.15rem; font-size: 1rem; font-weight: 500; }
.cj-contatti .entry-content .cj-ct-lede-en { max-width: 46ch; margin-block: 1.25rem 0; font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); font-weight: 500; line-height: 1.4; }
/* Job applications: notice under the service select; the button is marked blocked (contatti.js, refused server-side too). */
.cj-ct-form .wpcf7 .cj-ct-jobnote > p {
	margin: 0 0 1rem;
	padding: 0.85rem 1rem;
	border-left: 4px solid var(--cj-pink-20);
	border-radius: 4px;
	background: var(--cj-pink-tint);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.45;
	color: var(--cj-anthracite);
}
.cj-ct-form .wpcf7 .cj-ct-jobnote > p[hidden] { display: none; }
.cj-ct-form .wpcf7 .cj-ct-jobnote span { display: block; margin-top: 0.35rem; font-weight: 500; }
.cj-ct-form .wpcf7 form.is-job input[type="submit"] { opacity: 0.45; cursor: not-allowed; background-size: 0% 100%, auto; }

/* Inline thank-you: the panel keeps its place and swaps its content. */
.cj-ct-form.is-sent > :not(.cj-ct-thanks),
.cj-ct-form:not(.is-sent) .cj-ct-thanks { display: none; }
.cj-contatti .entry-content .cj-ct-thanks h2 { color: var(--cj-pink-20); }
.cj-contatti .entry-content .cj-ct-thanks p { margin-block: 0; font-size: 1.125rem; font-weight: 500; line-height: 1.45; color: var(--cj-anthracite); }
.cj-contatti .entry-content .cj-ct-thanks a { color: var(--cj-pink-20); font-weight: 700; }
.cj-ct-thanks:focus { outline: none; }

/* Direct lines: white on pink, large type (base.css large-type rule: ≥ 20px, weight 500). */
.cj-contatti .entry-content .cj-ct-direct { margin-block: 0; padding-top: clamp(0rem, 2vw, 1.5rem); }
.cj-contatti .entry-content .cj-ct-direct h2 {
	margin-block: 0 1.5rem;
	font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
	font-weight: 700;
	line-height: 1.1;
	text-transform: none;
}
.cj-contatti .entry-content .cj-ct-line {
	margin-block: 0;
	padding: 1rem 0;
	border-top: 1px solid rgba(255, 255, 255, 0.55);
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.35;
}
.cj-contatti .entry-content .cj-ct-line:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.55); }
.cj-contatti .entry-content .cj-ct-label {
	display: block;
	margin-bottom: 0.2rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.cj-contatti .entry-content .cj-ct-line a {
	color: inherit;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 2px solid currentColor;
	overflow-wrap: anywhere;
}
.cj-contatti .entry-content .cj-ct-line a:is(:hover, :focus-visible) { border-bottom-color: transparent; }
.cj-contatti .entry-content .cj-ct-line a:focus-visible { outline: 2px solid var(--cj-white); outline-offset: 3px; }

/* ---------- 3. Map (OSM block, lazy) ---------- */
.cj-contatti .entry-content .cj-ct-map { margin-block: 0; }
.cj-contatti .entry-content .cj-ct-map > * { margin-block: 0; }
/* The block's own address + directions caption repeats the direct lines above: keep it for screen readers only. */
.cj-contatti .cj-ct-map .cjosm__caption {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------- 4. Jobs line (Italian + English) ---------- */
.cj-contatti .entry-content .cj-ct-jobs { padding: clamp(2.5rem, 7vh, 4.5rem) 0; }
.cj-contatti .entry-content .cj-ct-jobs p { margin-block: 0 0.35rem; font-size: 1.25rem; font-weight: 500; line-height: 1.4; }
.cj-contatti .entry-content .cj-ct-jobs .cj-ct-jobs__en { font-size: 1.0625rem; font-weight: 700; }
.cj-contatti .entry-content .cj-ct-jobs a { color: inherit; font-weight: 700; text-decoration: none; border-bottom: 2px solid currentColor; }
.cj-contatti .entry-content .cj-ct-jobs a:focus-visible { outline: 2px solid var(--cj-white); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
	.cj-ct-form .wpcf7 input[type="submit"] { transition: none; }
}
