/* Homepage About / Impact widget.
 * Donut rendering and external label layout are delegated to local Apache ECharts.
 * Elementor Style controls are empty by default and only override CSS variables after explicit edits.
 */

.ba-home-about-widget {
  --green: #069043;
  --green-700: #06783a;
  --green-050: #f2faf6;
  --gold: #b79254;
  --ink: #163027;
  --muted: #67766f;
  --max: 1280px;
  --ba-impact-chart-track: #e7eeea;
  --ba-impact-label-bg: rgba(255, 255, 255, .97);
  --ba-impact-label-border: #dfe8e3;
  --ba-impact-label-name: #485c52;
  --ba-impact-label-width: 132px;
  --ba-impact-label-radius: 13px;
  --ba-impact-label-name-size: 11px;
  --ba-impact-label-value-size: 16px;
  --ba-impact-label-line-length: 8px;
  --ba-impact-label-edge-distance: 14px;
  background: linear-gradient(180deg, #fbfdfc 0%, #f6faf8 100%);
  padding: 56px 0 52px;
  color: var(--ink);
  font-family: YekanBakh, IRANSans, "Vazirmatn", Tahoma, Arial, sans-serif;
  line-height: 1.8;
}

.ba-home-about-widget,
.ba-home-about-widget * {
  box-sizing: border-box;
}

.ba-home-about-widget a {
  color: inherit;
  text-decoration: none;
}

.ba-home-about-widget :focus-visible {
  outline: 3px solid rgba(6, 144, 67, .28);
  outline-offset: 3px;
}

.ba-home-about-widget .ba-container {
  width: min(var(--max), calc(100% - 40px));
  margin: auto;
}

.ba-home-about-widget .ba-impact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr);
  gap: 0;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe8e0;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(7, 76, 44, .045);
}

.ba-home-about-widget .ba-impact__content {
  min-width: 0;
  align-self: stretch;
  padding: 34px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.ba-home-about-widget .ba-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 18px;
}

.ba-home-about-widget .ba-section-heading--stack {
  display: block;
  margin-bottom: 0;
}

.ba-home-about-widget .ba-section-heading__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--green-700);
  font-weight: 800;
  font-size: 12px;
}

.ba-home-about-widget .ba-section-heading__eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.ba-home-about-widget .ba-section-heading__title {
  max-width: 680px;
  margin: 5px 0 8px;
  font-size: var(--ba-heading-title-size, clamp(25px, 2.45vw, 34px));
  line-height: 1.42;
  letter-spacing: -.45px;
}

.ba-home-about-widget .ba-impact__text {
  max-width: 700px;
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 16px;
  text-align: justify;
  line-height: 1.95;
  flex: 1 1;
}

.ba-home-about-widget .ba-impact__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.ba-home-about-widget .ba-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid #b9d7c5;
  color: var(--green-700);
  background: #fff;
  border-radius: 10px;
  padding: 9px 14px;
  box-shadow: none;
}

.ba-home-about-widget .ba-impact__actions .ba-button {
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    background-color 200ms ease,
    color 200ms ease,
    box-shadow 200ms ease;
}

.ba-home-about-widget .ba-impact__actions .ba-button:hover {
  transform: translateY(-2px);
  border-color: var(--green-700);
  background: var(--green-700);
  color: #fff;
  box-shadow: 0 8px 18px rgba(7, 76, 44, .14);
}

.ba-home-about-widget .ba-impact__actions .ba-button:active {
  transform: translateY(0);
  box-shadow: 0 3px 9px rgba(7, 76, 44, .10);
}

.ba-home-about-widget .ba-impact__funding {
  position: relative;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 0px;
  background: #f5faf7;
  border: 0;
  border-inline-start: 1px solid #dfeae4;
  border-radius: 0;
  overflow: hidden;
}

.ba-home-about-widget .ba-impact__funding-visual {
  position: relative;
  min-height: 370px;
}

.ba-home-about-widget .ba-impact__chart-wrap {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
}

.ba-home-about-widget .ba-impact__chart {
  width: 100%;
  height: 100%;
  min-height: 370px;
  direction: ltr;
  unicode-bidi: isolate;
}

.ba-home-about-widget .ba-impact__chart-values {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  direction: ltr;
}

.ba-home-about-widget .ba-impact__chart-value-row {
  position: absolute;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  color: var(--ba-impact-source-color);
  font-family: inherit;
  font-size: var(--ba-impact-label-value-size);
  font-weight: 900;
  line-height: 1.35;
  white-space: nowrap;
  direction: ltr;
  opacity: 0;
}

