/* Kaya Platt Psychotherapy – single blog post (block editor posts).
   Type comes from the site's Elementor kit (headings "Times New Roman" #54595F, text #2C2E30 at 20px / 18px);
   colours are the kit's own (teal #689F9A / #6EA19C, dark teal #2A535B / #2c4443, cream #F6F5EA, mist #F3F5F8).
   Everything sits under .kp-blog, so no other page changes. */

.kp-blog {
	--kp-teal: var(--e-global-color-11f37c8, #689F9A);
	--kp-teal-soft: var(--e-global-color-6383171, #6EA19C);
	--kp-ink-link: var(--e-global-color-c1f2328, #2A535B);
	--kp-ink-hover: var(--e-global-color-8028167, #2c4443);
	--kp-head: var(--e-global-color-secondary, #54595F);
	--kp-text: #2C2E30;
	--kp-cream: var(--e-global-color-b6073e4, #F6F5EA);
	--kp-mist: var(--e-global-color-2e93db8, #F3F5F8);
	--kp-line: #E6E1D8;
	--kp-measure: 760px;
	display: block;
	padding: 48px 0 0;
	color: var(--kp-text);
}

/* Image plugins (EWWW on the live site) wrap images in <picture> for WebP: lay the <img> out as if the
   wrapper weren't there, so the author photo, hero and cards keep their sizes. The WebP source still applies. */
.kp-blog picture { display: contents; }
.kp-blog picture > source { display: none; } /* otherwise an empty flex item, adding a gap */

.kp-blog__wrap {
	max-width: var(--kp-measure);
	margin-inline: auto;
	padding-inline: 20px;
	box-sizing: content-box;
}

/* ---------- header ---------- */
.kp-crumbs {
	font-size: 15px;
	line-height: 1.5;
	color: var(--kp-head);
	margin: 0 0 20px;
	/* one line; a long post title ends in "…" (it is the H1 just below) */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.kp-crumbs a { color: var(--kp-ink-link); text-decoration: none; }
.kp-crumbs a:hover { color: var(--kp-ink-hover); text-decoration: underline; }
.kp-crumbs .breadcrumb_last { color: var(--kp-head); }

.kp-post__title {
	font-size: 44px;
	font-weight: 500;
	line-height: 1.15;
	margin: 0 0 18px;
	text-wrap: balance;
}

.kp-post__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	font-size: 16px;
	line-height: 1.5;
	color: var(--kp-head);
	margin: 0 0 32px;
}
.kp-post__meta a { color: var(--kp-ink-link); text-decoration: none; font-weight: 500; }
.kp-post__meta a:hover { color: var(--kp-ink-hover); text-decoration: underline; }
.kp-dot { color: var(--kp-teal); }

.kp-post__image {
	margin: 0 auto 40px;
}
.kp-post__image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

/* ---------- contents list ---------- */
.kp-toc {
	margin: 0 0 36px;
	border: 1px solid var(--kp-line);
	border-radius: 8px;
	background: #fff;
}
.kp-toc summary {
	cursor: pointer;
	list-style: none;
	padding: 14px 20px;
	font-family: "Times New Roman", serif;
	font-size: 22px;
	color: var(--kp-head);
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.kp-toc summary::-webkit-details-marker { display: none; }
.kp-toc summary::after {
	content: "+";
	font-family: inherit;
	font-size: 26px;
	line-height: 1;
	color: var(--kp-teal);
}
.kp-toc details[open] summary::after { content: "\2212"; }
.kp-toc ol {
	margin: 0;
	padding: 0 20px 18px 44px;
	font-size: 17px;
	line-height: 1.5;
}
.kp-toc li { margin: 0 0 6px; padding: 0; }
.kp-toc a { color: var(--kp-ink-link); text-decoration: none; }
.kp-toc a:hover { color: var(--kp-ink-hover); text-decoration: underline; }

/* ---------- the post: core blocks ---------- */
.kp-post__body {
	line-height: 1.65;
	overflow-wrap: break-word;
}
.kp-post__body > * { margin-top: 0; margin-bottom: 1.1em; }
.kp-post__body > *:last-child { margin-bottom: 0; }

.kp-post__body h2,
.kp-post__body h3,
.kp-post__body h4 {
	font-weight: 500;
	line-height: 1.2;
	scroll-margin-top: 24px;
	text-wrap: balance;
}
.kp-post__body h2 { margin: 1.6em 0 0.5em; }
.kp-post__body h3 { margin: 1.4em 0 0.45em; }
.kp-post__body h4 { margin: 1.3em 0 0.4em; font-size: 23px; }
.kp-post__body > h2:first-child,
.kp-post__body > h3:first-child { margin-top: 0; }

.kp-post__body a {
	color: var(--kp-ink-link);
	text-decoration: underline;
	text-decoration-color: var(--kp-teal-soft);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.kp-post__body a:hover { color: var(--kp-ink-hover); text-decoration-thickness: 2px; }
.kp-post__body strong { font-weight: 600; }

.kp-post__body ul,
.kp-post__body ol {
	padding: 0 0 0 1.3em;
	margin-bottom: 1.1em;
}
.kp-post__body li { margin: 0 0 0.45em; padding: 0; }
.kp-post__body li::marker { color: var(--kp-teal); }
.kp-post__body li > ul,
.kp-post__body li > ol { margin: 0.45em 0 0; }

.kp-post__body blockquote,
.kp-post__body .wp-block-quote {
	margin: 1.6em 0;
	padding: 0 0 0 22px;
	border-left: 3px solid var(--kp-teal);
	font-family: "Times New Roman", serif;
	font-size: 1.2em;
	font-style: italic;
	line-height: 1.45;
	color: var(--kp-head);
}
.kp-post__body blockquote p { margin: 0 0 0.6em; }
.kp-post__body blockquote cite,
.kp-post__body .wp-block-quote cite {
	display: block;
	font-family: inherit;
	font-style: normal;
	font-size: 15px;
	color: var(--kp-head);
}
.kp-post__body .wp-block-pullquote {
	margin: 2em 0;
	padding: 24px 0;
	border-top: 1px solid var(--kp-line);
	border-bottom: 1px solid var(--kp-line);
	text-align: center;
}
.kp-post__body .wp-block-pullquote blockquote { border: 0; padding: 0; margin: 0; }

.kp-post__body figure { margin: 1.8em 0; }
.kp-post__body .wp-block-image img,
.kp-post__body figure img { height: auto; max-width: 100%; border-radius: 6px; }
.kp-post__body figcaption,
.kp-post__body .wp-element-caption {
	margin-top: 8px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--kp-head);
	text-align: center;
}

.kp-post__body hr,
.kp-post__body .wp-block-separator {
	border: 0;
	border-top: 1px solid var(--kp-line);
	width: 40%;
	margin: 2.2em auto;
}
.kp-post__body .wp-block-separator.is-style-wide { width: 100%; }

.kp-post__body .wp-block-button__link,
.kp-post__body .wp-element-button {
	display: inline-block;
	background: var(--kp-teal);
	color: #fff;
	text-decoration: none;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	padding: 12px 24px;
	border-radius: 3px;
}
.kp-post__body .wp-block-button__link:hover,
.kp-post__body .wp-element-button:hover { background: var(--kp-ink-link); color: #fff; }
.kp-post__body .is-style-outline .wp-block-button__link { background: transparent; color: var(--kp-ink-link); border: 1px solid var(--kp-teal); }

/* questions and answers: the Details block, and Yoast's FAQ block (which also adds FAQ schema) */
.kp-post__body .wp-block-details,
.kp-post__body .schema-faq-section {
	border-bottom: 1px solid var(--kp-line);
	padding: 14px 0;
	margin: 0;
}
.kp-post__body .wp-block-details:first-of-type,
.kp-post__body .schema-faq-section:first-child { border-top: 1px solid var(--kp-line); }
.kp-post__body .wp-block-details summary {
	cursor: pointer;
	font-weight: 500;
	color: var(--kp-head);
}
.kp-post__body .wp-block-details > :not(summary) { margin: 0.6em 0 0; }
.kp-post__body .schema-faq-question { display: block; font-weight: 500; color: var(--kp-head); }
.kp-post__body .schema-faq-answer { margin: 0.4em 0 0; }
.kp-post__body .wp-block-yoast-faq-block { margin: 1.6em 0; }

.kp-post__body table,
.kp-post__body .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 17px;
	line-height: 1.5;
}
.kp-post__body th,
.kp-post__body td { border: 1px solid var(--kp-line); padding: 10px 12px; text-align: left; vertical-align: top; }
.kp-post__body th { background: var(--kp-cream); font-weight: 600; }
.kp-post__body .wp-block-table { margin: 1.6em 0; overflow-x: auto; }

.kp-post__body .wp-block-group.has-background,
.kp-post__body .wp-block-columns.has-background { padding: 24px 28px; border-radius: 8px; }
.kp-post__body .wp-block-embed { margin: 1.8em 0; }
.kp-post__body .wp-block-embed__wrapper iframe { max-width: 100%; }

.kp-post__body .alignwide { max-width: 1000px; margin-inline: calc((var(--kp-measure) - 1000px) / 2); width: auto; }
.kp-post__body .alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.kp-post__body .alignfull img,
.kp-post__body .alignwide img { width: 100%; border-radius: 0; }
.kp-post__body .alignleft { float: left; margin: 0.3em 1.4em 1em 0; max-width: 50%; }
.kp-post__body .alignright { float: right; margin: 0.3em 0 1em 1.4em; max-width: 50%; }
.kp-post__body .aligncenter { margin-inline: auto; text-align: center; }

/* ---------- after the post ---------- */
.kp-post__footer { margin: 48px 0 0; }

.kp-author {
	display: flex;
	gap: 22px;
	align-items: flex-start;
	padding: 26px 28px;
	background: var(--kp-cream);
	border-radius: 8px;
}
.kp-author__photo {
	flex: 0 0 96px;
	width: 96px;
	height: 96px;
	object-fit: cover;
	object-position: center top;
	border-radius: 8px;
}
.kp-author__text p { margin: 0; }
.kp-author__label {
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--kp-head);
}
.kp-author__name {
	font-family: "Times New Roman", serif;
	font-size: 26px;
	line-height: 1.25;
	margin: 2px 0 2px !important;
}
.kp-author__name a { color: var(--kp-head); text-decoration: none; }
.kp-author__name a:hover { color: var(--kp-ink-hover); }
.kp-author__role { font-size: 16px; color: var(--kp-head); margin-bottom: 10px !important; }
.kp-author__bio { font-size: 17px; line-height: 1.55; margin-bottom: 10px !important; }
.kp-author__links { font-size: 16px; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.kp-author__links a { color: var(--kp-ink-link); font-weight: 500; text-decoration: underline; text-decoration-color: var(--kp-teal-soft); text-underline-offset: 3px; }
.kp-author__links a:hover { color: var(--kp-ink-hover); }

.kp-help {
	margin: 20px 0 0;
	padding: 14px 18px;
	background: var(--kp-mist);
	border-radius: 8px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--kp-text);
}
.kp-help a { color: var(--kp-ink-link); font-weight: 600; }

.kp-related {
	margin: 64px 0 0;
	padding: 56px 0 64px;
	border-top: 1px solid var(--kp-line);
}
.kp-related__wrap { max-width: 1060px; margin-inline: auto; padding-inline: 20px; }
.kp-related__title { margin: 0 0 28px; font-weight: 500; text-align: center; }
.kp-related__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 340px));
	justify-content: center;
	gap: 32px;
}
.kp-card { margin: 0; padding: 0; }
.kp-card__link { display: block; text-decoration: none; color: inherit; }
.kp-card__image { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 8px; background: var(--kp-mist); margin-bottom: 14px; }
.kp-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.kp-card__link:hover .kp-card__image img { transform: scale(1.03); }
.kp-card__title {
	display: block;
	font-family: "Times New Roman", serif;
	font-size: 22px;
	line-height: 1.3;
	color: var(--kp-head);
}
.kp-card__link:hover .kp-card__title { color: var(--kp-ink-hover); text-decoration: underline; text-decoration-color: var(--kp-teal-soft); }
.kp-card__date { display: block; margin-top: 6px; font-size: 15px; color: var(--kp-head); }
.kp-related__all { text-align: center; margin: 32px 0 0; font-size: 17px; }
.kp-related__all a { color: var(--kp-ink-link); font-weight: 500; text-decoration: underline; text-decoration-color: var(--kp-teal-soft); text-underline-offset: 3px; }

@media (max-width: 1040px) {
	.kp-post__body .alignwide { margin-inline: 0; max-width: 100%; }
}

@media (max-width: 767px) {
	.kp-blog { padding-top: 28px; }
	.kp-crumbs { font-size: 14px; margin-bottom: 14px; }
	.kp-post__title { font-size: 30px; }
	.kp-post__meta { font-size: 15px; margin-bottom: 24px; }
	.kp-post__image { margin-bottom: 28px; }
	.kp-toc summary { font-size: 20px; padding: 12px 16px; }
	.kp-toc ol { padding: 0 16px 14px 38px; font-size: 16px; }
	.kp-post__body .alignleft,
	.kp-post__body .alignright { float: none; margin: 1.4em 0; max-width: 100%; }
	.kp-author { gap: 16px; padding: 20px 18px; }
	.kp-author__photo { flex-basis: 64px; width: 64px; height: 64px; }
	.kp-author__name { font-size: 24px; }
	.kp-author__bio { font-size: 16px; }
	.kp-related { margin-top: 48px; padding: 40px 0 48px; }
}

@media (prefers-reduced-motion: reduce) {
	.kp-card__image img { transition: none; }
}
