/*  1 element */
.editor-block {
	padding: 60px 0;
}
.editor-block.padding-0{
	padding: 0!important;
}
/* Wszysstkie prócz 1 i ostatniego */
.editor-block + .editor-block {
	padding: 50px 0 50px;
}

/* Ostatni element editor block */
main .editor-block:not(:has(~ .editor-block)) {
	padding-bottom: 60px;
}

.editor-block .wrap > .heading {
	display: flex;
	justify-content: center;
	align-items: center;
	font-weight: 500;
	text-align: center;
	font-family: var(--display);
	margin: 0 auto 48px;
	color: var(--ink);
}

.editor-block .wrap .editor-block__before-heading {
	text-align: center;
	margin: 0 auto;
	padding: 0;
	margin-bottom: 16px;
	color: var(--brand);
	text-transform: uppercase;
	max-width: 800px;
}
.editor-block .wrap .editor-block__before-heading p {
	margin: 0;
	color: var(--brand);
}

.editor-block .editor-block__button {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 32px;
}
.editor-block .editor-block__button--left {
	justify-content: flex-start;
	/* desktop: wyrównanie do treści powyżej — .custom-col-12 ma padding-left:15px */
	padding-left: 15px;
}
@media (max-width: 768px) {
	.editor-block .editor-block__button {
		padding-left: 24px;
		padding-right: 24px;
	}
}

/* nagłówek wiersza (kicker + nagłówek) — w kolumnie z tekstem, wyrównany do lewej.
   Wysoka specyficzność, żeby ubić skalę .editor-block hX:not(.global-header). */
.editor-block .editor-row__head{margin-bottom:16px}
.editor-block .editor-row__head .eyebrow{display:inline-block;margin-bottom:10px}
.editor-block .editor-row__head .editor-row__title{display:block;font-family:var(--display);font-weight:700;text-transform:uppercase;line-height:1.02;letter-spacing:.5px;color:var(--ink);font-size:clamp(28px,3.4vw,42px);margin:0;text-align:left}

.editor-block h1,
.editor-block h2,
.editor-block h3,
.editor-block h4,
.editor-block h5,
.editor-block h6 {
	font-weight: 700;
	color: var(--ink);
	line-height: normal;
	font-family: var(--body);
}

.editor-block .custom-row .heading {
	margin-top: 0;
}
.editor-block .custom-row + .custom-row {
	margin-top: 80px;
}

.editor-block ul li,
.editor-block ol li {
	line-height: 28px;
}

.editor-block h2:not(.global-header) {
	font-size: 48px;
	line-height: 56px;
}

.editor-block h3:not(.global-header) {
	font-size: 33.18px;
	line-height: 44px;
}

.editor-block h4:not(.global-header) {
	font-size: 27.65px;
	line-height: 36px;
}

.editor-block h5:not(.global-header) {
	font-size: 23.04px;
	line-height: 32px;
}

.editor-block h6:not(.global-header) {
	font-size: 19.2px;
	line-height: 28px;
}
.editor-block p:has(img) {
	margin: 0;
	display: flex;
	justify-content: center;
	align-items: center;
}
.custom-row {
	display: flex;
	flex-wrap: wrap;
	margin-right: -15px;
	margin-left: -15px;
}

.custom-col-12 {
	flex: 0 0 100%;
	max-width: 100%;
	padding-right: 15px;
	padding-left: 15px;
}

.custom-col-md-4,
.custom-col-md-6 {
	position: relative;
	width: 100%;
	padding-right: 15px;
	padding-left: 15px;
}

.custom-col-md-4 {
	flex: 0 0 33.333333%;
	max-width: 33.333333%;
}

.custom-col-md-6 {
	flex: 0 0 50%;
	max-width: 50%;
}

.custom-justify-around {
	justify-content: space-around;
}

.custom-justify-center {
	justify-content: center;
}

.editor-block p:has(> video) {
	margin: 0;
}

.editor-block img {
	max-width: 100%;
	height: auto;
}

.editor-block ol {
	display: block;
	list-style-type: decimal;
	margin-block-start: 1em;
	margin-block-end: 1em;
	margin-inline-start: 0px;
	margin-inline-end: 0px;
	padding-inline-start: 40px;
	unicode-bidi: isolate;
}

