.animated_cta {
	padding: 60px 0;
}

.animated_cta .container {
	display: flex;
	gap: 24px;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.animated_cta .container > .heading {
	font-size: 58px;
	line-height: 64px;
	text-align: center;
	font-weight: 700;
	margin: 0;
	color: var(--grey-900);
}

.animated_cta .animated_cta__content {
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: 0 20px;
	color: var(--primary-500);
	max-width: 800px;
}

.animated_cta .animated_cta__content p {
	margin: 0;
	color: var(--primary-500);
}

.animated_cta .animated_cta-wrapper {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
	width: 100%;
	align-items: stretch;
}

.animated_cta .animated_cta-wrapper__item {
	position: relative;
	overflow: hidden;
	width: calc(100% / 2 - 12px);
	transition: background 0.6s ease-in-out;
	border-radius: 24px;
	/* max-height: 320px; */
}

/* Obraz – zawsze wypełnia całość karty */
.animated_cta .animated_cta-wrapper__item__image {
	width: 100%;
	height: 100%;
}

.animated_cta .animated_cta-wrapper__item__image__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.animated_cta-wrapper__item__content {
	color: var(--white);
}

/* Overlay pokrywający całą kartę */
.animated_cta .animated_cta-wrapper__item__overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	/* Bazowe tło */
	background: linear-gradient(
		to right,
		rgba(35, 34, 34, 0) 0%,
		rgba(35, 34, 34, 0.8) 36%,
		rgba(35, 34, 34, 1) 100%
	);
	overflow: hidden;
}

/* Kontener overlay-slide – ustawiony, by zawartość była 40px od każdej krawędzi */
.animated_cta .overlay-slide {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 40px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-end;
}
.animated_cta .overlay-slide .overlay-header,
.animated_cta-wrapper__item__content {
	max-width: 50%;
	width: 100%;
}

/* Blok z opisem i przyciskiem – początkowo ukryty */
.animated_cta .overlay-extra {
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	will-change: max-height;
	transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
	will-change: max-height, opacity;
	width: 50%;
}

/* Nagłówek – umieszczony jako ostatni element, dzięki czemu domyślnie znajduje się na dole */
.animated_cta .overlay-header {
	font-size: 40px;
	line-height: 48px;
	color: var(--white);
	font-weight: 700;
	margin: 0;
	/* margin-top: auto;  */
	transition: margin-top 0.6s ease-in-out;
}

.animated_cta .button {
	overflow: visible;
}
@media (max-width: 1600px) {
	.animated_cta .overlay-slide {
		padding: 30px;
	}
}
@media (max-width: 1240px) {
	.animated_cta .overlay-header {
		font-size: 32px;
		line-height: 36px;
	}
}
@media (max-width: 1120px) {
	.animated_cta .animated_cta-wrapper__item {
		width: calc(100%);
		max-width: 780px;
	}
}
@media (max-width: 992px) {
	
	.animated_cta .container > .heading {
		font-size: 40px;
		line-height: 40px;
	}
	.animated_cta .overlay-slide {
		padding: 20px;
	}
}

@media (max-width: 768px) {
	.animated_cta {
		padding: 40px 0;
	}
	.animated_cta .animated_cta-wrapper {
		gap: 18px;
	}

	.animated_cta .container > .heading {
		font-size: 36px;
	}
	.animated_cta .overlay-slide .overlay-header,
	.animated_cta-wrapper__item__content {
		max-width: 60%;
	}
	.animated_cta .overlay-header {
		font-size: 24px;
		line-height: 28px;
	}


	.animated_cta .animated_cta-wrapper__item__overlay {
		background: linear-gradient(
			to right,
			rgba(35, 34, 34, 0.3) 0%,
			rgba(35, 34, 34, 0.95) 50%,
			rgba(35, 34, 34, 0.3) 100%
		);
	}
	.animated_cta .overlay-slide .overlay-header,
	.animated_cta-wrapper__item__content {
		max-width: 100%;
		text-align: center;
	}
	.animated_cta .overlay-slide {
		align-items: center;
	}

	.animated_cta .overlay-extra{
		align-items: center;
		width: unset;
	}
}
@media (max-width: 576px) {

	.animated_cta .overlay-header {
		font-size: 22px;
		line-height: 26px;
	}


	.animated_cta .animated_cta-wrapper__item {
		width: 100%;
	}
	.animated_cta .container > .heading {
		font-size: 34px;
	}
	.animated_cta-wrapper__item__content p {
		font-size: 14px;
		line-height: 24px;
	}
		.animated_cta .overlay-extra .button {
		font-size: 16px;
		line-height: 18px;
	}

}
@media (max-width: 390px) {
	.animated_cta .overlay-extra {
		display: none;
	}
}
