/*
 * CSS tái tạo giao diện cho đoạn HTML header được cung cấp.
 * Có thể dùng độc lập để tạo bố cục tương tự ảnh mẫu.
 * Một số biểu tượng của Flatsome (icon-menu, icon-search, icon-angle-down)
 * cần font/icon CSS của theme nếu muốn hiển thị đúng như website gốc.
 */

:root {
  --gv-blue: #10569d;
  --gv-blue-hover: #287fc6;
  --gv-text: #fff;
  --gv-nav-height: 45px;
}

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

#header.header-full-width {
  width: 100%;
  position: relative;
  z-index: 100;
  background: #fff;
  color: var(--gv-text);
  font-family: Arial, Helvetica, sans-serif;
}

#header .header-wrapper {
  width: 100%;
  position: relative;
}

#header .container {
  width: min(100%, 1000px);
  margin-left: auto;
  margin-right: auto;
}

#header .header-main {
  width: 100%;
  min-height: 0;
  background: #fff;
}

#header .header-inner,
#header .flex-row {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
}

#header .header-inner {
  min-height: 0;
  position: relative;
}

#header .flex-col {
  min-width: 0;
}

#header #logo {
  flex: 0 1 auto;
  margin: 0;
  line-height: 0;
}

#header #logo a {
  display: block;
  line-height: 0;
}

#header #logo img {
  display: block;
  width: 100%;
  max-width: 1170px;
  height: auto;
  object-fit: contain;
}

#header #logo .header-logo-dark {
  display: none;
}

#header .flex-left {
  justify-content: flex-start;
}

#header .flex-right {
  justify-content: flex-end;
}

#header .flex-center {
  justify-content: center;
}

#header .flex-grow {
  flex-grow: 1;
}

#header .nav,
#header .header-nav,
#header .mobile-nav {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
}

#header .nav li {
  list-style: none;
  position: relative;
  margin: 0;
  padding: 0;
}

#header .nav a {
  text-decoration: none;
}

#header #wide-nav {
  width: 100%;
  min-height: var(--gv-nav-height);
  background: var(--gv-blue);
  color: var(--gv-text);
}

#header #wide-nav > .flex-row {
  min-height: var(--gv-nav-height);
  align-items: stretch;
}

#header #wide-nav .flex-col {
  display: flex;
  align-items: stretch;
}

#header #wide-nav .flex-center {
  flex: 1 1 auto;
  justify-content: center;
}

#header #wide-nav .header-bottom-nav {
  min-height: var(--gv-nav-height);
  align-items: stretch;
}

#header #wide-nav .header-bottom-nav > li {
  display: flex;
  align-items: stretch;
}

#header #wide-nav .nav-top-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: var(--gv-nav-height);
  padding: 0 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  white-space: nowrap;
  transition: background-color .18s ease;
}

#header #wide-nav .nav-top-link:hover,
#header #wide-nav .current-menu-item > .nav-top-link,
#header #wide-nav .current_page_item > .nav-top-link,
#header #wide-nav .active > .nav-top-link {
  background: var(--gv-blue-hover);
  color: #fff;
}

#header #wide-nav .nav-top-link .dashicons {
  line-height: 1;
}

#header #wide-nav .icon-angle-down {
  font-size: 11px;
  margin-left: 2px;
}

/* Menu dropdown */
#header #wide-nav .menu-item-has-children > .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 999;
  min-width: 220px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 5px 18px rgb(0 0 0 / 14%);
}

#header #wide-nav .menu-item-has-children:hover > .sub-menu,
#header #wide-nav .menu-item-has-children:focus-within > .sub-menu {
  display: block;
}

#header #wide-nav .sub-menu li {
  display: block;
  width: 100%;
}

#header #wide-nav .sub-menu a {
  display: block;
  padding: 9px 14px;
  color: #333;
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
}

#header #wide-nav .sub-menu a:hover {
  color: var(--gv-blue);
  background: #f3f7fb;
}

/* Search menu */
#header .header-search {
  position: relative;
}

#header .header-search > a {
  display: flex;
  width: 42px;
  min-height: var(--gv-nav-height);
  align-items: center;
  justify-content: center;
  color: #fff;
}

#header .header-search > a:hover {
  background: var(--gv-blue-hover);
}

#header .nav-dropdown {
  list-style: none;
}

#header .header-search .nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  width: 280px;
  margin: 0;
  padding: 12px;
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 5px 18px rgb(0 0 0 / 14%);
}

#header .header-search:hover > .nav-dropdown,
#header .header-search:focus-within > .nav-dropdown {
  display: block;
}

#header .searchform {
  width: 100%;
  margin: 0;
}

#header .searchform .flex-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}

#header .searchform .flex-grow {
  flex: 1 1 auto;
}

#header .search-field {
  width: 100%;
  min-width: 0;
  height: 38px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-right: 0;
  border-radius: 3px 0 0 3px;
  color: #333;
  background: #fff;
  font: inherit;
  font-size: 13px;
}

#header .ux-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0 3px 3px 0;
  color: #fff;
  background: var(--gv-blue);
  cursor: pointer;
}

#header .ux-search-submit:hover {
  background: var(--gv-blue-hover);
}

#header .live-search-results {
  position: relative;
  z-index: 1000;
  background: #fff;
}

/* Mobile menu/search and mobile header image */
#header .show-for-medium {
  display: none;
}

#header .hide-for-medium {
  display: flex;
}

#header .header-bg-container {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

#header .header-bg-container .fill {
  position: absolute;
  inset: 0;
}

#header .header-bg-color {
  background: transparent;
}

#header .html_topbar_right img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Tablet and mobile */
@media (max-width: 849px) {
  #header .hide-for-medium {
    display: none !important;
  }

  #header .show-for-medium {
    display: flex !important;
  }

  #header .header-inner {
    justify-content: space-between;
    min-height: 54px;
    padding: 0 12px;
  }

  #header #logo {
    order: 2;
    flex: 0 1 auto;
    max-width: calc(100% - 100px);
  }

  #header .header-inner > .flex-left {
    order: 1;
  }

  #header .header-inner > .flex-right {
    order: 3;
  }

  #header .mobile-nav {
    align-items: center;
  }

  #header .mobile-nav > li > a {
    display: flex;
    min-width: 42px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    color: var(--gv-blue);
  }

  #header .icon-menu,
  #header .icon-search {
    font-size: 20px;
  }

  #header #wide-nav {
    min-height: 0;
  }

  #header #wide-nav > .flex-row {
    display: block;
    min-height: 0;
  }

  #header #wide-nav .html_topbar_right {
    display: block;
    width: 100%;
  }

  #header #wide-nav .html_topbar_right img {
    width: 100%;
    height: auto;
  }

  #header .header-search .nav-dropdown {
    right: 0;
    width: min(280px, calc(100vw - 24px));
  }
}

@media (max-width: 480px) {
  #header .header-inner {
    min-height: 48px;
    padding: 0 8px;
  }

  #header #logo {
    max-width: calc(100% - 88px);
  }

  #header #logo img {
    max-height: 54px;
    width: auto;
    max-width: 100%;
  }

  #header .mobile-nav > li > a {
    min-width: 36px;
    min-height: 40px;
  }
}
