/* VIGOTOUR 1.0.11 (18/11/2026) - header 2 tầng. Markup do includes/site-header.php in ra qua hook trong theme header.php.
   Mọi quy tắc gắn với #masthead:has(...) nên nếu theme thiếu hook thì header cũ giữ nguyên. */
.vgth-topbar, .vgth-logo, .vgth-cta, .vgtm-row1, .vgtm-bar { display: none; }

/* =================== Máy tính (>= 992px) =================== */
@media (min-width: 992px) {
  /* Khi cuộn: tầng trên trôi đi, tầng chính dính trên đầu. */
  html body #masthead.sticky_hwp:has(.vgth-topbar), html body #masthead.sticky_hwp.fixed-header:has(.vgth-topbar) { top: -40px !important; }
  html body #masthead:has(.vgth-topbar) .top-header, html body #masthead.fixed-header:has(.vgth-topbar) .top-header { display: none !important; }

  /* Tầng trên */
  /* 1.0.11.2: nền đỏ tông logo, chuyển sắc nhẹ từ trên xuống. */
  #masthead .vgth-topbar { display: block; background: #c8161d linear-gradient(180deg, #dd2a30 0%, #c8161d 55%, #b3121a 100%); color: #fff; height: 40px; }
  .vgth-topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 40px; gap: 16px; }
  .vgth-top-links, .vgth-top-right { display: flex; align-items: center; gap: 22px; flex: 0 0 auto; }
  .vgth-top-links > *, .vgth-top-right > * { flex: 0 0 auto; }
  .vgth-topbar a, .vgth-top-search {
    display: inline-flex; align-items: center; gap: 7px; color: #fff !important; text-decoration: none;
    font: 500 13px/1 "Be Vietnam Pro", Arial, sans-serif; text-transform: uppercase; letter-spacing: .02em;
    background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; opacity: .92;
    transition: opacity .2s ease, color .2s ease;
  }
  .vgth-topbar svg { width: 15px; height: 15px; flex: 0 0 15px; opacity: .9; }
  .vgth-topbar a:hover, .vgth-top-search:hover, .vgth-topbar a:focus-visible, .vgth-top-search:focus-visible { opacity: 1; color: #fff !important; text-decoration: underline; text-underline-offset: 4px; }
  /* Nút biểu tượng vuông: Tìm kiếm + ☰ Thông tin công ty */
  .vgth-topbar .vgth-top-right { gap: 8px; }
  .vgth-topbar .vgth-top-right .vgth-top-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border-radius: 6px; background: rgba(255, 255, 255, .14); color: #fff !important; border: 0; cursor: pointer; opacity: 1; transition: background-color .2s ease; }
  .vgth-topbar .vgth-top-right .vgth-top-icon svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: 1; display: block; }
  .vgth-topbar .vgth-top-right .vgth-top-icon:hover, .vgth-topbar .vgth-top-right .vgth-top-icon:focus-visible { background: rgba(255, 255, 255, .28); text-decoration: none; }
  .vgth-topbar .vgth-top-hotline { opacity: 1; letter-spacing: .01em; }
  .vgth-topbar .vgth-top-hotline b { font-weight: 700; color: #fff3b0; letter-spacing: .03em; }
  .vgth-topbar .vgth-top-hotline svg { opacity: 1; }

  /* Tầng chính */
  #masthead:has(.vgth-logo) .bottom-header { background: #fff; box-shadow: 0 2px 10px rgba(28, 46, 117, .08); }
  #masthead:has(.vgth-logo) .bottom-header-inner { gap: 36px; min-height: 76px; }
  #masthead .vgth-logo { display: block; flex: 0 0 auto; line-height: 0; }
  #masthead .vgth-logo img { height: 56px; width: auto; display: block; }
  /* 1.0.11.2: không còn nút Hotline ở tầng chính - menu dạt phải, mục cuối thẳng mép phải với "Tìm kiếm" ở tầng trên. */
  #masthead:has(.vgth-logo) .navigation-container { flex: 1 1 auto; display: flex !important; justify-content: flex-end; min-width: 0; }
  #masthead:has(.vgth-logo) .navigation-container > #navigation { width: 100%; max-width: 860px; }
  #masthead:has(.vgth-logo) #navigation > ul { display: flex; justify-content: space-between; flex-wrap: nowrap; width: 100%; }
  #masthead:has(.vgth-logo) #navigation > ul > li { padding-left: 0; padding-right: 0; }
  #masthead:has(.vgth-logo) #navigation > ul > li.vgth-up { display: none !important; }
  #masthead:has(.vgth-logo) #navigation > ul > li > a { padding-top: 27px; padding-bottom: 27px; }
  #masthead:has(.vgth-logo) .header-btn { display: none; }
  #masthead .vgth-cta {
    display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; height: 48px; padding: 0 20px 0 16px;
    border: 1.5px solid #c8161d; border-radius: 999px; color: #c8161d !important; background: #fff;
    font: 700 16px/1 "Be Vietnam Pro", Arial, sans-serif; text-decoration: none; white-space: nowrap;
    transition: background-color .2s ease, color .2s ease;
  }
  #masthead .vgth-cta svg { width: 20px; height: 20px; flex: 0 0 20px; }
  .vgth-cta-txt { display: flex; flex-direction: column; gap: 3px; }
  .vgth-cta-txt small { font: 500 11px/1 "Be Vietnam Pro", Arial, sans-serif; text-transform: uppercase; letter-spacing: .03em; opacity: .8; }
  #masthead .vgth-cta:hover, #masthead .vgth-cta:focus-visible { background: #c8161d; color: #fff !important; }
}
/* Máy tính nhỏ (992-1199px): thu gọn để vừa một dòng. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .vgth-top-links, .vgth-top-right { gap: 14px; }
  .vgth-topbar a, .vgth-top-search { font-size: 12px; letter-spacing: 0; }
  .vgth-top-links svg { display: none; }
  #masthead .vgth-logo img { height: 48px; }
  #masthead:has(.vgth-logo) .bottom-header-inner { gap: 12px; }
  .vgth-cta-txt { display: none; }
  #masthead .vgth-cta { width: 46px; height: 46px; padding: 0; justify-content: center; }
}

/* =================== Điện thoại / máy tính bảng (< 992px) =================== */
@media (max-width: 991.98px) {
  html body #masthead.sticky_hwp:has(.vgtm-row1), html body #masthead.sticky_hwp.fixed-header:has(.vgtm-row1) { top: -56px !important; }
  html body #masthead:has(.vgtm-row1) .top-header { display: none !important; }
  #masthead:has(.vgtm-row1) { background: #fff; }

  /* Tầng 1: logo + gọi */
  #masthead .vgtm-row1 { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; padding: 0 12px 0 14px; background: #fff; }
  .vgtm-logo { display: block; line-height: 0; }
  .vgtm-logo img { height: 42px; width: auto; display: block; }
  .vgtm-call {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 10px; border-radius: 999px;
    border: 1.5px solid #c8161d; color: #c8161d !important; text-decoration: none; background: #fff;
  }
  .vgtm-call svg { width: 18px; height: 18px; flex: 0 0 18px; }
  .vgtm-call span { display: flex; flex-direction: column; gap: 2px; }
  .vgtm-call small { font: 500 9.5px/1 "Be Vietnam Pro", Arial, sans-serif; text-transform: uppercase; letter-spacing: .03em; opacity: .8; }
  .vgtm-call b { font: 700 14px/1 "Be Vietnam Pro", Arial, sans-serif; letter-spacing: .01em; }

  /* Tầng 2: thanh biểu tượng */
  #masthead .vgtm-bar {
    display: grid; grid-template-columns: repeat(6, 1fr); height: 64px;
    background: linear-gradient(100deg, #1c2e75 0%, #2a4396 70%, #3653ad 100%);
    box-shadow: 0 4px 12px rgba(28, 46, 117, .18);
  }
  .vgtm-bar > a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0;
    color: #fff !important; text-decoration: none; padding: 4px 2px; position: relative;
    font: 600 10px/1.2 "Be Vietnam Pro", Arial, sans-serif; text-transform: uppercase; text-align: center; letter-spacing: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .vgtm-bar svg { width: 22px; height: 22px; flex: 0 0 22px; }
  .vgtm-bar span { display: block; max-width: 100%; overflow-wrap: anywhere; }
  .vgtm-bar > a.is-on { background: rgba(255, 255, 255, .12); }
  .vgtm-bar > a.is-on::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: #ff5a60; }
  .vgtm-bar > a:active { background: rgba(255, 255, 255, .16); }
  .vgtm-bar > .vgtm-more { background: rgba(255, 255, 255, .1); }
  .vgtm-bar > a:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

  /* Menu ☰: phần "Về Vigotour" */
  #vgtp-mobile-menu .vgtm-cap2 { margin-top: 18px; padding-top: 16px; border-top: 1px solid #e6e9f2; }
  #vgtp-mobile-menu .vgtm-info .vgtm-ico { display: inline-flex; width: 22px; height: 22px; color: #1c2e75; flex: 0 0 22px; }
  #vgtp-mobile-menu .vgtm-info .vgtm-ico svg { width: 22px; height: 22px; }
}
/* 1.0.11.1: slider "Đối tác - khách hàng" - theme đặt mũi tên lệch ra ngoài khung 40px, ở khổ 992-1259px
   nút › thò khỏi mép phải (tràn ngang ~25px) và nút ‹ khuất mép trái. Đưa hai nút vào trong, chừa chỗ hai bên. */
@media (min-width: 992px) and (max-width: 1259.98px) {
  html body .client-logo.slick-slider { padding-left: 46px; padding-right: 46px; }
  html body .client-logo.slick-slider .slick-prev { left: 0; }
  html body .client-logo.slick-slider .slick-next { right: 0; }
}
@media (max-width: 359px) {
  .vgtm-bar > a { font-size: 9px; }
  .vgtm-call small { display: none; }
  .vgtm-call b { font-size: 13px; }
}
