/* ---------------------------------------------------------------------------
 * Serena native blog single — styles for the blocks that used to be rendered
 * by WPBakery (js_composer) inside post_content. Declarations are ported
 * verbatim from the WPBakery-DOM-coupled rules in style.css and re-keyed to
 * clean, builder-independent markup emitted by the native template
 * (templates/blog_single-loop.php + inc/serena-blog.php). Part of
 * wp-drop-page-builders F2 (#13). The old .psicologist-signature / .blog-sidebar
 * / .related-post rules in style.css stay until the final cleanup.
 * ------------------------------------------------------------------------- */

/* ===== Body typography normalisation ===================================== */
/* WPBakery wrapped post text in .wpb_text_column, whose stylesheet zeroes the
 * bottom margin of EVERY last-child element (descendant, any depth):
 *   .wpb_text_column :last-child, .wpb_text_column p:last-child { margin-bottom: 0 }
 * Without it a trailing margin (e.g. a blockquote's inner <p>, or the last list
 * item) pushes everything below it down. Ported verbatim onto .serena-content.
 * No theme-wrapper prefix: plain posts render through the Elementor single
 * template (no .blog_holder), so this must key off .serena-content alone. */
.serena-content :last-child {
	margin-bottom: 0;
}

/* ===== Two-column body + sidebar ========================================= */
/* Reproduces the WPBakery [vc_row][vc_col 2/3][vc_col 1/3] the migration
 * removed: content column 66.67%, sidebar 33.33%, centered in a 1260px grid,
 * with the same .vc_column-inner 0 15px gutter. */
.blog_holder article .serena-blog {
	display: flex;
	margin-left: -15px;
	margin-right: -15px;
}

.blog_holder article .serena-blog__body {
	flex: 0 0 66.667%;
	max-width: 66.667%;
	padding: 0 15px;
	box-sizing: border-box;
}

.blog_holder article .serena-blog__side {
	flex: 0 0 33.333%;
	max-width: 33.333%;
	padding: 0 15px;
	box-sizing: border-box;
}

@media (max-width: 767px) {
	.blog_holder article .serena-blog {
		display: block;
	}
	.blog_holder article .serena-blog__body,
	.blog_holder article .serena-blog__side {
		max-width: 100%;
	}
}

/* ===== Author signature ================================================== */
.blog_holder article .serena-signature {
	padding: 2rem 2rem 1rem;
	background-color: #FAFAFA;
	/* 40px top gap — matches the WPBakery signature row's margin-top:40px. */
	margin: 4rem -15px 0;
	display: flex;
	align-items: flex-start;
}

.serena-signature__photo {
	flex: 0 0 20%;
	max-width: 20%;
	padding: 0 15px;
	box-sizing: border-box;
	text-align: center;
}

.blog_holder article .serena-signature__photo img {
	border-radius: 240px 10% 240px 240px;
	margin-right: 0;
	height: auto;
	max-width: 100%;
}

.serena-signature__body {
	flex: 0 0 80%;
	max-width: 80%;
	padding: 0 15px;
	box-sizing: border-box;
}

.blog_holder article .serena-signature__head {
	display: flex;
	align-items: baseline;
	margin-bottom: 1rem;
}

.blog_holder article .serena-signature__name {
	letter-spacing: 0;
	color: #4F4F4F;
	line-height: 1em;
	margin-top: 1rem;
	font-size: 25px;
	font-size: 2.5rem;
}

.blog_holder article .serena-signature__name a {
	line-height: 1em;
	color: #4F4F4F;
}

.blog_holder article .serena-signature__role {
	letter-spacing: 1px;
	margin: 0;
}

@media (min-width: 768px) {
	.blog_holder article .serena-signature__role {
		margin-left: 1.5rem;
		border-left: 1px solid;
		padding-left: 1.5rem;
	}
}

