/**
 * Trang tin tức — ACC FUTEK
 */

.acc-futek-blog-archive {
	--acc-blog-primary: var(--fs-color-primary, var(--primary-color, #446084));
	--acc-blog-accent: #e67e22;
	--acc-blog-text: #2d3748;
	--acc-blog-muted: #5a6578;
	--acc-blog-border: rgba(0, 0, 0, 0.08);
	--acc-blog-radius: 14px;
}

.acc-futek-blog-archive .blog-wrapper {
	padding-bottom: 48px;
}

.acc-futek-blog-archive .acc-page-banner {
	margin-bottom: 0;
}

/* --- Lọc chuyên mục --- */
.acc-futek-blog-filters {
	padding: 20px 15px 8px;
	background: #f7f8fa;
}

.acc-futek-blog-filters__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	max-width: 1200px;
	margin: 0 auto;
}

.acc-futek-blog-filters__pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border-radius: 999px;
	border: 1px solid var(--acc-blog-border);
	background: #fff;
	color: var(--acc-blog-primary);
	font-size: 0.86rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.acc-futek-blog-filters__pill:hover,
.acc-futek-blog-filters__pill:focus {
	color: var(--acc-blog-primary);
	border-color: color-mix(in srgb, var(--acc-blog-primary) 30%, transparent);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
	text-decoration: none;
}

.acc-futek-blog-filters__pill.is-active {
	background: var(--acc-blog-primary);
	border-color: var(--acc-blog-primary);
	color: #fff;
}

.acc-futek-blog-filters__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.06);
	font-size: 0.75rem;
	font-weight: 700;
}

.acc-futek-blog-filters__pill.is-active .acc-futek-blog-filters__count {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

/* --- Layout --- */
.acc-futek-blog-layout {
	padding: 28px 0 0;
}

.acc-futek-blog-layout__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 32px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 15px;
}

.acc-futek-blog-layout__main {
	min-width: 0;
}

/* --- Grid bài viết --- */
.acc-futek-blog-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px 20px;
}

/* --- Card bài viết --- */
.acc-futek-post-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.acc-futek-post-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--acc-blog-radius);
	background: #eef2f6;
	aspect-ratio: 16 / 10;
}

.acc-futek-post-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.35s ease;
}

.acc-futek-post-card__media:hover .acc-futek-post-card__image,
.acc-futek-post-card__media:focus .acc-futek-post-card__image {
	transform: scale(1.04);
}

.acc-futek-post-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: color-mix(in srgb, var(--acc-blog-primary) 35%, #fff);
}

.acc-futek-post-card__placeholder svg {
	width: 42px;
	height: 42px;
}

.acc-futek-post-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	max-width: calc(100% - 24px);
	padding: 5px 10px;
	border-radius: 8px;
	background: var(--acc-blog-accent);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.acc-futek-post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding-top: 14px;
}

.acc-futek-post-card__title {
	margin: 0 0 8px;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.45;
}

.acc-futek-post-card__title a {
	color: #1a202c;
	text-decoration: none;
	transition: color 0.2s ease;
}

.acc-futek-post-card__title a:hover,
.acc-futek-post-card__title a:focus {
	color: var(--acc-blog-primary);
}

.acc-futek-post-card__excerpt {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.65;
	color: var(--acc-blog-muted);
}

.acc-futek-post-card__date {
	display: block;
	margin-bottom: 6px;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--acc-blog-muted);
}

/* Compact — dùng ở trang chủ */
.acc-futek-post-card--compact {
	flex-direction: row;
	align-items: flex-start;
	gap: 12px;
	height: auto;
}

.acc-futek-post-card--compact .acc-futek-post-card__media {
	flex: 0 0 72px;
	width: 72px;
	height: auto;
	aspect-ratio: 5 / 4;
	align-self: flex-start;
	border-radius: 8px;
}

.acc-futek-post-card--compact .acc-futek-post-card__body {
	padding-top: 0;
}

