/* PMG – "Dlaczego warto" Elementor widget */

.pmg-why {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: auto 1fr;
	grid-template-areas:
		"media heading"
		"media tiles";
	gap: 40px;
	align-items: start;
}

.pmg-why__heading {
	grid-area: heading;
	margin: 0;
	font-weight: 700;
	line-height: 1.2;
}

/* ---------- Media + overlay card ---------- */
.pmg-why__media {
	grid-area: media;
	position: relative;
	align-self: stretch;
	height: 100%;
	min-height: 340px;
	border-radius: 16px;
	overflow: hidden;
}

.pmg-why__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 16px;
}

.pmg-why__card {
	position: absolute;
	left: 24px;
	right: 24px;
	bottom: 24px;
	max-width: 78%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 24px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 18px 40px rgba(15, 27, 45, .18);
}

.pmg-why__card-title {
	margin: 0 0 6px;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.25;
}

.pmg-why__card-desc {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: #6b7280;
}

.pmg-why__card-icon {
	flex: 0 0 52px;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #eafaf0;
	color: #16a34a;
	font-size: 22px;
}

.pmg-why__card-icon img {
	width: 26px;
	height: 26px;
	object-fit: contain;
}

/* ---------- Tiles ---------- */
.pmg-why__tiles-wrap {
	grid-area: tiles;
	position: relative;
}

.pmg-why__tiles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

/* Card duplicated as a tile is only used inside the mobile slider */
.pmg-why__tile--card {
	display: none;
}

/* Slider navigation arrows are only used on mobile */
.pmg-why__nav {
	display: none;
}

.pmg-why__tile {
	background: #f7f9f8;
	border-radius: 16px;
	padding: 24px;
	display: flex;
	flex-direction: column;
}

.pmg-why__tile-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.pmg-why__tile-icon {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #eafaf0;
	color: #16a34a;
	font-size: 20px;
}

.pmg-why__tile-icon img {
	width: 22px;
	height: 22px;
	object-fit: contain;
}

.pmg-why__num {
	font-size: 18px;
	font-weight: 700;
	color: #16a34a;
	letter-spacing: .02em;
}

.pmg-why__tile-title {
	margin: 0 0 10px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: #0f1b2d;
}

.pmg-why__tile-desc {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: #6b7280;
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.pmg-why {
		display: flex;
		flex-direction: column;
		gap: 20px;
	}

	.pmg-why__media {
		min-height: 220px;
	}

	/* The overlay card is moved into the slider as the first tile */
	.pmg-why__card {
		display: none;
	}

	.pmg-why__tile--card {
		display: flex;
	}

	/* Slider area = positioning context for side arrows */
	.pmg-why__tiles-wrap {
		position: relative;
		overflow: hidden;
	}

	/* Tiles become a one-per-view slider driven by JS (translateX) */
	.pmg-why__tiles {
		display: flex;
		grid-template-columns: none;
		flex-wrap: nowrap;
		gap: 14px;
		transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
		will-change: transform;
		touch-action: pan-y;
	}

	.pmg-why__tiles.is-dragging {
		transition: none;
	}

	/* One full-width tile per view */
	.pmg-why__tile {
		flex: 0 0 100%;
		max-width: 100%;
		min-width: 100%;
	}

	/* Navigation arrows – overlaid on left & right edges */
	.pmg-why__nav {
		display: block;
	}

	.pmg-why__arrow {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		z-index: 2;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border-radius: 50%;
		border: 1px solid #d9e0e3;
		background: rgba(255, 255, 255, 0.92);
		box-shadow: 0 6px 18px rgba(15, 27, 45, 0.12);
		color: #16a34a;
		cursor: pointer;
		transition: opacity 0.2s ease, box-shadow 0.2s ease;
	}

	.pmg-why__arrow--prev {
		left: 8px;
	}

	.pmg-why__arrow--next {
		right: 8px;
	}

	.pmg-why__arrow:disabled {
		opacity: 0.35;
		cursor: default;
	}

	.pmg-why__arrow svg,
	.pmg-why__arrow img {
		width: 20px;
		height: 20px;
		object-fit: contain;
		pointer-events: none;
	}
}
