/* ============================================================
   BecomingX Africa — Responsive Panel Styles
   Prefix: dg-bx-
   Add to site stylesheet. Targets all module components.
   ============================================================ */

/* ─── Page wrapper ──────────────────────────────────────────── */
.dg-bx-page {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 60px auto;
  box-sizing: border-box;
  padding: 0 20px;
}

/* ─── Introduction outer wrapper (black bg) ─────────────────── */
.dg-bx-intro-outer {
  width: 100%;
  background: #000;
  padding: 60px 20px;
  box-sizing: border-box;
}

.dg-bx-intro-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  color: #fff;
}

/* ─── Hero image block ──────────────────────────────────────── */
.dg-bx-hero {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 40px;
}

.dg-bx-hero__img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}

.dg-bx-hero__overlay {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  text-align: center;
  padding: 40px 40px 50px 40px;
  box-sizing: border-box;
}

.dg-bx-hero__title {
  color: #fff;
  font-size: 56px;
  font-weight: bold;
  line-height: 1.05;
  max-width: 900px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.dg-bx-hero__number {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  margin: 0 auto 20px auto;
  box-sizing: border-box;
}

.dg-bx-hero__label {
  font-size: 22px;
  font-weight: 600;
  margin: 0 auto 20px auto;
}

/* ─── Overlapping image + colour box (intro & employer quote) ── */
.dg-bx-overlap {
  display: flex;
  align-items: flex-start;
  position: relative;
  margin-bottom: 50px;
}

.dg-bx-overlap__img {
  width: calc(50% + 25px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.dg-bx-overlap__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dg-bx-overlap__box {
  width: calc(50% + 25px);
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 40px;
  box-sizing: border-box;
  position: relative;
  margin-left: -50px;
  margin-top: 50px;
  z-index: 2;
  flex-shrink: 0;
}

/* Colour variants */
.dg-bx-overlap__box--path     { background: #4f867f; color: #fff; }
.dg-bx-overlap__box--jobs     { background: #68a3cf; color: #fff; }
.dg-bx-overlap__box--starting { background: #ece329; color: #222; }
.dg-bx-overlap__box--investing{ background: #f4b23a; color: #000; }

.dg-bx-overlap__quote-label {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 10px;
}

.dg-bx-overlap__quote-name {
  margin-bottom: 0;
}

/* ─── Activity title bar ────────────────────────────────────── */
.dg-bx-activity-bar {
  width: 100%;
  background: #000;
  border-radius: 10px;
  padding: 20px 32px;
  box-sizing: border-box;
  margin: 25px 0;
}

.dg-bx-activity-bar__text {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

.dg-bx-activity-bar__label {
  color: #fff;
}

/* Accent colour on activity title word */
.dg-bx-activity-bar__accent--path     { color: #4f867f; }
.dg-bx-activity-bar__accent--jobs     { color: #68a3cf; }
.dg-bx-activity-bar__accent--starting { color: #ece329; }
.dg-bx-activity-bar__accent--investing{ color: #f4b23a; }

/* ─── Question pills ────────────────────────────────────────── */
.dg-bx-pills {
  margin-bottom: 20px;
}

.dg-bx-pill {
  width: 100%;
  border: 2px solid #d9d9d9;
  border-radius: 10px;
  padding: 9px 14px;
  box-sizing: border-box;
  margin-bottom: 14px;
}

.dg-bx-pill:last-child {
  margin-bottom: 0;
}

/* ─── Page navigation bar ───────────────────────────────────── */
.dg-bx-nav {
  display: flex;
  align-items: center;
  margin-top: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.dg-bx-nav__pages {
  display: flex;
  flex: 1 1 auto;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

/* Nav button — active */
.dg-bx-nav__btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1;
  background: transparent;
  white-space: nowrap;
}

/* Nav button — disabled */
.dg-bx-nav__btn--disabled {
  border: 2px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.4);
  pointer-events: none;
}

/* Colour variants for active nav buttons */
.dg-bx-nav__btn--path     { border: 2px solid #4f867f; color: #4f867f; }
.dg-bx-nav__btn--jobs     { border: 2px solid #68a3cf; color: #68a3cf; }
.dg-bx-nav__btn--starting { border: 2px solid #ece329; color: #ece329; }
.dg-bx-nav__btn--investing{ border: 2px solid #f4b23a; color: #f4b23a; }

/* Page number circles */
.dg-bx-nav__num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.dg-bx-nav__num--inactive {
  background: transparent;
  color: #777;
  border: 2px solid #d8d8d8;
}

.dg-bx-nav__num--path     { background: #4f867f; color: #fff; border: 2px solid #4f867f; }
.dg-bx-nav__num--jobs     { background: #68a3cf; color: #fff; border: 2px solid #68a3cf; }
.dg-bx-nav__num--starting { background: #ece329; color: #fff; border: 2px solid #ece329; }
.dg-bx-nav__num--investing{ background: #f4b23a; color: #fff; border: 2px solid #f4b23a; }

/* Pill-shaped page labels (Introduction / Conclusion) */
.dg-bx-nav__pill {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  box-sizing: border-box;
  white-space: nowrap;
}

.dg-bx-nav__pill--inactive {
  background: transparent;
  color: #777;
  border: 2px solid #d8d8d8;
}

.dg-bx-nav__pill--active-path     { background: transparent; color: #fff; border: 2px solid #4f867f; }
.dg-bx-nav__pill--active-jobs     { background: transparent; color: #fff; border: 2px solid #68a3cf; }
.dg-bx-nav__pill--active-starting { background: transparent; color: #fff; border: 2px solid #ece329; }
.dg-bx-nav__pill--active-investing{ background: transparent; color: #fff; border: 2px solid #f4b23a; }

.dg-bx-nav__pill--filled-path     { background: #4f867f; color: #fff; border: 2px solid #4f867f; }
.dg-bx-nav__pill--filled-jobs     { background: #68a3cf; color: #fff; border: 2px solid #68a3cf; }
.dg-bx-nav__pill--filled-starting { background: #ece329; color: #fff; border: 2px solid #ece329; }
.dg-bx-nav__pill--filled-investing{ background: #f4b23a; color: #fff; border: 2px solid #f4b23a; }

/* ─── Centred diagram block ─────────────────────────────────── */
.dg-bx-diagram {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.dg-bx-diagram__inner {
  width: 50%;
  aspect-ratio: 1 / 1;
}

.dg-bx-diagram__inner--wide {
  width: 70%;
}

.dg-bx-diagram__inner--wider {
  width: 75%;
}

.dg-bx-diagram__inner--left {
  width: 80%;
  margin-bottom: 30px;
}

.dg-bx-diagram__inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ─── View full-size button ─────────────────────────────────── */
.dg-bx-view-btn {
  margin: 20px 0 30px;
  text-align: center;
}

.dg-bx-view-btn a {
  display: inline-block;
  padding: 12px 24px;
  color: #fff;
  text-decoration: none;
  border-radius: 40px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dg-bx-view-btn--path     a { background: #4f867f; }
.dg-bx-view-btn--jobs     a { background: #68a3cf; }
.dg-bx-view-btn--starting a { background: #ece329; color: #000; }
.dg-bx-view-btn--investing a { background: #f4b23a; color: #000; }

/* ─── Tables ────────────────────────────────────────────────── */
.dg-bx-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

.dg-bx-table th {
  border: 2px solid #222;
  padding: 10px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.dg-bx-table td {
  border: 2px solid #222;
  padding: 8px 12px;
  text-align: center;
}

.dg-bx-table th--path     { color: #4f867f; }
.dg-bx-table th--jobs     { color: #68a3cf; }
.dg-bx-table th--starting { color: #ece329; }
.dg-bx-table th--investing{ color: #f4b23a; }

/* Dark header tables (Starting Strong / Investing in Yourself activity tables) */
.dg-bx-table--dark th,
.dg-bx-table--dark td.dg-bx-table__header-cell {
  background: #222;
  color: inherit;
}

/* ─── Callout box (used in Investing p4) ────────────────────── */
.dg-bx-callout {
  background: #f8f8f8;
  border-left: 6px solid #f4b23a;
  padding: 18px 20px;
  margin: 25px 0;
  border-radius: 4px;
}

/* ─── CTA / grey panel (new component) ──────────────────────── */
.dg-bx-panel {
  width: 100%;
  box-sizing: border-box;
  padding: 60px 40px;
  text-align: center;
}

.dg-bx-panel__heading {
  margin: 0 0 16px;
  font-size: 2rem;
}

.dg-bx-panel__text {
  margin: 0 0 24px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.dg-bx-panel--grey       { background-color: #808080; color: #ffffff; }
.dg-bx-panel--path       { background-color: #4f867f; color: #ffffff; }
.dg-bx-panel--jobs       { background-color: #68a3cf; color: #ffffff; }
.dg-bx-panel--investing  { background-color: #f4b23a; color: #1a1a1a; }
.dg-bx-panel--starting   { background-color: #ece329; color: #1a1a1a; }

.dg-bx-panel--grey .dg-bx-panel__heading,
.dg-bx-panel--grey .dg-bx-panel__text,
.dg-bx-panel--path .dg-bx-panel__heading,
.dg-bx-panel--path .dg-bx-panel__text,
.dg-bx-panel--jobs .dg-bx-panel__heading,
.dg-bx-panel--jobs .dg-bx-panel__text { color: #ffffff; }

.dg-bx-panel--investing .dg-bx-panel__heading,
.dg-bx-panel--investing .dg-bx-panel__text,
.dg-bx-panel--starting .dg-bx-panel__heading,
.dg-bx-panel--starting .dg-bx-panel__text { color: #1a1a1a; }


/* ============================================================
   BREAKPOINTS
   ============================================================ */

@media (max-width: 1024px) {
  .dg-bx-hero__title { font-size: 44px; }
  .dg-bx-panel { padding: 50px 30px; }
  .dg-bx-panel__heading { font-size: 1.75rem; }
}

@media (max-width: 768px) {

  /* Page wrapper */
  .dg-bx-page { padding: 0 16px; }

  /* Intro outer */
  .dg-bx-intro-outer { padding: 40px 16px; }

  /* Hero */
  .dg-bx-hero__img { height: 220px; }
  .dg-bx-hero__overlay { padding: 20px 20px 30px 20px; }
  .dg-bx-hero__title { font-size: 28px; }
  .dg-bx-hero__number { width: 40px; height: 40px; font-size: 20px; margin-bottom: 12px; }

  /* Overlapping image/box — stack vertically on mobile */
  .dg-bx-overlap { flex-direction: column; }
  .dg-bx-overlap__img {
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 0;
  }
  .dg-bx-overlap__box {
    width: 100%;
    aspect-ratio: auto;
    margin-left: 0;
    margin-top: 0;
    border-radius: 0 0 10px 10px;
    padding: 24px;
  }

  /* Activity bar */
  .dg-bx-activity-bar { padding: 16px 20px; }
  .dg-bx-activity-bar__text { font-size: 18px; }

  /* Diagrams */
  .dg-bx-diagram__inner,
  .dg-bx-diagram__inner--wide,
  .dg-bx-diagram__inner--wider,
  .dg-bx-diagram__inner--left { width: 100%; }

  /* Nav — restructure into clear rows instead of one wrapping flex row */
  .dg-bx-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .dg-bx-nav > div:first-child,
  .dg-bx-nav > div:last-child {
    display: flex;
    width: 100%;
  }
  .dg-bx-nav > div:first-child { justify-content: flex-start; order: 1; }
  .dg-bx-nav__pages { order: 2; width: 100%; justify-content: center; gap: 8px; }
  .dg-bx-nav > div:last-child { justify-content: flex-end; order: 3; }
  .dg-bx-nav__num { width: 34px; height: 34px; font-size: 12px; }
  .dg-bx-nav__pill { font-size: 12px; padding: 0 12px; min-height: 34px; }
  .dg-bx-nav__btn { font-size: 11px; padding: 8px 16px; }

  /* Tables — make scrollable */
  .dg-bx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dg-bx-table { min-width: 480px; }
  .dg-bx-table th { font-size: 14px; padding: 8px; }
  .dg-bx-table td { font-size: 13px; padding: 6px 8px; }

  /* CTA panel */
  .dg-bx-panel { padding: 40px 20px; }
  .dg-bx-panel__heading { font-size: 1.5rem; }
  .dg-bx-panel__text { font-size: 1rem; }
}

@media (max-width: 480px) {

  /* Hero */
  .dg-bx-hero__img { height: 180px; }
  .dg-bx-hero__title { font-size: 22px; }

  /* Nav — too narrow for pills: hide them, Back and Next on one row */
  .dg-bx-nav {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .dg-bx-nav__pages { display: none; }
  .dg-bx-nav > div:first-child { justify-content: flex-start; width: auto; }
  .dg-bx-nav > div:last-child { justify-content: flex-end; width: auto; }

  /* CTA panel */
  .dg-bx-panel { padding: 30px 16px; }
  .dg-bx-panel__heading { font-size: 1.25rem; }
}
