/*
 * Small brand overlay on top of DocFX's built-in "modern" template (which already ships
 * responsive layout, a mobile nav and a light/dark toggle -- this file only adjusts colour and
 * adds the landing-page card grid / report-viewer styles used by docs/home.md and
 * docs/report-pages/*.md). See docs/guide/embed-html-in-site.en.md for how these classes are used.
 */

:root {
  /* A calm, desaturated blue -- consistent with the other two course templates' RTEU branding. */
  --bs-primary: #245b8c;
  --bs-primary-rgb: 36, 91, 140;
  --bs-link-color-rgb: 36, 91, 140;
  --rteu-card-bg: #f7f9fb;
  --rteu-card-border: #dbe3ea;
}

[data-bs-theme="dark"] {
  --rteu-card-bg: #1c2531;
  --rteu-card-border: #33404f;
}

/* ---- Landing page (docs/home.md) ---- */

.rteu-hero {
  padding: 1.25rem 0 0.5rem;
}

.rteu-badges img {
  margin: 0.15rem 0.2rem 0.15rem 0;
}

.rteu-cta {
  display: inline-block;
  margin: 0.75rem 0 1rem;
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  background-color: var(--bs-primary);
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
}

.rteu-cta:hover {
  background-color: #1a4568;
  color: #fff !important;
}

.rteu-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.rteu-card {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid var(--rteu-card-border);
  border-radius: 0.6rem;
  background: var(--rteu-card-bg);
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.rteu-card:hover {
  transform: translateY(-2px);
  border-color: var(--bs-primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.rteu-card-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--bs-primary);
}

.rteu-card-desc {
  font-size: 0.9rem;
  opacity: 0.85;
}

.rteu-card-tag {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
}

/* ---- Report-viewer pages (docs/report-pages/*.md) ---- */

.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

.report-toolbar a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 0.4rem;
  border: 1px solid var(--bs-primary);
  color: var(--bs-primary) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 600;
}

.report-toolbar a:hover {
  background-color: var(--bs-primary);
  color: #fff !important;
}

.report-frame-wrap {
  border: 1px solid var(--rteu-card-border);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--rteu-card-bg);
}

.report-frame {
  display: block;
  width: 100%;
  height: 78vh;
  min-height: 32rem;
  border: 0;
}

.report-fallback {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  opacity: 0.8;
}

@media (max-width: 40rem) {
  .report-frame {
    height: 65vh;
  }
}
