/* Đổi font toàn site: tiêu đề = Roboto Slab, nội dung/chữ còn lại = Inter.
   Rất nhiều selector trong CSS gốc của theme (vd .qodef-header-navigation>ul>li>a)
   tự khai font-family TRỰC TIẾP trên chính nó (không phải kế thừa từ body) — một
   khi 1 phần tử có khai font-family riêng, nó luôn thắng giá trị kế thừa từ cha dù
   cha có !important hay không (kế thừa chỉ là giá trị fallback thấp nhất trong
   cascade). Vì vậy phải dùng selector `*` để áp !important TRỰC TIẾP lên từng phần
   tử, không thể chỉ đặt ở `body` rồi trông chờ kế thừa xuống.

   BẪY ĐÃ GẶP: lúc đầu định loại trừ #wpadminbar bằng cách nhét vào bên trong
   :not(...) của chính rule `*` — nhưng theo spec CSS, độ ưu tiên (specificity)
   của :not()/:is() KHÔNG phải specificity của bản thân selector chứa nó, mà lấy
   specificity CAO NHẤT trong các tham số bên trong. Vì #wpadminbar là ID selector
   (specificity cấp ID), nhét nó vào :not() làm CẢ RULE `*` nghiễm nhiên có độ ưu
   tiên ngang ID — thắng luôn cả các rule heading (chỉ ở cấp class) phía dưới, làm
   heading bị trả về Inter thay vì Roboto Slab. => KHÔNG bao giờ nhét ID selector
   vào :not() của 1 rule diện rộng nếu không muốn đẩy specificity cả rule lên theo.
   Cách đúng: giữ rule `*` ở specificity thấp (0) như ban đầu, rồi thêm các rule
   "khôi phục font" RIÊNG, đặt SAU CÙNG trong file, dùng selector cụ thể (class/ID
   thật) — !important vẫn so specificity bình thường với nhau nên rule sau cùng,
   cụ thể hơn, sẽ thắng đúng từng phần tử của nó mà không ảnh hưởng rule khác. */

:root {
	--e-global-typography-primary-font-family: 'Inter';
	--e-global-typography-secondary-font-family: 'Roboto Slab';
	--e-global-typography-text-font-family: 'Inter';
	--e-global-typography-accent-font-family: 'Inter';
}

*, *::before, *::after {
	font-family: 'Inter', sans-serif !important;
}

h1, h2, h3, h4, h5, h6,
.qodef-m-title,
.qodef-e-title,
.qodef-widget-title,
.qodef-custom-font,
.qodef-related-posts-title,
.qodef-intro-title,
.qodef-m-right-title,
.qodef-m-left-title,
h1 *, h2 *, h3 *, h4 *, h5 *, h6 *,
.qodef-m-title *,
.qodef-e-title *,
.qodef-widget-title *,
.qodef-custom-font *,
.qodef-related-posts-title *,
.qodef-intro-title *,
.qodef-m-right-title *,
.qodef-m-left-title * {
	font-family: 'Roboto Slab', serif !important;
}

/* --- Khôi phục font icon/admin bar — không cho rule `*` phía trên đè lên --- */
#wpadminbar,
#wpadminbar * {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
}
#wpadminbar .ab-icon,
#wpadminbar .ab-icon::before,
#wpadminbar .ab-item::before,
#wpadminbar #wp-admin-bar-wp-logo .ab-icon::before {
	font-family: dashicons !important;
}
.dashicons,
.dashicons-before::before,
[class*="dashicons-"]::before {
	font-family: dashicons !important;
}
.fa, .fas, .far, .fal, .fad,
[class*="fa-"]::before {
	font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome !important;
}
.fab {
	font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
}
[class*="elegant-icon"],
.qodef-m-svg [class^="icon_"],
[class^="icon_"],
[class*=" icon_"] {
	font-family: ElegantIcons !important;
}

/* Feedback lần 1 — header: logo + chữ menu to hơn 30% (logo 68→88px, chữ 15→19.5px).
   Giữ tổng chiều cao header 100px (offset #qodef-page-outer phụ thuộc số này):
   chỉ bớt margin-top của #qodef-page-header-inner để 2 đường kẻ trên/dưới ôm vừa logo. */
