/* 17FIT 商學院 — 共用 blog 頁首 */
:root {
  --bh-blue: #2F6FEB;
  --bh-blue-700: #1F54C4;
  --bh-blue-50: #EEF3FE;
  --bh-ink: #111827;
  --bh-ink-3: #5B6472;
  --bh-line: #E3E7EE;
  --bh-h: 64px;
  --bh-font: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --bh-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
}
.od-icon { width: var(--od-icon-size, 1em); height: var(--od-icon-size, 1em); flex: none; display: inline-block; vertical-align: middle; }

.bh {
  position: sticky; top: var(--ph, 0px); z-index: 900;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--bh-line);
  font-family: var(--bh-font);
}
@supports (backdrop-filter: blur(8px)) { .bh { background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(8px); } }
.bh-in {
  max-width: 1120px; margin: 0 auto; height: var(--bh-h);
  display: flex; align-items: center; gap: 24px; padding: 0 24px;
}
.bh-brand { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; flex: none; color: var(--bh-ink); }
.bh-mark { font-family: var(--bh-mono); font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--bh-blue); }
.bh-name { font-weight: 700; font-size: 16px; color: var(--bh-ink); }

.bh-menu { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.bh-nav { flex: 1; min-width: 0; }
.bh-cats { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.bh-cats a {
  display: block; padding: 8px 12px; border-radius: 8px; font-size: 15px; line-height: 1.4;
  color: var(--bh-ink); text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.bh-cats a:hover { background: var(--bh-blue-50); color: var(--bh-blue-700); }
.bh-cats a[aria-current="true"] { color: var(--bh-blue-700); background: var(--bh-blue-50); font-weight: 700; }

.bh-search { position: relative; display: flex; align-items: center; flex: none; }
.bh-search input {
  width: 180px; height: 40px; padding: 0 40px 0 14px; border: 1px solid var(--bh-line); border-radius: 999px;
  font: inherit; font-size: 15px; color: var(--bh-ink); background: #fff;
  transition: border-color .15s ease, width .2s ease;
}
.bh-search input::placeholder { color: var(--bh-ink-3); }
.bh-search input:focus { outline: none; border-color: var(--bh-blue); box-shadow: 0 0 0 3px rgba(47,111,235,.18); }
.bh-search button {
  position: absolute; right: 4px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none;
  color: var(--bh-ink-3); cursor: pointer; display: flex; align-items: center; justify-content: center; --od-icon-size: 18px;
}
.bh-search button:hover { color: var(--bh-blue-700); background: var(--bh-blue-50); }
.bh-ext {
  display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 14px; font-weight: 600;
  color: var(--bh-ink); text-decoration: none; white-space: nowrap; padding: 8px 4px; --od-icon-size: 16px;
}
.bh-ext:hover { color: var(--bh-blue-700); }
.bh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bh a:focus-visible, .bh button:focus-visible { outline: 3px solid var(--bh-blue); outline-offset: 2px; }

.bh-burger {
  display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; cursor: pointer;
  align-items: center; justify-content: center;
}
.bh-burger i, .bh-burger i::before, .bh-burger i::after { display: block; width: 20px; height: 2px; background: var(--bh-ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.bh-burger i { position: relative; }
.bh-burger i::before, .bh-burger i::after { content: ""; position: absolute; left: 0; }
.bh-burger i::before { top: -6px; } .bh-burger i::after { top: 6px; }
.bh.bh-open .bh-burger i { background: transparent; }
.bh.bh-open .bh-burger i::before { transform: translateY(6px) rotate(45deg); }
.bh.bh-open .bh-burger i::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1199px) {
  :root { --bh-h: 56px; }
  .bh-in { padding: 0 16px; gap: 12px; }
  .bh-burger { display: flex; }
  .bh-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 16px; padding: 16px;
    background: #fff; border-bottom: 1px solid var(--bh-line); box-shadow: 0 12px 24px rgba(17,24,39,.08);
    max-height: calc(100vh - var(--bh-h) - var(--ph, 0px)); overflow-y: auto;
  }
  .bh.bh-open .bh-menu { display: flex; }
  .bh-search { order: -1; }
  .bh-search input { width: 100%; height: 48px; font-size: 16px; }
  .bh-cats { flex-direction: column; gap: 0; }
  .bh-cats a { padding: 12px; font-size: 16px; }
  .bh-ext { padding: 12px; border-top: 1px solid var(--bh-line); }
}
@media (prefers-reduced-motion: reduce) { .bh *, .bh { transition: none !important; } }
@media print { .bh { display: none !important; } }
