/* =========================================================
   ATC BLOG POST STYLES
   Version 1.5.0
   Applies only to body.single-post.
   Supports the original theme structure and the improved ATC template.
   ========================================================= */

/* Page background and main spacing */
body.single-post .main,
body.single-post .atc-single-post {
	background: #f6f7f4;
	padding-top: 64px !important;
	padding-bottom: 80px !important;
}

body.single-post .main > .container,
body.single-post .atc-single-post > .container {
	width: min(1240px, calc(100% - 32px));
	max-width: 1240px;
	margin-right: auto;
	margin-left: auto;
	padding-right: 0 !important;
	padding-left: 0 !important;
}

/* Works with both the original .blog-container and improved layout */
body.single-post .blog-container,
body.single-post .atc-single-layout {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 42px;
	align-items: start;
}

body.single-post .blog-info,
body.single-post .atc-single-main {
	width: auto !important;
	min-width: 0;
	margin: 0;
	padding: 44px 48px;
	background: #ffffff;
	border: 1px solid rgba(23, 63, 53, 0.10);
	border-radius: 12px;
	box-shadow: 0 12px 35px rgba(23, 63, 53, 0.06);
}

body.single-post .blog-sidebar,
body.single-post .atc-single-sidebar {
	width: auto !important;
	min-width: 0;
	margin: 0;
	padding: 0;
}

/* Prevent a nested sidebar element from receiving theme widths */
body.single-post .blog-sidebar > .widget-area,
body.single-post .atc-single-sidebar.widget-area {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* =========================================================
   POST HEADER
   ========================================================= */

body.single-post .entry-header {
	margin: 0 0 34px;
	padding: 0;
	text-align: left !important;
}

body.single-post .entry-title {
	max-width: 900px;
	margin: 0 0 14px !important;
	padding: 0 !important;
	color: #173f35 !important;
	font-size: clamp(34px, 4vw, 52px) !important;
	font-weight: 700 !important;
	line-height: 1.14 !important;
	letter-spacing: -0.02em;
	text-align: left !important;
	-webkit-text-fill-color: #173f35 !important;
}

body.single-post .entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: 0;
	color: #6b746f;
	font-size: 14px;
	line-height: 1.5;
	text-align: left !important;
}

body.single-post .entry-meta a {
	color: #51605a;
	text-decoration: none;
}

body.single-post .entry-meta a:hover,
body.single-post .entry-meta a:focus {
	color: #173f35;
}

body.single-post .entry-header::after {
	display: block;
	width: 64px;
	height: 3px;
	margin-top: 22px;
	background: #c7a44b;
	border-radius: 10px;
	content: "";
}

/* =========================================================
   FEATURED IMAGE
   ========================================================= */

body.single-post .post-thumbnail {
	display: block;
	margin: 0 0 36px;
	overflow: hidden;
	border-radius: 10px;
}

body.single-post .post-thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
}

/* =========================================================
   ARTICLE CONTENT
   ========================================================= */

body.single-post .entry-content {
	color: #353b38;
	font-size: 18px;
	line-height: 1.82;
}

body.single-post .entry-content > *:first-child {
	margin-top: 0;
}

body.single-post .entry-content p {
	margin-top: 0;
	margin-bottom: 1.45em;
	color: #353b38;
	font-size: inherit;
	line-height: inherit;
}

body.single-post .entry-content h2 {
	margin: 48px 0 18px !important;
	padding: 0 !important;
	color: #173f35 !important;
	font-size: clamp(27px, 3vw, 35px) !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	letter-spacing: -0.01em;
	-webkit-text-fill-color: #173f35 !important;
}

body.single-post .entry-content h3 {
	margin: 36px 0 14px !important;
	padding: 0 !important;
	color: #245b4a !important;
	font-size: clamp(22px, 2.4vw, 27px) !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	-webkit-text-fill-color: #245b4a !important;
}

body.single-post .entry-content h4 {
	margin: 30px 0 12px !important;
	padding: 0 !important;
	color: #173f35 !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	-webkit-text-fill-color: #173f35 !important;
}

body.single-post .entry-content a {
	color: #1e684f;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(199, 164, 75, 0.65);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

body.single-post .entry-content a:hover,
body.single-post .entry-content a:focus {
	color: #173f35;
	text-decoration-color: #c7a44b;
}

body.single-post .entry-content ul,
body.single-post .entry-content ol {
	margin: 0 0 28px;
	padding-left: 26px;
}

body.single-post .entry-content li {
	margin-bottom: 8px;
}

body.single-post .entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 9px;
}

body.single-post .entry-content figure {
	margin: 34px 0;
}

