/* Header Styles */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Ensure header is always visible when mmenu is open */
html.mm-opened .site-header,
html.mm-opened .site-header .header-container,
html.mm-opened .site-header .header-wrapper {
  position: relative;
  transform: none !important;
  -webkit-transform: none !important;
  -ms-transform: none !important;
}

html.mm-opened .site-header {
  position: sticky;
  top: 0;
  z-index: 10001;
}

/* Header container sử dụng class .site-container chung */

.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 15px 0;
  gap: 0;
}

/* Logo Section */
.header-logo {
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo-img {
  height: 50px;
  width: auto;
  display: block;
}

/* Navigation Menu */
.header-nav {
  flex: 1;
  display: flex;
  justify-content: right;
  margin-right: 10px;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 25px;
  align-items: center;
}

.nav-menu .menu-item {
  position: relative;
}

.nav-menu .menu-item > a {
  color: #231f20;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
}

.nav-menu .menu-item > a:hover {
  color: #2a8aca;
}

.nav-menu .menu-item-has-children > a .bi-chevron-down {
  font-size: 10px;
  margin-left: 3px;
}

/* Dropdown Menu */
.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  list-style: none;
  margin: 0;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 100;
}

.nav-menu .menu-item:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .sub-menu .menu-item a {
  padding: 10px 20px;
  display: block;
  color: #333;
  font-size: 14px;
  text-transform: none;
  font-weight: 400;
}

.nav-menu .sub-menu .menu-item a:hover {
  background: #f5f5f5;
  color: #1e3a8a;
}

/* Right Section */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

/* Search Button */
.search-btn {
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.search-btn:hover {
  opacity: 0.7;
}

.search-icon {
  width: 20px;
  height: 20px;
  display: block;
}

/* Contact Button */
.btn-contact {
  background: #0f2264;
  color: #fff;
  padding: 5px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.3s ease;
  white-space: nowrap;
}

.btn-contact:hover {
  background: #3b82f6;
  color: #fff;
}

/* Language Flags */
.language-flags {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.wpml-ls-legacy-list-horizontal,.wpml-ls-legacy-list-horizontal a{
    padding:0;
}
.wpml-ls-legacy-list-horizontal>ul{
    display:flex;
    gap:10px
}
.wpml-ls-legacy-list-horizontal a span{
    display:none;
}
.flag-link {
  display: block;
  transition: transform 0.2s ease;
}

.flag-link:hover {
  transform: scale(1.1);
}

.flag-icon {
  width: 45px;
  height: 45px;
  display: block;
  border-radius: 2px;
}

/* Language Flags Dropdown (for mobile) */
.language-flags-dropdown {
  display: none; /* Hidden by default, shown only on mobile */
  position: relative;
}

.language-flags-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  position: relative;
}

.language-flags-dropdown-btn img {
  width: 24px;
  height: 24px;
  display: block;
}

.language-flags-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 5px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 130px;
  padding:10px;
  z-index: 1000;
  overflow: hidden;
}

.language-flags-dropdown-menu.active {
  display: block;
}

.language-flags-dropdown-menu .flag-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.language-flags-dropdown-menu .flag-link:last-child {
  border-bottom: none;
}

.language-flags-dropdown-menu .flag-link:hover {
  background: #f5f5f5;
  transform: none;
}

.language-flags-dropdown-menu .flag-link .flag-icon {
  width: 24px;
  height: 24px;
}

.language-flags-dropdown-menu .flag-link span {
  font-size: 14px;
  color: #333;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  display: none; /* Hidden by default */
  flex-direction: column;
  gap: 4px;
  width: 30px;
  position: relative;
  z-index: 1001;
}

/* Show toggle button from 1199px and below */
@media (max-width: 1199.98px) {
  .mobile-menu-toggle {
    display: flex;
  }
}

/* Hide toggle button from 1200px and above */
@media (min-width: 1200px) {
  .mobile-menu-toggle {
    display: none !important;
  }
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background: #1e3a8a;
  border-radius: 2px;
  transition: all 0.3s ease;
  display: block;
  position: relative;
}

/* Transform hamburger to X when menu is open */
.mm-opened .mobile-menu-toggle span:nth-child(1) {
  transform: rotate(45deg);
  top: 7px;
}

.mm-opened .mobile-menu-toggle span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.mm-opened .mobile-menu-toggle span:nth-child(3) {
  transform: rotate(-45deg);
  top: -7px;
}


/* Mobile Menu Source (Hidden - for mmenu) */
.mobile-menu-source {
  display: none !important;
  visibility: hidden;
  position: absolute;
}

/* Ensure mmenu is hidden by default */
.mm-menu--offcanvas:not(.mm-menu--opened) {
  transform: translate3d(-100%, 0, 0) !important;
  -webkit-transform: translate3d(-100%, 0, 0) !important;
}

.mm-wrapper:not(.mm-wrapper--opened) .mm-menu--offcanvas {
  transform: translate3d(-100%, 0, 0) !important;
  -webkit-transform: translate3d(-100%, 0, 0) !important;
}

/* Responsive */
@media (max-width: 1199.98px) {
  /* Hide desktop navigation when mobile toggle is visible */
  .header-nav {
    display: none !important;
  }
  
  .header-wrapper {
    justify-content: space-between;
  }
  
  .mobile-menu-toggle {
    order: 1;
  }
  
  .header-logo {
    order: 2;
    margin-right: auto;
  }
  
  .header-right {
    order: 3;
    gap: 15px;
  }
  
  .btn-contact {
    padding: 8px 16px;
    font-size: 13px;
  }
}

@media (max-width: 767.98px) {
  /* Adjust mmenu position to be closer to header */
  .mm-menu--offcanvas {
    top: 65px !important;
  }
  .header-wrapper {
    padding: 12px 0;
    gap: 15px;
    justify-content: space-between;
  }
  
  .mobile-menu-toggle {
    order: 1;
  }
  
  .header-logo {
    order: 2;
    margin-right: auto;
  }
  
  .header-right {
    order: 3;
    gap: 10px;
  }
  
  .logo-img {
    height: 40px;
  }
  
  .language-flags {
    gap: 5px;
  }
  
  .flag-icon {
    width: 20px;
    height: 20px;
  }
  
  .btn-contact {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .search-btn {
    padding: 3px;
  }
  
  .search-icon {
    width: 18px;
    height: 18px;
  }
}

/* Mobile - Convert flags to dropdown at 540px and below */
@media (max-width: 540px) {
  .language-flags {
    gap: 0;
  }
  .language-flags-dropdown-menu a{
      justify-content:start;
  }
  .language-flags > .wpml-ls-legacy-list-horizontal {
    display: none !important;
  }
  
  .language-flags-dropdown {
    display: block !important;
  }
  
  .language-flags-dropdown-btn {
    width: 36px;
    height: 36px;
    border-color: rgba(0, 0, 0, 0.2);
  }
  
  .language-flags-dropdown-btn img {
    width: 20px;
    height: 20px;
  }
}

/* Hide contact button at 430px and below */
@media (max-width: 430px) {
  .btn-contact {
    display: none !important;
  }
}



