/*
Theme Name: Krop og Nærvær
Description: Tema til Krop og Nærvær – gravidmassage, efterfødselsmassage, NADA, babyterapi og samtaler.
Version: 1.1.0
Requires at least: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: krop-og-naervaer
*/

/* Colours, fonts and spacing live in theme.json. This file only holds the few
   things theme.json cannot express. */

html {
	scroll-behavior: smooth;
}

/* Keep anchored sections clear of the sticky header when jumped to. */
[id] {
	scroll-margin-top: 7rem;
}

/* ---------- Header ---------- */

.kov-topbar p {
	margin: 0;
	letter-spacing: 0.02em;
}

.kov-header {
	position: sticky;
	top: 0;
	z-index: 10;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.kov-brand {
	gap: 0.75rem;
}

.kov-brand .wp-block-image {
	margin: 0;
}

/* ---------- Cards / panels ---------- */

.kov-panel {
	border-radius: 20px;
}

.kov-card {
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: 20px;
	border: 1px solid var(--wp--preset--color--line);
}

.kov-card {
	position: relative; /* anchor for the full-card link below */
}

.kov-card:hover,
.kov-card:focus-within {
	transform: translateY(-3px);
	box-shadow: 0 12px 30px -14px rgba(46, 43, 40, 0.22);
	background-color: var(--wp--preset--color--sand) !important;
	border-color: var(--wp--preset--color--accent);
}

/* The title link stretches over the whole card, so the card is one big link. */
.kov-card h3 a {
	color: inherit;
	text-decoration: none;
}

.kov-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.kov-card h3 a:focus-visible {
	outline: none;
}

.kov-card:focus-within {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.kov-card h3 {
	margin-top: 0;
}

/* ---------- Check list (copper ticks) ---------- */

ul.kov-checks {
	list-style: none;
	padding-left: 0;
}

ul.kov-checks li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.5rem;
}

ul.kov-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.2rem;
	height: 1.2rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
		center / 70% no-repeat;
}

/* ---------- Numbered steps ---------- */

.kov-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 50%;
	border: 1.5px solid var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.35rem !important;
	margin: 0;
}

/* ---------- Price list ---------- */

.kov-price-row {
	padding-bottom: 0.9rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.kov-price-row p {
	margin: 0;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	.kov-card {
		transition: none;
	}
}

/* Big phone number in the contact box: no underline until hovered. */
#kontakt a {
	text-decoration: none;
}

#kontakt a:hover {
	text-decoration: underline;
}

/* Phones: keep the header on one line. */
.kov-header .wp-block-button__link {
	white-space: nowrap;
}

@media (max-width: 600px) {
	.kov-header .wp-block-site-title {
		font-size: 0.85rem !important;
		letter-spacing: 0.08em;
	}
	.kov-header .wp-block-button__link {
		padding: 0.55rem 1rem;
	}
}

/* "Book tid →" link at the bottom of each treatment card. */
.kov-card-link {
	margin-top: auto;
	font-weight: 600;
}

.kov-card-link a {
	text-decoration: none;
}

.kov-card-link a:hover {
	text-decoration: underline;
}

/* Long treatment names (e.g. "Afspændingsmassage/Kraniosekral") wrap instead of overflowing. */
.kov-card h3 {
	overflow-wrap: anywhere;
	hyphens: auto;
}

.kov-price-row p:last-child {
	white-space: nowrap;
	text-align: right;
}

/* ---------- Treatment pages ---------- */

.kov-back-link a {
	text-decoration: none;
}

.kov-back-link a:hover {
	text-decoration: underline;
}

.kov-price-tag {
	display: inline-block;
	padding: 0.35rem 1rem;
	border-radius: 999px;
	background: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--primary-dark);
	font-weight: 600;
}

/* Short pages: keep the footer at the bottom of the screen. */
.wp-site-blocks {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.wp-site-blocks > main {
	flex: 1;
}

/* Long tick lists on treatment pages: two columns on wider screens. */
@media (min-width: 640px) {
	ul.kov-checks-2col {
		columns: 2;
		column-gap: 2.5rem;
	}
}

ul.kov-checks-2col li {
	break-inside: avoid;
}


/* Treatment pages: breathing room above each section heading. */
.wp-block-post-content h2 {
	margin-top: var(--wp--preset--spacing--50);
}
