/**
 * 無障礙樣式 (Accessibility Styles)
 * 全國原住民族學生體育人才資料庫
 * 符合台灣無障礙網頁 AA 標準
 */

/* =====================================================
   一般樣式
   ===================================================== */
.navbar-brand a {
  color: var(--bs-nav-link-color);
  text-decoration: none;
}

#news-istsdb h3 {
  text-decoration: none;
  color: #575757;
  font-weight: 400;
  text-align: left;
  line-height: 1.4em;
  margin-top: 6px;
}

main.news .articles article h2 {
    color: #545454;
    font-size: 1.25rem;
    line-height: 1.5em;
    margin: 5px 0;
}

/* =====================================================
   字級控制 (Font Size Control)
   ===================================================== */
html.font-small { font-size: 87.5%; }
html.font-medium { font-size: 100%; }
html.font-large { font-size: 112.5%; }

/* =====================================================
   Skip Link (跳至主要內容)
   ===================================================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: #1a1a2e;
  color: #fff;
  padding: 12px 24px;
  z-index: 10000;
  text-decoration: none;
  font-size: 1rem;
  border-radius: 0 0 4px 0;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #ffc107;
  outline-offset: 2px;
}

/* =====================================================
   sr-only 螢幕閱讀器專用
   ===================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only-focusable:focus {
  position: absolute;
  width: auto;
  height: auto;
  padding: 12px 24px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* =====================================================
   導盲磚 - 定位於各區塊內部左上角
   ===================================================== */
.accesskey-link {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1;
  color: #6c757d;
  text-decoration: none;
  padding: 2px 8px;
  background: rgba(248, 249, 250, 0.9);
  border-radius: 2px;
}
.accesskey-link:focus {
  outline: 2px solid #833c46;
  outline-offset: 2px;
}

/* 導盲磚絕對定位（用於區塊內部） */
.accesskey-positioned {
  position: absolute;
  top: 4px;
  left: 8px;
  z-index: 100;
}

/* 區塊定位參考 */
#header-nav,
#main-content,
#footer {
  position: relative;
}

/* =====================================================
   noscript 提示
   ===================================================== */
.noscript-alert {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  padding: 12px 16px;
  text-align: center;
  font-size: 0.875rem;
}

/* =====================================================
   字級控制（導覽列整合）
   ===================================================== */
.nav-item-font-size {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 0.5rem;
}

.nav-item-font-size .font-size-label {
  color: #495057;
  font-size: 0.875rem;
  margin-right: 4px;
}

.nav-item-font-size button {
  border: none;
  background: none;
  font-weight: bold;
}

/* 手機版調整 */
@media (max-width: 991.98px) {
  .nav-item-font-size {
    padding: 0.5rem 1rem;
    justify-content: flex-start;
  }
}

/* =====================================================
   字級切換按鈕
   ===================================================== */
.btn-font-size {
  padding: 2px 6px;
  border: 1px solid #6c757d;
  background: #fff;
  color: #495057;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.btn-font-size:hover {
  background: #e9ecef;
  border-color: #495057;
}
.btn-font-size:focus {
  outline: 2px solid #833c46;
  outline-offset: 2px;
}
.btn-font-size.active {

  background: #833c46;
  color: #fff;
  border-color: #833c46;
}

/* =====================================================
   SVG 地圖無障礙焦點樣式（單層式 Tab 導覽）
   保留舊系統的滿版紅色選取樣式，只加焦點邊框
   ===================================================== */

/* 縣市按鈕焦點樣式 - 用 stroke 讓邊框跟隨 path 形狀 */
#map [role="button"]:focus {
  outline: none;
  stroke: #833c46 !important;
  stroke-width: 4 !important;
}
#map [role="button"]:focus-visible {
  outline: none;
  stroke: #833c46 !important;
  stroke-width: 4 !important;
}

/* =====================================================
   Bootstrap 覆蓋樣式 - 統一配色
   ===================================================== */

/* Dropdown 選項樣式 - 覆蓋 Bootstrap 預設藍色 */
.dropdown-item:focus,
.dropdown-item:hover {
  background-color: rgba(131, 60, 70, 0.1);
  color: #833c46;
}
.dropdown-item.active,
.dropdown-item:active {
  background-color: #833c46;
  color: #fff;
}

/* btn-primary 覆蓋 Bootstrap 預設藍色 */
.btn-primary {
  background-color: #833c46;
  border-color: #833c46;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #6d3239;
  border-color: #6d3239;
}
.btn-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(131, 60, 70, 0.5);
}
