/* Kira HoatHinh3D — style chính. Dark UI cho site tin tức/review hoạt hình 3D. */

:root {
	--hh3d-bg: #0f1118;
	--hh3d-bg-soft: #151827;
	--hh3d-card: #1a1e2e;
	--hh3d-line: #262b40;
	--hh3d-text: #e8eaf2;
	--hh3d-muted: #9aa0b5;
	--hh3d-accent: #ff6a00;
	--hh3d-accent-2: #d62828;
	--hh3d-grad: linear-gradient(135deg, #ff6a00 0%, #d62828 100%);
	--hh3d-radius: 12px;
	--hh3d-container: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--hh3d-bg);
	color: var(--hh3d-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--hh3d-accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: #ff8a3d; }

h1, h2, h3, h4 { line-height: 1.3; color: var(--hh3d-text); }

.hh3d-container { max-width: var(--hh3d-container); margin: 0 auto; padding: 0 20px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	overflow: hidden;
	word-wrap: normal !important;
}

.skip-link { left: 8px; top: 8px; z-index: 999; background: var(--hh3d-card); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { clip: auto; clip-path: none; width: auto; height: auto; }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(15, 17, 24, .92);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--hh3d-line);
}

.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }

.site-branding { flex-shrink: 0; }
.site-branding img { max-height: 52px; width: auto; }

.main-navigation { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.main-navigation ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 4px; flex-wrap: wrap; }
.main-navigation li a {
	display: block;
	padding: 8px 13px;
	color: var(--hh3d-text);
	font-weight: 600;
	font-size: 15px;
	border-radius: 8px;
}
.main-navigation li a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a { background: var(--hh3d-bg-soft); color: var(--hh3d-accent); }

.menu-toggle { display: none; }

/* Search form */
.search-form { display: flex; gap: 8px; }
.search-field {
	background: var(--hh3d-bg-soft);
	border: 1px solid var(--hh3d-line);
	color: var(--hh3d-text);
	border-radius: 8px;
	padding: 8px 12px;
	min-width: 0;
	width: 170px;
	font-size: 14px;
}
.search-field:focus { outline: 2px solid var(--hh3d-accent); border-color: transparent; }
.search-submit,
.hh3d-btn {
	background: var(--hh3d-grad);
	color: #fff;
	border: 0;
	border-radius: 8px;
	padding: 8px 16px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	display: inline-block;
}
.search-submit:hover, .hh3d-btn:hover { filter: brightness(1.1); color: #fff; }

/* ---------- Layout ---------- */
.site-main { padding: 32px 0 56px; }

.has-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }

.content-narrow { max-width: 820px; margin: 0 auto; width: 100%; }

/* Breadcrumb */
.hh3d-breadcrumb { font-size: 13.5px; color: var(--hh3d-muted); margin-bottom: 18px; }
.hh3d-breadcrumb a { color: var(--hh3d-muted); }
.hh3d-breadcrumb a:hover { color: var(--hh3d-accent); }
.hh3d-breadcrumb .sep { margin: 0 8px; opacity: .55; }
.hh3d-breadcrumb .current { color: var(--hh3d-text); }

/* Page headers */
.page-header { margin-bottom: 28px; }
.page-title { font-size: 30px; margin: 0 0 8px; }
.archive-description, .category-count { color: var(--hh3d-muted); font-size: 15px; }
.search-keyword { color: var(--hh3d-accent); }

/* ---------- Cards ---------- */
.hh3d-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.hh3d-card-grid.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.hh3d-card {
	background: var(--hh3d-card);
	border: 1px solid var(--hh3d-line);
	border-radius: var(--hh3d-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .18s ease, border-color .18s ease;
}
.hh3d-card:hover { transform: translateY(-4px); border-color: var(--hh3d-accent); }

.hh3d-card-media { aspect-ratio: 16 / 9; overflow: hidden; display: block; }
.hh3d-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.hh3d-card:hover .hh3d-card-media img { transform: scale(1.05); }

.hh3d-card-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.hh3d-card-cat {
	align-self: flex-start;
	background: rgba(255, 106, 0, .13);
	color: var(--hh3d-accent);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .4px;
	padding: 3px 10px;
	border-radius: 999px;
}

.hh3d-card-title { font-size: 18px; margin: 0; }
.hh3d-card-title a { color: var(--hh3d-text); }
.hh3d-card-title a:hover { color: var(--hh3d-accent); }

.hh3d-card-excerpt { color: var(--hh3d-muted); font-size: 14.5px; }
.hh3d-card-excerpt p { margin: 0; }

.hh3d-card-meta { margin-top: auto; color: var(--hh3d-muted); font-size: 13px; }

/* ---------- Single / Page ---------- */
.entry-title { font-size: 32px; margin: 0 0 14px; }

.hh3d-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--hh3d-muted); font-size: 14px; margin-bottom: 20px; }
.hh3d-meta .dot { opacity: .6; }
.hh3d-meta-cats a { color: var(--hh3d-accent); font-weight: 600; }