#qodef-page-header #qodef-page-header-inner {
	margin-top: 6px;
	height: 94px;
}
#qodef-page-header .qodef-header-logo-link {
	height: 88px;
	max-height: none;
}
#qodef-page-header .qodef-header-navigation > ul > li > a,
#qodef-page-header .qodef-header-navigation > ul > li > a .qodef-menu-item-text,
#qodef-page-header .qodef-widget-holder .qodef-m-text {
	font-size: 19.5px;
}

/* Feedback lần 1 — accordion ngang (trang chủ, what-we-do, faq): CSS gốc xoay tiêu đề
   rotate(180deg) + text-orientation:mixed nên chữ Trung bị lộn ngược và số 01..06 nằm ngang.
   Bỏ xoay, cho chữ đứng thẳng; số (::before) viết ngang để đứng thẳng, đặt dưới chữ
   bằng row-reverse (trục chính của flex theo chiều dọc vì writing-mode vertical-rl). */
.qodef-horizontal-accordion-showcase .qodef-m-header .qodef-m-title {
	transform: none;
	text-orientation: upright;
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	bottom: 40px;
	left: 0;
	right: 0;
	letter-spacing: .1em;
}
.qodef-horizontal-accordion-showcase .qodef-m-header .qodef-m-title::before {
	writing-mode: horizontal-tb;
	right: auto;
	padding: 0;
	margin-top: 30px;
	font-size: 150px;
	line-height: 1;
	letter-spacing: 0;
}
@media only screen and (max-width: 1600px) {
	.qodef-horizontal-accordion-showcase .qodef-m-header .qodef-m-title {
		left: 0;
		right: 0;
	}
	.qodef-horizontal-accordion-showcase .qodef-m-header .qodef-m-title::before {
		right: auto;
		margin-top: 20px;
		font-size: 100px;
	}
}

/* Nút chọn ngôn ngữ GTranslate (Google dịch Trung → Anh/Việt) — xem dd_language_switcher(). */
#qodef-page-header .qodef-widget-holder {
	display: flex;
	align-items: center;
}
.dd-lang-switcher {
	display: flex;
	align-items: center;
	margin-right: 28px;
	line-height: 1;
}
#qodef-page-mobile-header-inner .dd-lang-switcher {
	margin: 0 20px 0 auto;
}
/* Sau khi Google dịch sang chữ Latin (Google gắn class translated-ltr vào <html>):
   tiêu đề dọc của accordion xoay nghiêng 90° thay vì dựng đứng từng ký tự. */
html.translated-ltr .qodef-horizontal-accordion-showcase .qodef-m-header .qodef-m-title {
	text-orientation: mixed;
	letter-spacing: 0;
}
/* Kiểu cờ xếp ngang: các <a class="glink"> nằm cùng hàng, cách đều. */
.dd-lang-switcher .gtranslate_wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
}
.dd-lang-switcher a.glink {
	display: block;
	line-height: 0;
}
.dd-lang-switcher a.glink img {
	width: 26px;
	height: auto;
	opacity: .75;
	transition: opacity .2s ease;
}
.dd-lang-switcher a.glink:hover img,
.dd-lang-switcher a.glink.gt-current-lang img {
	opacity: 1;
}
/* Bản dịch Anh/Việt làm menu dài hơn chữ Trung → thu khoảng cách giữa các mục để không đè hàng cờ. */
html.translated-ltr #qodef-page-header .qodef-header-navigation > ul > li {
	margin: 0 16px;
}
@media only screen and (max-width: 1440px) {
	html.translated-ltr #qodef-page-header .qodef-header-navigation > ul > li {
		margin: 0 11px;
	}
	html.translated-ltr #qodef-page-header .qodef-header-navigation > ul > li > a,
	html.translated-ltr #qodef-page-header .qodef-header-navigation > ul > li > a .qodef-menu-item-text {
		font-size: 17px;
	}
}