.editor-block ul {
	display: block;
	list-style-type: disc;
	margin-block-start: 1em;
	margin-block-end: 1em;
	margin-inline-start: 0px;
	margin-inline-end: 0px;
	padding-inline-start: 40px;
	unicode-bidi: isolate;
}
.editor-block table {
	max-width: 800px;
	margin: 0 auto;
	border: 0;
}

.editor-block table tr {
	padding: 12px 8px;
	font-weight: 400;
	border: 0;
	font-size: 18px;
}
.editor-block table tbody tr:nth-child(odd) {
	background-color: var(--paper);
}
.editor-block table thead tr:first-child * {
	color: var(--ink);
}
.editor-block table thead tr:nth-child(odd) * {
	background-color: var(--paper) !important;
}
.editor-block table thead tr:nth-child(even) * {
	background-color: #fff !important;
}
.editor-block table th {
	color: var(--muted);
	font-weight: 400;
	text-align: center !important;
	border: 0;
}

.editor-block table td {
	color: var(--ink);
	border: 0;
	text-align: center !important;
}

@media (max-width: 1200px) {
	.editor-block ol {
		margin-block-start: 0.75em;
		margin-block-end: 0.75em;
		margin-inline-start: 0px;
		margin-inline-end: 0px;
		padding-inline-start: 30px;
		unicode-bidi: isolate;
	}

	.editor-block ul {
		margin-block-start: 0.75em;
		margin-block-end: 0.75em;
		margin-inline-start: 0px;
		margin-inline-end: 0px;
		padding-inline-start: 30px;
		unicode-bidi: isolate;
	}
}

@media (max-width: 992px) {
	.editor-block .wrap {
		max-width: 600px;
	}
	.custom-col-12 {
		flex: 0 0 100%;
		max-width: 100%;
		padding-right: 15px;
		padding-left: 15px;
	}
	.editor-block img {
		display: block;
		max-width: 600px;
		width: 100%;
		margin: 0 auto;
		height: auto;
	}
	.editor-block video {
		max-height: 450px;
	}
	.custom-row.mobile-swap {
		flex-direction: column-reverse;
	}
	.editor-block .custom-row + .custom-row{
		margin-top: 40px;
	}
}
@media (max-width: 768px) {
	.editor-block ol {
		margin-block-start: 0.5em;
		margin-block-end: 0.5em;
		margin-inline-start: 0px;
		margin-inline-end: 0px;
		padding-inline-start: 20px;
		unicode-bidi: isolate;
		word-wrap: break-word;
	}

	.editor-block ul {
		margin-block-start: 0.5em;
		margin-block-end: 0.5em;
		margin-inline-start: 0px;
		margin-inline-end: 0px;
		padding-inline-start: 20px;
		unicode-bidi: isolate;
		word-wrap: break-word;
	}

	.custom-col-12 {
		padding-right: 20px;
		padding-left: 20px;
	}
	.editor-block {
		padding: 40px 0px;
	}
	main .editor-block:not(:has(~ .editor-block)) {
		padding: 40px 0;
	}

	.editor-block h2:not(.global-header) {
		font-size: 40px;
		line-height: 52px;
	}

	.editor-block h3:not(.global-header) {
		font-size: 32px;
	}
	.editor-block h4:not(.global-header) {
		font-size: 28px;
	}
	.editor-block h5:not(.global-header) {
		font-size: 26px;
	}
	.editor-block h6:not(.global-header) {
		font-size: 24px;
	}
	.editor-block .wrap > .heading {
		margin-bottom: 24px;
	}
}

@media (max-width: 576px) {
	.editor-block h2:not(.global-header) {
		font-size: 30px;
		line-height: 38px;
	}
	.editor-block h3:not(.global-header) {
		font-size: 28px;
		line-height: 36px;
	}
	.editor-block h4:not(.global-header) {
		font-size: 26px;
		line-height: 34px;
	}
	.editor-block h5:not(.global-header) {
		font-size: 24px;
		line-height: 32px;
	}
	.editor-block h6:not(.global-header) {
		font-size: 22px;
		line-height: 30px;
	}
}


.editor-block .custom-row {
	margin-right: -40px;
	margin-left: -40px;
}

.editor-block .custom-col-md-6 {
	padding-right: 40px;
	padding-left: 40px;
}

@media (max-width: 992px) {
	.editor-block .custom-row {
		margin-right: -15px;
		margin-left: -15px;
	}

	.editor-block .custom-col-md-6 {
		padding-right: 15px;
		padding-left: 15px;
	}
}