.entry-thumb { margin: 0 0 26px; border-radius: var(--hh3d-radius); overflow: hidden; }
.entry-thumb img { width: 100%; }

.entry-content { font-size: 17px; }
.entry-content > * { max-width: 780px; }
.entry-content h2 { font-size: 24px; margin: 36px 0 14px; padding-left: 12px; border-left: 4px solid var(--hh3d-accent); }
.entry-content h3 { font-size: 20px; margin: 28px 0 10px; }
.entry-content p { margin: 0 0 18px; }
.entry-content img { border-radius: var(--hh3d-radius); }
.entry-content ul, .entry-content ol { padding-left: 24px; margin-bottom: 18px; }
.entry-content li { margin-bottom: 6px; }
.entry-content blockquote {
	margin: 24px 0;
	padding: 16px 22px;
	background: var(--hh3d-bg-soft);
	border-left: 4px solid var(--hh3d-accent);
	border-radius: 0 var(--hh3d-radius) var(--hh3d-radius) 0;
	color: var(--hh3d-muted);
}
.entry-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
.entry-content th, .entry-content td { border: 1px solid var(--hh3d-line); padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--hh3d-bg-soft); }

.entry-tags a {
	display: inline-block;
	background: var(--hh3d-bg-soft);
	border: 1px solid var(--hh3d-line);
	color: var(--hh3d-muted);
	font-size: 13px;
	padding: 4px 12px;
	border-radius: 999px;
	margin: 0 6px 6px 0;
}

/* Related + post navigation */
.related-posts { margin: 44px 0; }
.related-title { font-size: 22px; margin-bottom: 18px; padding-left: 12px; border-left: 4px solid var(--hh3d-accent); }

.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 16px; margin: 30px 0; }
.post-navigation a {
	display: block;
	background: var(--hh3d-card);
	border: 1px solid var(--hh3d-line);
	border-radius: var(--hh3d-radius);
	padding: 14px 18px;
	max-width: 48%;
}
.post-navigation .nav-label { display: block; font-size: 12px; color: var(--hh3d-muted); text-transform: uppercase; letter-spacing: .4px; }
.post-navigation .nav-title { color: var(--hh3d-text); font-weight: 600; font-size: 14.5px; }

/* Pagination */
.pagination, .page-numbers { font-size: 15px; }
.navigation.pagination { margin-top: 36px; }
.nav-links .page-numbers {
	display: inline-block;
	background: var(--hh3d-card);
	border: 1px solid var(--hh3d-line);
	color: var(--hh3d-text);
	border-radius: 8px;
	padding: 8px 14px;
	margin: 0 3px;
}
.nav-links .page-numbers.current { background: var(--hh3d-grad); border-color: transparent; color: #fff; }
.nav-links .page-numbers:hover { border-color: var(--hh3d-accent); }

/* ---------- Sidebar ---------- */
.widget-area { display: flex; flex-direction: column; gap: 26px; }
.widget {
	background: var(--hh3d-card);
	border: 1px solid var(--hh3d-line);
	border-radius: var(--hh3d-radius);
	padding: 20px;
}
.widget-title { font-size: 17px; margin: 0 0 14px; padding-left: 10px; border-left: 3px solid var(--hh3d-accent); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 7px 0; border-bottom: 1px solid var(--hh3d-line); font-size: 14.5px; }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--hh3d-text); }
.widget a:hover { color: var(--hh3d-accent); }
.widget .search-form { flex-wrap: wrap; }
.widget .search-field { flex: 1; width: auto; }

.sidebar-recent-link { display: flex; gap: 12px; align-items: flex-start; }
.sidebar-recent-link img { width: 84px; height: 56px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.sidebar-recent-title { display: block; font-weight: 600; font-size: 14px; line-height: 1.4; }
.sidebar-recent-date { color: var(--hh3d-muted); font-size: 12.5px; }

/* ---------- Trang chủ ---------- */
.front-page-article .entry-content { font-size: 16px; }
.front-page-article .entry-content > * { max-width: none; }

.hh3d-hero { position: relative; }
.hh3d-slider { position: relative; overflow: hidden; }
.hh3d-slide { display: none; position: relative; min-height: 420px; }
.hh3d-slide.is-active { display: block; }
.hh3d-slide img { width: 100%; height: 520px; object-fit: cover; }
.hh3d-slide-caption {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 60px 24px 40px;
	background: linear-gradient(transparent, rgba(10, 11, 16, .93));
	text-align: center;
}
.hh3d-slide-caption h2, .hh3d-slide-caption h3 { font-size: 32px; margin: 0 0 8px; color: #fff; }
.hh3d-slide-caption p { color: #cfd3e0; margin: 0 auto; max-width: 640px; }
.hh3d-slider-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 5; }
.hh3d-slider-dot { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.35); cursor: pointer; padding: 0; }
.hh3d-slider-dot.is-active { background: var(--hh3d-accent); }

.home-intro { padding: 44px 20px 8px; max-width: var(--hh3d-container); margin: 0 auto; }
.home-feature-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; padding: 20px; max-width: var(--hh3d-container); margin: 0 auto; }
.home-feature {
	background: var(--hh3d-card);
	border: 1px solid var(--hh3d-line);
	border-radius: var(--hh3d-radius);
	padding: 22px;
}
.home-feature h3 { margin: 0 0 8px; font-size: 18px; }
.home-feature p { margin: 0; color: var(--hh3d-muted); font-size: 14.5px; }

