/* ======================================================= CSS CHO KHỐI FOOTER TÙY CHỈNH CỦA BÀI VIẾT (custom-post-footer.css) ======================================================= */
.expore {
	height: 240px
}
.section-title{
font-size:28px;
font-weight:800;
margin:40px 0 20px;
padding-bottom:10px;
border-bottom:3px solid #2e7d32;
display:inline-block;
}
.section-header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:15px;
}

.section-title{
font-size:28px;
font-weight:800;
border-bottom:3px solid #2e7d32;
padding-bottom:6px;
}

.section-more{
font-weight:600;
color:#2e7d32;
text-decoration:none;
}

.section-more:hover{
text-decoration:underline;
}
.category-child-section{
margin-bottom:50px;
}
.center-title{
    text-align:center;
    margin-bottom:30px;
	margin-top: 40px;
}

.center-title .page-title{
    font-size:32px;
    font-weight:800;
    display:inline-block;
    padding-bottom:8px;
    border-bottom:3px solid #2e7d32;
}

.page-header h1.page-title {
	margin-bottom: .5em;
	font-weight: 800;
	font-size: 32px;
}

.wp-block-column {
	height: 100%;
	margin-top: 1rem;
}

/* 1. CONTAINER CHUNG */
.custom-ad-footer-grid-section {
	max-width: 1200px;
	/* Giới hạn container nội dung */
	margin: 0px auto;
	padding: 20px 0;
}

.footer-ad-block {
	margin-bottom: 40px;
}

/* 2. TIÊU ĐỀ KHỐI (Giống như trong hình ảnh) */
.section-title-bg {
	padding: 10px 20px;
	color: white;
	font-size: 20px;
	font-weight: bold;
	margin-bottom: 20px;
	text-transform: uppercase;
}

.section-title-green {
	background-color: #558B2F;
	/* Màu xanh lá cây đậm */
}

.section-title-dark {
	background-color: #387034;
	/* Màu xanh lá cây đậm hơn cho Form */
}

/* 3. KHỐI BÀI VIẾT LIÊN QUAN / CÓ THỂ BẠN SẼ THÍCH (3 Cột) */
.related-post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.related-post-card {
	border: 1px solid #e0e0e0;
	padding: 15px;
	text-align: center;
	text-decoration: none;
	color: #333;
	transition: all 0.2s;
}