.blog_holder article .serena-signature .qbutton {
	background: #FF9472;
	background: linear-gradient(45deg, #FF9472 0%, #FFBC02 100%);
	color: #FFFFFF !important;
}

.blog_holder article .serena-signature .qbutton:hover {
	background: #FF7D53;
	background: linear-gradient(-45deg, #FF7D53 0%, #FFBC02 100%);
}

@media (min-width: 320px) and (max-width: 767px) {
	.blog_holder article .serena-signature {
		display: block;
		text-align: center;
	}
	.serena-signature__photo,
	.serena-signature__body {
		max-width: 100%;
		flex-basis: 100%;
		padding-left: 0;
	}
	.blog_holder article .serena-signature__head {
		flex-direction: column;
		align-items: center;
	}
	.blog_holder article .serena-signature__name {
		text-align: center;
	}
	.blog_holder article .serena-signature__role {
		margin-top: .5rem;
		text-align: center;
	}
}

/* ===== Related posts grid ================================================ */
.blog_holder article .serena-related {
	/* 20px top gap — matches the WPBakery related row's margin-top:20px. */
	margin: 2rem -15px 0;
	padding-top: 4rem;
}

.blog_holder article .serena-related__heading {
	text-align: center;
	color: #4F4F4F;
	font-size: 26px;
	font-size: 2.6rem;
	margin: 0 0 3.2rem;
}

.blog_holder article .serena-related__grid {
	display: flex;
	/* Break out 15px each side like the WPBakery grid's inner row did, so each
	   card (padding 0 15px) recovers the ~10px of text width that otherwise
	   wraps the longest related title to an extra line. Mirrors .serena-blog. */
	margin-left: -15px;
	margin-right: -15px;
}

.blog_holder article .serena-related__card {
	flex: 0 0 33.333%;
	max-width: 33.333%;
	/* 30px transparent gap below the coloured body, matching the WPBakery grid
	   item's padding-bottom (the body background stops above it). */
	padding: 0 15px 30px;
	box-sizing: border-box;
}

.blog_holder article .serena-related__img {
	display: block;
	height: 23rem;
	overflow: hidden;
	background-size: cover;
	background-position: center;
}

.blog_holder article .serena-related__img img {
	width: 100%;
	height: 23rem;
	object-fit: cover;
	display: block;
}

.blog_holder article .serena-related__body {
	background-color: #F9F9F9;
	/* No bottom padding: the button's 22px margin-bottom is the coloured box's
	   bottom edge (matching the WPBakery zone-c); the 30px gap below lives on
	   the card as transparent padding. */
	padding: 3rem 2.5rem 0;
}

.blog_holder article .serena-related__title {
	color: #212121;
	text-transform: none;
	font-size: 20px;
	font-size: 2rem;
	/* The theme's h4 rule adds letter-spacing:1px; the WPBakery grid title reset
	   it to normal. Keep it normal so titles wrap at the same width as before. */
	letter-spacing: normal;
	text-align: left;
	/* 22px title→excerpt gap, matching the WPBakery grid card. */
	margin: 0 0 22px;
}

.blog_holder article .serena-related__title a {
	color: #212121;
}

.blog_holder article .serena-related__excerpt {
	text-align: left;
}

.blog_holder article .serena-related__btn {
	display: inline-block;
	background: #B11972;
	color: #FFFFFF !important;
	padding: 10px 25px;
	font-size: 16px;
	border-radius: 30px;
	/* 22px excerpt→button gap and 22px below the button, matching the WPBakery
	   grid card's vc_btn3 margins so the card is the same height as before. */
	margin-top: 22px;
	margin-bottom: 22px;
	/* 24px line box (10+10 padding → 44px button) matches the WPBakery vc_btn3. */
	line-height: 24px;
	/* WPBakery's vc_btn3 rendered the label in Nunito; the child theme otherwise
	   inherits Open Sans here, which sets the label ~4px narrower. */
	font-family: Nunito, sans-serif;
	text-transform: uppercase;
	letter-spacing: 1px;
}

@media (max-width: 767px) {
	.blog_holder article .serena-related__grid {
		display: block;
	}
	.blog_holder article .serena-related__card {
		max-width: 100%;
		margin-bottom: 2rem;
	}
}
