/* =========================================================================
   Astra Child - Blog Fixes
   Loaded AFTER Astra's own compiled stylesheet, so these rules only need
   to patch/override what's necessary. Everything here is scoped so it
   cannot affect pages built with a page builder.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Layout safety net
   Prevents the classic "sidebar drops below content" / "container
   collapses to 0 height" bug caused by unfloated/uncleared children.
   ------------------------------------------------------------------------- */
#primary,
#secondary,
.ast-article-post,
.entry-content,
.site-content .ast-row {
	overflow: hidden;
}

.ast-separate-container #primary,
.ast-separate-container #secondary {
	box-sizing: border-box;
}

@media (min-width: 769px) {
	.ast-right-sidebar .site-content > .ast-container .ast-row,
	.ast-left-sidebar .site-content > .ast-container .ast-row {
		display: flex;
		flex-wrap: wrap;
		align-items: flex-start;
	}
}

/* -------------------------------------------------------------------------
   2. Blog archive - card layout
   ------------------------------------------------------------------------- */
.blog .ast-article-post,
.archive .ast-article-post,
.search .ast-article-post,
.home .ast-article-post {
	margin-bottom: 2.5em;
	padding-bottom: 2em;
	border-bottom: 1px solid #e7e7e7;
}

.ast-article-post .post-thumb-img-content,
.ast-article-post .ast-blog-featured-section {
	margin-bottom: 1.2em;
	overflow: hidden;
	border-radius: 6px;
}

.ast-article-post .post-thumb-img-content img,
.ast-article-post .ast-blog-featured-section img,
.astra-child-fallback-thumb img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

.ast-article-post .entry-title {
	margin: 0 0 0.4em;
	font-size: 1.5em;
	line-height: 1.3;
}

.ast-article-post .entry-title a {
	text-decoration: none;
}

.ast-article-post .entry-meta {
	margin-bottom: 0.8em;
	font-size: 0.85em;
	opacity: 0.75;
}

.ast-article-post .entry-meta span {
	margin-right: 0.6em;
}

.ast-article-post .entry-content {
	line-height: 1.7;
}

/* -------------------------------------------------------------------------
   3. Single post
   ------------------------------------------------------------------------- */
.single-post .entry-header .post-thumb-img-content,
.single-post .astra-child-fallback-thumb {
	margin: 0 0 1.5em;
	border-radius: 6px;
	overflow: hidden;
}

.single-post .entry-header .post-thumb-img-content img,
.single-post .astra-child-fallback-thumb img {
	width: 100%;
	height: auto;
	display: block;
}

.single-post .entry-title {
	font-size: 2em;
	line-height: 1.25;
	margin-bottom: 0.4em;
}

.single-post .entry-meta {
	margin-bottom: 1.5em;
	font-size: 0.9em;
	opacity: 0.75;
}

.single-post .entry-content {
	font-size: 1.05em;
	line-height: 1.75;
}

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

.single-post .entry-content p {
	margin-bottom: 1.4em;
}

/* -------------------------------------------------------------------------
   4. Tags / categories
   ------------------------------------------------------------------------- */
.ast-terms-link,
.entry-footer .tags-links {
	margin-top: 1.2em;
	line-height: 2;
}

.ast-terms-link a,
.entry-footer .tags-links a,
.tags-links a {
	display: inline-block;
	margin: 0 0.4em 0.4em 0;
	padding: 0.3em 0.9em;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.06);
	font-size: 0.8em;
	text-decoration: none;
	transition: background 0.2s ease;
}

.ast-terms-link a:hover,
.entry-footer .tags-links a:hover,
.tags-links a:hover {
	background: rgba(0, 0, 0, 0.12);
}

.ast-terms-link a.ast-underline-text {
	background: transparent;
	padding: 0;
	text-decoration: underline;
	margin-right: 1em;
}

/* -------------------------------------------------------------------------
   5. Sidebar
   ------------------------------------------------------------------------- */
#secondary {
	box-sizing: border-box;
}

#secondary .widget {
	margin-bottom: 2em;
	padding-bottom: 1.5em;
	border-bottom: 1px solid #e7e7e7;
}

#secondary .widget:last-child {
	border-bottom: none;
}

#secondary .widget-title {
	font-size: 1.05em;
	margin-bottom: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

#secondary .widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

#secondary .widget ul li {
	margin-bottom: 0.6em;
}

#secondary .widget select,
#secondary .widget input[type="text"],
#secondary .widget input[type="search"] {
	width: 100%;
	box-sizing: border-box;
}

.astra-child-fallback-widget .search-form {
	display: flex;
	gap: 0.5em;
}

@media (max-width: 768px) {
	#secondary {
		margin-top: 3em;
	}
}

/* -------------------------------------------------------------------------
   6. Comments
   ------------------------------------------------------------------------- */
#comments.comments-area {
	margin-top: 3em;
	padding-top: 2em;
	border-top: 1px solid #e7e7e7;
}

#comments .comments-title {
	font-size: 1.3em;
	margin-bottom: 1em;
}

.ast-comment-list {
	list-style: none;
	margin: 0 0 2em;
	padding: 0;
}

.ast-comment-list .comment-body {
	padding: 1.2em 0;
	border-bottom: 1px solid #ededed;
}

.ast-comment-list .comment-author {
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin-bottom: 0.4em;
}

.ast-comment-list .comment-author .avatar {
	border-radius: 50%;
	width: 42px;
	height: 42px;
}

.ast-comment-list .comment-author .fn {
	font-weight: 600;
	font-style: normal;
}

.ast-comment-list .comment-metadata {
	font-size: 0.8em;
	opacity: 0.7;
	margin-bottom: 0.6em;
}

.ast-comment-list .comment-content p {
	margin: 0 0 0.8em;
	line-height: 1.65;
}

.ast-comment-list .reply a {
	display: inline-block;
	margin-top: 0.4em;
	padding: 0.3em 0.9em;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.06);
	text-decoration: none;
	font-size: 0.85em;
}

.ast-comment-list .children {
	list-style: none;
	margin-left: 2.5em;
	padding: 0;
}

#respond.comment-respond {
	margin-top: 2em;
}

#respond .comment-reply-title {
	font-size: 1.2em;
	margin-bottom: 0.8em;
}

.comment-form p {
	margin-bottom: 1em;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.7em 0.9em;
	border: 1px solid #d7d7d7;
	border-radius: 4px;
	font-family: inherit;
	font-size: 1em;
}

.comment-form textarea {
	min-height: 130px;
}

.comment-form .form-submit input[type="submit"] {
	cursor: pointer;
	padding: 0.7em 1.6em;
	border: none;
	border-radius: 4px;
}

@media (max-width: 600px) {
	.ast-comment-list .children {
		margin-left: 1em;
	}
}

/* -------------------------------------------------------------------------
   7. Pagination
   ------------------------------------------------------------------------- */
.ast-pagination,
nav.pagination,
.navigation.pagination {
	margin-top: 2em;
	clear: both;
}

.ast-pagination a,
.ast-pagination > span,
nav.pagination .page-numbers {
	display: inline-block;
	padding: 0.4em 0.9em;
	margin: 0 0.2em 0.2em 0;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.06);
	text-decoration: none;
}

.ast-pagination .current,
nav.pagination .page-numbers.current {
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
}
