/*! Kira XemTuVi - main stylesheet. Tông tím chàm – vàng kim – đỏ son. */

:root {
	--navy: #141030;
	--navy-2: #2d1b69;
	--indigo: #3d2980;
	--gold: #d4af37;
	--gold-2: #f5d76e;
	--red: #b02a2f;
	--cream: #f5f0e4;
	--ink: #23203a;
	--muted: #6b6880;
	--line: #e7e3f0;
	--bg: #faf9fd;
	--white: #ffffff;
	--radius: 14px;
	--radius-sm: 10px;
	--shadow: 0 10px 30px rgba(20, 16, 48, .12);
	--shadow-sm: 0 4px 14px rgba(20, 16, 48, .08);
	--container: 1200px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
	--serif: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--font);
	color: var(--ink);
	background: var(--bg);
	line-height: 1.7;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); text-decoration: none; transition: color .2s; }
a:hover { color: var(--red); }

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.25; color: var(--navy); margin: 0 0 .6em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

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

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
	position: absolute; left: -999px; top: 0; z-index: 1000;
	background: var(--gold); color: var(--navy); padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-block; cursor: pointer; border: 0; border-radius: 999px;
	padding: 12px 26px; font-weight: 700; font-size: .98rem; line-height: 1.2;
	text-align: center; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(176, 42, 47, .35); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(176, 42, 47, .45); }
