/* =====================================================================
   GINEERS — downloads.css  (Downloads page: documents + videos)
   Loaded after common.css
   ===================================================================== */

.dl-head { padding-top: 48px; margin-bottom: 28px; }

/* ---------- Filter buttons + search ---------- */
.dl-tools {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: var(--blue-tint);
  border-radius: 14px;
  margin-bottom: 36px;
  position: sticky; top: calc(var(--header-h) + 6px); z-index: 5;
}
.dl-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-search { flex: 1 1 280px; display: flex; justify-content: flex-end; }
.filter-btn {
  font: inherit; font-weight: 500; font-size: 1rem;
  padding: 9px 18px;
  border: 2px solid var(--blue-dark);
  border-radius: 999px;
  background: var(--white); color: var(--blue-dark);
  cursor: pointer;
}
.filter-btn:hover { background: var(--blue-tint); }
.filter-btn[aria-pressed="true"] { background: var(--blue-dark); color: var(--white); }
.dl-search input {
  font: inherit; font-size: 1.05rem;
  width: 100%; max-width: 420px;
  padding: 11px 16px;
  border: 2px solid var(--blue-dark);
  border-radius: 8px;
  color: var(--text);
}
.dl-search input::placeholder { color: #555; }
.dl-empty { font-size: 1.15rem; font-weight: 500; }

/* ---------- Document tables ---------- */
.dl-group { margin-bottom: 44px; }
.dl-group h2 {
  padding-bottom: 10px;
  border-bottom: 4px solid var(--blue-light);
}
.dl-table { width: 100%; border-collapse: collapse; font-size: 1.05rem; table-layout: fixed; }
/* same column widths in every group so the tables line up */
.dl-table th:nth-child(1) { width: 22%; }
.dl-table th:nth-child(2) { width: 36%; }
.dl-table th:nth-child(3) { width: 12%; }
.dl-table th:nth-child(4) { width: 15%; }
.dl-table th:nth-child(5) { width: 15%; }
.dl-table th {
  text-align: left; font-weight: 700; color: var(--blue-dark);
  padding: 12px 14px; border-bottom: 2px solid var(--line);
}
.dl-table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dl-table tbody tr:hover { background: #f5fafe; }
.dl-table td:first-child { font-weight: 700; }
.dl-cell { text-align: right; white-space: nowrap; }
.btn-small { padding: 8px 18px; font-size: .98rem; }
.file-badge {
  display: inline-block; min-width: 44px; text-align: center;
  padding: 2px 8px; margin-right: 6px;
  font-size: .8rem; font-weight: 700;
  color: var(--white); background: var(--red); border-radius: 5px;
}

/* Tables become cards on phones */
@media (max-width: 760px) {
  .dl-table thead { display: none; }
  .dl-table, .dl-table tbody, .dl-table tr, .dl-table td { display: block; width: 100%; }
  .dl-table tr { border: 2px solid var(--line); border-radius: 12px; margin-bottom: 14px; padding: 8px 4px; }
  .dl-table td { border: 0; padding: 6px 14px; }
  .dl-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; color: var(--blue-dark); }
  .dl-cell { text-align: left; }
  .dl-tools { position: static; }
  .dl-search input { width: 100%; }
  .dl-search { width: 100%; }
}

/* ---------- Videos ---------- */
.dl-videos { margin-top: 20px; }
.dl-videos h2 { padding-bottom: 10px; border-bottom: 4px solid var(--blue-light); }
.video-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px;
}
.video-card {
  margin: 0;
  border: 2px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--white);
}
.video-card video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--blue-dark); }
.video-card figcaption {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 16px 18px; font-size: 1.05rem;
}
.video-card figcaption span { color: var(--text-soft); white-space: nowrap; }

[hidden] { display: none !important; }
