/*!
 * a11y.css — 前台無障礙化補充樣式
 *
 * 用途：只放「為了無障礙而加」的樣式，與設計端交付的 main.css 分開，
 * 之後要比對或回退都容易。載入順序在 main.css 之後（見
 * resources/views/frontEnd/includes/head.blade.php）。
 *
 * 改完這個檔案一定要跑：
 *   php tools/a11y/update-mix-manifest.php
 * 重新計算 public/mix-manifest.json 內的 ?id=（正式站 nginx 對 /assets/
 * 設 30 天快取，沒有換 query string 使用者不會拿到新檔）。
 */

/*
 * .sr-only：只給螢幕報讀軟體看的文字。
 *
 * Bootstrap 3（plugins.css）已經有一份定義，這裡再寫一次是保險——
 * 萬一之後 plugins.css 被抽換，補在樣板上的 sr-only 文字不會突然變成可見文字。
 * 內容與 Bootstrap 3 相同，重複定義不會有副作用。
 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/*
 * .sr-only-focusable：鍵盤 focus 時才顯示（例如「跳至主要內容」連結）。
 * 目前樣板還沒用到，先備妥定義。
 */
.sr-only-focusable:active,
.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
}

/*
 * 非連結的橫幅外框（a11y patch 02）。
 *
 * 沒有 url 的首頁橫幅原本輸出 `<a href="javascript:void(0)" target="_blank">`，
 * 那是一個沒有目的地的連結（Freego HM1240401C，也會干擾鍵盤操作），
 * 已改成 `<span>` 包同樣的 `.img`。main.css 有一條
 * `a, a:before, a:after, a *, … { transition: all .1s ease-in-out }`，
 * 換掉 `<a>` 之後 `.h_lecture .item:hover .img` 的陰影會變成瞬間出現，
 * 這裡把同樣的 transition 補回去，讓視覺與原本一致。
 */
.slider .item > span,
.slider .item > span *,
.h_lecture .item > span,
.h_lecture .item > span *,
.h_dm span.item,
.h_dm span.item * {
    transition: all 0.1s ease-in-out;
}