.acc-futek-post-card--compact .acc-futek-post-card__title {
	font-size: 0.92rem;
	margin-bottom: 0;
}

/* --- Sidebar: widget Thanh bên WordPress --- */
.acc-futek-blog-sidebar {
	position: sticky;
	top: 100px;
	align-self: start;
}

.acc-futek-blog-sidebar__widgets .widget,
.acc-futek-blog-sidebar__widgets .wp-block-group:not(.alignfull):not(.alignwide) {
	padding: 20px;
	margin-bottom: 18px;
	border-radius: var(--acc-blog-radius);
	border: 1px solid var(--acc-blog-border);
	background: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.acc-futek-blog-sidebar__widgets .widget-title,
.acc-futek-blog-sidebar__widgets .wp-block-heading {
	margin: 0 0 14px;
	padding: 0;
	border: none;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--acc-blog-primary);
}

.acc-futek-blog-sidebar__widgets .widget-title span {
	padding: 0;
}

.acc-futek-blog-sidebar__widgets .is-divider {
	display: none;
}

/* Danh sách widget */
.acc-futek-blog-sidebar__widgets .widget ul,
.acc-futek-blog-sidebar__widgets .wp-block-categories-list,
.acc-futek-blog-sidebar__widgets .wp-block-latest-posts {
	margin: 0;
	padding: 0;
	list-style: none;
}

.acc-futek-blog-sidebar__widgets .widget li,
.acc-futek-blog-sidebar__widgets .wp-block-categories-list li,
.acc-futek-blog-sidebar__widgets .wp-block-latest-posts li {
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid var(--acc-blog-border);
}

.acc-futek-blog-sidebar__widgets .widget li:last-child,
.acc-futek-blog-sidebar__widgets .wp-block-categories-list li:last-child,
.acc-futek-blog-sidebar__widgets .wp-block-latest-posts li:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.acc-futek-blog-sidebar__widgets .widget li:first-child,
.acc-futek-blog-sidebar__widgets .wp-block-categories-list li:first-child,
.acc-futek-blog-sidebar__widgets .wp-block-latest-posts li:first-child {
	padding-top: 0;
}

.acc-futek-blog-sidebar__widgets .widget a,
.acc-futek-blog-sidebar__widgets .wp-block-categories-list a,
.acc-futek-blog-sidebar__widgets .wp-block-latest-posts a {
	color: var(--acc-blog-text);
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.45;
	text-decoration: none;
	transition: color 0.2s ease;
}

.acc-futek-blog-sidebar__widgets .widget a:hover,
.acc-futek-blog-sidebar__widgets .widget a:focus,
.acc-futek-blog-sidebar__widgets .wp-block-categories-list a:hover,
.acc-futek-blog-sidebar__widgets .wp-block-categories-list a:focus,
.acc-futek-blog-sidebar__widgets .wp-block-latest-posts a:hover,
.acc-futek-blog-sidebar__widgets .wp-block-latest-posts a:focus {
	color: var(--acc-blog-primary);
}

.acc-futek-blog-sidebar__widgets .widget .count,
.acc-futek-blog-sidebar__widgets .wp-block-categories-list .wp-block-categories-list__count {
	color: var(--acc-blog-muted);
	font-weight: 600;
}

/* Widget Tìm kiếm */
.acc-futek-blog-sidebar__widgets .widget_search .search-form,
.acc-futek-blog-sidebar__widgets .wp-block-search,
.acc-futek-blog-sidebar__widgets .wp-block-search__inside-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 5px 5px 16px;
	border: 1.5px solid #d1d9e6;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.acc-futek-blog-sidebar__widgets .widget_search .search-form:focus-within,
.acc-futek-blog-sidebar__widgets .wp-block-search:focus-within,
.acc-futek-blog-sidebar__widgets .wp-block-search__inside-wrapper:focus-within {
	border-color: var(--acc-blog-primary);
	box-shadow:
		0 1px 4px rgba(0, 0, 0, 0.05),
		0 0 0 3px color-mix(in srgb, var(--acc-blog-primary) 14%, transparent);
}