.ba-home-about-widget .ba-impact__chart-value-number {
  order: 2;
  direction: ltr;
  unicode-bidi: isolate;
}

.ba-home-about-widget .ba-impact__chart-value-unit {
  order: 1;
  direction: rtl;
  unicode-bidi: isolate;
  font-weight: 800;
}

.ba-home-about-widget .ba-impact__donut-center {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(112px, 30%, 148px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #dfe9e3;
  box-shadow: 0 10px 30px rgba(7, 76, 44, .08);
  text-align: center;
  pointer-events: none;
}

.ba-home-about-widget .ba-impact__donut-total {
  color: var(--green-700);
  font-size: clamp(29px, 3vw, 38px);
  line-height: 1;
  font-weight: 950;
  direction: ltr;
}

.ba-home-about-widget .ba-impact__donut-unit {
  margin-top: 5px;
  color: var(--green-700);
  font-size: 12px;
  font-weight: 800;
}

.ba-home-about-widget .ba-impact__donut-caption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.ba-home-about-widget .ba-impact__beneficiaries {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-top: -2px;
  padding: 0 8px 2px;
  text-align: center;
}

.ba-home-about-widget .ba-impact__beneficiaries-label {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.ba-home-about-widget .ba-impact__beneficiaries-value {
  color: var(--green-700);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.35;
  direction: ltr;
}

@media (max-width: 1080px) {
  .ba-home-about-widget {
    padding: 50px 0 48px;
  }

  .ba-home-about-widget .ba-impact__grid {
    grid-template-columns: 1fr;
  }

  .ba-home-about-widget .ba-impact__content {
    padding: 28px 26px 26px;
  }

  .ba-home-about-widget .ba-impact__funding {
    width: 100%;
    margin: 0;
    padding: 18px 18px 14px;
    border-inline-start: 0;
    border-top: 1px solid #dfeae4;
  }

  .ba-home-about-widget .ba-impact__funding-visual {
    min-height: 430px;
  }

  .ba-home-about-widget .ba-impact__chart {
    min-height: 430px;
  }
}

@media (max-width: 760px) {
  .ba-home-about-widget {
    padding: 40px 0 38px;
    --ba-impact-label-width: 116px;
    --ba-impact-label-name-size: 10px;
    --ba-impact-label-value-size: 15px;
    --ba-impact-label-line-length: 6px;
    --ba-impact-label-edge-distance: 10px;
  }

  .ba-home-about-widget .ba-container {
    width: min(100% - 24px, var(--max));
  }

  .ba-home-about-widget .ba-impact__grid {
    border-radius: 18px;
  }

  .ba-home-about-widget .ba-impact__content {
    padding: 20px 16px 18px;
  }

  .ba-home-about-widget .ba-impact__actions .ba-button {
    flex: 1 1 calc(50% - 6px);
  }

  .ba-home-about-widget .ba-impact__funding {
    padding: 12px 10px 10px;
    gap: 6px;
  }

  .ba-home-about-widget .ba-impact__funding-visual,
  .ba-home-about-widget .ba-impact__chart {
    min-height: 380px;
  }

  .ba-home-about-widget .ba-impact__beneficiaries-label {
    font-size: 10px;
  }

  .ba-home-about-widget .ba-impact__beneficiaries-value {
    font-size: 18px;
  }
}

@media (max-width: 430px) {
  .ba-home-about-widget {
    --ba-impact-label-width: 104px;
    --ba-impact-label-name-size: 9px;
    --ba-impact-label-value-size: 14px;
    --ba-impact-label-line-length: 5px;
    --ba-impact-label-edge-distance: 8px;
  }

  .ba-home-about-widget {
    padding: 36px 0 34px;
  }

  .ba-home-about-widget .ba-impact__content {
    padding: 18px 14px 16px;
  }

  .ba-home-about-widget .ba-impact__actions .ba-button {
    flex-basis: 100%;
  }

  .ba-home-about-widget .ba-impact__funding {
    padding: 10px 8px 8px;
  }

  .ba-home-about-widget .ba-impact__funding-visual,
  .ba-home-about-widget .ba-impact__chart {
    min-height: 350px;
  }

  .ba-home-about-widget .ba-impact__beneficiaries {
    margin-top: -4px;
    padding-bottom: 0;
  }

  .ba-home-about-widget .ba-impact__beneficiaries-value {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ba-home-about-widget .ba-impact__actions .ba-button {
    transition: none;
  }

  .ba-home-about-widget .ba-impact__actions .ba-button:hover,
  .ba-home-about-widget .ba-impact__actions .ba-button:active {
    transform: none;
  }
}
