/*  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;
}

@media (min-width: 1750px) {
	.editor-block .container {
		max-width: 1440px;
	}
}

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

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

.editor-block .editor-block__button {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 32px;
}

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

.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(--grey-50);
}
.editor-block table thead tr:first-child * {
	color: var(--grey-900);
}
.editor-block table thead tr:nth-child(odd) * {
	background-color: var(--grey-50) !important;
}
.editor-block table thead tr:nth-child(even) * {
	background-color: var(--white) !important;
}
.editor-block table th {
	color: var(--grey-500);
	font-weight: 400;
	text-align: center !important;
	border: 0;
}

.editor-block table td {
	color: var(--grey-900);
	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 .container {
		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 .container > .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(--primary-500);
	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(--primary-500);
	border-radius: 4px;
}

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

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

.editor-block.frontpage .custom-col-md-6 p strong,
.editor-block.frontpage .custom-col-md-6 p b {
	color: var(--grey-900);
	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;
	}
}