/* Sticky TopNav — design/trang-chu + danh-sach */
.re-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--re-header-h);
  background: var(--re-surface);
  border-bottom: 1px solid var(--re-outline-variant);
  box-shadow: 0 1px 2px rgba(11, 28, 48, 0.04);
}

.re-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--re-header-h);
  gap: var(--re-gutter);
}

.re-brand {
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  color: var(--re-primary);
  text-decoration: none;
  white-space: nowrap;
}

.re-brand:hover {
  color: var(--re-primary-container);
  text-decoration: none;
}

.re-nav {
  display: none;
  align-items: center;
  gap: var(--re-stack-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.re-nav a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--re-on-surface-variant);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.re-nav a:hover,
.re-nav a.is-active {
  color: var(--re-primary);
  border-bottom-color: var(--re-primary);
  font-weight: 700;
}

.re-header-actions {
  display: flex;
  align-items: center;
  gap: var(--re-stack-sm);
}

.re-header-search {
  display: none;
  position: relative;
}

.re-header-search .material-symbols-outlined {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--re-outline);
  font-size: 20px;
  pointer-events: none;
}

.re-header-search input {
  width: 220px;
  height: 40px;
  padding: 8px 12px 8px 40px;
  border: 1px solid var(--re-outline-variant);
  border-radius: 9999px;
  background: var(--re-bg);
  font-size: 14px;
  color: var(--re-on-surface);
}

.re-header-search input:focus {
  outline: none;
  border-color: var(--re-primary);
}

.re-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--re-on-surface);
  text-decoration: none;
}

.re-header-icon:hover {
  background: var(--re-surface-low);
  color: var(--re-primary);
}

.re-header-toggle {
  display: inline-flex;
  border: 0;
  background: transparent;
  color: var(--re-on-surface);
  padding: 8px;
}

.re-header-mobile {
  display: none;
  background: var(--re-surface);
  border-bottom: 1px solid var(--re-outline-variant);
  padding: 12px var(--re-margin-mobile) 16px;
}

.re-header-mobile.is-open {
  display: block;
}

.re-header-mobile .re-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.re-header-mobile .re-header-search {
  display: block;
  margin-bottom: 12px;
}

.re-header-mobile .re-header-search input {
  width: 100%;
}

@media (min-width: 992px) {
  .re-nav {
    display: flex;
  }

  .re-header-search {
    display: block;
  }

  .re-header-toggle {
    display: none;
  }

  .re-header-mobile {
    display: none !important;
  }
}

/* Ẩn header mặc định cũ nếu còn sót markup */
#wgr__top #top-bar,
#wgr__top #masthead,
#wgr__top #wide-nav {
  display: none;
}
