/* ================================================================
   ILTB 宜蘭縣政府財政稅務局 — 正式首頁切版補強
   主視覺樣式由 /frontref/css/all.css 提供；此檔只放 Blazor 動態資料所需的微調。
   ================================================================ */

#iltb-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#iltb-wrapper > main {
  flex: 1;
}

body {
  margin-bottom: 0 !important;
}

/*
 * 修正：/frontref/css/all.css 將 footer 設為 position:absolute; bottom:0，會脫離 flex 流並覆蓋
 * 到內容區塊。針對所有「使用 sticky-footer flex 佈局」的版型（首頁 #iltb-wrapper、其他頁面 .page）
 * 把 footer 改回 static，讓 main { flex:1 } 自然把 footer 推到內容下方。
 *
 * 注意：MainLayout.razor 中 <footer class="footer"> 內又包了 IltbHomeFooter 的 <footer id="footer">，
 *       兩層都需要還原為 static，所以用後代選擇器涵蓋雙層。
 */
#iltb-wrapper > #footer,
#iltb-wrapper > footer,
.page > .footer,
.page > footer,
.page footer#footer {
  position: static;
  width: auto;
}

.index-body .btn-quick,
.index-body .btn-sort {
  text-decoration: none !important;
}

.index-body #topic2 #popular .list-group-item .project-title {
  min-width: 0;
}

.index-body .project-btn {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  justify-content: flex-end;
}

.index-body .home-empty-state {
  padding: 1.25rem;
  color: var(--bs-gray-600);
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed var(--bs-gray-300);
  border-radius: 1rem;
}

.index-body .home-maintenance {
  z-index: 1080;
  width: min(92vw, 680px);
}

header .navbar-collapse .navbar-nav .nav-link {
  text-decoration: none !important;
}

header .navbar-collapse .navbar-nav .nav-link .img-fluid {
  object-fit: contain;
}

header .navbar-collapse .list-unstyled a,
footer a {
  text-decoration: none;
}

.home-login-link {
  color: var(--bs-deepTheme) !important;
  font-weight: 700;
}

.home-login-link:hover,
.home-login-link:focus {
  text-decoration: underline;
}

.home-user-menu .dropdown-menu {
  z-index: 1060;
}

.home-sidebar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-sidebar-item {
  background: var(--bs-deepBlue);
  color: #fff !important;
  text-decoration: none !important;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 14px 7px;
  font-size: .72rem;
  font-weight: 600;
  border-radius: 8px 0 0 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.3;
  box-shadow: -2px 2px 8px rgba(0,0,0,.18);
  letter-spacing: .04em;
  transition: background .2s, padding .2s;
}

.home-sidebar-item:hover,
.home-sidebar-item:focus {
  background: var(--bs-deepTheme);
  padding-right: 12px;
}

.home-sidebar-item:nth-child(2n) {
  background: var(--bs-deepBright);
}

@media (max-width: 1280px) {
  .home-sidebar {
    display: none;
  }
}

