/**
 * Single Post Template Styles
 * Styles for individual blog post pages
 */

body.single-post {
	background-color: var(--color-bg-teal);
}

.single-post {
	width: 100%;
	background: var(--color-bg-white);
	padding: 0;
	margin: 0;
}

.single-post__inner {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
}

/* Breadcrumb */
.single-post__breadcrumb {
	padding: 0 94px;
	margin-bottom: 24px;
}

.single-post-breadcrumb {
	font-family: 'Bricolage Grotesque', sans-serif;
	font-weight: 700;
	color: var(--color-primary-text);
	margin: 0;
	text-align: left;
}

.single-post-breadcrumb .hero-breadcrumb__prefix {
	font-weight: 700;
}

.single-post-breadcrumb .hero-breadcrumb__suffix {
	font-weight: 400;
	color: var(--color-text-muted-light);
}

.single-post-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.single-post-breadcrumb .hero-breadcrumb__suffix a,
.single-post-breadcrumb a.hero-breadcrumb__suffix {
	color: var(--color-text-muted-light);
}

/* Title */
.single-post__title {
	margin: 0;
	padding: 0 94px 48px 94px;
}

/* Banner Image */
.single-post__banner-image {
	width: 100%;
	margin: 0 0 0 0;
	padding: 0;
}

.single-post__banner-image img {
	width: 100%;
	height: auto;
	display: block;
}

/* Main content and sidebar container */
.single-post__main {
	display: flex;
	align-items: flex-start;
	gap: 0;
}

/* Content */
.single-post__content {
	padding: 120px 94px 120px 94px;
	flex: 1;
	min-width: 0;
}

/* When sidebar is present, remove right padding */
.single-post__main:has(.single-post__sidebar) .single-post__content {
	padding-right: 0;
}

/* Sidebar */
.single-post__sidebar {
	width: 265px;
	flex-shrink: 0;
	margin-left: 75px; /* 434px - 265px - 94px = 75px gap between content and sidebar */
	margin-right: 94px; /* Gutter to right of sidebar */
	margin-top: 120px; /* Align with content top padding */
	border-radius: 10px;
	background: #EDEDED;
	min-height: 925px;
	padding: 40px 30px; /* Internal padding for widget content */
	box-sizing: border-box;
}

.single-post__sidebar .widget {
	margin-bottom: 30px; /* Standard vertical spacing between widgets */
}

.single-post__sidebar .widget:last-child {
	margin-bottom: 0;
}

/* Spacing before Recent Entries widget (when heading is separate block) */
.single-post__sidebar .widget:has(+ .widget_recent_entries) {
	margin-bottom: 20px;
}

/* Remove bottom margin from first child of ws-heading in sidebar */
.single-post__sidebar .ws-heading > *:first-child {
	margin-block-end: 0;
	margin-bottom: 0;
}

/* Search Widget - Classic */
.single-post__sidebar .widget_search label {
	display: none;
}

.single-post__sidebar .widget_search .search-form {
	position: relative;
}

.single-post__sidebar .widget_search .search-field {
	width: 100%;
	padding: 12px 38px 12px 16px;
	border: 2px solid var(--color-teal);
	border-radius: 8px;
	background: var(--color-bg-white);
	font-family: 'Bricolage Grotesque', sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.45;
	color: var(--color-primary-text);
	box-sizing: border-box;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M9 17C13.4183 17 17 13.4183 17 9C17 4.58172 13.4183 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17Z' stroke='%232B2B2B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M19 19L14.65 14.65' stroke='%232B2B2B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 14px 14px;
}

.single-post__sidebar .widget_search .search-field::placeholder {
	color: var(--color-placeholder);
}

.single-post__sidebar .widget_search .search-submit {
	display: none;
}

/* Search Widget - Block-based */
.single-post__sidebar .wp-block-search {
	position: relative;
}

.single-post__sidebar .wp-block-search__label {
	display: none;
}

.single-post__sidebar .wp-block-search__input {
	width: 100%;
	padding: 12px 38px 12px 16px !important;
	border: 2px solid var(--color-teal) !important;
	border-radius: 8px !important;
	background: var(--color-bg-white) !important;
	font-family: 'Bricolage Grotesque', sans-serif !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	line-height: 1.45 !important;
	color: var(--color-primary-text) !important;
	box-sizing: border-box !important;
	/* Magnifying glass icon */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M9 17C13.4183 17 17 13.4183 17 9C17 4.58172 13.4183 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17Z' stroke='%232B2B2B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M19 19L14.65 14.65' stroke='%232B2B2B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 12px center !important;
	background-size: 14px 14px !important;
}

.single-post__sidebar .wp-block-search__input::placeholder {
	color: var(--color-placeholder) !important;
}

/* Hide search button completely */
.single-post__sidebar .wp-block-search__button {
	display: none !important;
}

