/* REDESIGN v2 pages: responsive adapter for the approved inline-style documents. */
.pg-v2-page__content,
.pg-v2-component,
.pg-v2 {
	display: block;
	width: 100%;
}

.pg-v2 {
	overflow: clip;
	font-family: Montserrat, Arial, sans-serif;
}

.pg-v2 *,
.pg-v2 *::before,
.pg-v2 *::after {
	box-sizing: border-box;
}

.pg-v2 img {
	max-width: 100%;
}

/* brantt-blocks sets a font directly on text elements, overriding inheritance. */
.pg-v2 :is(h5, h6, p, a, span, strong, small, em, b, li, label, input, select, textarea, button, summary, address, table, blockquote) {
	font-family: Montserrat, Arial, sans-serif;
}

.pg-v2 :is(h1, h2, h3, h4) {
	font-family: Stolzl, Montserrat, Arial, sans-serif !important;
}

/* Preserve section colors for headings without an explicit inline color. */
.pg-v2 :is(h1, h2, h3, h4, h5, h6) {
	color: inherit;
	width: auto;
}

/* The global blocks stylesheet forces every paragraph to width: 100%.
 * That width plus the process-card indent makes copy overflow the card. */
.pg-v2 p {
	width: auto;
	max-width: 100%;
}

.pg-v2 [style*='font-family'] {
	font-family: Montserrat, Arial, sans-serif !important;
}

.pg-v2 #poligrafix [style*='font-family'],
.pg-v2 [style*='font-size:clamp(40px'],
.pg-v2 [style*='font-size: clamp(40px'],
.pg-v2 [style*='font-size:32px'],
.pg-v2 [style*='font-size: 32px'] {
	font-family: Stolzl, Montserrat, Arial, sans-serif !important;
}

/* Safari needs a zero flex basis on replaced elements in the samples column. */
.pg-v2 #probki > div > div:first-child img {
	height: 0 !important;
	min-height: 0 !important;
	flex: 1 1 0 !important;
}

/* Use the same PoligraFIX artwork and treatment as on the homepage. */
.pg-v2--biuro-projektowe #poligrafix > div > div > img:first-child {
	content: url('../front-page/purchasing-bg-vector.png');
	max-width: none;
	filter: brightness(.38) !important;
}

/* Override the plugin's h1+p ... h6+p { margin-top: 0 !important }.
 * Keep the exact source spacing, matching compact and DC-normalized styles. */
.pg-v2 :is(h1, h2, h3, h4, h5, h6) + p:is([style*='margin:14px'], [style*='margin: 14px']) {
	margin-top: 14px !important;
}

.pg-v2 :is(h1, h2, h3, h4, h5, h6) + p:is([style*='margin:16px'], [style*='margin: 16px']) {
	margin-top: 16px !important;
}

.pg-v2 :is(h1, h2, h3, h4, h5, h6) + p:is([style*='margin:18px'], [style*='margin: 18px']) {
	margin-top: 18px !important;
}

.pg-v2 :is(h1, h2, h3, h4, h5, h6) + p:is([style*='margin:20px'], [style*='margin: 20px']) {
	margin-top: 20px !important;
}

.pg-v2-team-photo {
	width: 100%;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-radius: 12px;
	background: #e8e4ec;
}

.pg-v2-team-photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.pg-v2-contact-team {
	padding: 96px 0;
	background: #fff;
}

.pg-v2 .pg-v2-contact-team,
.pg-v2 .pg-v2-contact-team * {
	font-family: Montserrat, Arial, sans-serif !important;
}

.pg-v2-contact-team__container {
	width: 100%;
	max-width: 1410px;
	margin: 0 auto;
	padding: 0 40px;
}

.pg-v2-contact-team__intro {
	max-width: 900px;
	margin: 0 auto 48px;
	text-align: center;
}

.pg-v2-contact-team__intro > span {
	display: block;
	margin: 0 0 14px;
	color: #ff0074;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.pg-v2 .pg-v2-contact-team .pg-v2-contact-team__intro h2 {
	margin: 0;
	color: #161420;
	font-family: Stolzl, Montserrat, Arial, sans-serif !important;
	font-size: clamp(28px, 3vw, 40px);
	font-weight: 900;
	line-height: 1.15;
	letter-spacing: -.01em;
}

.pg-v2-contact-team__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px 24px;
}

.pg-v2-contact-team__group-title {
	margin: 72px 0 32px;
	color: #161420;
	font-size: clamp(24px, 2.4vw, 32px);
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
}

.pg-v2-contact-person {
	min-width: 0;
}

.pg-v2-contact-person__details {
	display: flex;
	min-width: 0;
	margin-top: 14px;
	flex-direction: column;
	align-items: flex-start;
	gap: 5px;
}

