/* ==========================================================================
   GIA AN JSC - GLOBAL TYPOGRAPHY & DESIGN SYSTEM
   Đồng bộ 100% Font Be Vietnam Pro, Cỡ chữ & Canh lề cho TOÀN BỘ WEBSITE
   Dựa theo chuẩn thiết kế từ trang Giới thiệu (gia-an-gioi-thieu)
   ========================================================================== */

:root {
  --mau-nhan: #A70E13;
  --mau-dam: #1E1F25;
  --mau-dam-2: #26272E;
  --nen: #F7F5F2;
  --nen-kem: #F4F0EA;
  --nen-nga: #FBF9F6;
  --trang: #FFFFFF;
  --chu-phu: #4A5560;
  --chu-mo: #5A6370;
  --chu-nhat: #8C909A;
  --chu: #222222;
  --font-chinh: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 1. ÁP DỤNG FONT BE VIETNAM PRO CHO TOÀN BỘ WEBSITE */
html,
body,
body *:not(i):not([class*="fa"]):not([class*="eicon"]):not([class*="dashicons"]):not([class*="genericon"]) {
  font-family: var(--font-chinh) !important;
}

body {
  color: var(--chu);
  background-color: var(--nen);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 2. CĂN LỀ TRÁI TỰ NHIÊN - BỎ HOÀN TOÀN JUSTIFY (CĂN ĐỀU 2 BÊN) TRÊN TOÀN TRANG */
p,
.entry-content p,
.elementor-text-editor,
.elementor-text-editor p,
.elementor-widget-text-editor,
.elementor-cta__description,
.elementor-cta__description p,
.c-text,
.post-content,
[style*="text-align: justify"],
[style*="text-align:justify"] {
  text-align: left !important;
  word-spacing: normal !important;
  letter-spacing: normal !important;
  line-height: 1.7 !important;
  color: var(--chu-phu);
}

/* 3. TIÊU ĐỀ (HEADINGS H1 - H6) THEO CHUẨN GIA AN */
h1, h2, h3, h4, h5, h6,
.elementor-heading-title,
.c-heading,
.entry-title {
  font-family: var(--font-chinh) !important;
  color: var(--mau-dam) !important;
  letter-spacing: normal !important;
  text-transform: none;
}

/* Xóa bỏ khoảng padding-top: 0.75em thừa mà theme cũ tự thêm vào các thẻ heading */
h1, h2, h3, h4, h5, h6 {
  clear: none !important;
  padding-top: 0 !important;
}

h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 600 !important;
  line-height: 1.35 !important;
}

h3 {
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

h4 {
  font-size: 18px;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

h5 {
  font-size: 16px;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

h6 {
  font-size: 14px;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

/* 4. THANH MENU CHÍNH: CHỈ VIẾT HOA CHỮ CÁI ĐẦU, BỎ IN HOA TOÀN BỘ */
.elementor-nav-menu a,
.elementor-nav-menu .menu-title,
.mainmenu-container a,
.nav-menu--canvas a,
.site-header .menu-item a,
.site-header .navigation a,
.navigation .nav-menu a {
  text-transform: none !important;
  font-family: var(--font-chinh) !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

/* 5. BANNER TIÊU ĐỀ TRANG DƯỚI (PAGE TITLE): VIẾT HOA TOÀN BỘ, CĂN GIỮA */
.page-title-bar .page-title,
.page-header .page-title,
h1.page-title,
.c-page-title {
  text-transform: uppercase !important;
  font-family: var(--font-chinh) !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-align: center !important;
  color: var(--trang) !important;
}

/* 6. BẢO TOÀN THẺ ĐẬM VÀ MÀU SẮC */
strong, b, .strong {
  font-family: var(--font-chinh) !important;
  font-weight: 600 !important;
  color: inherit !important;
}

/* 7. BẢO TOÀN CÁC FONT ICON (TRÁNH LỖI Ô VUÔNG) */
.fa, .fas, .far, .fab, .fal, .fad,
[class^="fa-"], [class*=" fa-"],
.eicon, [class^="eicon-"], [class*=" eicon-"],
.dashicons {
  font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands", FontAwesome, eicons, dashicons !important;
}


/* ==========================================================================
   8. UNIFIED SITE HEADER (ĐỒNG BỘ 100% TỪ BẢN THIẾT KẾ MỚI)
   - Tách rời Topbar và Navbar để thanh menu trên Trang chủ nằm bên trong ảnh slide
   - Không bị dính khối hộp bao bọc dau-trang-1 trên trang chủ
   ========================================================================== */

#masthead,
#masthead.site-header,
.site-header,
body.opal-header-absolute #masthead,
body.opal-header-absolute .site-header,
body.giaan-single-body #masthead,
body.giaan-single-body .site-header {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 999 !important;
}

#masthead .site-header {
  position: static !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* KHỐI 1: TOPBAR (LOGO + THÔNG TIN LIÊN HỆ) */
.ga-header-topbar {
  position: relative;
  overflow: hidden;
  background: #2B2C30;
  width: 100%;
}

.ga-header-topbar-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}

.ga-header-topbar-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  box-sizing: border-box;
}

.ga-logo-link {
  display: block;
  text-decoration: none !important;
}

.dau-trang-6 {
  height: 52px;
  width: auto;
  display: block;
}

.ga-contacts,
.dau-trang-7 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  color: #ffffff;
  font-family: var(--font-chinh) !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.dau-trang-8 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff !important;
  text-decoration: none !important;
  font-family: var(--font-chinh) !important;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.dau-trang-8:hover {
  opacity: 0.85;
}

.dau-trang-8 svg {
  flex-shrink: 0;
}

/* KHỐI 2: THANH MENU ĐỎ CHÍNH */
.ga-header-nav-wrap {
  width: 100%;
  position: relative;
}

/* TRÊN TRANG CHỦ: THANH MENU NẰM BÊN TRONG ẢNH SLIDE */
.ga-header-nav-wrap.ga-nav-on-home {
  position: relative !important;
  z-index: 100 !important;
  margin-bottom: -55px !important;
  background: transparent !important;
}

/* TRÊN CÁC TRANG CON: NỀN ĐÁ NẰM GỌN TRÊN PAGE TITLE BAR */
.ga-header-nav-wrap.ga-nav-on-subpage {
  background: #2B2C30 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.ga-header-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.dau-trang-9 {
  background: var(--mau-nhan, #A70E13);
  color: #ffffff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 0 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.dau-trang-10,
.ga-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 32px;
  font-family: var(--font-chinh) !important;
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dau-trang-11,
.dau-trang-12 {
  color: #ffffff !important;
  text-decoration: none !important;
  font-family: var(--font-chinh) !important;
  display: inline-flex;
  align-items: center;
  line-height: 1.5;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.dau-trang-11 {
  padding: 16px 0;
  font-weight: 500 !important;
}

.dau-trang-11:hover {
  opacity: 0.85;
}

.dau-trang-12 {
  padding: 16px 0;
  font-weight: 700 !important;
  box-shadow: inset 0 -3px 0 #ffffff !important;
}

.dau-trang-13 {
  font-family: var(--font-chinh) !important;
  font-size: 15px;
  font-weight: 600 !important;
  padding: 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.dau-trang-13:hover {
  opacity: 0.85;
}

.dau-trang-13 svg {
  flex-shrink: 0;
}

/* CĂN CHỈNH BĂNG TIÊU ĐỀ BÀI VIẾT */
body.giaan-single-body .page-title-bar {
  height: auto !important;
  min-height: 260px !important;
  max-height: 340px !important;
}

body.giaan-single-body .page-title-bar .wrap {
  height: auto !important;
  min-height: 260px !important;
  max-height: 340px !important;
  padding-top: 40px !important;
  padding-bottom: 40px !important;
}

/* 9. RESPONSIVE ĐẦU TRANG */
@media (max-width: 1024px) {
  .ga-header-nav-inner .ga-nav {
    flex: 1 1 0;
    min-width: 0;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ga-header-nav-inner .ga-nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 760px) {
  .ga-header-topbar-inner {
    padding: 16px;
    justify-content: center;
    text-align: center;
  }
  .ga-header-topbar-inner .ga-contacts {
    justify-content: center;
    gap: 6px 16px;
    font-size: 13px;
  }
  .ga-header-nav-wrap.ga-nav-on-home {
    margin-bottom: -105px !important;
  }
  .ga-header-nav-inner .dau-trang-9 {
    padding: 0 12px;
  }
  .ga-header-nav-inner .ga-nav {
    flex: 1 1 100% !important;
    gap: 0 20px !important;
  }
}