.related-post-card:hover {
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.card-full-excerpt{
    line-height: 1.4;
    min-height: calc(1.4em * 2); /* luôn cao bằng 2 dòng */

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-thumbnail {
	width: 100%;
	height: auto;
	object-fit: cover;
	margin-bottom: 10px;
}

.related-title {
	font-size: 16px;
	font-weight: bold;
	margin: 0;
}

/* 4. KHỐI SHORTCODE/LINK (Điểm đến, Tin tức) */
.content-grid-links {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.content-links-3-col,
.content-links-2-col,
.content-links-1-col {
	padding: 15px;
	border: 1px solid #e0e0e0;
	background-color: #f7f9f3;
}

.content-links-3-col {
	flex: 1 1 45%;
	/* Chiếm khoảng 45% */
}

.content-links-2-col {
	flex: 1 1 30%;
	/* Chiếm khoảng 30% */
}

.content-links-1-col {
	flex: 1 1 100%;
	/* Chiếm toàn bộ hàng */
	margin-top: 10px;
}

.ad-link-title {
	font-size: 18px;
	font-weight: bold;
	color: #387034;
	padding-bottom: 5px;
	border-bottom: 2px solid #558B2F;
	margin-top: 0;
	margin-bottom: 15px;
}

/* 5. KHỐI FORM ĐĂNG KÝ (BLOCK-REGISTER-FORM) */
.block-register-form .ad-content-wrapper {
	padding: 30px;
	background-color: #387034;
	border-radius: 8px;
	text-align: center;
	color: white;
}

.block-register-form p {
	color: #f0fff0;
}

/* Placeholder cho Form Đăng ký (nếu bạn chưa gắn shortcode) */
.form-placeholder {
	background-color: white;
	color: #333;
	padding: 20px;
	margin: 20px 0;
	border-radius: 4px;
	font-style: italic;
}

.ad-cta-button {
	display: inline-block;
	padding: 12px 25px;
	background-color: #D8AA49;
	/* Màu vàng cam nổi bật */
	color: white !important;
	text-decoration: none;
	border-radius: 4px;
	font-weight: bold;
	text-transform: uppercase;
	transition: background-color 0.3s;
}

.ad-cta-button:hover {
	background-color: #c79532;
}

/* RESPONSIVE */
@media (max-width: 992px) {
	.related-post-grid {
		grid-template-columns: 1fr 1fr;
		/* 2 cột trên tablet */
	}

	.content-links-3-col,
	.content-links-2-col {
		flex: 1 1 100%;
		/* Đẩy về 1 cột trên tablet */
	}
}

@media (max-width: 576px) {
	.related-post-grid {
		grid-template-columns: 1fr;
		/* 1 cột trên mobile */
	}
}

/* ======================================================= */
/* 1. SHORTCODE GRID STRUCTURE */
/* ======================================================= */
.custom-post-section-grid {
	display: grid;
	gap: 20px;
	/* Khoảng cách giữa các card */
	margin-bottom: 40px;
}

/* Định nghĩa số cột linh hoạt */
.custom-grid-cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.custom-grid-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.custom-grid-cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

.custom-grid-cols-5 {
	grid-template-columns: repeat(5, 1fr);
}

/* Thêm các số cột khác nếu cần */
/* Đảm bảo toàn bộ thẻ có thể nhấp được và loại bỏ các kiểu mặc định của liên kết */
.custom-post-section-grid a.card-link-full {
	display: block;
	text-decoration: none;
	color: inherit;
	height: 100%;
	/* Giúp Card Span hoạt động tốt */
	/* Thêm Transition cho Card khi hover nhẹ */
	transition: transform 0.2s ease-out;
}

.custom-post-section-grid a.card-link-full:hover {
	/* Hiệu ứng nhấc nhẹ Card lên khi hover */
	transform: translateY(-2px);
}

.single .entry-header {
	margin-bottom: 1rem;
}

/* ======================================================= */
/* 2. CARD TYPE: NORMAL (Ảnh 1 - Grid lớn/nhỏ) */
/* ======================================================= */
.custom-card-type-normal .post-card {
	background-color: #000;
	color: #fff;
	overflow: hidden;
	border-radius: 8px;
	position: relative;
	height: 100%;
}

.custom-card-type-normal .post-card .card-title {
	color: #F0F0F0;
}

.custom-card-type-normal .post-card .card-category {
	color: #059669;
}

.post-card span {
	font-family: "Space Mono", monospace;
}

/* Thiết lập cho Card chiếm 2 dòng (span_index) */
.custom-card-type-normal .post-card.card-span-row-2 {
	grid-row: span 2;
}

.custom-card-type-normal .card-image-wrapper {
	background-size: cover;
	background-position: center;
	position: relative;
	height: 100%;
	/* Rất quan trọng: Thêm overflow: hidden để giới hạn hình ảnh zoom */
	overflow: hidden;
}

/* Hiệu ứng ZOOM IN cho card type NORMAL (dùng background-image) */
.custom-card-type-normal .card-link-full:hover .card-image-wrapper {
	/* Vì dùng background-image, ta zoom chính wrapper */
	transform: scale(1.05);
	transition: transform 0.5s ease;
}

.custom-card-type-normal .card-image-wrapper {
	transition: transform 0.5s ease;
}

/* Hiệu ứng mờ */
.custom-card-type-normal .card-image-wrapper::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	height: 100%;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 50%);
}

.custom-card-type-normal .card-content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 20px;
	z-index: 10;
}