@media (min-width: 993px) {
	.editor-block .custom-col-md-6 > h3:first-child,
	.editor-block .custom-col-md-6 > h2:first-child,
	.editor-block .custom-col-md-6 > h4:first-child,
	.editor-block .custom-col-md-6 > h5:first-child,
	.editor-block .custom-col-md-6 > h6:first-child {
		margin-top: 0;
	}
}
/* === POWIĘKSZONE GAPY === */
/* Jeśli się nie spodoba — usuń wszystko poniżej tego komentarza */

.editor-block .custom-row {
	margin-right: 0;
	margin-left: 0;
	column-gap: 120px;
	row-gap: 0;
}

.editor-block .custom-col-md-6 {
	flex: 0 0 calc(50% - 60px);
	max-width: calc(50% - 60px);
	padding-right: 0;
	padding-left: 0;
}

@media (max-width: 1280px) {
	.editor-block .custom-row {
		column-gap: 60px;
	}

	.editor-block .custom-col-md-6 {
		flex: 0 0 calc(50% - 30px);
		max-width: calc(50% - 30px);
	}
}

@media (max-width: 992px) {
	.editor-block .custom-row {
		column-gap: 0;
		margin-right: -15px;
		margin-left: -15px;
	}

	.editor-block .custom-col-md-6 {
		flex: 0 0 100%;
		max-width: 100%;
		padding-right: 15px;
		padding-left: 15px;
	}
}



/* ============================= */
/* FRONTPAGE — WYRÓŻNIENIE SEKCJI */
/* ============================= */

/* === ZDJĘCIA Z EFEKTEM 3D === */

.editor-block.frontpage .custom-col-md-6 p:has(> a > img),
.editor-block.frontpage .custom-col-md-6 p:has(> img) {
	position: relative;
	perspective: 1200px;
}

.editor-block.frontpage .custom-col-md-6 a:has(img),
.editor-block.frontpage .custom-col-md-6 img {
	display: block;
	border-radius: 24px;
	overflow: hidden;
	transform-style: preserve-3d;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1);

}

/* Naprzemienne pochylenie — pierwsza, trzecia kolumna ze zdjęciem pochyla się w prawo */
.editor-block.frontpage .custom-row:nth-child(odd) .custom-col-md-6:first-child img {
	transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
}

.editor-block.frontpage .custom-row:nth-child(odd) .custom-col-md-6:last-child img {
	transform: perspective(1200px) rotateY(6deg) rotateX(2deg);
}

/* Wariant gdy obrazek jest po prawej stronie */
.editor-block.frontpage .custom-row:nth-child(even) .custom-col-md-6:first-child img {
	transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
}

.editor-block.frontpage .custom-row:nth-child(even) .custom-col-md-6:last-child img {
	transform: perspective(1200px) rotateY(6deg) rotateX(2deg);
}

/* Hover — wyrównanie do frontu i mocniejszy cień */
.editor-block.frontpage .custom-col-md-6 a:hover img,
.editor-block.frontpage .custom-col-md-6 img:hover {
	transform: perspective(1200px) rotateY(0deg) rotateX(0deg) translateY(-6px);

}

/* Dekoracyjny element za zdjęciem — "podkładka" */
.editor-block.frontpage .custom-col-md-6 p:has(img)::before {
	content: '';
	position: absolute;
	width: 80%;
	height: 80%;
	top: 12%;
	background: var(--brand);
	border-radius: 24px;
	opacity: 0.18;
	opacity: .5;
	z-index: -1;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.editor-block.frontpage .custom-row:nth-child(odd) .custom-col-md-6:first-child p:has(img)::before {
	left: -24px;
	transform: rotate(-3deg);
}

.editor-block.frontpage .custom-row:nth-child(odd) .custom-col-md-6:last-child p:has(img)::before {
	right: -24px;
	transform: rotate(3deg);
}

.editor-block.frontpage .custom-row:nth-child(even) .custom-col-md-6:first-child p:has(img)::before {
	left: -24px;
	transform: rotate(-3deg);
}

.editor-block.frontpage .custom-row:nth-child(even) .custom-col-md-6:last-child p:has(img)::before {
	right: -24px;
	transform: rotate(3deg);
}

/* === LINIA POD NAGŁÓWKIEM === */

.editor-block.frontpage .custom-col-md-6 h2:first-child,
.editor-block.frontpage .custom-col-md-6 h3:first-child,
.editor-block.frontpage .custom-col-md-6 h4:first-child {
	position: relative;
	padding-bottom: 20px;
	margin-bottom: 20px;
}

.editor-block.frontpage .custom-col-md-6 h2:first-child::after,
.editor-block.frontpage .custom-col-md-6 h3:first-child::after,
.editor-block.frontpage .custom-col-md-6 h4:first-child::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 64px;
	height: 4px;
	background: var(--brand);
	border-radius: 4px;
}

