/* 外層 grid：最多兩行，2–5 欄，使用 inline style 控制 repeat() */
.bmcpc-subnav-wrapper {
  display: grid;
  grid-auto-rows: 1fr;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

/* 每一格 tile */
.bmcpc-subnav-item {
  padding: 18px 10px;
  background-color: #ececec;
  color: #5d5e60 !important; /* 強制灰色 */
  font-size: 24px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.3;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: all 0.25s ease;
}

/* 交錯灰色：偶數用淺灰 */
.bmcpc-subnav-item:nth-child(even) {
  background-color: #f5f5f5; /* 淺灰 */
}

/* active 狀態：背景綠、字 #deb407 */
.bmcpc-subnav-item.active {
  background-color: #3f7c6c;
  color: #deb407 !important;
}

/* hover 時與 active 一樣（只對非 active） */
.bmcpc-subnav-item:not(.active):hover {
  background-color: #3f7c6c;
  color: #deb407 !important;
}

/* RWD：手機固定兩欄 */
@media (max-width: 768px) {
  .bmcpc-subnav-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .bmcpc-subnav-item {
    font-size: 16px;
    padding: 14px 8px;
  }
}
