/* layout.css — 版面（Header / Footer / Sidebar / 外殼 / 導覽）共用版面骨架。*/

.tcacb-container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  padding: 0 15px;
}

@media (max-width: 991.98px) {
  .tcacb-container {
    max-width: 960px;
    width: 95%;
  }
}
@media (max-width: 767.98px) {
  .tcacb-container {
    max-width: 720px;
    width: 98%;
  }
}
@media (max-width: 575.98px) {
  .tcacb-container {
    max-width: 100%;
    width: 100%;
    padding: 0 8px;
  }
}
.tcacb-web-shell {
  position: relative;
  min-height: 100vh;
  background: radial-gradient(circle at bottom right, rgba(var(--tcacb-primary-rgb), 0.04), transparent 1%), #f7faff;
}

.tcacb-web-main {
  --tcacb-header-offset: 5rem;
  padding-top: var(--tcacb-header-offset);
}

@media (max-width: 575.98px) {
  .tcacb-web-main {
    --tcacb-header-offset: 4.5rem;
  }
}
.tcacb-fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

.tcacb-glass-panel {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.tcacb-nav-link {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--tcacb-neutral-600);
  font-size: 1rem;
  font-weight: 600;
  transition: color 0.2s ease;
  padding: 0.25rem 0;
}
.tcacb-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.5rem;
  height: 2px;
  background: var(--tcacb-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}
.tcacb-nav-link:hover, .tcacb-nav-link.active {
  color: var(--tcacb-primary);
}
.tcacb-nav-link.active::after {
  transform: scaleX(1);
}

.tcacb-sidebar {
  position: fixed;
  top: 0;
  width: 280px;
  height: 100vh;
  background-color: #fff;
  z-index: 1050;
  overflow-y: auto;
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0s 0.3s;
}
.tcacb-sidebar.show {
  visibility: visible;
  transition: transform 0.3s ease, visibility 0s 0s;
}
@media (max-width: 575.98px) {
  .tcacb-sidebar {
    width: 100%;
  }
}

.tcacb-sidebar-right {
  right: 0;
  transform: translateX(100%);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
}
.tcacb-sidebar-right.show {
  transform: translateX(0);
}

.tcacb-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.tcacb-sidebar-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: var(--tcacb-neutral-600);
  font-size: 1rem;
  cursor: pointer;
}
.tcacb-sidebar-close:hover {
  background: rgba(0, 0, 0, 0.04);
}

.tcacb-sidebar-body {
  padding: 1rem;
}

.tcacb-sidebar-nav {
  display: grid;
  gap: 0.25rem;
}

.tcacb-sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 1rem;
  background: transparent;
  color: var(--tcacb-neutral-600);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.tcacb-sidebar-nav-item:hover, .tcacb-sidebar-nav-item.active {
  background: var(--tcacb-primary-soft);
  color: var(--tcacb-primary);
}
.tcacb-sidebar-nav-item i {
  width: 1.5rem;
  text-align: center;
  font-size: 1rem;
}

.tcacb-overlay {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}
.tcacb-overlay.show {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0s 0s;
}
