/* ===== Hero search ===== */
.page-wrapper.tin-tuc-archive {
	padding: 0;
}

.tin-tuc-hero .hero-full-content { max-width: 1300px; }
.tin-tuc-hero-search {
	position: relative;
	max-width: 40vh;
	margin-top: 8px;
}
.tin-tuc-hero-search input {
	width: 100%;
	padding: 15px 60px 15px 20px;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-family: inherit;
	font-size: 14px;
	background: #fff;
	box-shadow: var(--shadow-card);
}
.tin-tuc-hero-search input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.tin-tuc-hero-search button {
	position: absolute;
	top: 5px; right: 5px;
	width: 40px; height: 40px;
	border-radius: 50%;
	background: var(--primary);
	color: #fff;
	border: none;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
}
.tin-tuc-hero-search button svg { width: 17px; height: 17px; }

/* ===== Layout: sidebar + main (row/col thật của Flatsome, chỉ style phần custom) ===== */
.tin-tuc-body { padding-top: 40px; }
.post-sidebar .tin-tuc-cat-list,
.post-sidebar .tin-tuc-newsletter,
.post-sidebar .tin-tuc-cta-box { margin-bottom: 20px; }
.post-sidebar > *:last-child { margin-bottom: 0; }

.tin-tuc-cat-list {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-card);
	padding: 18px;
}
.tin-tuc-cat-list h4 {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--primary);
	margin: 0 0 12px;
}
.tin-tuc-cat-list ul { display: flex; flex-direction: column; gap: 4px; }
.tin-tuc-cat-list a {
	display: block;
	padding: 9px 10px;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--text-body);
	transition: background .2s ease, color .2s ease;
}
.tin-tuc-cat-list a:hover { background: var(--bg-soft); color: var(--primary); }
.tin-tuc-cat-list a.active { background: var(--primary); color: #fff; }

.tin-tuc-newsletter {
	background: var(--bg-soft);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 18px;
}
.tin-tuc-newsletter h4 {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--primary);
	margin: 0 0 12px;
}
.tin-tuc-newsletter p { font-size: 12px; line-height: 1.5; margin: 0 0 12px; }
.tin-tuc-newsletter input {
	width: 100%;
	padding: 10px 12px;
	margin-bottom: 8px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-family: inherit;
	font-size: 13px;
	background: #fff;
}
.tin-tuc-newsletter .btn { width: 100%; justify-content: center; padding: 10px; font-size: 13.5px; }
.tin-tuc-newsletter .tin-tuc-newsletter-note { font-size: 10.5px; color: var(--text-muted); margin: 8px 0 0; }

.tin-tuc-cta-box {
	background: linear-gradient(150deg, #E8A33D 0%, var(--secondary) 65%, #C99A2E 100%);
	border-radius: var(--radius-md);
	padding: 22px 20px;
	color: #fff;
	text-align: center;
}
.tin-tuc-cta-box h4 { 
	font-size: 20px;
	font-weight: 800;
	margin: 0 0 8px;
	line-height: 1.3;
	color: #fff;
}
.tin-tuc-cta-box p { font-size: 14px; line-height: 1.5; margin: 0 0 16px; opacity: 0.95; }
.tin-tuc-cta-box .btn { width: 100%; justify-content: center; background: #fff; color: var(--secondary); box-shadow: none; }
.tin-tuc-cta-box .btn:hover { background: rgba(255,255,255,0.9); }

/* ===== Filter tabs ===== */
.tin-tuc-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 24px;
}
.tin-tuc-tabs a {
	padding: 9px 20px;
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--text-body);
	background: var(--bg-soft);
	border: 1px solid var(--border);
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.tin-tuc-tabs a:hover { border-color: var(--primary); color: var(--primary); }
.tin-tuc-tabs a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.tin-tuc-grid .post-item .col-inner { height: 100%; }
.tin-tuc-grid .box.box-blog-post {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	overflow: hidden;
	box-shadow: var(--shadow-card);
	transition: transform .3s ease, box-shadow .3s ease;
}
.tin-tuc-grid .box.box-blog-post:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.tin-tuc-grid .box-image { width: 100%; aspect-ratio: 3/2; position: relative; }
.tin-tuc-grid .box-image .image-cover { height: 100%; }
.tin-tuc-grid .box-text { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.tin-tuc-grid .box-text-inner { display: flex; flex-direction: column; flex: 1; }

.tin-tuc-grid .cat-label {
	display: inline-block;
	align-self: flex-start;
	padding: 4px 12px;
	margin: 0 0 10px;
	border-radius: 999px;
	font-size: 10.5px !important;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--primary);
	background: var(--bg-soft);
	opacity: 1 !important;
}
.tin-tuc-grid .post-title { margin: 0 0 8px; }
.tin-tuc-grid .post-title a {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--text-dark);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
.tin-tuc-grid .post-title a:hover { color: var(--primary); }
.tin-tuc-grid .is-divider { display: none; }
.tin-tuc-grid .from_the_blog_excerpt {
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--text-body);
	margin: 0 0 12px;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
.tin-tuc-grid .button.is-link {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--primary);
	font-weight: 600;
	font-size: 14px;
	padding: 0;
	min-height: auto;
	background: none;
	text-transform: none;
	align-self: flex-start;
}

/* Badge ngày đăng (day/month) đè lên góc ảnh — markup thật của Flatsome khi show_date="badge" */
.tin-tuc-grid .post-date.badge {
	position: absolute;
	top: 12px; left: 12px;
	z-index: 1;
	background: #fff;
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-card);
	padding: 6px 10px;
	text-align: center;
	line-height: 1.1;
}
.tin-tuc-grid .post-date.badge .badge-inner {
	color: #fff;
	padding: 0;
	line-height: 1;
	border: 0;
	background: #fff !important;
}
.tin-tuc-grid .post-date-day { font-size: 15px; font-weight: 800; color: var(--primary); }
.tin-tuc-grid .post-date-month { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }

/* ===== Pagination — khớp đúng markup thật của flatsome_posts_pagination()
(inc/structure/structure-posts.php): <ul class="page-numbers nav-pagination
links text-center"><li><a/span class="page-number ...">...</a></li></ul> —
lưu ý số ít "page-number", KHÔNG phải "page-numbers" như chuẩn WP core. ===== */
#post-list .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 36px;
	padding: 0;
}
#post-list .page-numbers li { list-style: none; }
#post-list .page-number {
	min-width: 38px;
	height: 38px;
	padding: 0 6px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--text-body);
	background: #fff;
	border: 1px solid var(--border);
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
#post-list a.page-number:hover { border-color: var(--primary); color: var(--primary); }
#post-list .page-number.current {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}
#post-list .page-number.next,
#post-list .page-number.prev { background: transparent; border-color: transparent; color: var(--text-muted); }
.tin-tuc-img-box ,.widget_media_image{
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
	.post-sidebar { margin-bottom: 32px; }
}
@media (max-width: 600px) {
	.tin-tuc-hero-search { max-width: 100%; }
	.tin-tuc-tabs { gap: 8px; }
	.tin-tuc-tabs a { padding: 8px 14px; font-size: 12.5px; }
}