body.single-post .entry-content figcaption {
	margin-top: 9px;
	color: #737b77;
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}

body.single-post .entry-content blockquote {
	margin: 34px 0;
	padding: 22px 26px;
	background: #f3f6f3;
	border-left: 4px solid #c7a44b;
	color: #33433d;
	font-size: 19px;
	line-height: 1.7;
}

body.single-post .entry-content table {
	width: 100%;
	margin: 30px 0;
	border-collapse: collapse;
	font-size: 16px;
}

body.single-post .entry-content th,
body.single-post .entry-content td {
	padding: 13px 15px;
	border: 1px solid #dfe5e1;
	text-align: left;
}

body.single-post .entry-content th {
	background: #173f35;
	color: #ffffff;
	font-weight: 600;
}

/* =========================================================
   POST NAVIGATION
   ========================================================= */

body.single-post .post-navigation {
	margin-top: 52px;
	padding-top: 30px;
	border-top: 1px solid #e2e7e4;
}

body.single-post .post-navigation .nav-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

body.single-post .post-navigation a {
	display: block;
	height: 100%;
	padding: 20px;
	background: #f7f8f6;
	border: 1px solid #e2e7e4;
	border-radius: 8px;
	color: #173f35;
	text-decoration: none;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

body.single-post .post-navigation a:hover,
body.single-post .post-navigation a:focus {
	border-color: #c7a44b;
	transform: translateY(-2px);
}

body.single-post .atc-nav-label {
	display: block;
	margin-bottom: 6px;
	color: #7b837f;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

body.single-post .atc-nav-title {
	display: block;
	color: #173f35;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
}

/* =========================================================
   BLOG SIDEBAR
   ========================================================= */

body.single-post .atc-blog-sidebar-inner {
	position: sticky;
	top: 110px;
}

body.single-post .atc-blog-sidebar-inner,
body.single-post .atc-blog-sidebar-inner * {
	box-sizing: border-box;
}

body.single-post .atc-sidebar-card {
	margin: 0 0 24px;
	padding: 25px;
	background: #ffffff;
	border: 1px solid rgba(23, 63, 53, 0.11);
	border-radius: 10px;
	box-shadow: 0 8px 25px rgba(23, 63, 53, 0.05);
}

body.single-post .atc-sidebar-title {
	margin: 0 0 18px !important;
	padding: 0 0 12px !important;
	border-bottom: 2px solid #c7a44b;
	color: #173f35 !important;
	font-size: 21px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	text-align: left !important;
	-webkit-text-fill-color: #173f35 !important;
}

/* Search */
body.single-post .atc-sidebar-search .search-form {
	display: flex;
	width: 100%;
	margin: 0;
}

body.single-post .atc-sidebar-search label {
	display: block;
	min-width: 0;
	flex: 1 1 auto;
	margin: 0;
}

body.single-post .atc-sidebar-search .search-field {
	width: 100%;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 13px;
	background: #ffffff;
	border: 1px solid #d9dfdb;
	border-right: 0;
	border-radius: 6px 0 0 6px;
	color: #333333;
	font-size: 14px;
	outline: none;
}

body.single-post .atc-sidebar-search .search-field:focus {
	border-color: #245b4a;
}

body.single-post .atc-sidebar-search .search-submit {
	flex: 0 0 auto;
	height: 44px;
	margin: 0;
	padding: 0 16px;
	background: #173f35;
	border: 0;
	border-radius: 0 6px 6px 0;
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

body.single-post .atc-sidebar-search .search-submit:hover,
body.single-post .atc-sidebar-search .search-submit:focus {
	background: #245b4a;
}

/* Transfer CTA */
body.single-post .atc-sidebar-cta {
	background: #173f35;
	border-color: #173f35;
	color: #ffffff;
}

body.single-post .atc-sidebar-eyebrow {
	display: block;
	margin-bottom: 8px;
	color: #e0c774;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

body.single-post .atc-sidebar-cta h2 {
	margin: 0 0 13px !important;
	padding: 0 !important;
	color: #ffffff !important;
	font-size: 25px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	-webkit-text-fill-color: #ffffff !important;
}

body.single-post .atc-sidebar-cta p {
	margin: 0 0 16px;
	color: rgba(255, 255, 255, 0.86);
	font-size: 15px;
	line-height: 1.65;
}

body.single-post .atc-sidebar-cta ul {
	margin: 0 0 22px !important;
	padding: 0 !important;
	list-style: none !important;
}

body.single-post .atc-sidebar-cta li {
	position: relative;
	margin: 0 0 8px !important;
	padding: 0 0 0 19px !important;
	color: rgba(255, 255, 255, 0.92);
	font-size: 14px;
	line-height: 1.5;
	list-style: none !important;
}

body.single-post .atc-sidebar-cta li::before {
	position: absolute;
	top: 0;
	left: 0;
	color: #e0c774;
	font-weight: 700;
	content: "✓";
}

body.single-post .atc-sidebar-button {
	display: block;
	width: 100%;
	margin: 0;
	padding: 13px 18px;
	background: #c7a44b;
	border-radius: 6px;
	color: #173f35 !important;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.3;
	text-align: center;
	text-decoration: none !important;
	transition: background 0.2s ease, transform 0.2s ease;
}

body.single-post .atc-sidebar-button:hover,
body.single-post .atc-sidebar-button:focus {
	background: #dfc26f;
	color: #173f35 !important;
	transform: translateY(-1px);
}

/* Recent posts */
body.single-post .atc-recent-post {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	gap: 13px;
	align-items: start;
	margin: 0;
	padding: 14px 0;
	border-bottom: 1px solid #e8ece9;
}

body.single-post .atc-recent-post:first-child {
	padding-top: 0;
}

body.single-post .atc-recent-post:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

body.single-post .atc-recent-post-image {
	display: block;
	overflow: hidden;
	border-radius: 6px;
	aspect-ratio: 1 / 1;
}

body.single-post .atc-recent-post-image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

body.single-post .atc-recent-post-date {
	display: block;
	margin-bottom: 4px;
	color: #818985;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	text-transform: uppercase;
}

body.single-post .atc-recent-post-info h3 {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	line-height: 1.42 !important;
}

body.single-post .atc-recent-post-info h3 a {
	color: #173f35 !important;
	text-decoration: none !important;
}

body.single-post .atc-recent-post-info h3 a:hover,
body.single-post .atc-recent-post-info h3 a:focus {
	color: #967823 !important;
}

/* Categories */
body.single-post .atc-sidebar-categories {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

body.single-post .atc-sidebar-categories li {
	margin: 0 !important;
	padding: 0 !important;
	border-bottom: 1px solid #e8ece9;
	list-style: none !important;
}

body.single-post .atc-sidebar-categories li:last-child {
	border-bottom: 0;
}

body.single-post .atc-sidebar-categories a {
	display: block;
	padding: 10px 0;
	color: #425049 !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: color 0.2s ease, padding-left 0.2s ease;
}

body.single-post .atc-sidebar-categories a:hover,
body.single-post .atc-sidebar-categories a:focus {
	padding-left: 4px;
	color: #173f35 !important;
}

/* Comments */
body.single-post .comments-area {
	margin-top: 45px;
	padding-top: 32px;
	border-top: 1px solid #e2e7e4;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 980px) {
	body.single-post .main,
	body.single-post .atc-single-post {
		padding-top: 45px !important;
	}

	body.single-post .blog-container,
	body.single-post .atc-single-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 34px;
	}

	body.single-post .atc-blog-sidebar-inner {
		position: static;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}

	body.single-post .atc-sidebar-card {
		margin-bottom: 0;
	}
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 680px) {
	body.single-post .main,
	body.single-post .atc-single-post {
		padding-top: 28px !important;
		padding-bottom: 50px !important;
	}

	body.single-post .main > .container,
	body.single-post .atc-single-post > .container {
		width: min(100% - 24px, 1240px);
	}

	body.single-post .blog-info,
	body.single-post .atc-single-main {
		padding: 28px 20px;
		border-radius: 8px;
	}

	body.single-post .entry-header {
		margin-bottom: 26px;
	}

	body.single-post .entry-title {
		font-size: 33px !important;
		line-height: 1.18 !important;
	}

	body.single-post .entry-content {
		font-size: 17px;
		line-height: 1.75;
	}

	body.single-post .entry-content h2 {
		margin-top: 38px !important;
		font-size: 27px !important;
	}

	body.single-post .entry-content h3 {
		margin-top: 30px !important;
		font-size: 22px !important;
	}

	body.single-post .post-navigation .nav-links {
		grid-template-columns: 1fr;
	}

	body.single-post .atc-blog-sidebar-inner {
		grid-template-columns: 1fr;
	}

	body.single-post .atc-sidebar-card {
		padding: 22px;
	}
}

@media (max-width: 420px) {
	body.single-post .blog-info,
	body.single-post .atc-single-main {
		padding-right: 17px;
		padding-left: 17px;
	}

	body.single-post .entry-title {
		font-size: 29px !important;
	}

	body.single-post .atc-recent-post {
		grid-template-columns: 68px minmax(0, 1fr);
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	body.single-post .post-navigation a,
	body.single-post .atc-sidebar-button,
	body.single-post .atc-sidebar-categories a {
		transition: none;
	}
}
