/*
 Theme Name: Astra Child
 Template: astra
 Version: 1.0.1
*/

/* ===== Tabs (年份切換) ===== */
.news-filter {
  margin: 12px 0 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.news-filter .news-tab {
  border: 1px solid #ddd;
  background: #fff;
  /* padding: 6px 12px; */
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.15s ease;
}
.news-filter .news-tab:hover {
  background: #f5f5f5;
}
.news-filter .news-tab.is-active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* ===== 分頁 ===== */
.news-pagination {
  margin-top: 16px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.news-pagination .news-page {
  border: 1px solid #ddd;
  background: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  min-width: 36px;
  text-align: center;
}
.news-pagination .news-page.is-active {
  background: #000;
  color: #fff;
  border-color: #000;
}
.news-pagination .news-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== 清單樣式 ===== */
.dlm-downloads {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dlm-downloads .news-item {
  display: grid;
  grid-template-columns: 120px 1fr auto; /* 日期 | 標題 | 大小 */
  align-items: center;
  column-gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
.dlm-downloads .news-date {
  min-width: 110px;
  color: #666;
  font-size: 14px;
}
.dlm-downloads .news-link {
  text-decoration: none !important;
  color: #000 !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.dlm-downloads .news-link:hover {
  text-decoration: underline !important;
  color: #000 !important;
}
.dlm-downloads .news-size {
  color: #666;
  font-size: 12px;
  white-space: nowrap;
}

/* PDF Icon */
.dlm-downloads .pdf-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-block;
  vertical-align: -2px;
}
.dlm-downloads .pdf-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* 小螢幕響應：日期放上面 */
@media (max-width: 640px) {
  .dlm-downloads .news-item {
    grid-template-columns: 1fr auto;
    row-gap: 4px;
  }
  .dlm-downloads .news-date {
    grid-column: 1 / -1;
    order: -1;
    font-size: 12px;
  }
}

