/* 合作院校地圖：依使用者提供附件整合，樣式限定於 bdm 區塊。 */

/* Layout: card in the site's content width; text + tabs + county list on the left, Taiwan map on the right; stacks under 760px */
.bdm{
  --bdm-ink:#1d2b2c; --bdm-ink2:#4b5a5b; --bdm-muted:#7a8687; --bdm-line:#e2dfd5;
  --bdm-card:#ffffff; --bdm-sea:#f2f5f3; --bdm-land:#dfe2dc; --bdm-brand:#2f6b66;
  /* one color per product; the map and the active tab both use it */
  --bdm-CDA:#2c6e8f; --bdm-FUNC:#c2653a; --bdm-TEST:#4c8748; --bdm-TALK:#7656a3;
  --bdm-pc:var(--bdm-CDA);
  box-sizing:border-box; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  background:var(--bdm-card); border:1px solid var(--bdm-line); color:var(--bdm-ink);
  font-family:inherit; line-height:1.7; width:100%;
}
.bdm *,.bdm *::before,.bdm *::after{box-sizing:border-box}
.bdm [hidden]{display:none!important}
.bdm-info{padding:clamp(24px,4.5vw,56px);display:flex;flex-direction:column;gap:18px;justify-content:center;min-width:0}
.bdm-eyebrow{margin:0;font-size:.8rem;letter-spacing:.14em;color:var(--bdm-brand);font-weight:700}
.bdm-title{margin:0;font-size:clamp(1.4rem,2.6vw,1.9rem);line-height:1.45;font-weight:700;color:var(--bdm-ink)}
.bdm-title strong{font-size:1.6em;line-height:1;margin:0 .1em}
/* 四項服務固定兩欄兩列，維持閱讀與鍵盤操作順序一致。 */
.bdm-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.bdm-tab{font:inherit;font-size:.9rem;line-height:1.4;padding:7px 14px;border-radius:999px;border:1px solid var(--bdm-line);background:var(--bdm-card);color:var(--bdm-ink2);cursor:pointer;display:flex;align-items:center;gap:7px;width:100%;min-height:48px;min-width:0;text-align:left}
.bdm-tab .bdm-lbl{flex:1;min-width:0;overflow-wrap:anywhere}
.bdm-tab b{flex-shrink:0;white-space:nowrap;font-weight:700;color:var(--bdm-muted);font-variant-numeric:tabular-nums}
.bdm-tab:hover{border-color:var(--bdm-ink2)}
.bdm-tab[aria-pressed="true"]{background:var(--bdm-pc);border-color:var(--bdm-pc);color:#fff}
.bdm-tab[aria-pressed="true"] b{color:#fff}
.bdm-tab:focus-visible,.bdm-close:focus-visible,.bdm-menu button:focus-visible{outline:2px solid var(--bdm-brand);outline-offset:2px}
.bdm-caret{font-size:.65rem;transition:transform .15s}
.bdm-tab[aria-expanded="true"] .bdm-caret{transform:rotate(180deg)}
.bdm-dd{position:relative;min-width:0}
.bdm-caret{flex-shrink:0}
.bdm-menu{position:absolute;top:calc(100% + 6px);left:0;z-index:20;background:var(--bdm-card);border:1px solid var(--bdm-line);border-radius:10px;box-shadow:0 10px 28px rgba(29,43,44,.14);padding:6px;width:max(100%,210px);max-width:calc(100vw - 88px);display:flex;flex-direction:column}
.bdm-menu button{font:inherit;font-size:.9rem;text-align:left;border:0;background:none;cursor:pointer;display:flex;justify-content:space-between;gap:16px;padding:8px 12px;border-radius:6px;color:var(--bdm-ink)}
.bdm-menu button b{color:var(--bdm-muted);font-weight:500;font-variant-numeric:tabular-nums}
.bdm-menu button:hover{background:var(--bdm-sea)}
.bdm-menu button[aria-checked="true"]{color:var(--bdm-FUNC);font-weight:700}
.bdm-result{min-height:7.5em}
.bdm-hint{margin:0;color:var(--bdm-muted);font-size:.92rem}
.bdm-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:6px}
.bdm-head p{margin:0;font-weight:700;font-size:1.05rem}
.bdm-head small{font-weight:400;color:var(--bdm-muted);font-size:.85rem;margin-left:8px}
.bdm-close{font:inherit;font-size:.8rem;border:1px solid var(--bdm-line);background:var(--bdm-card);color:var(--bdm-ink2);border-radius:999px;padding:1px 10px;cursor:pointer}
.bdm-list{margin:0;color:var(--bdm-ink2);font-size:.95rem;line-height:2}
.bdm-map{position:relative;background:var(--bdm-sea);padding:16px;display:flex;align-items:center;justify-content:center;min-width:0}
.bdm-map svg{display:block;width:100%;max-width:420px;height:auto;max-height:640px}
.bdm-cty{fill:var(--bdm-land);stroke:#fff;stroke-width:1.1;stroke-linejoin:round;cursor:pointer;transition:fill .25s}
.bdm-cty.on{fill:var(--bdm-pc)}
.bdm-cty:hover{stroke:var(--bdm-ink);stroke-width:1.4}
.bdm-cty.sel{stroke:var(--bdm-ink);stroke-width:2.4}
.bdm-badge{cursor:pointer}
.bdm-badge circle{fill:#fff;stroke:var(--bdm-ink);stroke-width:1.1}
.bdm-badge text{fill:var(--bdm-ink);font:700 11px/1 system-ui,sans-serif;text-anchor:middle;dominant-baseline:central;pointer-events:none}
.bdm-leader{stroke:var(--bdm-muted);stroke-width:1}
.bdm-tip{position:absolute;pointer-events:none;background:var(--bdm-ink);color:#fff;font-size:.8rem;padding:3px 9px;border-radius:6px;white-space:nowrap;transform:translate(-50%,-135%)}
@media (max-width:1100px){
  .bdm{grid-template-columns:1fr}
}
@media (max-width:760px){
  .bdm{grid-template-columns:1fr}
  .bdm-result{min-height:0}
}
@media (prefers-reduced-motion:reduce){.bdm-cty,.bdm-caret{transition:none}}

/* 窄手機改成單欄，長的職能課程名稱與數字仍能完整呈現。 */
@media (max-width:520px){
  .bdm-tabs{grid-template-columns:1fr}
  .bdm-info{padding:24px 18px}
  .bdm-menu{width:100%;min-width:0;max-width:100%}
}
