/* =========================================================
 * CHI TIẾT BÀI VIẾT
 * template-parts/posts/single.php + layout-right-sidebar.php (banner, bài viết liên quan)
 * Màu: chỉ dùng biến :root (--hg-primary, --hg-text, --hg-button, --green-natural)
 * ---------------------------------------------------------
 * 1. Khung trang      2. Banner           3. Ngày đăng · danh mục
 * 4. Nội dung bài     5. Form bình luận   6. Danh sách bình luận
 * 7. Bài viết liên quan                   8. Responsive
 * ========================================================= */

/* ---------- 1. Khung trang ---------- */
.blog-single.page-wrapper { padding-top: 0; }
.blog-single .row { max-width: 1350px !important; }


/* ---------- 2. Banner: ảnh đại diện + lớp phủ + H1 + breadcrumb ---------- */
.hg-post-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
	margin-bottom: 30px;
	padding: 50px 20px;
	overflow: hidden;
	background: var(--hg-text);
	text-align: center;
	isolation: isolate;
}
.hg-post-hero .hg-post-hero-bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	margin: 0;
	object-fit: cover;
}
.hg-post-hero::before { /* lớp phủ – giảm % để thấy ảnh rõ hơn */
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix(in srgb, var(--hg-text) 90%, transparent);
}
.hg-post-hero-inner { max-width: 900px; }
.hg-post-hero .hg-post-title {
	margin: 0 0 14px;
	color: #fff;
	font-size: 40px;
	font-weight: 700;
	line-height: 1.25;
	text-transform: none;
	letter-spacing: 0;
}
.hg-post-hero-inner > * { justify-content: center; } /* breadcrumb căn giữa */
.hg-post-hero-inner a,
.hg-post-hero-inner span,
.hg-post-hero-inner li,
.hg-post-hero-inner svg { color: #fff !important; }
.hg-post-hero-inner a:hover { opacity: .8; }


/* ---------- 3. Ngày đăng · danh mục ---------- */
.hg-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 0 0 16px; color: var(--hg-text); }
.hg-post-meta time,
.hg-post-cats { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.hg-post-meta svg { flex: none; width: 15px; height: 15px; color: var(--hg-primary); }
.hg-post-cats a { color: var(--hg-text); }
.hg-post-cats a:hover { color: var(--hg-primary); }


/* ---------- 4. Nội dung bài ---------- */
.hg-post-content { color: var(--hg-text); font-size: 16px; line-height: 1.7; }
.hg-post-content > :first-child { margin-top: 0; }
.hg-post-content p { margin: 0 0 16px; color: var(--hg-text); font-size: 16px; }
.hg-post-content h2 { margin: 30px 0 12px; color: var(--hg-primary); font-weight: 600; line-height: 1.3; }
.hg-post-content h3 { margin: 26px 0 10px; color: var(--hg-primary); font-size: 22px; font-weight: 600; line-height: 1.35; }
.hg-post-content h4 { margin: 22px 0 8px; color: var(--hg-text); font-size: 18px; font-weight: 600; }
.hg-post-content a { color: var(--hg-primary); text-decoration: underline; text-underline-offset: 2px; }
.hg-post-content img { border-radius: 8px; }
.hg-post-content figure { margin: 22px 0; }
.hg-post-content figcaption { margin-top: 6px; color: color-mix(in srgb, var(--hg-text) 65%, #fff); font-size: 13px; text-align: center; }

/* Hộp ghi chú (Pro Tip) = khối "Trích dẫn" (Quote) */
.hg-post-content blockquote {
	margin: 20px 0;
	padding: 14px 18px;
	border: 1px solid color-mix(in srgb, var(--green-natural) 35%, transparent);
	border-left: 4px solid var(--green-natural);
	border-radius: 10px;
	background: color-mix(in srgb, var(--green-natural) 8%, #fff);
	color: var(--hg-text);
	font-size: 14px;
	font-style: normal;
}
.hg-post-content blockquote::before,
.hg-post-content blockquote::after { content: none; display: none; }
.hg-post-content blockquote p { margin: 0 0 6px; font-size: 14px; font-weight: 400; font-style: normal; }
.hg-post-content blockquote p:last-child { margin: 0; }
.hg-post-content blockquote strong:first-child { color: var(--hg-primary); }

/* Danh sách gạch đầu dòng → dấu ✓ xanh */
.hg-post-content ul { margin: 0 0 18px; padding: 0; list-style: none; }
.hg-post-content ul li { position: relative; margin: 0 0 8px; padding-left: 24px; }
.hg-post-content ul li::before {
	content: "";
	position: absolute;
	top: .5em;
	left: 2px;
	width: 11px;
	height: 6px;
	border: solid var(--green-natural);
	border-width: 0 0 2px 2px;
	transform: rotate(-45deg);
}
.hg-post-content ol { margin: 0 0 18px 1.3em; }
.hg-post-content ol li { margin: 0 0 8px; }


/* ---------- 5. Form bình luận ---------- */
.blog-single .comment-respond,
.blog-single #respond {
	margin: 36px 0 0;
	padding: 0 !important;
	border: 0;
	background: none !important;
	box-shadow: none;
}
.blog-single .comment-reply-title {
	margin: 0 0 6px;
	color: var(--hg-text);
	font-size: 24px !important;
	font-weight: 600;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: 0;
}
.blog-single .comment-reply-title small { margin-left: 10px; font-size: 13px; font-weight: 500; }
.blog-single .comment-reply-title small a { color: var(--hg-primary); }
.hg-comment-form .comment-notes,
.hg-comment-form .logged-in-as { margin: 0 0 16px; color: color-mix(in srgb, var(--hg-text) 70%, #fff); font-size: 14px; }

/* Lưới: Tên | Email · Bình luận · nút */
.hg-comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.hg-comment-form > * { grid-column: 1 / -1; margin: 0; }
.hg-comment-form .comment-form-author { grid-column: 1; }
.hg-comment-form .comment-form-email { grid-column: 2; }

.hg-comment-form label { display: block; margin: 0 0 8px; color: var(--hg-text); font-size: 14px; font-weight: 600; line-height: 1.3; }
.hg-comment-form .required { color: #d33; }
.hg-comment-form input[type="text"],
.hg-comment-form input[type="email"],
.hg-comment-form textarea {
	width: 100%;
	margin: 0;
	padding: 12px 16px;
	border: 1px solid color-mix(in srgb, var(--hg-text) 16%, transparent);
	border-radius: 10px;
	background: #fff;
	box-shadow: none;
	color: var(--hg-text);
	font-size: 15px;
	line-height: 1.5;
	transition: border-color .2s, box-shadow .2s;
}
.hg-comment-form input[type="text"],
.hg-comment-form input[type="email"] { height: 50px; }
.hg-comment-form textarea { min-height: 150px; resize: vertical; }
.hg-comment-form input::placeholder,
.hg-comment-form textarea::placeholder { color: color-mix(in srgb, var(--hg-text) 45%, #fff); opacity: 1; }
.hg-comment-form input:focus,
.hg-comment-form textarea:focus {
	border-color: var(--hg-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--hg-primary) 12%, transparent);
	outline: none;
}

/* Nút gửi */
.hg-comment-form .form-submit { margin: 0; }
.hg-comment-form .hg-cf-submit {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 0;
	margin: 0;
	padding: 11px 20px;
	border: 0;
	border-radius: 14px;
	background: var(--green-natural) !important;
	box-shadow: none;
	color: #fff !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	transition: background .2s, transform .2s;
}
.hg-comment-form .hg-cf-submit:hover { background: var(--hg-button) !important; transform: translateY(-1px); }
.hg-comment-form .hg-cf-submit svg { flex: none; width: 20px; height: 20px; }
.hg-comment-form .hg-cf-submit svg:last-child { transition: transform .2s; }
.hg-comment-form .hg-cf-submit:hover svg:last-child { transform: translateX(3px); }


/* ---------- 6. Danh sách bình luận ---------- */
.blog-single .comments-area { margin-top: 36px; }
.blog-single .comments-title {
	margin: 0 0 16px;
	color: var(--hg-text);
	font-size: 22px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
}
.blog-single .comment-list,
.blog-single .comment-list .children { margin: 0; padding: 0; list-style: none; }
.blog-single .comment-list > li,
.blog-single .comment-list .children > li { margin: 0 0 14px; }
.blog-single .comment-list .children { margin: 14px 0 0 56px; }

/* Thẻ bình luận (nền trắng, ghi đè nền xám Flatsome) */
.blog-single .comment-list .comment-inner,
.blog-single .comment-list .comment-body {
	margin: 0;
	padding: 18px 20px;
	border: 1px solid color-mix(in srgb, var(--hg-text) 10%, transparent);
	border-radius: 12px;
	background: #fff !important;
	box-shadow: 0 2px 10px color-mix(in srgb, var(--hg-text) 6%, transparent);
}
/* Avatar trái · nội dung phải */
.blog-single .comment-inner .flex-row { display: flex; align-items: flex-start; gap: 14px; }
.blog-single .comment-inner .flex-row > .flex-col:last-child { flex: 1 1 auto; min-width: 0; }
.blog-single .comment-inner .comment-author { margin: 0; }

/* Avatar xanh chữ cái đầu */
.hg-avatar {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	max-width: 48px;
	max-height: 48px;
	border-radius: 50%;
	background: var(--hg-primary);
	color: #fff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}
.blog-single .comment-list .hg-avatar { width: 48px !important; height: 48px !important; }
.blog-single .bypostauthor > .comment-inner .hg-avatar,
.blog-single .bypostauthor > .comment-body .hg-avatar { background: var(--green-natural); }

/* Tên + nhãn tác giả */
.blog-single .comment-list .fn { color: var(--hg-text); font-size: 16px; font-style: normal; font-weight: 700; }
.blog-single .comment-list .fn a { color: inherit; }
.blog-single .comment-list .says { display: none; }
.blog-single .bypostauthor > .comment-inner .fn::after,
.blog-single .bypostauthor > .comment-body .fn::after {
	content: "Ha Giang Family Travel";
	display: inline-block;
	margin-left: 8px;
	padding: 2px 8px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--green-natural) 14%, #fff);
	color: var(--hg-primary);
	font-size: 11px;
	font-weight: 600;
	vertical-align: 2px;
	white-space: nowrap;
}

/* Nội dung */
.blog-single .comment-list .comment-content { margin: 4px 0 0; color: var(--hg-text); font-size: 15px; line-height: 1.6; }
.blog-single .comment-list .comment-content p { margin: 0; }
.blog-single .comment-edit-link{
    display: none;
}

/* Ngày giờ (trái) + nút Trả lời (phải) */
.blog-single .comment-list .comment-meta,
.blog-single .comment-list .commentmetadata {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid color-mix(in srgb, var(--hg-text) 8%, transparent);
	color: color-mix(in srgb, var(--hg-text) 60%, #fff);
	font-size: 12px;
	text-transform: none;
	letter-spacing: 0;
}
.blog-single .comment-list .comment-meta::before,
.blog-single .comment-list .comment-meta::after { content: none !important; display: none !important; } /* bỏ clearfix của Flatsome */
.blog-single .comment-list .comment-meta a { color: inherit; }
.blog-single .comment-list .comment-meta > a { margin-right: auto; }
.blog-single .comment-list .comment-meta time { float: none; }
.blog-single .comment-list .reply { float: none; margin: 0; }
.blog-single .comment-list .comment-reply-link {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border: 1px solid color-mix(in srgb, var(--hg-primary) 30%, transparent);
	border-radius: 999px;
	color: var(--hg-primary) !important;
	font-size: 12px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	transition: background .2s, color .2s;
}
.blog-single .comment-list .comment-reply-link:hover { background: var(--hg-primary); color: #fff !important; }
.blog-single .comment-awaiting-moderation { display: block; margin-top: 6px; color: #b26a00; font-size: 13px; font-style: normal; }


/* ---------- 7. Bài viết liên quan (slider 4 cột) ---------- */
.hg-related { margin-top: 20px; margin-bottom: 40px; }
.hg-related .hg-related-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.hg-related h2.hg-related-title {
	margin: 0;
	padding-left: 14px;
	border-left: 5px solid var(--hg-primary);
	color: var(--hg-primary) !important;
	font-size: 30px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
}
.hg-related .hg-related-head .ds-btn { flex: none; margin: 0; }
.hg-related .hg-related-slider.ds-slider { --ds-cols: 4; --ds-gap: 20px; }
.hg-related .hg-related-slider .lp-title { margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.35; }
.hg-related .hg-related-slider .lp-desc { font-size: 14px; }


/* =========================================================
 * 8. RESPONSIVE
 * ========================================================= */

/* Laptop nhỏ */
@media (min-width: 850px) and (max-width: 1099px) {
	.hg-related .hg-related-slider.ds-slider { --ds-cols: 3; }
}

/* Tablet */
@media (min-width: 550px) and (max-width: 849px) {
	.hg-post-hero .hg-post-title { font-size: 44px !important; }

	.hg-related .hg-related-slider.ds-slider { --ds-cols: 2.2; --ds-gap: 16px; }
	.hg-related h2.hg-related-title { font-size: 26px; }
}

/* Điện thoại */
@media (max-width: 549px) {
	/* Banner */
	.hg-post-hero .hg-post-title { font-size: 38px !important; }

    .hg-related .hg-related-head{
        justify-content: end;
    }
	/* Nội dung */
	.hg-post-content h3 { font-size: 19px; }

	/* Form bình luận: 1 cột */
	.hg-comment-form { grid-template-columns: 1fr; gap: 14px; }
	.hg-comment-form .comment-form-author,
	.hg-comment-form .comment-form-email { grid-column: 1; }

	/* Danh sách bình luận */
	.blog-single .comment-list .children { margin-left: 20px; }
	.blog-single .comment-list .comment-inner,
	.blog-single .comment-list .comment-body { padding: 14px; }

	/* Bài viết liên quan */
	.hg-related .hg-related-slider.ds-slider { --ds-cols: 1.2; --ds-gap: 12px; }
	.hg-related .hg-related-head { flex-wrap: wrap; }
	.hg-related h2.hg-related-title { font-size: 22px; }
	.hg-related .hg-related-head .ds-btn { padding: 7px 14px; font-size: 13px; }
}