/* Documents & downloads (catalogue.html) — brochures, datasheets, catalogues,
   release notes, guides and security papers, grouped by type. */

.doc-hero { padding-bottom: 40px; }
.doc-lib { padding-top: 8px; }

/* Search + type chips */
.doc-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 36px; }
.doc-search {
  flex: 1 1 260px; max-width: 360px; display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff;
}
.doc-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.doc-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--text-tertiary); stroke-width: 2; stroke-linecap: round; }
.doc-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--text); }
.doc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-chip {
  height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--border); background: #fff;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all .15s;
}
.doc-chip:hover { border-color: var(--blue); color: var(--blue); }
.doc-chip.on { background: var(--text); border-color: var(--text); color: #fff; }
.doc-chip span { margin-inline-start: 4px; font-size: 12px; opacity: .7; }

/* One section per type */
.doc-sec { padding: 28px 0; border-top: 1px solid var(--border); }
.doc-sec:first-of-type { border-top: 0; padding-top: 0; }
.doc-sec-head { display: flex; align-items: center; gap: 10px; }
.doc-sec-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.3px; color: var(--text); }
.doc-count:not(:empty) {
  min-width: 24px; height: 24px; padding: 0 8px; border-radius: 12px; display: inline-grid; place-items: center;
  background: var(--bg-alt); border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text-secondary);
}
.doc-sec-sub { margin: 6px 0 18px; font-size: 15px; color: var(--text-secondary); max-width: 680px; line-height: 1.55; }
.doc-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.doc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 14px; }
.doc-card {
  display: flex; align-items: flex-start; gap: 16px; padding: 20px; border: 1px solid var(--border);
  border-radius: var(--radius); background: #fff; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.doc-card:hover { border-color: #CBD5E1; box-shadow: 0 10px 30px rgba(15,23,42,.07); transform: translateY(-2px); }
.doc-ico { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; }
.doc-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.doc-body { flex: 1; min-width: 0; }
.doc-body h3 { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.doc-body p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.doc-meta { display: inline-block; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--text-tertiary); letter-spacing: .2px; }
.doc-actions { display: flex; flex-direction: column; gap: 8px; flex: none; }
.doc-actions .btn { justify-content: center; gap: 6px; }
.doc-actions svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.doc-empty {
  grid-column: 1 / -1; padding: 18px 20px; border: 1px dashed var(--border); border-radius: var(--radius);
  background: var(--bg-alt); font-size: 14px; color: var(--text-secondary);
}
.doc-empty a { color: var(--blue); font-weight: 600; text-decoration: none; margin-inline-start: 4px; }
.doc-empty a:hover { text-decoration: underline; }
.doc-none { padding: 40px 0; text-align: center; color: var(--text-secondary); }

/* Type colours */
.doc-ico.blue { background: var(--blue-light); color: var(--blue-dark); }      .doc-dot.blue { background: var(--blue); }
.doc-ico.teal { background: #E6FFFA; color: #0F766E; }                         .doc-dot.teal { background: #14B8A6; }
.doc-ico.purple { background: #F3E8FF; color: #7C3AED; }                       .doc-dot.purple { background: var(--purple); }
.doc-ico.green { background: #DCFCE7; color: #15803D; }                        .doc-dot.green { background: var(--green); }
.doc-ico.orange { background: #FEF3C7; color: #B45309; }                       .doc-dot.orange { background: var(--orange); }
.doc-ico.slate { background: #F1F5F9; color: #334155; }                        .doc-dot.slate { background: #64748B; }

@media (max-width: 640px) {
  .doc-card { flex-wrap: wrap; }
  .doc-actions { flex-direction: row; width: 100%; padding-inline-start: 64px; }
  .doc-actions .btn { flex: 1; }
  .doc-search { max-width: none; }
}