/* Latest Posts Widget */
.single-post__sidebar .widget_recent_entries .widget-title,
.single-post__sidebar .widget .widgettitle {
	font-family: 'Bricolage Grotesque', sans-serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.61;
	letter-spacing: -0.005em;
	color: var(--color-primary-text);
	margin: 0 0 16px 0;
}

.single-post__sidebar .widget_recent_entries ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.single-post__sidebar .widget_recent_entries li {
	margin-bottom: 0;
}

.single-post__sidebar .widget_recent_entries a {
	font-family: 'Bricolage Grotesque', sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.45;
	letter-spacing: -0.005em;
	color: var(--color-primary-text);
	text-decoration: none;
	transition: color 0.2s ease;
}

.single-post__sidebar .widget_recent_entries a:hover {
	color: var(--color-teal);
}

/* Paragraph styles in post content */
.single-post__content p {
	color: #2B2B2B;
	font-family: 'Bricolage Grotesque', sans-serif;
	font-size: 18px;
	font-style: normal;
	font-weight: 400;
	line-height: 162%; /* 29.16px */
	letter-spacing: -0.09px;
	margin-bottom: 23px;
}

/* Vertical spacing between blocks in post content */
.single-post__content > * {
	margin-bottom: 23px;
}

.single-post__content > *:last-child {
	margin-bottom: 0;
}

/* Remove top margin from first element (desktop only) */
@media (min-width: 1024px) {
	.single-post__content > *:first-child {
		margin-top: 0;
	}

	/* Remove top margin from first child of first child (handles wrapper divs like ws-heading) */
	.single-post__content > *:first-child > *:first-child {
		margin-top: 0;
	}
}

/* Override browser default margins on headings - use 23px spacing */
.single-post__content h1,
.single-post__content h2,
.single-post__content h3,
.single-post__content h4 {
	margin-top: 23px;
	margin-bottom: 23px;
	margin-block-start: 23px;
	margin-block-end: 23px;
}

/* Related Posts Section */
.single-post__related {
	width: 100%;
	background: var(--color-bg-white);
	padding: 0;
	margin: 0;
}

.single-post__related-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 32px 110px 32px;
}

.single-post__related-title {
	margin: 0 0 48px 0;
	text-align: left;
}

.single-post__related .section-post-archive__cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
	align-items: start;
}

/* WordPress Pullquote Block Styles */
.single-post__content .wp-block-pullquote {
	text-align: left;
	margin-top: 23px;
	margin-bottom: 23px;
}

.single-post__content .wp-block-pullquote blockquote {
	margin: 0;
	padding: 0;
	padding-left: 32px;
	border: none;
	border-left: 2px solid #DADADA;
}

.single-post__content .wp-block-pullquote blockquote p {
	color: #2B2B2B;
	font-family: 'Instrument Serif', serif;
	font-size: 36px;
	font-style: normal;
	font-weight: 400;
	line-height: 100%; /* 36px */
	letter-spacing: -0.36px;
	margin-bottom: 0;
}

.single-post__content .wp-block-pullquote blockquote cite {
	color: rgba(43, 43, 43, 0.58); /* #2B2B2B at 58% opacity */
	font-family: 'Bricolage Grotesque', sans-serif;
	font-size: 20px;
	font-style: normal;
	font-weight: 700;
	line-height: 161%; /* 32.2px */
	letter-spacing: -0.1px;
	display: block;
	margin-top: 0;
}

/* Mobile Styles */
@media (max-width: 1023px) {
	.single-post__breadcrumb {
		padding: 0 24px;
		margin-bottom: 16px;
	}

	.single-post__title {
		padding: 0 24px 32px 24px;
	}

	.single-post__main {
		flex-direction: column;
		gap: 0;
	}

	.single-post__content {
		padding: 80px 24px 36px 24px;
	}

	/* Override desktop sidebar padding removal on mobile */
	.single-post__main:has(.single-post__sidebar) .single-post__content {
		padding-right: 24px;
	}

	.single-post__sidebar {
		display: none;
	}

	.single-post__content p {
		color: #2B2B2B;
		font-family: 'Bricolage Grotesque', sans-serif;
		font-size: 14px;
		font-style: normal;
		font-weight: 400;
		line-height: 154%; /* 21.56px */
		letter-spacing: -0.07px;
	}

	.single-post__content .wp-block-pullquote {
		padding-left: 20px;
	}

	.single-post__content .wp-block-pullquote blockquote p {
		font-size: 27px;
		line-height: 100%; /* 27px */
		letter-spacing: -0.27px;
	}

	.single-post__content .wp-block-pullquote blockquote cite {
		font-size: 16px;
		line-height: 145%; /* 23.2px */
		letter-spacing: -0.08px;
	}

	.single-post__related-inner {
		padding: 0 24px 64px 24px;
	}

	.single-post__related-title {
		margin-bottom: 32px;
	}

	.single-post__related .section-post-archive__cards {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}