.btn-light { background: var(--gold-2); color: var(--navy); }
.btn-light:hover { color: var(--navy); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header { background: var(--white); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100; }
.topbar { background: var(--navy); color: #cfc8e6; font-size: .82rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 7px 20px; gap: 12px; }
.topbar p { margin: 0; }
.topbar a { color: var(--gold-2); }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 14px 20px; }
.site-branding { flex: 0 0 auto; }
.custom-logo, .site-branding img { max-height: 58px; width: auto; }

.main-navigation { margin-left: auto; }
.nav-menu { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; align-items: center; }
.nav-menu li { position: relative; }
.nav-menu a { display: block; padding: 10px 14px; font-weight: 600; color: var(--navy); border-radius: 8px; }
.nav-menu a:hover, .nav-menu .current-menu-item > a, .nav-menu .current_page_item > a { color: var(--red); background: #f4f0fb; }
.nav-menu .sub-menu {
	list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0;
	min-width: 230px; background: #fff; box-shadow: var(--shadow); border-radius: 12px;
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s; z-index: 30;
}
.nav-menu li:hover > .sub-menu, .nav-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.menu-item-has-children > a::after { content: " ▾"; font-size: .7em; color: var(--muted); }

.header-actions { display: flex; align-items: center; }
.search-toggle, .menu-toggle {
	background: #f4f0fb; border: 0; width: 42px; height: 42px; border-radius: 10px;
	cursor: pointer; font-size: 1.2rem; color: var(--navy-2); display: inline-flex;
	align-items: center; justify-content: center;
}
.menu-toggle { display: none; position: relative; }
.menu-toggle-bar, .menu-toggle-bar::before, .menu-toggle-bar::after {
	content: ""; display: block; width: 20px; height: 2px; background: var(--navy); position: relative;
}
.menu-toggle-bar::before { position: absolute; top: -6px; }
.menu-toggle-bar::after { position: absolute; top: 6px; }

.header-search { background: #f4f0fb; border-top: 1px solid var(--line); padding: 14px 0; }
.header-search[hidden] { display: none; }

/* ---------- Search form ---------- */
.search-form { display: flex; gap: 8px; }
.search-field {
	flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--line);
	border-radius: 999px; font-size: 1rem; background: #fff;
}
.search-field:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

/* ---------- Layout ---------- */
.site-content { padding: 30px 0 50px; }
.content-area-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; align-items: start; }
.is-front .site-content > .container { max-width: 100%; padding: 0; }
.is-front .content-area-wrap { display: block; }
body:not(.has-sidebar) .content-area-wrap, .content-area-wrap.is-full { grid-template-columns: 1fr; }

/* ---------- Breadcrumb ---------- */
.kxtv-breadcrumb { margin: 0 0 18px; font-size: .86rem; color: var(--muted); }
.kxtv-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.kxtv-breadcrumb li::after { content: "›"; margin-left: 6px; color: var(--muted); }
.kxtv-breadcrumb li:last-child::after { content: ""; }
.kxtv-breadcrumb a { color: var(--navy-2); }

/* ---------- Page header ---------- */
.page-header { margin-bottom: 26px; padding-bottom: 18px; border-bottom: 2px solid var(--line); }
.page-title { margin: 0 0 6px; }
.page-subtitle, .page-header .archive-description { color: var(--muted); margin: 0; }

/* ---------- Grid ---------- */
.kxtv-grid { display: grid; gap: 26px; }
.kxtv-grid-2 { grid-template-columns: repeat(2, 1fr); }
.kxtv-grid-3 { grid-template-columns: repeat(3, 1fr); }
.kxtv-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Post card ---------- */
.post-card {
	background: #fff; border-radius: var(--radius); overflow: hidden;
	box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
	transition: transform .18s, box-shadow .2s; border: 1px solid var(--line);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.post-card-media .kxtv-thumb, .post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-card:hover .post-card-media img { transform: scale(1.06); }
.post-card-cat {
	position: absolute; left: 12px; top: 12px; background: var(--red); color: #fff;
	font-size: .74rem; font-weight: 700; padding: 5px 12px; border-radius: 999px;
}
.post-card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.post-card-title { font-size: 1.16rem; margin: 0 0 8px; }
.post-card-title a { color: var(--navy); }
.post-card-title a:hover { color: var(--red); }
.post-card-meta { font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.dot-sep { margin: 0 6px; }
.post-card-excerpt { font-size: .95rem; color: #4a4860; margin: 0 0 14px; }
.post-card-more { margin-top: auto; font-weight: 700; color: var(--red); font-size: .9rem; }

/* ---------- Hero slider ---------- */
.hero-slider { position: relative; overflow: hidden; }
.hero-slider .slides { position: relative; }
.slide {
	display: none; min-height: 460px; background-size: cover; background-position: center;
	align-items: center; color: #fff;
}
.slide.is-active { display: flex; animation: fade .6s ease; }
@keyframes fade { from { opacity: .3; } to { opacity: 1; } }
.slide-inner { max-width: 640px; padding: 60px 20px; }
.slide-tag {
	display: inline-block; background: var(--gold); color: var(--navy); font-weight: 700;
	padding: 6px 16px; border-radius: 999px; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em;
}
.slide-title { color: #fff; font-size: 2.6rem; margin: 16px 0 12px; text-shadow: 0 2px 18px rgba(0,0,0,.4); }
.slide-desc { font-size: 1.1rem; color: #ece8f6; margin-bottom: 22px; }
.slider-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; padding: 0; }
.dot.is-active { background: var(--gold); border-color: var(--gold); }

/* ---------- Home sections ---------- */
.home-section { padding: 56px 0; }
.home-section:nth-child(even) { background: #fff; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 36px; }
.section-head .section-title { font-size: 1.9rem; }
.section-head.section-head { position: relative; }
.latest-section .section-head { display: flex; justify-content: space-between; align-items: baseline; text-align: left; max-width: var(--container); }
.section-sub { color: var(--muted); margin: 0; }
.section-link { font-weight: 700; color: var(--red); white-space: nowrap; }
.section-title { position: relative; }

/* category cards on home */
.cat-card {
	display: flex; flex-direction: column; background: #fff; border-radius: var(--radius);
	overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
	transition: transform .18s, box-shadow .2s; color: var(--ink);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.cat-card-media { display: block; aspect-ratio: 16 / 9; background-size: cover; background-position: center; }
.cat-card-body { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.cat-card-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.cat-card-desc { color: #4a4860; font-size: .92rem; }
.cat-card-count { color: var(--red); font-weight: 700; font-size: .82rem; }

/* CTA banner */
.home-cta { background-size: cover; background-position: center; color: #fff; }
.home-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 54px 20px; }
.home-cta h2 { color: #fff; margin: 0 0 8px; font-size: 1.8rem; }
.home-cta p { color: #f0ecf8; margin: 0; max-width: 640px; }

/* steps */
.steps-grid { gap: 22px; }
.step-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow-sm); }
.step-num { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 12px; background: linear-gradient(135deg, var(--navy-2), var(--red)); color: var(--gold-2); font-family: var(--serif); font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; }
.step-title { font-size: 1.1rem; margin-bottom: 6px; }
.step-card p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Single / Page ---------- */
.single-post, .single-page { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-sm); }
.entry-title { font-size: 2rem; margin-bottom: 12px; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .88rem; margin-bottom: 16px; }
.entry-meta span { display: inline-flex; align-items: center; }
.entry-meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-right: 8px; }
.entry-lead { font-size: 1.12rem; color: #45425c; font-style: italic; border-left: 4px solid var(--gold); padding-left: 16px; }
.entry-featured { margin: 0 0 26px; border-radius: var(--radius); overflow: hidden; }
.entry-featured-img { width: 100%; object-fit: cover; }

.entry-content { font-size: 1.05rem; line-height: 1.85; }
.entry-content h2 { margin-top: 1.6em; padding-bottom: .2em; border-bottom: 2px solid var(--line); }
.entry-content h3 { margin-top: 1.3em; color: var(--navy-2); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .5em; }
.entry-content img { border-radius: var(--radius); margin: 1.2em 0; }
.entry-content a { color: var(--red); text-decoration: underline; }
.entry-content blockquote { border-left: 4px solid var(--gold); margin: 1.2em 0; padding: .5em 1.2em; background: #faf7ef; color: #45425c; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .98rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; }
.entry-content thead th { background: var(--navy-2); color: #fff; }
.entry-content tbody tr:nth-child(even) { background: #f7f4fc; }
.entry-content figure { margin: 1.4em 0; }

.entry-footer { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.entry-tags { list-style: none; display: inline-flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.entry-tags li a { background: #f4f0fb; padding: 5px 12px; border-radius: 999px; font-size: .82rem; color: var(--navy-2); }
.tags-label, .share-label { font-weight: 700; margin-right: 8px; }
.entry-share { display: flex; align-items: center; gap: 8px; }
.share-btn { background: var(--navy-2); color: #fff; padding: 6px 14px; border-radius: 8px; font-size: .82rem; font-weight: 600; }
.share-btn:hover { background: var(--red); color: #fff; }

.author-box { display: flex; gap: 18px; margin-top: 26px; padding: 22px; background: #f7f4fc; border-radius: var(--radius); align-items: flex-start; }
.author-box-avatar { border-radius: 50%; flex: 0 0 auto; }
.author-box-name { font-size: 1.15rem; margin: 0 0 4px; }
.author-box-bio { margin: 0; color: #4a4860; font-size: .95rem; }

/* related */
.kxtv-related { margin-top: 40px; }
.kxtv-related .section-title { font-size: 1.5rem; padding-bottom: 10px; border-bottom: 2px solid var(--line); margin-bottom: 22px; }

/* ---------- Category hero ---------- */
.category-hero { background-size: cover; background-position: center; border-radius: var(--radius); padding: 48px 34px; color: #fff; margin-bottom: 30px; }
.category-hero .page-title { color: #fff; font-size: 2.2rem; margin: 6px 0 10px; }
.category-hero .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--gold-2); font-weight: 700; }
.category-desc, .category-hero .category-desc p { color: #ece8f6; max-width: 720px; margin: 0; }

/* ---------- Sidebar ---------- */
.sidebar .widget { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.widget-title { font-size: 1.1rem; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--line); position: relative; }
.widget-title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 48px; height: 2px; background: var(--gold); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget_categories li, .widget_recent_entries .recent-item { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.widget_categories li:last-child { border-bottom: 0; }
.widget_categories a { display: inline-flex; justify-content: space-between; width: 100%; color: var(--navy); font-weight: 600; }
.widget_categories a:hover { color: var(--red); }

.recent-list { display: flex; flex-direction: column; }
.recent-item { display: flex; gap: 12px; align-items: center; }
.recent-thumb { flex: 0 0 64px; }
.recent-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.recent-body a { font-weight: 600; color: var(--navy); font-size: .95rem; display: block; line-height: 1.4; }
.recent-body a:hover { color: var(--red); }
.recent-body time { font-size: .78rem; color: var(--muted); }

.widget_cta { background: linear-gradient(160deg, var(--navy-2), var(--indigo)) !important; color: #fff; border: 0 !important; }
.widget_cta .widget-title { color: #fff; border-color: rgba(255,255,255,.2); }
.widget_cta p { color: #e7e2f5; font-size: .94rem; }

/* ---------- Pagination ---------- */
.kxtv-pagination { margin-top: 34px; }
.kxtv-pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0; padding: 0; }
.kxtv-pagination a, .kxtv-pagination span {
	display: inline-flex; min-width: 42px; height: 42px; align-items: center; justify-content: center;
	padding: 0 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-weight: 600; color: var(--navy);
}
.kxtv-pagination .current { background: var(--red); color: #fff; border-color: var(--red); }
.kxtv-pagination a:hover { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }

/* ---------- 404 ---------- */
.error-404 { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-sm); }
.error-illustration { position: relative; max-width: 460px; margin: 0 auto 24px; }
.error-illustration img { border-radius: var(--radius); }
.error-code { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 5rem; font-weight: 800; color: var(--gold-2); text-shadow: 0 4px 24px rgba(0,0,0,.5); }
.error-search { max-width: 460px; margin: 0 auto 18px; }
.error-suggest { margin-top: 36px; text-align: left; }
.error-suggest .section-title { text-align: center; }

/* ---------- Comments ---------- */
.comments-area { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; margin-top: 30px; box-shadow: var(--shadow-sm); }
.comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.comment-list ol { list-style: none; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-author .avatar { border-radius: 50%; margin-right: 10px; vertical-align: middle; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
	width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; font-family: inherit; margin-bottom: 12px;
}
.comment-form textarea:focus, .comment-form input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #cfc8e6; margin-top: 40px; }
.footer-widgets { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; padding: 54px 20px 36px; }
.footer-logo { max-height: 56px; margin-bottom: 16px; }
.site-footer h3, .site-footer .widget-title { color: #fff; }
.site-footer .widget-title::after { background: var(--gold); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.08); }
.footer-col a { color: #cfc8e6; }
.footer-col a:hover { color: var(--gold-2); }
.footer-about p { color: #b3acce; font-size: .94rem; }
.footer-contact li { color: #cfc8e6; }
.footer-bottom { background: #0e0b26; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; font-size: .85rem; }
.copyright, .footer-disclaimer { margin: 0; color: #9a93b8; }
.footer-menu { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; }
.footer-menu a { color: #cfc8e6; }

/* ---------- Back to top ---------- */
.back-to-top {
	position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%;
	border: 0; background: var(--red); color: #fff; font-size: 1.3rem; cursor: pointer; z-index: 90;
	box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); transition: .25s;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); }
.back-to-top[hidden] { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.content-area-wrap { grid-template-columns: minmax(0, 1fr) 300px; gap: 30px; }
	.slide-title { font-size: 2.1rem; }
}

@media (max-width: 860px) {
	.content-area-wrap { grid-template-columns: 1fr; }
	.kxtv-grid-4 { grid-template-columns: repeat(2, 1fr); }
	.menu-toggle { display: inline-flex; margin-right: 8px; }
	.main-navigation { margin-left: auto; order: 3; position: relative; }
	.nav-menu {
		display: none; position: absolute; right: 0; top: calc(100% + 12px); flex-direction: column;
		background: #fff; box-shadow: var(--shadow); border-radius: 12px; padding: 10px; min-width: 250px; z-index: 50; align-items: stretch;
	}
	.main-navigation.is-open .nav-menu { display: flex; }
	.nav-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding-left: 14px; }
	.latest-section .section-head { flex-direction: column; gap: 8px; }
	.home-cta-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
	body { font-size: 16px; }
	.kxtv-grid-2, .kxtv-grid-3, .kxtv-grid-4 { grid-template-columns: 1fr; }
	.topbar-note { display: none; }
	.slide { min-height: 380px; }
	.slide-title { font-size: 1.7rem; }
	.single-post, .single-page, .comments-area { padding: 22px; }
	.entry-title { font-size: 1.6rem; }
	.footer-widgets { grid-template-columns: 1fr; gap: 26px; }
	.entry-footer { flex-direction: column; }
}