.custom-card-type-normal .card-category {
	font-size: 10px;
	font-weight: bold;
	color: #f0f0f0;
	margin-bottom: 5px;
	display: block;
}

.custom-card-type-normal .card-title {
	font-size: 18px;
	margin: 0;
	margin-bottom: 6px;
	line-height: 1.3;
}

.custom-card-type-normal .card-span-row-2 .card-title {
	font-size: 24px;
	/* Tiêu đề lớn hơn cho card chiếm 2 dòng */
}

.custom-card-type-normal .card-excerpt {
	font-size: 14px;
	margin-top: 10px;
	opacity: 0.8;
}

/* ======================================================= */
/* 3. CARD TYPE: FULL (Ảnh 2 - Card chuẩn) */
/* ======================================================= */
.custom-card-type-full .post-card {
	grid-column: span 1;
	background-color: #fff;
	overflow: hidden;
}

.custom-card-type-full .card-full-image-wrapper {
	overflow: hidden;
	height: 200px;
}

.custom-card-type-full .card-full-image-wrapper img {
	width: 100%;
	height: 100%;
	display: block;
	border-radius: 8px;
	/* YÊU CẦU 1: IMAGE TYPE COVER */
	object-fit: cover;
	/* YÊU CẦU 2: HIỆU ỨNG ZOOM IN */
	transition: transform 0.5s ease;
}

/* Kích hoạt ZOOM IN khi hover vào toàn bộ card */
.custom-card-type-full .card-link-full:hover .card-full-image-wrapper img {
	transform: scale(1.08);
	/* Phóng to 8% */
}

.custom-card-type-full .card-full-content {
	padding: 15px;
}

.custom-card-type-full .card-category-full {
	font-size: 10px;
	font-weight: bold;
	color: #e54c4c;
	/* Màu cam/đỏ giống ảnh 2 */
	margin-bottom: 5px;
	display: block;
	text-transform: uppercase;
}

.custom-card-type-full .card-title-full {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 6px 0;
	line-height: 1.2;
}

.custom-card-type-full .card-meta-full {
	font-size: 12px;
	color: #666;
}

.custom-card-type-full .card-meta-full span {
	margin-right: 10px;
}

.cat-grid-3 {
	grid-template-columns: repeat(3, 1fr);
}

.cat-grid-2 {
	grid-template-columns: repeat(2, 1fr);
}

/* Item Banner */
.category-banner-item {
	position: relative;
	height: 120px;
	/* Độ cao giống ảnh mẫu */
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	align-items: center;
	padding: 0 25px;
	text-decoration: none !important;
	transition: transform 0.3s ease;
}

.category-banner-item:hover {
	transform: translateY(-5px);
}

/* Background & Overlay */
.cat-banner-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	z-index: 1;
}

.cat-banner-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 100%);
	z-index: 2;
}

/* Content */
.cat-banner-content {
	position: relative;
	z-index: 3;
	color: #fff;
}

.cat-banner-title {
	font-size: 20px;
	font-weight: bold;
	text-transform: uppercase;
	margin: 0;
	color: #fff;
}

.cat-banner-action {
	font-size: 13px;
	opacity: 0.8;
}

/* Icon góc phải */
.cat-banner-icon {
	position: absolute;
	top: 10px;
	right: 15px;
	background: rgba(255, 255, 255, 0.15);
	width: 35px;
	height: 45px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 5px;
	z-index: 3;
	color: #fff;
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
	/* Tạo hình tag */
}

/* Responsive */
@media (max-width: 768px) {
	.category-banner-grid {
		grid-template-columns: 1fr;
	}
}

.custom-category-grid{
    display:grid;
    grid-template-columns:repeat(6,1fr);
    gap:20px;
}

.custom-category-grid .post-card:nth-child(1),
.custom-category-grid .post-card:nth-child(2){
    grid-column:span 3;
}