.home-section { padding: 40px 0; }
.home-section-alt { background: var(--hh3d-bg-soft); border-top: 1px solid var(--hh3d-line); border-bottom: 1px solid var(--hh3d-line); }
.home-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.home-section-title { font-size: 24px; margin: 0; padding-left: 12px; border-left: 4px solid var(--hh3d-accent); }
.home-section-more { font-weight: 600; font-size: 14.5px; }

.home-cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.home-cat-chip {
	background: var(--hh3d-card);
	border: 1px solid var(--hh3d-line);
	border-radius: var(--hh3d-radius);
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	transition: border-color .15s ease, transform .15s ease;
}
.home-cat-chip:hover { border-color: var(--hh3d-accent); transform: translateY(-3px); }
.home-cat-name { color: var(--hh3d-text); font-weight: 700; }
.home-cat-count { color: var(--hh3d-muted); font-size: 13px; }

/* ---------- 404 ---------- */
.error-404 { text-align: center; padding: 30px 0; }
.error-code {
	font-size: 96px;
	font-weight: 800;
	margin: 0;
	background: var(--hh3d-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	line-height: 1;
}
.error-search { max-width: 420px; margin: 0 auto 40px; }
.error-suggest { text-align: left; }
.error-home-link { margin-top: 36px; }

/* ---------- Footer ---------- */
.site-footer { background: #0a0c12; border-top: 1px solid var(--hh3d-line); margin-top: 20px; }
.footer-cols { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 36px; padding: 44px 20px; }
.footer-logo { max-height: 46px; width: auto; margin-bottom: 14px; }
.footer-col p { color: var(--hh3d-muted); font-size: 14.5px; }
.footer-title { font-size: 16px; margin: 0 0 14px; padding-left: 10px; border-left: 3px solid var(--hh3d-accent); }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { padding: 6px 0; font-size: 14.5px; }
.footer-list a { color: var(--hh3d-muted); }
.footer-list a:hover { color: var(--hh3d-accent); }
.site-info { border-top: 1px solid var(--hh3d-line); padding: 18px 0; text-align: center; color: var(--hh3d-muted); font-size: 14px; }
.site-info p { margin: 0; }

/* ---------- Comments (cơ bản) ---------- */
.comments-area { margin-top: 44px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { background: var(--hh3d-card); border: 1px solid var(--hh3d-line); border-radius: var(--hh3d-radius); padding: 16px 18px; margin-bottom: 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%;
	background: var(--hh3d-bg-soft);
	border: 1px solid var(--hh3d-line);
	color: var(--hh3d-text);
	border-radius: 8px;
	padding: 10px 12px;
}
.comment-form .submit { background: var(--hh3d-grad); color: #fff; border: 0; border-radius: 8px; padding: 10px 22px; font-weight: 700; cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.has-sidebar { grid-template-columns: 1fr; }
	.home-cat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.hh3d-card-grid.columns-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
	.menu-toggle {
		display: inline-flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		margin-left: auto;
		background: transparent;
		border: 1px solid var(--hh3d-line);
		border-radius: 8px;
		padding: 10px;
		cursor: pointer;
	}
	.menu-toggle-bar { width: 22px; height: 2px; background: var(--hh3d-text); display: block; transition: transform .2s ease, opacity .2s ease; }
	.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) { opacity: 0; }
	.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

	.main-navigation {
		display: none;
		position: absolute;
		top: 100%;
		left: 0; right: 0;
		background: var(--hh3d-bg-soft);
		border-bottom: 1px solid var(--hh3d-line);
		padding: 16px 20px 20px;
		flex-direction: column;
		align-items: stretch;
	}
	.main-navigation.is-open { display: flex; }
	.main-navigation ul { flex-direction: column; }
	.header-search { margin-top: 12px; }
	.header-search .search-field { flex: 1; width: auto; }

	.hh3d-card-grid, .hh3d-card-grid.columns-3 { grid-template-columns: 1fr; }
	.home-feature-row { grid-template-columns: 1fr; }
	.footer-cols { grid-template-columns: 1fr; }
	.page-title { font-size: 24px; }
	.entry-title { font-size: 25px; }
	.hh3d-slide img { height: 340px; }
	.hh3d-slide-caption h2, .hh3d-slide-caption h3 { font-size: 22px; }
	.post-navigation .nav-links { flex-direction: column; }
	.post-navigation a { max-width: 100%; }
}
