/* =========================================================
   Guide/blog listing extras (cam-nang.html)
   ========================================================= */
/* Grid items default to min-width:auto, which lets their content refuse to
   shrink below its own min-content width — the main column here was doing
   that and forcing itself to ~full container width, squeezing .widget-area
   down to near-zero and off the right edge. min-width:0 lets it actually
   respect the 2.5fr/1fr split from .page-layout. */
.guide-main {
	min-width: 0;
}

.guide-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 24px;
}

.guide-tab {
	padding: 10px 20px;
	border-radius: 999px;
	border: 1px solid var(--color-border);
	background: #fff;
	color: var(--color-text);
	font-weight: 600;
	font-size: 0.9375rem;
	cursor: pointer;
}

.guide-tab:hover {
	border-color: var(--color-primary);
	color: var(--color-primary);
}

.guide-tab.is-active {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: #fff;
}

.guide-search {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 200px;
	padding: 10px 16px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	background: #fff;
}
@media (max-width: 782px) {
	.guide-search {
		width: 100%;
	}
}

.guide-search .icon {
	width: 16px;
	height: 16px;
	color: var(--color-text-light);
	flex-shrink: 0;
}

.guide-search input {
	flex: 1;
	min-width: 0;
	border: none;
	font: inherit;
	color: var(--color-text);
	background: transparent;
}

.guide-search input:focus {
	outline: none;
}

.guide-featured {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 0;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	margin-bottom: 40px;
}
@media (max-width: 900px) {
	.guide-featured {
		grid-template-columns: 1fr;
	}
}

.guide-featured-thumb {
	position: relative;
	display: block;
	min-height: 260px;
}
@media (max-width: 900px) {
	.guide-featured-thumb {
		min-height: 220px;
	}
}

.guide-featured-thumb .ph-thumb {
	height: 100%;
}

.guide-featured-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 800;
	color: #fff;
	background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
}

.guide-featured-badge .icon {
	width: 14px;
	height: 14px;
}

.guide-featured-body {
	padding: 32px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.guide-featured-body .post-card-title {
	font-size: 1.5rem;
}

.guide-section-title {
	font-size: 1.25rem;
	margin-bottom: 20px;
}

/* Sidebar "Bài Viết Nổi Bật" mini post list */
.widget-post-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 14px;
}

.widget-post-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.widget-post-thumb {
	display: block;
	flex-shrink: 0;
	width: 72px;
	border-radius: var(--radius);
	overflow: hidden;
}

.widget-post-thumb .ph-thumb {
	aspect-ratio: 1 / 1;
	height: auto;
	font-size: 0;
}

.widget-post-title {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--color-text);
	line-height: 1.4;
}

.widget-post-title:hover {
	color: var(--color-primary);
}

.widget-post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	font-size: 0.75rem;
	color: var(--color-text-light);
	margin-top: 4px;
}

.widget-post-meta .icon {
	width: 12px;
	height: 12px;
	vertical-align: -1px;
}

/* =========================================================
   Blog list
   ========================================================= */
.post-list-item {
	display: flex;
	gap: 20px;
	padding-bottom: 30px;
	margin-bottom: 30px;
	border-bottom: 1px solid var(--color-border);
}
@media (max-width: 782px) {
	.post-list-item {
		flex-direction: column;
	}
}

.post-thumb {
	flex: 0 0 240px;
}
@media (max-width: 782px) {
	.post-thumb {
		flex: none;
	}
}

.post-thumb img {
	border-radius: var(--radius);
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.entry-title a {
	color: var(--color-text);
}

.entry-meta {
	font-size: 0.875rem;
	color: var(--color-text-light);
	margin-bottom: 0.6em;
}

.entry-meta span {
	margin-right: 12px;
}

.read-more {
	font-weight: 600;
	font-size: 0.875rem;
}

.widget-area .widget {
	margin-bottom: 30px;
	padding-bottom: 30px;
	border-bottom: 1px solid var(--color-border);
}

.widget .btn {
	width: 100%;
	justify-content: center;
	margin-top: 4px;
}

.widget-area .search-form {
	display: flex;
	gap: 8px;
}

.widget-area .search-field {
	flex: 1;
	min-width: 0;
	padding: 10px 14px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	font: inherit;
}

.widget-area .search-submit {
	flex-shrink: 0;
	width: 42px;
	border: none;
	border-radius: var(--radius);
	background: var(--color-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.widget-area .search-submit:hover {
	background: var(--color-primary-dark);
}

/* =========================================================
   Cẩm Nang archive "Bài viết mới nhất" grid (template-cam-nang.php) —
   moved here from pages/home.css, since #guide-latest is the actual
   Cẩm Nang archive page's own section, not the homepage's #guide teaser
   (a different section, see pages/home.css).
   ========================================================= */
/* "Bài viết mới nhất" on cam-nang.html is a fixed 3-column grid (not
   auto-fit) — kept to exactly 6 cards, a clean multiple of 3, so no
   orphaned card ends up on its own row. */
#guide-latest .post-grid {
	grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
	#guide-latest .post-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 480px) {
	#guide-latest .post-grid {
		grid-template-columns: 1fr;
	}
}