/* === DROBNE POPRAWKI TYPOGRAFICZNE === */

.editor-block.frontpage .custom-col-md-6 p {
	font-size: 17px;
	line-height: 28px;
	color: var(--muted);
}

.editor-block.frontpage .custom-col-md-6 p strong,
.editor-block.frontpage .custom-col-md-6 p b {
	color: var(--ink);
	font-weight: 700;
}

.editor-block.frontpage .custom-row + .custom-row {
	margin-top: 120px;
}

/* === RESPONSYWNOŚĆ === */

@media (max-width: 1280px) {
	.editor-block.frontpage .custom-col-md-6 p:has(img)::before {
		width: 75%;
		height: 75%;
	}
}

@media (max-width: 992px) {
	.editor-block.frontpage .custom-row + .custom-row {
		margin-top: 60px;
	}

	/* Wyłączenie 3D na mobile — wszystkie obrazki płaskie */
	.editor-block.frontpage .custom-col-md-6 img,
	.editor-block.frontpage .custom-row .custom-col-md-6:first-child img,
	.editor-block.frontpage .custom-row .custom-col-md-6:last-child img {
		transform: none;
	}

	.editor-block.frontpage .custom-col-md-6 p:has(img)::before {
		width: 90%;
		height: 90%;
		left: 5% !important;
		right: auto !important;
		top: 8%;
		transform: rotate(-2deg);
	}

	.editor-block.frontpage .custom-col-md-6 h2:first-child,
	.editor-block.frontpage .custom-col-md-6 h3:first-child,
	.editor-block.frontpage .custom-col-md-6 h4:first-child {
		padding-bottom: 16px;
		margin-top: 24px;
	}

	.editor-block.frontpage .custom-col-md-6 h2:first-child::after,
	.editor-block.frontpage .custom-col-md-6 h3:first-child::after,
	.editor-block.frontpage .custom-col-md-6 h4:first-child::after {
		width: 56px;
		height: 3px;
	}
}

@media (max-width: 768px) {
	.editor-block.frontpage .custom-col-md-6 p {
		font-size: 16px;
		line-height: 26px;
	}
}
/* === TABELE W TREŚCI (cenniki itp.) === */
/* Wrapper .table-wrap = przewijanie w poziomie na wąskich ekranach; padding na komórkach
   (reguła `table tr{padding}` wyżej nic nie robi — padding działa tylko na th/td). */
.editor-block .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:16px 0 36px}
.editor-block .table-wrap table{width:100%;max-width:800px;min-width:520px;border-collapse:collapse}
.editor-block table th,
.editor-block table td{padding:12px 10px;line-height:1.4;font-size:16px}
.editor-block table th{font-family:var(--display);font-weight:600;text-transform:uppercase;letter-spacing:.5px;font-size:13px}
.editor-block.cennik-dostaw table td:last-child{font-weight:700;white-space:nowrap}
.editor-block .table-wrap + h3,
.editor-block .table-wrap + h2{margin-top:8px}
.editor-block h2:not(.global-header) + p,
.editor-block h3:not(.global-header) + p{margin-top:8px}
.editor-block p.small{font-size:14px;color:var(--muted)}
.editor-block ul.list-lead li{margin-bottom:10px}
.editor-block ul.list-lead li strong{color:var(--ink)}
@media (max-width:768px){
  .editor-block table th,.editor-block table td{padding:10px 8px;font-size:15px}
}