.pg-v2-contact-person__details h3 {
	margin: 0 0 2px;
	color: #161420;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}

.pg-v2-contact-person__details a {
	max-width: 100%;
	color: #655f6d;
	font-size: 14px;
	line-height: 1.5;
	overflow-wrap: anywhere;
	text-decoration: none;
}

.pg-v2-contact-person__details a:hover,
.pg-v2-contact-person__details a:focus-visible {
	color: #ff0074;
}

.pg-v2-form {
	width: 100%;
}

.pg-v2-form #fluentform_3 fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.pg-v2-form #fluentform_3,
.pg-v2-form #fluentform_3 .ff-el-input--label label,
.pg-v2-form #fluentform_3 .ff-el-form-control:not(.ff-screen-reader-element),
.pg-v2-form #fluentform_3 .ff_upload_btn.ff-btn,
.pg-v2-form #fluentform_3 .ff-btn-submit.ff_btn_style {
	font-family: Montserrat, Arial, sans-serif;
}

@media (max-width: 1100px) {
	.pg-v2-contact-team__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	/* The DC runtime serializes inline styles with spaces, so match the
	 * repeat() value instead of relying on the original compact notation. */
	.pg-v2 [style*="repeat(4"],
	.pg-v2 [style*="repeat(3"] {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	.pg-v2 [style*="repeat(5"] {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 760px) {
	.pg-v2-contact-team {
		padding: 64px 0;
	}

	.pg-v2-contact-team__container {
		padding: 0 20px;
	}

	.pg-v2-contact-team__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 28px 16px;
	}

	.pg-v2-contact-team__group-title {
		margin-top: 56px;
	}

	.pg-v2 section[style*="padding:96px 0"],
	.pg-v2 section[style*="padding: 96px 0px"],
	.pg-v2 section[style*="padding:88px 0"],
	.pg-v2 section[style*="padding: 88px 0px"],
	.pg-v2 section[style*="padding:80px 0"],
	.pg-v2 section[style*="padding: 80px 0px"] {
		padding-top: 64px !important;
		padding-bottom: 64px !important;
	}

	.pg-v2 [style*="padding:0 40px"],
	.pg-v2 [style*="padding: 0px 40px"],
	.pg-v2 [style*="padding:24px 40px 0"],
	.pg-v2 [style*="padding: 24px 40px 0px"] {
		padding-right: 20px !important;
		padding-left: 20px !important;
	}

	.pg-v2 [style*="padding:56px 40px 96px"],
	.pg-v2 [style*="padding: 56px 40px 96px"] {
		padding: 40px 20px 64px !important;
	}

	/* On phones every document grid becomes a readable single column. */
	.pg-v2 [style*="grid-template-columns"] {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	.pg-v2 [style*="min-width:"] {
		min-width: 0 !important;
	}

	/* Hero, process and contact wrappers use two flexible desktop columns.
	 * Removing min-width alone would allow them to stay side by side and become
	 * too narrow, therefore stack the outer section rows explicitly. */
	.pg-v2 section > [style*="display: flex"][style*="flex-wrap: wrap"] {
		flex-direction: column !important;
		align-items: stretch !important;
	}

	.pg-v2 [style*="padding:15px 56px"],
	.pg-v2 [style*="padding: 15px 56px"] {
		width: 100%;
		justify-content: center;
		padding-right: 28px !important;
		padding-left: 28px !important;
	}

	/* The samples artwork is absolutely positioned on desktop. On mobile it
	 * must participate in the document flow or its images collapse to strips. */
	.pg-v2 #probki > div {
		flex-direction: column !important;
		gap: 36px !important;
	}

	.pg-v2 #probki > div > div {
		width: 100% !important;
		max-width: none !important;
		min-width: 0 !important;
	}

	.pg-v2 #probki > div > div:first-child > div {
		position: static !important;
		inset: auto !important;
	}

	.pg-v2 #probki > div > div:first-child img {
		flex: none !important;
		height: auto !important;
		aspect-ratio: 16 / 9;
	}

	.pg-v2--biuro-projektowe #poligrafix > div > div {
		padding: 36px 24px !important;
	}

	.pg-v2--biuro-projektowe #poligrafix p[style*="width: 80%"] {
		width: 100% !important;
	}

	/* Team portraits remain compact, but no longer squeeze into four columns. */
	.pg-v2--o-nas #zespol [style*="grid-template-columns"] {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 24px 16px !important;
	}

	.pg-v2-team-photo {
		aspect-ratio: 4 / 5;
	}
}

@media (max-width: 430px) {
	.pg-v2-contact-person__details a {
		font-size: 12px;
	}

	.pg-v2--o-nas #zespol [style*="grid-template-columns"] {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}
