@charset "utf-8";

/* ============================================================
   Header Navigation - Unified Bar Layout
   Logo + Nav + Actions in a single row
   ============================================================ */

/* --- Hide old header elements (from biton.css) --- */
.biton-topbar,
.biton-nav {
  display: none !important;
}

/* --- Main Header Bar --- */
.bh-bar {
  background-color: var(--bt-menu-bg);
  border-bottom: 1px solid var(--bt-border);
  transition: background-color .2s, border-color .2s;
}

.bh-inner {
  display: flex;
  align-items: center;
  height: 60px;
  gap: 0;
}

/* --- Logo --- */
.bh-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 32px;
}

.bh-logo {
  width: 120px;
  transition: opacity .15s;
}

.bh-logo:hover {
  opacity: .8;
}

/* --- Desktop Navigation --- */
.bh-nav {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

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

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

.bh-nav-link {
  display: block;
  color: var(--bt-text);
  font-weight: 600;
  font-size: 14px;
  line-height: 60px;
  padding: 0 18px;
  white-space: nowrap;
  transition: color .15s;
  position: relative;
}

.bh-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background-color: var(--bt-accent);
  border-radius: 3px 3px 0 0;
  transition: width .2s ease, left .2s ease;
}

.bh-nav-link:hover {
  color: var(--bt-accent);
}

.bh-nav-link:hover::after {
  width: calc(100% - 36px);
  left: 18px;
}

.bh-nav-empty {
  color: var(--bt-text-muted, #999);
  font-weight: 400;
}

.bh-nav-empty a {
  text-decoration: underline;
  margin-left: 4px;
}

/* --- Sub-menu (Desktop Dropdown) --- */
.bh-sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  background-color: var(--bt-dropdown-bg);
  border-radius: 10px;
  box-shadow: var(--bt-dropdown-shadow);
  z-index: 200;
  opacity: 0;
  animation: bhFadeIn .2s ease forwards;
}

.bh-sub-menu::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent var(--bt-dropdown-arrow) transparent;
  position: absolute;
  top: -16px;
  left: calc(50% - 8px);
}

.bh-has-sub:hover > .bh-sub-menu {
  display: block;
}

.bh-sub-menu li a {
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--bt-text);
  white-space: nowrap;
  transition: background-color .1s, color .1s;
}

.bh-sub-menu li a:hover {
  background-color: var(--bt-dropdown-hover);
  color: var(--bt-accent);
}

@keyframes bhFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* --- Right Actions (Desktop) --- */
.bh-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.bh-darkmode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid var(--bt-border);
  background: transparent;
  color: var(--bt-text);
  font-size: 15px;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}

.bh-darkmode-btn:hover {
  background-color: var(--bt-accent);
  border-color: var(--bt-accent);
  color: #fff;
  transform: scale(1.05);
}

.bh-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--bt-text) !important;
  transition: background-color .12s, color .12s;
}

.bh-action-link:hover {
  background-color: var(--bt-search-bg);
  color: var(--bt-accent) !important;
}

.bh-action-muted {
  opacity: .55;
}

.bh-action-muted:hover {
  opacity: 1;
}

.bh-btn-signup {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #fff !important;
  background: var(--bt-accent);
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background-color .15s, transform .1s;
}

.bh-btn-signup:hover {
  background: var(--bt-accent-hover);
  color: #fff !important;
  transform: translateY(-1px);
}

/* --- Desktop Search --- */
.bh-search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.bh-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--bt-text);
  font-size: 14px;
  cursor: pointer;
  transition: background-color .12s, color .12s;
}

.bh-search-toggle:hover {
  background-color: var(--bt-search-bg);
  color: var(--bt-accent);
}

.bh-search-input {
  width: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--bt-text);
  font-size: 13px;
  outline: none;
  transition: width .25s ease, padding .25s ease, background-color .25s ease;
  border-radius: 8px;
}

.bh-search-form.bh-search-open .bh-search-input {
  width: 180px;
  padding: 7px 12px;
  background-color: var(--bt-search-bg);
}

