/* ==========================================================================
   BLA theme - CSS chung (header, footer, trang nội dung).
   Màu/font lấy từ bộ nhận diện BLA; mọi class riêng có tiền tố .bla-
   để không đụng Bootstrap/Tailwind.
   ========================================================================== */

/* ---------- 1. Biến thương hiệu ---------- */
:root {
  --bla-red: #ed1c24;
  --bla-red-dark: #c4121a;
  --bla-yellow: #ffc50f;
  --bla-black: #1d0e1f;
  --bla-grey: #f4f5f7;
  --bla-line: #e5e7eb;
  --bla-font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --bla-wrap: 1400px;
}

/* ---------- 2. Font Roboto (tự host, chia theo bộ ký tự để tải ít nhất) ---------- */
@font-face { font-family: "Roboto"; font-weight: 400; font-style: normal; font-display: swap; src: url("../vendor/roboto/roboto-vietnamese-400-normal.woff2") format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Roboto"; font-weight: 400; font-style: normal; font-display: swap; src: url("../vendor/roboto/roboto-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-weight: 400; font-style: normal; font-display: swap; src: url("../vendor/roboto/roboto-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Roboto"; font-weight: 500; font-style: normal; font-display: swap; src: url("../vendor/roboto/roboto-vietnamese-500-normal.woff2") format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Roboto"; font-weight: 500; font-style: normal; font-display: swap; src: url("../vendor/roboto/roboto-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-weight: 500; font-style: normal; font-display: swap; src: url("../vendor/roboto/roboto-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Roboto"; font-weight: 700; font-style: normal; font-display: swap; src: url("../vendor/roboto/roboto-vietnamese-700-normal.woff2") format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Roboto"; font-weight: 700; font-style: normal; font-display: swap; src: url("../vendor/roboto/roboto-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-weight: 700; font-style: normal; font-display: swap; src: url("../vendor/roboto/roboto-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ---------- 3. Nền tảng ---------- */
body { font-family: var(--bla-font); color: var(--bla-black); margin: 0; }
.bla-wrap { width: 100%; max-width: var(--bla-wrap); margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
.bla-skip { position: absolute; left: -9999px; }
.bla-skip:focus { left: 8px; top: 8px; z-index: 1000; background: #fff; padding: 8px 12px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Nút: xem assets/css/components/buttons.css (.bla-btn, .bla-btn--red/--yellow là tên cũ vẫn dùng được) */

/* ---------- 4. Header (2 lớp, cố định) ----------
   Độc lập Bootstrap/Tailwind. Khung cố định + .bla-header-space giữ chỗ nên khi header thu gọn lúc cuộn
   (JS thêm .is-scrolled) nội dung KHÔNG bị giật. Chiều cao: thanh trên 32px, hàng chính 64px (cuộn: 52px);
   mobile hàng chính 56px (cuộn: 48px). */
:root { --bla-hdr-top: 40px; --bla-hdr-main: 64px; }
@media (max-width: 1023.98px) { :root { --bla-hdr-main: 56px; } }
html { scroll-padding-top: calc(var(--bla-hdr-main) + 16px); } /* anchor (#form-dang-ky...) không bị header che */
.bla-header { position: fixed; top: 0; left: 0; right: 0; z-index: var(--bla-z-header); background: #fff; box-shadow: 0 1px 6px rgba(29, 14, 31, .1); transition: transform .2s ease; }
.admin-bar .bla-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .bla-header { top: 46px; } }
.bla-no-topbar { --bla-hdr-top: 0px; } /* Customizer: tắt thanh trên cùng thì không giữ chỗ cho nó */
.bla-header-space { height: calc(var(--bla-hdr-top) + var(--bla-hdr-main)); }
.bla-header.is-scrolled { transform: translateY(calc(-1 * var(--bla-hdr-top))); } /* thanh trên trượt ra khỏi màn hình */
.bla-header.is-menu-open { transform: none; }
@media (prefers-reduced-motion: reduce) { .bla-header { transition: none; } }

/* Thanh trên: nền đen BLA, chữ trắng */
/* Thanh trên cùng: nền ĐỎ thương hiệu (dùng sắc đỏ đậm --bla-red-dark để chữ trắng 14px đạt tương phản 6:1; #ed1c24 chỉ 4,4:1). Trước đây nền đen tạo cảm giác nặng nề. */
.bla-topbar { height: var(--bla-hdr-top); background: var(--bla-red-dark); color: #fff; font-size: 14px; }
.bla-topbar { display: flex; align-items: center; }
/* Khối liên hệ bên phải: lề phải bằng lề của khung nội dung (căn theo 50% bề rộng thanh trừ nửa khung) */
.bla-topbar__in { flex: none; display: flex; justify-content: flex-end; gap: 20px; align-items: center; height: 100%; margin-left: auto; padding: 0 max(16px, calc(50% - (var(--bla-wrap) / 2) + 16px)) 0 16px; }
/* Chọn ngôn ngữ: nút gọn (cờ + tên + mũi tên) mở danh sách cờ + chữ. Nút cao 24px trong thanh 32px nên có khoảng thở 4px mỗi bên. */
.bla-lang { position: relative; }
.bla-lang__btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 62px; height: 26px; padding: 0 10px; gap: 6px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .8); border-radius: 6px; color: #fff; font: 500 14px/1 var(--bla-font); cursor: pointer; transition: background .15s; }
.bla-lang__globe { font-size: 15px; line-height: 1; }
.bla-lang__btn .bla-lang__globe::before { font-family: "Font Awesome 6 Free" !important; font-weight: 900; } /* (cần 2 class vì public.css của plugin nạp sau) plugin button-contact-vr ép .fa-globe dùng font FontAwesome cũ (không nạp) làm icon thành ô vuông trên trang bài viết */
.bla-lang__code { font-size: 14px; font-weight: 700; letter-spacing: .04em; line-height: 1; }
.bla-lang__btn::after { content: ""; position: absolute; inset: -9px -7px; } /* vùng chạm 44x44 (nút 32x24 có viền 1px) */ /* vùng chạm lớn hơn nút nhìn thấy */
.bla-lang__btn:hover, .bla-lang__btn[aria-expanded="true"] { background: rgba(255, 255, 255, .26); }
.bla-lang__btn:focus-visible { outline: 2px solid var(--bla-focus); outline-offset: 2px; }
.bla-lang__caret { transition: transform .15s; }
.bla-lang__btn[aria-expanded="true"] .bla-lang__caret { transform: rotate(180deg); }
.bla-lang__menu { --bla-focus: #1d0e1f; position: absolute; right: 0; top: calc(100% + 6px); z-index: var(--bla-z-dropdown); min-width: 216px; margin: 0; padding: 6px; list-style: none; background: #fff; color: var(--bla-black); border-radius: 10px; box-shadow: 0 10px 28px rgba(29, 14, 31, .22); }
.bla-lang__menu[hidden] { display: none; }
.bla-lang__opt { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--bla-black); font: 500 15px/1.2 var(--bla-font); text-decoration: none; }
a.bla-lang__opt:hover, a.bla-lang__opt:focus-visible { background: var(--bla-grey); outline: none; box-shadow: inset 0 0 0 2px var(--bla-focus); }
.bla-lang__opt.is-current { font-weight: 700; }
.bla-lang__tick { margin-left: auto; color: var(--bla-red-dark); }
.bla-lang__opt.is-soon { opacity: .55; cursor: default; }
.bla-lang__opt small { margin-left: auto; font-size: 14px; color: #595959; }
.bla-flag { display: block; flex: none; width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.bla-flag--lg { width: 28px; height: 19px; box-shadow: 0 0 0 1px rgba(29, 14, 31, .15); }
.bla-topbar__links { display: flex; align-items: center; gap: 20px; }
.bla-topbar__link { position: relative; display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; font-weight: 500; line-height: 1; }
.bla-topbar__link::after { content: ""; position: absolute; inset: -8px -4px; }
.bla-topbar__link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.bla-topbar__link:focus-visible { outline: 2px solid var(--bla-focus); outline-offset: 3px; border-radius: 2px; }
.bla-topbar__link .bla-icon { vertical-align: 0; }
/* Trang trí bên trái thanh trên (chỉ từ 768px): cờ Đức lượn nhẹ + câu giới thiệu đổi luân phiên. CSS thuần, rất nhẹ. */
.bla-topbar { position: relative; }
.bla-topbar__in { position: relative; z-index: 1; }
/* Vùng trang trí bên trái thanh trên. Từ 768px: câu giới thiệu. Từ 1200px: dải phác họa nét mảnh suốt chiều ngang: bên trái 6 thành phố Việt Nam (Bắc -> Nam),
   GIỮA là câu giới thiệu (in nghiêng), bên phải 8 thành phố nước Đức; hai hình trang trí (Köln, Neuschwanstein) nằm sau khối hotline cho cân. Máy bay bay từ trái sang
   phải 30 giây/lượt; tới đâu thì thành phố đó hiện chấm vàng và tên (chữ ở giữa thanh) rồi mờ. Nét trắng mờ, chỉ CSS + 1 ảnh SVG nhỏ (cache). */
.bla-topbar__zone { display: none; }
.bla-topbar__sketch { display: none; }
@media (min-width: 768px) {
  .bla-topbar__zone { display: block; position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; height: 100%; padding-left: max(16px, calc(50% - (var(--bla-wrap) / 2) + 16px)); }
}
@media (min-width: 1200px) {
  .bla-topbar__zone { padding-left: 0; }
  .bla-topbar__sketch { display: block; position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
  .bla-topbar__in { background: linear-gradient(rgba(255, 255, 255, .3), rgba(255, 255, 255, .3)) left bottom / 100% 1px no-repeat; }
  .bla-topbar__in::before, .bla-topbar__in::after { content: ""; position: absolute; bottom: 0; width: 48px; height: 100%; z-index: -1; pointer-events: none; opacity: .32;
    background: url("../images/sketch/cities.svg") calc(var(--ci) * -48px) 0 / calc(48px * 16) 100% no-repeat; }
  .bla-topbar__in::before { --ci: 14; right: 74px; }
  .bla-topbar__in::after { --ci: 15; right: 14px; }
  .bla-ticker { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 280px; }
  .bla-ticker span { text-align: center; }
}
.bla-topbar__sketch::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(255, 255, 255, .3); }
.bla-city { --cw: 48px; position: absolute; bottom: 0; left: calc(var(--x) * 1%); width: var(--cw); height: 100%; }
.bla-city::before { content: ""; position: absolute; inset: 0; opacity: .32; background: url("../images/sketch/cities.svg") calc(var(--i) * var(--cw) * -1) 0 / calc(var(--cw) * 16) 100% no-repeat; }
.bla-city__dot { position: absolute; left: calc(var(--cw) / 2 - 3.5px); bottom: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--bla-yellow); box-shadow: 0 0 0 3px rgba(255, 197, 15, .35); opacity: 0;
  animation: blaPing 30s infinite backwards; animation-delay: calc((var(--x) - 66) * .3s); }
/* Tên thành phố: ở GIỮA thanh, ngay trên hình; chỉ hiện ~1,2 giây khi máy bay tới (các thành phố cách nhau >= 1,2 giây nên không chồng chữ) */
.bla-city__name { position: absolute; left: calc(var(--cw) / 2); top: 50%; transform: translate(-50%, -50%); font: 500 14px/16px var(--bla-font); color: #fff; white-space: nowrap;
  text-shadow: 0 0 3px var(--bla-red-dark), 0 0 7px var(--bla-red-dark); opacity: 0; animation: blaName 30s infinite backwards; animation-delay: calc((var(--x) - 66) * .3s); }
@keyframes blaPing { 0% { opacity: 0; transform: scale(.3); } 0.8% { opacity: 1; transform: scale(1.6); } 2% { transform: scale(1); } 40% { opacity: 1; } 46%, 100% { opacity: 0; } }
@keyframes blaName { 0% { opacity: 0; transform: translate(-50%, -30%); } 0.8% { opacity: 1; transform: translate(-50%, -50%); } 3.8% { opacity: 1; transform: translate(-50%, -50%); } 4.4%, 100% { opacity: 0; transform: translate(-50%, -50%); } }
/* Máy bay (biểu tượng Font Awesome "plane" dạng SVG nền) bay ở GIỮA chiều cao thanh, từ trái sang phải */
.bla-topbar__sketch::after { content: ""; position: absolute; left: 0; top: 50%; margin-top: -11.5px; width: 26px; height: 23px; opacity: .6;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='%23fff' d='M482.3 192c34.2 0 93.7 29 93.7 64c0 36-59.5 64-93.7 64l-116.6 0L265.2 495.9c-5.7 10-16.3 16.1-27.8 16.1l-56.2 0c-10.6 0-18.3-10.2-15.4-20.4l49-171.6L112 320 68.8 377.6c-3 4-7.8 6.4-12.8 6.4l-42 0c-7.8 0-14-6.3-14-14c0-1.3 .2-2.6 .5-3.9L32 256 .5 145.9c-.4-1.3-.5-2.6-.5-3.9c0-7.8 6.3-14 14-14l42 0c5 0 9.8 2.4 12.8 6.4L112 192l102.9 0-49-171.6C162.9 10.2 170.6 0 181.2 0l56.2 0c11.5 0 22.1 6.2 27.8 16.1L365.7 192l116.6 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: blaFly 30s linear 10.2s infinite, blaFlyFirst 10.2s linear 1; }
/* Lúc tải trang máy bay xuất phát ngay SAU câu dịch vụ (từ 66% chiều ngang, tới cuối trong 10,2 giây) như thể "du học Đức" bay sang luôn; các lượt sau bay trọn từ Việt Nam (30 giây/lượt). Mốc 66 cũng là gốc thời gian của các thành phố (--x - 66). */
@keyframes blaFlyFirst { from { left: 66%; } to { left: calc(100% - 26px); } }
@keyframes blaFly { from { left: 0; } to { left: calc(100% - 26px); } }
/* Câu giới thiệu (in nghiêng, 14px, đậm 400), đổi luân phiên mỗi 4 giây; từ 1200px nằm GIỮA thanh, giữa các thành phố Việt Nam và nước Đức */
.bla-ticker { position: relative; z-index: 1; width: min(100%, 360px); height: var(--bla-hdr-top); overflow: hidden; }
.bla-ticker span { position: absolute; inset: 0; display: block; line-height: var(--bla-hdr-top); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 400; font-style: italic; opacity: 0; animation-duration: calc(var(--n) * 4s); animation-iteration-count: infinite; animation-fill-mode: backwards; animation-delay: calc(var(--i) * 4s); }
@keyframes blaTick1 { 0% { opacity: 0; transform: translateY(10px); } 8.00% { opacity: 1; transform: none; } 88.00% { opacity: 1; transform: none; } 100.00% { opacity: 0; transform: translateY(-10px); } 100% { opacity: 0; } }
@keyframes blaTick2 { 0% { opacity: 0; transform: translateY(10px); } 4.00% { opacity: 1; transform: none; } 44.00% { opacity: 1; transform: none; } 50.00% { opacity: 0; transform: translateY(-10px); } 100% { opacity: 0; } }
@keyframes blaTick3 { 0% { opacity: 0; transform: translateY(10px); } 2.67% { opacity: 1; transform: none; } 29.33% { opacity: 1; transform: none; } 33.33% { opacity: 0; transform: translateY(-10px); } 100% { opacity: 0; } }
@keyframes blaTick4 { 0% { opacity: 0; transform: translateY(10px); } 2.00% { opacity: 1; transform: none; } 22.00% { opacity: 1; transform: none; } 25.00% { opacity: 0; transform: translateY(-10px); } 100% { opacity: 0; } }
.bla-ticker[data-n="1"] span { animation-name: blaTick1; }
.bla-ticker[data-n="2"] span { animation-name: blaTick2; }
.bla-ticker[data-n="3"] span { animation-name: blaTick3; }
.bla-ticker[data-n="4"] span { animation-name: blaTick4; }
@media (prefers-reduced-motion: reduce) {
  .bla-ticker span { animation: none; }
  .bla-topbar__sketch::after { animation: none; display: none; }
  .bla-city__dot, .bla-city__name { animation: none; opacity: 0; }
  .bla-ticker span:first-child { opacity: 1; }
}
/* Icon điện thoại/email của thanh trên: Font Awesome, to hơn bản SVG cũ */
.bla-topbar__ico { font-size: 17px; line-height: 1; width: 1.1em; text-align: center; }

/* Hàng chính */
.bla-mainbar__in { display: flex; align-items: center; gap: 16px; height: var(--bla-hdr-main); transition: height .2s ease; }
.bla-header.is-scrolled .bla-mainbar__in { height: calc(var(--bla-hdr-main) - 12px); }
.bla-logo { display: block; flex: none; border-radius: 4px; }
.bla-logo img { display: block; height: 40px; width: auto; transition: height .2s ease; }
.bla-header.is-scrolled .bla-logo img { height: 34px; }
.bla-logo:focus-visible { outline: 3px solid var(--bla-focus); outline-offset: 3px; }
.bla-burger { display: none; }
.bla-actions { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.bla-searchbtn.bla-btn { color: var(--bla-black); }
.bla-header__cta.bla-btn { border-radius: var(--bla-radius-pill); padding: 6px 18px; font-size: 14.5px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 6px rgba(196, 18, 26, .3); }

/* Menu chính (1 hàng, căn giữa) */
.bla-menu { flex: 1; min-width: 0; align-self: stretch; }
.bla-menu__head, .bla-menu__foot { display: none; }
.bla-nav { display: flex; justify-content: center; height: 100%; gap: 2px; list-style: none; margin: 0; padding: 0; }
.bla-nav__item { position: relative; display: flex; align-items: center; }
.bla-nav__link { align-self: stretch; display: inline-flex; align-items: center; gap: 4px; min-height: var(--bla-tap); padding: 0 12px; font: 500 16px/1.2 var(--bla-font); color: var(--bla-black); background: none; border: 0; text-decoration: none; cursor: pointer; white-space: nowrap; }
.bla-nav__link:hover, .bla-nav__item.is-open > .bla-nav__link { color: var(--bla-red-dark); }
.bla-nav__caret { width: 14px; height: 14px; transition: transform .15s; vertical-align: 0; }
.bla-nav__toggle { align-self: stretch; display: inline-flex; align-items: center; justify-content: center; width: 28px; margin-left: -12px; padding: 0; color: var(--bla-black); background: none; border: 0; cursor: pointer; }
.bla-nav__toggle:hover { color: var(--bla-red-dark); }
.bla-nav__item.is-open > .bla-nav__toggle .bla-nav__caret, .bla-nav__item.is-open > .bla-nav__link--btn .bla-nav__caret { transform: rotate(180deg); }
.bla-nav__link:focus-visible, .bla-nav__toggle:focus-visible, .bla-burger:focus-visible, .bla-nav__sub a:focus-visible { outline: 3px solid var(--bla-focus); outline-offset: -3px; border-radius: 4px; }
/* Mục đang ở: chữ đỏ đậm + gạch chân dày 3px */
.bla-nav__item.is-current > .bla-nav__link { color: var(--bla-red-dark); font-weight: 700; }
.bla-nav__item.is-current::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; background: var(--bla-red); border-radius: 3px 3px 0 0; }
.bla-nav__sub { display: none; position: absolute; left: 0; top: 100%; min-width: 280px; margin: 0; padding: 8px 0; list-style: none; background: #fff; border-top: 3px solid var(--bla-red); border-radius: 0 0 var(--bla-radius-md) var(--bla-radius-md); box-shadow: var(--bla-shadow-lg); z-index: var(--bla-z-dropdown); }
.bla-nav__item:nth-last-child(-n+2) > .bla-nav__sub { left: auto; right: 0; }
.bla-nav__item.is-open > .bla-nav__sub { display: block; }
/* Chưa có JS: vẫn mở được khi rê chuột/focus (JS thêm class bla-js nên luật này tự tắt khi JS chạy) */
html:not(.bla-js) .bla-nav__item:hover > .bla-nav__sub, html:not(.bla-js) .bla-nav__item:focus-within > .bla-nav__sub { display: block; }
.bla-nav__sub a { display: flex; align-items: center; min-height: 42px; padding: 8px 20px; font-size: 15px; line-height: 1.35; color: var(--bla-black); text-decoration: none; }
.bla-nav__sub a:hover { background: var(--bla-grey); color: var(--bla-red-dark); }
.bla-nav__sub a.is-current { color: var(--bla-red-dark); font-weight: 700; background: var(--bla-danger-bg); }

/* Panel tìm kiếm mở từ nút kính lúp */
.bla-searchpanel { position: absolute; left: 0; right: 0; top: 100%; padding: 12px 0 16px; background: #fff; border-top: 1px solid var(--bla-line); box-shadow: var(--bla-shadow-md); }
.bla-searchpanel[hidden] { display: none; }
.bla-searchform { display: flex; align-items: center; gap: 8px; max-width: 760px; margin: 0 auto; }
.bla-searchform .bla-input { flex: 1; min-width: 0; }
.bla-searchpanel__sugg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 760px; margin: 12px auto 0; font-size: 14px; color: var(--bla-text-muted); }
.bla-searchpanel__sugg a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--bla-line); border-radius: var(--bla-radius-pill); color: var(--bla-black); text-decoration: none; }
.bla-searchpanel__sugg a:hover { border-color: var(--bla-red-dark); color: var(--bla-red-dark); }

/* ---------- 5. Footer ---------- */
.bla-footer { background: #111; /* đen trung tính (không ngả tím) cho chân trang; chữ vàng/trắng/đỏ giữ đúng nhận diện */ color: #d6d3d8; font-size: 14px; line-height: 1.6; }
.bla-footer a { color: #fff; text-decoration: none; }
.bla-footer a:hover { color: var(--bla-yellow); }
.bla-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.bla-footer__logo { height: 52px; width: auto; margin-bottom: 14px; background: none; } /* logo nền trong suốt, không đặt nền */
.bla-footer__name { font-weight: 700; color: #fff; margin: 0 0 6px; }
.bla-footer__h { font-size: 15px; font-weight: 700; text-transform: uppercase; color: var(--bla-yellow); margin: 20px 0 10px; }
.bla-footer__list { list-style: none; margin: 0; padding: 0; }
.bla-footer__list li { margin-bottom: 8px; }
.bla-social { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; } /* chừa khoảng cách rõ với nút "Theo dõi Zalo" bên dưới */
.bla-social + p { margin: 0 0 8px; }
.bla-social a { width: 38px; height: 38px; border-radius: 50%; background: var(--bla-red); display: inline-flex; align-items: center; justify-content: center; }
.bla-social a:hover { background: var(--bla-yellow); color: var(--bla-black); }
.bla-footer__badges { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.bla-footer__badges img { height: auto; max-width: 100%; }
/* Huy hiệu hội viên VGECA (mẫu 2 của VGECA: nền sáng, viền trái đỏ, logo + chữ cùng hàng) dưới huy hiệu Bộ Công Thương.
   Đặt màu chữ rõ ràng (.bla-footer a mặc định trắng) để không bị trắng trên nền trắng. */
.bla-footer .vgeca-badge{--vg-ink:#14110f;--vg-red:#d4161c;--vg-gold:#f0b323;--vg-bg:#fff;--vg-line:#d6cfc4;--vg-sub:#5c564e;display:inline-flex;flex-direction:row;align-items:center;gap:10px;margin-top:16px;padding:8px 12px;box-sizing:border-box;background:var(--vg-bg);border:1px solid var(--vg-line);border-left:4px solid var(--vg-red);border-radius:8px;color:var(--vg-ink);text-decoration:none;font:15px/1.35 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;max-width:100%}
.bla-footer .vgeca-badge:hover,.bla-footer .vgeca-badge:focus-visible{border-left-color:var(--vg-gold);color:var(--vg-ink)}
.bla-footer .vgeca-badge:focus-visible{outline:3px solid var(--vg-gold);outline-offset:2px}
.bla-footer .vgeca-badge img{height:38px;width:auto;display:block;background:#fff;border-radius:4px;padding:2px 6px}
.bla-footer .vgeca-badge b{display:block;font-weight:700;color:var(--vg-ink)}
.bla-footer .vgeca-badge u{display:block;text-decoration:none;color:var(--vg-red);font-weight:600;font-size:14px}
.bla-footer .vgeca-badge.is-revoked{display:none}
/* Dải phác họa: Việt Nam nối liền Đức thành một khối căn giữa (không khoảng trống ở giữa; màn hẹp cắt đều hai mép), nằm dưới khối menu (không chồng lên chữ), sát đường bản quyền; mờ để không rối với chữ.
   Mỗi hình có độ cao riêng (--h) tạo nhịp cao thấp; hiệu ứng nhẹ: nổi lên xuống vài px (chỉ transform, tắt khi giảm chuyển động). Mobile first: thu nhỏ 0.55 rồi 1 từ 768px. */
.bla-footer { position: relative; overflow: hidden; --bla-sk: .55; }
.bla-footer__sketch { display: flex; justify-content: center; align-items: flex-end; height: calc(190px * var(--bla-sk)); overflow: hidden; opacity: .2; pointer-events: none; }
.bla-footer__sk { display: flex; align-items: flex-end; flex: none; }
.bla-footer__sk span { flex: none; width: calc(var(--h) * var(--bla-sk) * 1.4 * 1px); height: calc(var(--h) * var(--bla-sk) * 1px); background: url("../images/sketch/cities-footer.svg") calc(var(--i) * var(--h) * var(--bla-sk) * -1.4px) 0 / calc(var(--h) * var(--bla-sk) * 1.4px * 16) 100% no-repeat; animation: blaSkFloat 7s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -1.3s); will-change: transform; }
@keyframes blaSkFloat { from { transform: translateY(0); } to { transform: translateY(-8px); } }
@media (min-width: 768px) { .bla-footer { --bla-sk: 1; } }
@media (prefers-reduced-motion: reduce) { .bla-footer__sk span { animation: none; will-change: auto; } }
.bla-footer__grid { position: relative; z-index: 1; }
.bla-footer__bottom { position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,.12); padding: 14px 0; text-align: center; font-size: 14px; }

/* ---------- 6. Trang nội dung (Bootstrap + lớp bổ sung) ---------- */
.bla-page-title { font-size: clamp(26px, 4vw, 36px); font-weight: 700; margin: 8px 0 20px; }
.bla-page-title span { color: var(--bla-red); }
.bla-breadcrumb { font-size: 14px; color: #777; margin-bottom: 8px; }
.bla-breadcrumb a { color: #555; text-decoration: none; }
.bla-breadcrumb a:hover { color: var(--bla-red); }
.bla-breadcrumb i { font-size: 10px; margin: 0 4px; }
.bla-card { border: 1px solid var(--bla-line); border-radius: 10px; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.bla-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.1); transform: translateY(-2px); }
.bla-card .card-title a { color: var(--bla-black); text-decoration: none; }
.bla-card .card-title a:hover { color: var(--bla-red); }
.bla-card__meta { font-size: 14px; color: #888; margin-bottom: 6px; }
.bla-archive-desc { color: #555; margin-bottom: 24px; }
.bla-article { max-width: 820px; margin: 0 auto; }
.bla-sapo { font-weight: 700; font-size: 1.15em; line-height: 1.6; padding-bottom: 16px; border-bottom: 1px dashed #ccc; margin-bottom: 24px; }
.bla-article__thumb img { max-width: 100%; height: auto; border-radius: 10px; margin-bottom: 24px; }
.bla-content { font-size: 17px; line-height: 1.75; }
.bla-content img { max-width: 100%; height: auto; }
.bla-content a { color: var(--bla-red); }
.bla-content h2, .bla-content h3 { margin-top: 1.6em; font-weight: 700; }
.bla-related { margin-top: 56px; }
.bla-pagination { margin-top: 32px; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.bla-pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--bla-line); border-radius: 6px; color: var(--bla-black); text-decoration: none; }
.bla-pagination .current, .bla-pagination .page-numbers:hover { background: var(--bla-red); border-color: var(--bla-red); color: #fff; }

/* ---------- 7. Responsive ---------- */
@media (max-width: 1023.98px) {
  .bla-mainbar__in { gap: 8px; }
  .bla-logo img, .bla-header.is-scrolled .bla-logo img { height: 28px; }
  .bla-topbar__link--mail { display: none; }
  .bla-burger { display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--bla-tap); height: var(--bla-tap); margin-left: -10px; padding: 0; color: var(--bla-black); background: transparent; border: 0; border-radius: var(--bla-radius-md); cursor: pointer; }
  .bla-burger .bla-icon { width: 26px; height: 26px; vertical-align: 0; }
  .bla-burger__shut, .bla-burger[aria-expanded="true"] .bla-burger__open { display: none; }
  .bla-burger[aria-expanded="true"] .bla-burger__shut { display: inline-block; }
  html.bla-menu-open { overflow: hidden; } /* khóa cuộn nền khi mở menu */

  /* Menu mobile: panel đủ chiều cao dưới header, tự cuộn */
  .bla-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex: none; height: calc(100vh - 100%); height: calc(100dvh - 100%); overflow-y: auto; overscroll-behavior: contain; background: #fff; border-top: 1px solid var(--bla-line); }
  .admin-bar .bla-menu { height: calc(100dvh - 100% - 46px); }
  .bla-menu.is-open { display: flex; flex-direction: column; }
  .bla-menu__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 4px 16px; border-bottom: 1px solid var(--bla-line); }
  .bla-menu__title { font-weight: 700; font-size: 18px; }
  .bla-menu__foot { display: block; margin-top: auto; padding: 16px; }
  .bla-nav { display: block; height: auto; }
  .bla-nav__item { flex-wrap: wrap; align-items: stretch; border-bottom: 1px solid var(--bla-line); }
  .bla-nav__item.is-current::after { left: 0; right: auto; top: 0; bottom: 0; width: 4px; height: auto; border-radius: 0; }
  .bla-nav__link { flex: 1; min-height: 52px; padding: 0 16px; font-size: 17px; }
  .bla-nav__link--btn { justify-content: space-between; }
  .bla-nav__toggle { width: 52px; margin: 0; border-left: 1px solid var(--bla-line); }
  .bla-nav__caret { width: 18px; height: 18px; }
  .bla-nav__sub, .bla-nav__item:nth-last-child(-n+2) > .bla-nav__sub { position: static; flex: 0 0 100%; min-width: 0; left: auto; right: auto; padding: 0; background: var(--bla-grey); border-top: 0; border-radius: 0; box-shadow: none; }
  .bla-nav__sub a { min-height: 48px; padding: 0 16px 0 28px; font-size: 16px; }
  html:not(.bla-js) .bla-nav__item:hover > .bla-nav__sub { display: none; }
  .bla-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575px) {
  .bla-footer__grid { grid-template-columns: 1fr; }
  .bla-header__cta.bla-btn { padding: 6px 14px; }
}

/* ---------- Nội dung do biên tập viên nhập (bài viết, trang): không để phần tử cố định chiều rộng làm tràn ngang trên mobile ---------- */
.bla-content, .bla-fullwidth { overflow-wrap: anywhere; }
.bla-content img, .bla-fullwidth img { max-width: 100%; height: auto; }
.bla-content iframe, .bla-content video, .bla-content embed,
.bla-fullwidth iframe, .bla-fullwidth video, .bla-fullwidth embed { max-width: 100%; }
.wp-caption { max-width: 100%; width: auto !important; }
.wp-caption img { max-width: 100%; height: auto; }
@media (max-width: 767.98px) {
  /* Bảng rộng: cho cuộn ngang trong chính bảng thay vì kéo cả trang */
  .bla-content table, .bla-fullwidth table { display: block; max-width: 100%; overflow-x: auto; }
}

/* Nút "Đăng ký tư vấn" ở header: vùng chạm tối thiểu 44px trên mobile/tablet (bộ test tests/specs/02-layout bắt lỗi cao 36px) */
/* Nút Tư vấn trên header: cao 36px cho gọn; vùng chạm 44px nhờ ::before của .bla-btn--sm */
@media (max-width: 1023.98px) { .bla-header__cta.bla-btn { min-height: 36px; } }

/* Bootstrap .container (bài viết, danh mục, blog, sự kiện, trang tĩnh) dùng cùng khung với header để lề trái/phải thẳng hàng ở màn rộng */
.container { max-width: var(--bla-wrap); --bs-gutter-x: 2rem; }
