/* TolongBeli — shared site header for article and inner pages */

.tb-header {
  --tb-ink: #082a3a;
  --tb-ink-2: #0b4760;
  --tb-teal: #00bfff;
  --tb-teal-dark: #007fa8;
  --tb-teal-soft: #e5f9ff;
  --tb-amber: #a06a48;
  --tb-muted: #4f6b78;
  --tb-line: #cfeaf3;
  --tb-wa: #25d366;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(11, 31, 51, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--tb-ink);
  transition: box-shadow 0.2s ease;
}

body.admin-bar .tb-header {
  top: 32px;
}

.tb-header.is-scrolled {
  box-shadow: 0 12px 30px rgba(11, 31, 51, 0.09);
}

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

.tb-header a {
  color: inherit;
  text-decoration: none;
}

.tb-header svg {
  display: block;
}

.tb-header .tb-wrap {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.tb-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}

.tb-header .tb-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.tb-header .tb-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--tb-teal), var(--tb-teal-dark));
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 191, 255, 0.25);
}

.tb-header .tb-brand-mark svg {
  width: 24px;
  height: 24px;
}

.tb-header .tb-brand-logo {
  width: 64px;
  height: 64px;
  padding: 3px;
  flex-shrink: 0;
  object-fit: contain;
  border: 1px solid rgba(0, 191, 255, 0.45);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 191, 255, 0.22);
}

.tb-header .tb-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.tb-header .tb-brand-text strong {
  font-family: "Red Hat Display", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.tb-header .tb-brand-text small {
  margin-top: 4px;
  color: var(--tb-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tb-header .tb-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tb-header .tb-nav a {
  padding: 10px 12px;
  border-radius: 9px;
  color: #33485a;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.16s ease, color 0.16s ease;
}

.tb-header .tb-nav a:hover {
  background: var(--tb-teal-soft);
  color: var(--tb-teal-dark);
}

.tb-header .tb-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tb-header .tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.tb-header .tb-btn svg {
  width: 18px;
  height: 18px;
}

.tb-header .tb-btn:hover {
  transform: translateY(-1px);
}

.tb-header .tb-btn-primary {
  background: var(--tb-wa);
  color: #082a3a !important;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.28);
}

.tb-header .tb-btn-primary:hover {
  background: #1ebe5d;
  color: #082a3a !important;
  box-shadow: 0 14px 26px rgba(30, 190, 93, 0.3);
}

.tb-header .tb-btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--tb-line);
  color: var(--tb-ink) !important;
}

.tb-header .tb-btn-ghost:hover {
  background: #fff;
  border-color: #cbd5db;
}

.tb-header .tb-nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--tb-line);
  border-radius: 11px;
  background: #fff;
  color: var(--tb-ink);
  cursor: pointer;
}

.tb-header .tb-nav-toggle svg {
  width: 22px;
  height: 22px;
}

.tb-header .tb-nav-toggle .tb-icon-open,
.tb-header .tb-nav-toggle .tb-icon-close {
  display: grid;
  place-items: center;
}

.tb-header .tb-nav-toggle .tb-icon-close {
  display: none;
}

.tb-header .tb-nav-toggle[aria-expanded="true"] .tb-icon-open {
  display: none;
}

.tb-header .tb-nav-toggle[aria-expanded="true"] .tb-icon-close {
  display: grid;
}

.tb-header :focus-visible {
  outline: 3px solid var(--tb-amber);
  outline-offset: 3px;
}

@media (max-width: 1080px) {
  .tb-header .tb-nav a {
    padding: 9px 8px;
    font-size: 13px;
  }

  .tb-header .tb-header-actions .tb-btn-ghost {
    display: none;
  }
}

@media (max-width: 960px) {
  .tb-header .tb-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 20px 20px;
    border-bottom: 1px solid var(--tb-line);
    background: #fff;
    box-shadow: 0 20px 40px rgba(11, 31, 51, 0.12);
  }

  .tb-header .tb-nav.is-open {
    display: flex;
  }

  .tb-header .tb-nav a {
    padding: 12px 10px;
    font-size: 14px;
  }

  .tb-header .tb-nav-toggle {
    display: grid;
  }
}

@media (max-width: 680px) {
  body.admin-bar .tb-header {
    top: 46px;
  }

  .tb-header .tb-wrap {
    width: calc(100% - 32px);
  }

  .tb-header-inner {
    min-height: 66px;
    gap: 10px;
  }

  .tb-header .tb-brand-text small {
    display: none;
  }

  .tb-header .tb-brand-mark {
    width: 40px;
    height: 40px;
  }

  .tb-header .tb-brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 13px;
  }

  .tb-header .tb-brand-text strong {
    font-size: 13px;
  }

  .tb-header .tb-header-actions .tb-btn-primary {
    min-height: 42px;
    padding: 10px 14px;
    font-size: 13px;
  }
}

@media (max-width: 560px) {
  .tb-header .tb-brand-text {
    display: none;
  }
}