/* === DOKUMENTY (Edytor z klasą .dokument lub .cennik-dostaw: cennik, polityka cookies…) === */
.editor-block:is(.cennik-dostaw,.dokument) .wrap > .heading{font-size:clamp(34px,5vw,56px);font-weight:700;text-transform:uppercase;letter-spacing:.5px;line-height:1;margin-bottom:36px}
.editor-block:is(.cennik-dostaw,.dokument) .editor-block__before-heading{font-family:var(--display);font-weight:600;font-size:13px;letter-spacing:.8px}
.editor-block:is(.cennik-dostaw,.dokument) p{font-size:16px;line-height:1.7;color:var(--ink-2)}
.editor-block:is(.cennik-dostaw,.dokument) h2:not(.global-header){font-family:var(--display);font-weight:700;text-transform:uppercase;letter-spacing:.5px;font-size:34px;line-height:1.1;margin:56px 0 18px}
.editor-block:is(.cennik-dostaw,.dokument) h3:not(.global-header){font-family:var(--body);font-weight:600;font-size:17px;line-height:1.45;color:var(--ink-2);margin:26px 0 10px}
.editor-block:is(.cennik-dostaw,.dokument) .table-wrap{margin:0 0 8px}
.editor-block:is(.cennik-dostaw,.dokument) .table-wrap table{max-width:none;min-width:480px}
.editor-block:is(.cennik-dostaw,.dokument) table th,
.editor-block:is(.cennik-dostaw,.dokument) table td{text-align:left!important;padding:12px 14px}
.editor-block:is(.cennik-dostaw,.dokument) table thead tr *{background:var(--ink)!important;color:#fff!important}
.editor-block.cennik-dostaw table th:last-child,
.editor-block.cennik-dostaw table td:last-child{text-align:right!important}
.editor-block.cennik-dostaw table td:last-child{color:var(--brand);font-weight:700}
.editor-block.dokument table{min-width:640px}
.editor-block:is(.cennik-dostaw,.dokument) table tbody tr{border-bottom:1px solid var(--line)}
.editor-block:is(.cennik-dostaw,.dokument) table tbody tr:nth-child(odd){background:var(--paper)}
.editor-block:is(.cennik-dostaw,.dokument) ul.list-lead{padding-inline-start:20px}
.editor-block:is(.cennik-dostaw,.dokument) ul.list-lead li{line-height:1.65;color:var(--ink-2)}
@media (max-width:768px){
  .editor-block:is(.cennik-dostaw,.dokument) h2:not(.global-header){font-size:28px;line-height:1.1;margin-top:40px}
  .editor-block:is(.cennik-dostaw,.dokument) h3:not(.global-header){font-size:16px}
  .editor-block:is(.cennik-dostaw,.dokument) table th,.editor-block:is(.cennik-dostaw,.dokument) table td{padding:10px 10px}
}

/* === TABELE NA MOBILE: układ „kartowy” (JS w main.js nadaje .table--stack + data-label) === */
@media (max-width:640px){
  .editor-block .table-wrap{overflow:visible;margin:0 0 8px}
  .editor-block .table-wrap table.table--stack{min-width:0;max-width:none}
  .editor-block table.table--stack,
  .editor-block table.table--stack tbody,
  .editor-block table.table--stack tr,
  .editor-block table.table--stack td{display:block;width:100%}
  .editor-block table.table--stack thead{display:none}
  .editor-block table.table--stack tbody tr{border:1px solid var(--line);border-radius:var(--radius);padding:4px 14px;margin:0 0 10px;background:#fff!important}
  .editor-block table.table--stack td{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:9px 0!important;text-align:left!important;border-bottom:1px solid var(--line);white-space:normal}
  .editor-block table.table--stack td:last-child{border-bottom:0}
  .editor-block table.table--stack td::before{content:attr(data-label);flex:0 0 auto;font-family:var(--display);font-weight:600;font-size:12px;letter-spacing:.6px;text-transform:uppercase;color:var(--muted)}
  .editor-block table.table--stack td > *{text-align:right}
  .editor-block table.table--stack td{text-align:right!important}
  .editor-block.cennik-dostaw table.table--stack td:last-child{color:var(--brand);font-weight:700;font-size:17px}
  /* cennik: pierwszy wiersz karty (gabaryt / waga) jako tytuł */
  .editor-block:is(.cennik-dostaw,.dokument) table.table--stack td:first-child{font-family:var(--display);font-weight:700;text-transform:uppercase;letter-spacing:.5px;font-size:16px;color:var(--ink)}
}
@media (max-width:768px){
  /* dokument: tekst do lewej także na mobile (globalna reguła centruje .editor-block) */
  .editor-block:is(.cennik-dostaw,.dokument) .custom-col-12,
  .editor-block:is(.cennik-dostaw,.dokument) p,
  .editor-block:is(.cennik-dostaw,.dokument) h2:not(.global-header),
  .editor-block:is(.cennik-dostaw,.dokument) h3:not(.global-header),
  .editor-block:is(.cennik-dostaw,.dokument) ul{text-align:left}
}