/* các dòng sau: 3 card */
.custom-category-grid .post-card:nth-child(n+3){
    grid-column:span 2;
}

/* FIX khi chỉ có 4 card */
.custom-category-grid .post-card:nth-child(4):last-child{
    grid-column:span 3;
}

/* FIX khi chỉ có 3 card */
.custom-category-grid .post-card:nth-child(3):last-child{
    grid-column:span 6;
}

.custom-category-grid .card-full-image-wrapper{
    height:240px;
}

/* đảm bảo ảnh fill đúng */
.custom-category-grid .card-full-image-wrapper img{
    height:100%;
    width:100%;
    object-fit:cover;
}
@media (max-width: 992px) {

    .custom-category-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .custom-category-grid .post-card{
        grid-column:span 1 !important;
    }

}

@media (max-width: 600px) {
	.custom-category-grid .post-card {
		grid-column: span 6 !important;
	}
}

.entry-meta,
.entry-header .comments-link,
.single-post .comments-link {
	display: none !important;
}

/* Style cho Breadcrumbs */
.breadcrumbs,
#breadcrumbs {
	padding: 15px 0;
	margin-bottom: 20px;
	font-size: 14px;
	color: #666;
	border-bottom: 1px solid #eee;
	/* Tạo đường gạch chân nhẹ */
	font-family: 'Segoe UI', Roboto, sans-serif;
}

/* Link trong breadcrumb */
.breadcrumbs a {
	color: #558B2F;
	/* Màu xanh lá theo tone bài viết của bạn */
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s;
}

.breadcrumbs a:hover {
	color: #387034;
	text-decoration: underline;
}

/* Dấu phân cách (separator) */
.breadcrumb-separator {
	margin: 0 8px;
	color: #ccc;
}

/* Vị trí hiện tại (trang đang xem) */
.breadcrumb_last,
.current-item {
	color: #999;
	font-weight: normal;
}

/* Đảm bảo phần nội dung chính không quá sát lề */
.post-section .entry-content,
.post-section .post-navigation {
	max-width: 1200px;
	margin-inline: auto;
}

.post-section .entry-content:not(:last-child) {
	margin-bottom: 30px;
}

.post-section .entry-header,
.post-section .post-navigation,
.post-section .entry-header,
.post-section .post-thumbnail-main,
.post-section .post-meta-custom {
	max-width: 1200px;
	padding-left: 0;
	padding-right: 0;
	margin-top: 0;
	margin-inline: auto;
}

.post-section .entry-title {
	margin-top: .5em;
	font-weight: 900;
	font-size: 32px;
}

.post-section .post-thumbnail-main {
	margin-top: 12px;
}

.post-section .post-thumbnail-main img {
	width: 100%;
	height: 240px;
	object-fit: cover;
}

.post-meta-custom {
	display: flex;
	justify-content: space-between;
	align-items: start;
	padding: 15px 0;
	margin-bottom: 30px;
	border-top: 1px solid #f0f0f0;
	/* Thêm đường kẻ trên nếu muốn giống ảnh */
	border-bottom: 1px solid #f0f0f0;
}

.author-info {
	display: flex;
	align-items: start;
	gap: 12px;
}

.author-avatar img {
	border-radius: 50%;
	width: 32px !important;
	height: 32px !important;
}

.author-name {
	display: block;
	font-weight: 600;
	color: #333;
	font-size: 15px;
}

.post-date {
	font-size: 13px;
	color: #888;
}

.post-actions {
	display: flex;
	gap: 20px;
	color: #777;
}

.action-item {
	cursor: pointer;
	font-size: 18px;
	display: flex;
	align-items: center;
	gap: 6px;
}

/* Tooltip "Copied" */
.share-container {
	position: relative;
}

