/* =========================
   全站內容避開 fixed header
========================= */
:root {
  --header-height: 72px;
}

body {
  margin: 0;
  padding-top: var(--header-height);
}

@media (max-width: 768px) {
  :root {
    --header-height: 62px;
  }
}

/* =========================
   Header Base
========================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

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

/* =========================
   Desktop Nav
========================= */
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__link {
  text-decoration: none;
  color: #222;
  font-size: 18px;
  font-weight: 500;
}

.nav__link--active {
  color: #1d4f91;
  font-weight: 700;
}

/* 漢堡按鈕：桌機先隱藏 */
.menu-btn {
  display: none;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

/* =========================
   Mobile
========================= */
@media (max-width: 768px) {
  .header__inner {
    padding: 10px 16px;
  }

  .logo img {
    height: 40px;
  }

  .menu-btn {
    display: block;
    z-index: 1002;
  }

  .nav {
    display: none;              /* 手機預設收起 */
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    width: 220px;
    background: #fff;
    border-radius: 16px;
    padding: 12px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1001;
  }

  .nav.active {
    display: flex;             /* 點漢堡才展開 */
  }

  .nav__link {
    width: 100%;
    padding: 14px 18px;
    font-size: 18px;
  }
}