/* =========================================================
   Knowledge Base detail pages (guide + printable-file)
   printable-file.css imports this file.
   ========================================================= */

/* ---------- Hero ---------- */
.hero--kb-detail { padding: clamp(3rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 4.5rem); }
.hero--kb-detail .hero__content { text-align: left; }
.hero--kb-detail .hero__title { margin: 0 0 1.25rem; max-width: 18em; text-wrap: balance; }
.hero--kb-detail .hero__subtitle { margin: 0; max-width: 38rem; }
.kb-detail__crumb {
  display: flex;                                   /* (a block box: the hero spacing pulls it up, components.css) */
  width: fit-content;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 1.5rem;
  font-size: var(--fs-small);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s;
}
.kb-detail__crumb .icon { transform: rotate(180deg); }
.kb-detail__crumb:hover { color: #fff; }

/* ---------- Body ---------- */
.section--kb-detail { padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); background: #fff; }

.kb-detail__cover,
.kb-detail__video {
  margin: 0 0 2.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f1f3;
}
/* the frame hugs the photo: landscape photos use the full width, portrait photos (e.g. phone pictures) the full
   height of 34rem - no grey bars beside them and nothing cut off (feedback 27.09.) */
.kb-detail__cover { width: fit-content; max-width: 100%; background: none; }
.kb-detail__cover img { width: auto; max-width: 100%; height: auto; max-height: 34rem; display: block; }
.kb-prose img { max-height: 34rem; width: auto; object-fit: contain; }
.kb-detail__video { aspect-ratio: 16 / 9; background: #000; }
.kb-detail__video iframe,
.kb-detail__video video { width: 100%; height: 100%; border: 0; display: block; }

.kb-prose {
  font-size: var(--fs-body);
  line-height: 1.7;
  color: #213342;
}
.kb-prose + .kb-prose { margin-top: 1.5rem; }
.kb-prose > *:first-child { margin-top: 0; }
.kb-prose p { margin: 0 0 1.2em; }
.kb-prose h2 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; margin: 2em 0 0.7em; color: #213342; }
.kb-prose h3,
.kb-prose h4 { font-size: var(--fs-body); font-weight: 600; margin: 1.8em 0 0.6em; color: #213342; }
.kb-prose ul,
.kb-prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.kb-prose li { margin-bottom: 0.4em; }
.kb-prose a { color: #5912b5; text-decoration: underline; text-underline-offset: 3px; }
.kb-prose a:hover { color: #722be2; }
.kb-prose img { max-width: 100%; height: auto; border-radius: 8px; }
.kb-prose figure { margin: 2em 0; }
.kb-prose figcaption { font-size: var(--fs-small); color: #667085; margin-top: 0.5em; }
.kb-prose pre {
  font-size: var(--fs-small);
  background: #0f1b2d;
  color: #e6edf5;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
}
.kb-prose code { font-size: 0.92em; }
.kb-prose blockquote { margin: 1.5em 0; padding-left: 1.25rem; border-left: 3px solid #722be2; color: #475467; }
/* images, galleries and videos of "More images and texts": components.css (Content blocks) */

/* ---------- Buttons ---------- */
.kb-btn,
.kb-btn.btn--primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  font-size: var(--fs-ui);
  font-weight: 500;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  background: #5912b5;
  border-color: #5912b5;
  color: #fff;
  white-space: nowrap;
}
.kb-btn.btn--primary:hover { background: #4a0e99; border-color: #4a0e99; }

/* ---------- Downloads list (guide) ---------- */
.kb-downloads { margin-top: 3rem; }
.kb-downloads__title { font-size: var(--fs-h3); font-weight: 600; color: #213342; margin: 0 0 1rem; }
.kb-downloads__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.kb-downloads__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid #722be2;
  border-radius: 8px;
  background: #fff;
}
.kb-downloads__info { min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.kb-downloads__name { font-size: var(--fs-body); font-weight: 500; color: #213342; overflow-wrap: anywhere; }
.kb-downloads__meta { font-size: var(--fs-small); color: #667085; }

/* ---------- File box (printable file) ---------- */
.kb-filebox {
  display: flex;
  align-items: center;
  gap: 1.5rem 2rem;
  margin: 0 0 2.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: 8px;
  background: #f0f1f3;
}
.kb-filebox__icon { width: 64px; height: 64px; flex-shrink: 0; color: #333; }
.kb-filebox__icon img,
.kb-filebox__icon svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.kb-filebox__facts { flex: 1; display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; margin: 0; }
.kb-filebox__facts dt { font-size: var(--fs-small); color: #667085; margin: 0 0 0.1rem; }
.kb-filebox__facts dd { font-size: var(--fs-body); font-weight: 500; color: #213342; margin: 0; }
.kb-filebox__pending { font-size: var(--fs-small); color: #667085; max-width: 14rem; text-align: right; }

/* ---------- Footer / back link ---------- */
.kb-detail__footer { margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid #e3e6ea; }
.kb-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--fs-ui);
  font-weight: 500;
  color: #5912b5;
  text-decoration: none;
}
.kb-detail__back .icon { transform: rotate(180deg); transition: transform 0.2s; }
.kb-detail__back:hover .icon { transform: rotate(180deg) translateX(3px); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .kb-filebox { gap: 1.25rem 1.5rem; padding: 1.25rem 1.5rem; }
}
@media (max-width: 600px) {
  .kb-filebox { flex-direction: column; align-items: flex-start; }
  .kb-filebox__pending { text-align: left; max-width: none; }
  .kb-downloads__item { flex-direction: column; align-items: flex-start; }
  .kb-btn, .kb-btn.btn--primary { width: 100%; justify-content: center; }
}
