/* 學校成效 — 列表樣式（版面共用 qna.css） */

/* 覆蓋 Collapsible-Sidebar.css 的 #sidebar active 樣式 */
#sidebar.qna-sidebar ul li.active > a {
  background: #eef8f0 !important;
  color: #1e7e34 !important;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #28a745;
  border-radius: 0 6px 6px 0;
}

#sidebar.qna-sidebar ul li a:hover {
  background: #f5faf6 !important;
  color: #28a745 !important;
}

.school-page .wrapper {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  margin-top: 0;
  box-shadow: none;
  align-items: flex-start;
  gap: 20px;
}

@media (min-width: 769px) {
  .school-page .wrapper {
    gap: 24px;
  }
}

.school-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
  overflow-x: auto;
}

.school-year-select {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border: 1px solid #dcefe0;
  border-radius: 6px;
  background: #fff;
}

.school-year-select select {
  border: 0;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  outline: none;
}

.school-filter {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #444;
  background: #fff;
  border: 1px solid #dcefe0;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  list-style: none;
  margin: 0;
}

.school-filter:hover {
  background: #f5faf6;
  border-color: #c8e6c9;
  color: #1e7e34;
}

.school-filter.active {
  color: #fff;
  background: #28a745;
  border-color: #28a745;
}

.school-grid {
  margin: 0 -8px;
}

.school-card {
  padding: 0 8px 16px;
}

.school-card-link {
  display: block;
  position: relative;
  height: 100%;
  border: 1px solid #e8ecef;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  text-decoration: none !important;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.school-card-link:hover {
  border-color: #dce9df;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.school-card-thumb {
  width: 100%;
  height: 150px;
  background-color: #f8f9fa;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.school-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-block;
  max-width: calc(100% - 16px);
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 999px;
  word-break: break-word;
}

.school-badge--full {
  color: #856404;
  background: #fff3cd;
}

.school-badge--domain {
  color: #0c5460;
  background: #d1ecf1;
}

.school-badge--general {
  color: #1e7e34;
  background: #eaf7ec;
}

.school-card-name {
  padding: 10px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #008fa8;
  line-height: 1.45;
  word-break: break-word;
}

.school-card-link:hover .school-card-name {
  color: #1e7e34;
}

@media (max-width: 768px) {
  .school-page .wrapper {
    gap: 0;
  }

  .school-toolbar {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .school-filter {
    font-size: 0.8125rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
}