/* --- Mobile Toggle --- */
.bh-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--bt-toggler-border);
  border-radius: 8px;
  background: none;
  color: var(--bt-text);
  font-size: 20px;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
}

/* --- Mobile Panel Menu (below header) --- */
.bh-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  visibility: hidden;
  pointer-events: none;
}

.bh-panel.bh-panel-open {
  visibility: visible;
  pointer-events: auto;
}

/* Dark backdrop */
.bh-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background .3s ease;
}

.bh-panel-open .bh-panel-backdrop {
  background: rgba(0, 0, 0, .45);
}

/* Sliding panel body */
.bh-panel-body {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  max-height: 75vh;
  background-color: var(--bt-menu-bg);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .25);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity .2s ease;
  overflow: hidden;
}

.bh-panel-open .bh-panel-body {
  opacity: 1;
}

/* Overlay navigation */
.bh-overlay-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 24px;
}

.bh-overlay-item {
  border-bottom: 1px solid var(--bt-border);
}

.bh-overlay-item:last-child {
  border-bottom: none;
}

.bh-overlay-link {
  display: block;
  padding: 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--bt-text);
  letter-spacing: -.02em;
  transition: color .15s;
}

.bh-overlay-link:hover {
  color: var(--bt-accent);
}

/* Overlay sub-menu */
.bh-overlay-has-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.bh-overlay-has-sub > .bh-overlay-link {
  flex: 1;
}

.bh-overlay-sub-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  color: var(--bt-text);
  font-size: 13px;
  cursor: pointer;
  transition: transform .25s ease;
  flex-shrink: 0;
  opacity: .5;
}

.bh-sub-open > .bh-overlay-sub-toggle {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--bt-accent);
}

.bh-overlay-sub {
  display: none;
  width: 100%;
  padding: 0 0 8px 0;
}

.bh-sub-open > .bh-overlay-sub {
  display: block;
  animation: bhSubFadeIn .2s ease;
}

@keyframes bhSubFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bh-overlay-sub a {
  display: block;
  padding: 11px 0 11px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--bt-text);
  opacity: .65;
  transition: color .12s, opacity .12s;
}

.bh-overlay-sub a:hover {
  color: var(--bt-accent);
  opacity: 1;
}

/* Overlay footer */
.bh-overlay-footer {
  flex-shrink: 0;
  padding: 16px 24px 28px;
  border-top: 1px solid var(--bt-border);
}

.bh-overlay-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bh-overlay-act-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--bt-text) !important;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background-color .12s, color .12s;
}

.bh-overlay-act-link:hover {
  background-color: var(--bt-search-bg);
  color: var(--bt-accent) !important;
}

.bh-act-muted {
  opacity: .55;
}

.bh-act-muted:hover {
  opacity: 1;
}

.bh-overlay-signup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #fff !important;
  background: var(--bt-accent);
  padding: 8px 16px;
  border-radius: 10px;
  transition: background-color .15s;
}

.bh-overlay-signup:hover {
  background: var(--bt-accent-hover);
  color: #fff !important;
}

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet: reduce nav font & spacing */
@media (max-width: 1200px) {
  .bh-nav-link {
    font-size: 13px;
    padding: 0 12px;
  }

  .bh-brand {
    margin-right: 20px;
  }
}

/* Mobile breakpoint */
@media (max-width: 991px) {
  /* Hide desktop nav and actions */
  .bh-nav,
  .bh-actions {
    display: none !important;
  }

  /* Show mobile toggle */
  .bh-mobile-toggle {
    display: flex;
  }

  .bh-inner {
    height: 56px;
  }

  .bh-logo {
    width: 110px;
  }

  .bh-brand {
    margin-right: 0;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .bh-inner {
    height: 50px;
  }

  .bh-logo {
    width: 100px;
  }

  .bh-overlay-nav {
    padding: 8px 16px;
  }

  .bh-overlay-link {
    font-size: 16px;
    padding: 14px 0;
  }

  .bh-overlay-footer {
    padding: 14px 16px 20px;
  }
}