.share-btn::after {
	content: "Đã chép link!";
	position: absolute;
	bottom: 150%;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	padding: 4px 10px;
	font-size: 12px;
	border-radius: 4px;
	opacity: 0;
	visibility: hidden;
	white-space: nowrap;
}

.share-btn.copied::after {
	opacity: 1;
	visibility: visible;
}

/* ======================================================= */
/* RESPONSIVE CHO TRANG BÀI VIẾT (SINGLE POST) */
/* ======================================================= */
@media (max-width: 1240px) {

	/* Thêm padding cho các container chính khi màn hình nhỏ hơn 1200px */
	.post-section .entry-header,
	.post-section .post-navigation,
	.post-section .post-thumbnail-main,
	.post-section .post-meta-custom,
	.post-section .entry-content,
	.custom-ad-footer-grid-section {
		padding-left: 20px !important;
		padding-right: 20px !important;
		box-sizing: border-box;
	}
}

@media (max-width: 768px) {

	/* 1. Tiêu đề bài viết */
	.post-section .entry-title {
		font-size: 28px !important;
		/* Giảm size tiêu đề trên mobile */
		margin-top: 15px;
		line-height: 1.2;
	}

	/* 2. Ảnh Thumbnail chính */
	.post-section .post-thumbnail-main img {
		height: 200px;
		/* Thu nhỏ chiều cao ảnh chính */
		border-radius: 8px;
	}

	/* 3. Thanh Meta (Tác giả/Ngày tháng) */
	.post-meta-custom {
		flex-direction: column;
		/* Xếp chồng trên mobile */
		align-items: flex-start;
		gap: 15px;
		padding: 15px 0;
	}

	.post-actions {
		width: 100%;
		justify-content: flex-start;
		border-top: 1px solid #f0f0f0;
		padding-top: 10px;
	}

	/* 4. Nội dung bài viết (Chỉnh sửa font size cho dễ đọc) */
	.post-section .entry-content {
		font-size: 16px;
		line-height: 1.6;
	}

	/* Đảm bảo các bảng hoặc ảnh trong nội dung không bị tràn */
	.entry-content img,
	.entry-content figure {
		max-width: 100% !important;
		height: 100% !important;
	}

	/* 5. Khối Grid Footer (Đã sửa theo yêu cầu 2 card) */
	.custom-post-section-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		/* Luôn hiện 2 cột */
		gap: 10px;
	}

	.custom-card-type-full .card-full-image-wrapper {
		height: 160px !important;
		/* Giảm chiều cao ảnh trong grid footer */
	}

	.custom-card-type-full .card-title-full {
		font-size: 14px !important;
		height: 40px;
		overflow: hidden;
	}

	/* 6. Breadcrumbs */
	.breadcrumbs,
	#breadcrumbs {
		padding: 10px 0;
		font-size: 12px;
	}
}

@media (max-width: 480px) {

	/* Mobile cực nhỏ */
	.post-section .entry-title {
		font-size: 22px !important;
	}

	/* Nếu 2 cột vẫn quá chật, có thể cân nhắc 1 cột ở đây, nhưng theo yêu cầu của bạn là tối đa 2 card: */
	.custom-post-section-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	.custom-ad-footer-grid-section {
		padding-left: 15px !important;
		padding-right: 15px !important;
	}
}

.post-tags-section {
	margin: 30px 0;
	padding-top: 20px;
	border-top: 1px dashed #eee;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.tags-title {
	font-weight: 700;
	font-size: 14px;
	color: #333;
	margin-right: 5px;
}

.tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tag-item {
	background: #f5f5f5;
	color: #666;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 13px;
	text-decoration: none;
	transition: all 0.3s ease;
	border: 1px solid transparent;
}

.tag-item:hover {
	background: var(--ast-global-color-6);
	/* Màu xanh nhạt khi hover */
	color: var(--ast-global-color-0);
	border-color: var(--ast-global-color-0);
	transform: translateY(-2px);
}