.acc-futek-blog-sidebar__widgets .widget_search label,
.acc-futek-blog-sidebar__widgets .wp-block-search__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.acc-futek-blog-sidebar__widgets .widget_search .search-field,
.acc-futek-blog-sidebar__widgets .wp-block-search__input {
	flex: 1;
	min-width: 0;
	width: auto;
	height: 40px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 0;
	background: transparent;
	font-size: 0.9rem;
	color: #1a202c;
	box-shadow: none;
}

.acc-futek-blog-sidebar__widgets .widget_search .search-field::placeholder,
.acc-futek-blog-sidebar__widgets .wp-block-search__input::placeholder {
	color: #8a94a6;
	opacity: 1;
}

.acc-futek-blog-sidebar__widgets .widget_search .search-field:focus,
.acc-futek-blog-sidebar__widgets .wp-block-search__input:focus {
	outline: none;
}

.acc-futek-blog-sidebar__widgets .widget_search .search-submit,
.acc-futek-blog-sidebar__widgets .wp-block-search__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--acc-blog-primary);
	color: #fff;
	font-size: 0;
	line-height: 0;
	cursor: pointer;
	transition: background 0.2s ease;
}

.acc-futek-blog-sidebar__widgets .widget_search .search-submit::before,
.acc-futek-blog-sidebar__widgets .wp-block-search__button::before {
	content: "";
	display: block;
	width: 18px;
	height: 18px;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' stroke='black' stroke-width='2'/%3E%3Cpath stroke='black' stroke-linecap='round' stroke-width='2' d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.acc-futek-blog-sidebar__widgets .widget_search .search-submit:hover,
.acc-futek-blog-sidebar__widgets .widget_search .search-submit:focus,
.acc-futek-blog-sidebar__widgets .wp-block-search__button:hover,
.acc-futek-blog-sidebar__widgets .wp-block-search__button:focus {
	background: color-mix(in srgb, var(--acc-blog-primary) 88%, #000);
	color: #fff;
}

.acc-futek-blog-sidebar__widgets .wp-block-search.wp-block-search__button-outside {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 5px 5px 16px;
	border: 1.5px solid #d1d9e6;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.acc-futek-blog-sidebar__widgets .wp-block-search.wp-block-search__button-outside .wp-block-search__inside-wrapper {
	flex: 1;
	width: auto;
	padding: 0;
	border: none;
	background: transparent;
	box-shadow: none;
}

/* --- Trang chi tiết bài viết --- */
.acc-futek-blog-layout--single {
	padding: 24px 0 48px;
}

.acc-futek-blog-single .entry-content,
.acc-futek-blog-single .article-inner {
	color: #2d3748;
	font-size: 1rem;
	line-height: 1.75;
}

.acc-futek-blog-single .entry-title {
	color: #1a202c;
}

/* --- Pagination / empty --- */
.acc-futek-blog-pagination {
	margin-top: 32px;
}

.acc-futek-blog-empty {
	padding: 40px 20px;
	border-radius: var(--acc-blog-radius);
	background: #f7f8fa;
	text-align: center;
	color: var(--acc-blog-muted);
}

/* --- Responsive --- */
@media (max-width: 991px) {
	.acc-futek-blog-layout__inner {
		grid-template-columns: 1fr;
	}

	.acc-futek-blog-sidebar {
		position: static;
	}

	.acc-futek-blog-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 549px) {
	.acc-futek-blog-grid {
		grid-template-columns: 1fr;
	}

	.acc-futek-blog-filters__inner {
		justify-content: flex-start;
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-bottom: 6px;
		scrollbar-width: thin;
	}

	.acc-futek-blog-filters__pill {
		flex-shrink: 0;
	}

}
