/* Detail parts of the treatment pages (tools/in_detalj.py): k15 two picture cards, k14 "Vad händer sen?".
   Scoped p3-in-*; only transform and opacity move. Loaded right after p3-overrides.css (inc/pricing.php). */
.p3-sheets .p3-sheet > .p3-in-k15,
.p3-sheets .p3-sheet > .p3-in-k14 {
	grid-column: 2 / 4;
}

/* k15: two pale cards, 16:9 picture over title and text. */
.p3-sheets .p3-in-k15 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--p3-gap);
}

/* The region is keyboard-focusable (tabindex). The browser's own ring lost 2 px at the sides on phones and an outline
   inside the edge is painted over by the positioned cards, so the ring is a frame above the cards (Kajal 2026-10-26). */
.p3-sheets .p3-in-k15 {
	position: relative;
}

.p3-sheets .p3-in-k15::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border: 3px solid var(--p3-ink);
	border-radius: var(--p3-r);
	opacity: 0;
	pointer-events: none;
}

.p3-sheets .p3-in-k15:focus-visible {
	outline: none;
}

.p3-sheets .p3-in-k15:focus-visible::after {
	opacity: 1;
}

.p3-sheets .p3-in-k15__card {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	min-width: 0;
	padding: 16px 16px 24px;
	border-radius: var(--p3-r);
	background: var(--p3-pale);
	color: var(--p3-ink);
}

.p3-sheets .p3-in-k15__card figure {
	aspect-ratio: 16 / 9;
	margin: 0 0 24px;
	border-radius: 16px;
	overflow: hidden;
	background: #e3e9f0;
}

.p3-sheets .p3-in-k15__card img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s var(--p3-spring);
}

.p3-sheets .p3-in-k15__card:hover img {
	transform: scale(1.03);
}

/* The Hjälp card's photo (tools/in_detalj.py HJALP) is cropped from its top, so the man's head stays in the wider phone frame (Kajal 2026-11-02). */
.p3-sheets .p3-in-k15__card figure.p3-in-k15__fig--top img {
	object-position: 50% 0;
}

.p3-sheets .p3-in-k15__card h3 {
	margin: 0 8px 8px;
	font-size: 22px;
	line-height: 1.2;
	letter-spacing: -.03em;
	font-weight: var(--heading-weight);
}

.p3-sheets .p3-in-k15__card p {
	margin: 0 8px 24px;
	font-size: 15.67px;
	line-height: 1.6;
	color: var(--p3-ink-soft);
}

/* The picture slot of k15 without a picture: a soft tile with the step number. */
.p3-sheets .p3-in-tile {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--p3-pale-b);
	color: rgba(31, 39, 54, .72);
	font-size: clamp(56px, 5.5vw, 80px);
	line-height: 1;
	letter-spacing: -.05em;
	font-weight: var(--heading-weight);
}

/* k14: one wide light card, heading, four compact cards (title, text) under it. */
.p3-sheets .p3-in-k14__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin: 0 0 32px;
}

.p3-sheets .p3-in-k14__head h2 {
	margin: 0;
}

.p3-sheets .p3-in-k14__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.p3-sheets .p3-in-k14__card {
	min-width: 0;
}

.p3-sheets .p3-in-k14__card h3 {
	margin: 0 0 8px;
	color: var(--p3-ink);
}

.p3-sheets .p3-in-k14__card p {
	font-size: 15.67px;
	color: var(--p3-ink-soft);
}

@media (max-width: 900px) {
	.p3-sheets .p3-sheet > .p3-in-k15,
	.p3-sheets .p3-sheet > .p3-in-k14 {
		grid-column: 1;
	}

	.p3-sheets .p3-in-k14__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 650px) {
	.p3-sheets .p3-in-k15 {
		grid-template-columns: minmax(0, 1fr);
	}

	.p3-sheets .p3-in-k14__head {
		flex-direction: column;
		align-items: flex-start;
	}

	.p3-sheets .p3-in-k14__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

}

@media (prefers-reduced-motion: reduce) {
	.p3-sheets .p3-in-k15__card img {
		transition: none;
	}

	.p3-sheets .p3-in-k15__card:hover img {
		transform: none;
	}
}
