.banner-blog .banner-layers {
    max-width: 1350px;
}
.banner-blog .top-title {
    font-size: 20px;
    font-family: Kalam, cursive !important;
    color: #F9D001 !important;
    font-weight: 700;
    margin-bottom: unset;
}
.banner-blog p{
    font-size: 20px;
    font-weight: 600;
}

/* =========================================================
 * Trang Cẩm nang (template-parts/posts/archive.php)
 * ========================================================= */
.blog-archive .row{
    max-width: 1350px !important;
}

/* Bỏ đường kẻ dọc giữa 2 cột của Flatsome */
.blog-archive .row-divided > .col + .col:not(.large-12) { border-left: 0; }

.hg-blog-breadcrumb { margin: 0 0 14px; }

/* ---------- Nút lọc chủ đề ---------- */
.hg-blog-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin: 0 0 24px; }
.hg-blog-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 32px;
	padding: 0 14px 0 10px;
	border: 1px solid color-mix(in srgb, var(--hg-text) 14%, transparent);
	border-radius: 16px;
	background: #fff;
	color: var(--hg-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	transition: background .2s, border-color .2s, color .2s;
}
.hg-blog-chip:hover { border-color: var(--hg-primary); color: var(--hg-primary); }
.hg-blog-chip.is-active { border-color: var(--hg-primary); background: var(--hg-primary); color: #fff; }
.hg-blog-chip-icon { display: inline-flex; flex: none; width: 18px; height: 18px; color: var(--hg-primary); }
.hg-blog-chip-icon svg, .hg-blog-chip-icon img { display: block; width: 100% !important; height: 100% !important; margin: 0; object-fit: contain; }
.hg-blog-chip.is-active .hg-blog-chip-icon { color: #fff; }
.hg-blog-chip.is-active .hg-blog-chip-icon img { filter: brightness(0) invert(1); } /* icon → trắng khi đang chọn */

/* ---------- Lưới bài viết ---------- */
.hg-blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.hg-blog-card {
	display: flex;
	flex-direction: column;
	margin: 0;
	overflow: hidden;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 2px 10px color-mix(in srgb, var(--hg-text) 10%, transparent);
	transition: transform .2s, box-shadow .2s;
}
.hg-blog-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px color-mix(in srgb, var(--hg-text) 14%, transparent); }
.hg-blog-media { position: relative; display: block; aspect-ratio: 16 / 8; overflow: hidden; background: color-mix(in srgb, var(--hg-text) 8%, #fff); }
.hg-blog-media .hg-blog-img { position: absolute; inset: 0; display: block; width: 100% !important; height: 100% !important; max-width: none; margin: 0; object-fit: cover; transition: transform .5s; }
.hg-blog-card:hover .hg-blog-img { transform: scale(1.05); }
.hg-blog-noimg { background: linear-gradient(150deg, var(--hg-primary), var(--hg-text)); }

.hg-blog-body { display: flex; flex: 1; flex-direction: column; padding: 12px 14px 14px; }
.hg-blog .hg-blog-title { 
    margin: 0 0 6px; 
    font-size: 16px; 
    font-weight: 600; 
    line-height: 1.35; 
}
.hg-blog-title a {
	display: -webkit-box;
	overflow: hidden;
	color: var(--hg-primary);
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.hg-blog-title a:hover { color: var(--hg-text); }
.hg-blog .hg-blog-desc {
	display: -webkit-box;
	margin: 0 0 12px;
	overflow: hidden;
	color: var(--hg-text);
	font-size: 16px;
	line-height: 1.5;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.hg-blog-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.hg-blog-foot time { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    color: var(--hg-text); 
    font-size: 12px; 
}
.hg-blog-foot time svg { width: 15px; height: 15px; color: var(--hg-primary); }
.hg-blog-more { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    color: var(--hg-primary); 
    font-size: 14px; 
    font-weight: 600; 
    white-space: nowrap; 
}
.hg-blog-more svg { width: 20px; height: 20px; transition: transform .2s; }
.hg-blog-more:hover svg { transform: translateX(4px); }

/* ---------- Phân trang (giống trang tour) ---------- */
.hg-blog-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 28px; }
.hg-pg { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 6px; color: var(--hg-text); font-size: 14px; font-weight: 500; text-decoration: none; }
.hg-pg:hover { background: color-mix(in srgb, var(--hg-primary) 10%, #fff); color: var(--hg-primary); }
.hg-pg.is-current { background: var(--hg-button); color: #fff; }
.hg-pg-dots { padding: 0 2px; color: color-mix(in srgb, var(--hg-text) 70%, #fff); }




/* =========================================================
 * Sidebar Cẩm nang (template-parts/posts/layout-right-sidebar.php)
 * tìm kiếm · bài viết nổi bật · hộp tư vấn
 * ========================================================= */

/* Bỏ đường kẻ dọc giữa 2 cột của Flatsome + khoảng cách giữa các khối */
.blog-archive .row-divided > .col + .col,
.blog-single .row-divided > .col + .col { border-left: 0 !important; }
.post-sidebar #secondary { display: block; }
#secondary.hg-sb > * { margin-bottom: 0; }
#secondary.hg-sb > * + * { margin-top: 15px; }

/* ---------- Khung trắng chung ---------- */
.hg-sb-box {
	position: relative;
	padding: 14px;
	border: 1px solid color-mix(in srgb, var(--hg-text) 10%, transparent);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 2px 10px color-mix(in srgb, var(--hg-text) 6%, transparent);
}
.hg-sb .hg-sb-title {
	margin: 0 0 8px;
	padding: 0;
	color: var(--hg-primary);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: 0;
}

/* ---------- 1. Tìm kiếm ---------- */
.hg-sb-search-field { position: relative; }
.hg-sb-search-field svg {
	position: absolute;
	top: 50%;
	left: 12px;
	z-index: 1;
	width: 17px;
	height: 17px;
	margin-top: -8.5px;
	color: color-mix(in srgb, var(--hg-text) 50%, #fff);
	pointer-events: none;
}
.hg-sb .hg-sb-search input[type="search"] {
	width: 100%;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0 12px 0 38px;
	border: 1px solid color-mix(in srgb, var(--hg-text) 16%, transparent);
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
	color: var(--hg-text);
	font-size: 14px;
	transition: border-color .2s, box-shadow .2s;
}
.hg-sb .hg-sb-search input[type="search"]::placeholder { color: color-mix(in srgb, var(--hg-text) 50%, #fff); opacity: 1; }
.hg-sb .hg-sb-search input[type="search"]:focus {
	border-color: var(--hg-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--hg-primary) 12%, transparent);
	outline: none;
}
.hg-sb-search.is-loading .hg-sb-search-field svg { animation: hgSbPulse .8s ease-in-out infinite alternate; }
@keyframes hgSbPulse { to { color: var(--hg-primary); } }

/* Khung gợi ý */
.hg-sb-suggest {
	position: absolute;
	top: calc(100% - 6px);
	left: 14px;
	right: 14px;
	z-index: 30;
	max-height: 360px;
	padding: 6px;
	overflow-y: auto;
	border: 1px solid color-mix(in srgb, var(--hg-text) 12%, transparent);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 12px 30px color-mix(in srgb, var(--hg-text) 18%, transparent);
}
.hg-sb-suggest[hidden] { display: none; }
.hg-sb .hg-sb-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 8px;
	border-radius: 8px;
	color: var(--hg-text);
	text-decoration: none;
}
.hg-sb .hg-sb-item:hover,
.hg-sb .hg-sb-item.is-active { background: color-mix(in srgb, var(--hg-primary) 8%, #fff); color: var(--hg-primary); }
.hg-sb-item img,
.hg-sb-item .hg-sb-noimg { flex: none; width: 38px; height: 38px; margin: 0; border-radius: 6px; object-fit: cover; }
.hg-sb-item span { display: flex; flex-direction: column; min-width: 0; }
.hg-sb-item b {
	display: -webkit-box;
	overflow: hidden;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.hg-sb-item small { color: color-mix(in srgb, var(--hg-text) 60%, #fff); font-size: 12px; }
.hg-sb-none { margin: 0; padding: 10px 8px; color: color-mix(in srgb, var(--hg-text) 70%, #fff); font-size: 13px; }
.hg-sb .hg-sb-all {
	display: block;
	width: 100%;
	min-height: 0;
	margin: 4px 0 0;
	padding: 9px 8px;
	border: 0;
	border-top: 1px solid color-mix(in srgb, var(--hg-text) 8%, transparent);
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--hg-primary);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
}
.hg-sb .hg-sb-all:hover { text-decoration: underline; }

/* ---------- 2. Bài viết nổi bật ---------- */
.hg-sb-posts ul { margin: 0; padding: 0; list-style: none; }
.hg-sb-posts li { margin: 0; padding: 0; border-top: 1px solid color-mix(in srgb, var(--hg-text) 8%, transparent); }
.hg-sb-posts li:first-child { border-top: 0; }
.hg-sb .hg-sb-posts a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	color: var(--hg-text);
	font-size: 16px;
	line-height: 1.45;
	text-decoration: none;
	transition: color .2s;
}
.hg-sb .hg-sb-posts a:hover { color: var(--hg-primary); }
.hg-sb-posts a span {
	display: -webkit-box;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.hg-sb-posts .hg-sb-thumb {
	flex: none;
	width: 52px !important;
	height: 52px !important;
	margin: 0;
	border-radius: 16px;
	object-fit: cover;
}
.hg-sb-noimg { display: block; background: linear-gradient(150deg, var(--hg-primary), var(--hg-text)); }

/* ---------- 3. Hộp tư vấn ---------- */
.hg-sb-contact {
	position: relative;
	padding: 20px 18px 22px;
	overflow: hidden;
	border-radius: 10px;
	background: var(--hg-text);
	color: #fff;
	text-align: center;
	isolation: isolate;
}
/* Ảnh nền (dưới cùng) */
.hg-sb-contact .hg-sb-contact-bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	margin: 0;
	object-fit: cover;
}
/* Lớp phủ tối (trên ảnh, dưới chữ) – giảm 75% nếu muốn thấy ảnh rõ hơn */
.hg-sb-contact::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix(in srgb, var(--hg-text) 25%, transparent);
}
.hg-sb .hg-sb-contact-title {
	margin: 0 0 14px;
	padding: 0 0 14px;
	border-bottom: 1px solid color-mix(in srgb, #fff 25%, transparent);
	color: #fff;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: none;
	letter-spacing: 0;
}
.hg-sb-contact-list {
	display: inline-flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
	text-align: left;
}
.hg-sb-contact-list li { display: flex; align-items: center; gap: 10px; margin: 0; line-height: 1.4; }
.hg-sb .hg-sb-contact-list a,
.hg-sb-contact-list li > span:not(.hg-sb-contact-icon) {
	color: #fff;
	font-size: 16px;
	text-decoration: none;
}
.hg-sb .hg-sb-contact-list a:hover { text-decoration: underline; }
/* Icon trong vòng tròn trắng */
.hg-sb-contact-icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #fff;
}
.hg-sb-contact-icon img { 
    display: block; 
    width: 36px !important; 
    height: 36px !important; 
    margin: 0; 
    object-fit: contain; 
}
.hg-sb-contact-btn img{
    display: block; 
    width: 24px !important; 
    height: 24px !important; 
    margin: 0; 
    object-fit: contain; 
}
.hg-sb .hg-sb-contact-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 9px 18px;
	border-radius: 16px;
	background: var(--green-natural);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background .2s, transform .2s;
}
.hg-sb .hg-sb-contact-btn:hover { background: var(--hg-button); color: #fff; transform: translateY(-1px); }

/* ---------- Responsive ---------- */
/* ---------- Laptop / tablet ngang: ≤ 1099px ---------- */
@media (min-width: 1100px) and (max-width: 1440px) {
    .banner-blog .text-box{
        left: 15px;
    }
}
@media (min-width: 850px) and (max-width: 1099px) {
    .blog-wrapper .row-large > .large-9{
        flex-basis: 65%;
		max-width: 65%;
    }
	.blog-wrapper .row-large > .post-sidebar {
		flex-basis: 35%;
		max-width: 35%;
	}
    .banner-blog{
	    padding-top: 400px !important;
	}
	.banner-blog .text-box {
        width: 90% !important;
        left: 15px;
        top: 50%;
    }
    .banner-category-blog .text-box{
        width: 90% !important;
        left: 50%;
        top: 50%;
    }
    .hg-blog-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 550px) and (max-width: 849px) {
    .blog-wrapper .row-large > .large-9,
	.blog-wrapper .row-large > .post-sidebar {
		flex-basis: 100%;
		max-width: 100%;
	}
	.hg-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.banner-blog,
	.banner-category-blog{
	    padding-top: 400px !important;
	}
	.banner-blog h1,
	.banner-category-blog h1{
	    font-size: 44px !important;
	}
	.banner-blog .text-box {
        width: 90% !important;
        left: 15px;
        top: 50%;
    }
    .banner-category-blog .text-box{
        width: 90% !important;
        left: 50%;
        top: 50%;
    }
    .hg-blog-chips { gap: 8px; margin-bottom: 20px; }
	.hg-blog-chip { height: 32px; padding: 0 12px 0 9px; font-size: 13px; }
	.post-sidebar { margin-top: 24px; }
	.hg-sb-contact-list {
    	display: flex;
    	flex-direction: column;
    	gap: 10px;
    	width: fit-content;   /* chỉ rộng bằng nội dung */
    	margin: 0 auto 18px;  /* canh giữa, nút xuống dòng dưới */
    	padding: 0;
    	list-style: none;
    	text-align: left;
    }
}

@media (max-width: 549px) {
	.hg-blog-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.blog-wrapper .row-large > .large-9,
	.blog-wrapper .row-large > .post-sidebar {
		flex-basis: 100%;
		max-width: 100%;
	}
	.banner-blog,
	.banner-category-blog{
	    padding-top: 400px !important;
	}
	.banner-blog h1,
	.banner-category-blog h1{
	    font-size: 38px !important;
	}
	.banner-blog .text-box {
        width: 90% !important;
        left: 15px;
        top: 50%;
    }
    .banner-category-blog .text-box{
        width: 90% !important;
        left: 50%;
        top: 50%;
    }
    .banner-blog p {
        font-size: 16px;
    }
}
