.sf-market-growth {
  background-image: url("../images/help-us.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  position: relative;
}

.sf-market-growth .sfmg-inner-content {
  position: relative;
}

.sf-market-growth .sfmg-wrapper {
  background-image: url("../images/help-us.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  position: relative;
}

.sf-market-growth .sfmg-content {
  padding: 40px 0;
}

.sf-market-growth .overlay-grow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #101010AB;
  z-index: 0;
}

.sf-market-growth .sfmg-chart {
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.25);
  border-radius: 50px;
  /* border: 2px solid #BF1E2E; */
  margin-top: 40px;
  margin-bottom: -120px;
  background-color: #333333;
  padding: 20px;
}

/* .sf-market-growth .data {
  position: relative !important;
  color: #FFF !important;
  background-color: #101010AB;
  z-index: 9999 !important;
}

.sf-market-growth .bar {
  position: relative !important;
  color: #FFF !important;
  background-color: #101010AB;
  z-index: 0 !important;
} */

.sf-market-growth #chart-animation .column {
  --aspect-ratio: 4 / 3;
  --labels-size: 30px;
}

.sf-market-growth #chart-animation th[scope="row"] {
  color: white;
}

.sf-market-growth #chart-animation .column tbody tr {
  border-color: white;
}

.sf-market-growth #chart-animation td {
  position: relative;
  background: transparent;
  overflow: hidden;
  --size: 0;
}

.sf-market-growth .animate-bars.animated #chart-animation td::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background-color: #BF1E2E;
  animation: grow-bar 2s ease-out forwards;
}

.sf-market-growth #chart-animation tr:nth-child(1) td {
  animation-delay: 0s;
}
.sf-market-growth #chart-animation tr:nth-child(2) td {
  animation-delay: 0.3s;
}
.sf-market-growth #chart-animation tr:nth-child(3) td {
  animation-delay: 0.6s;
}

@keyframes grow-bar {
  to {
    height: 100%;
  }
}


@media (min-width: 992px) {
  .sf-market-growth {
    text-align: start;
    background: transparent;
  }

  .sf-market-growth .sfmg-chart {
    position: absolute;
    z-index: 6;
    top: -40px;
    bottom: -60px;
    right: 0;
    left: 50%;
    margin: 0;
  }

  .sf-market-growth #chart-animation .column {
    --aspect-ratio: 3 / 3;
    --labels-size: 60px;
  }

  .sf-market-growth #chart-animation .column tbody th {
    font-size: 32px;
  }

  .sf-market-growth #chart-animation .column tbody tr:not(:last-child) th::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 2px;
    background-color: white;
    position: absolute;
    top: 60%;
    right: -12%;
  }
}

@media (min-width: 1200px) {
  .sf-market-growth #chart-animation .column {
    --aspect-ratio: 4 / 3;
  }

  .sf-market-growth #chart-animation .column tbody tr:not(:last-child) th::after {
    width: 48px;
    right: -18%;
  }

  .sf-market-growth .sfmg-chart {
    bottom: -40px;
  }
}


.bar-group {
      display: flex;
      align-items: flex-end;
      justify-content: center;
      gap: 24px;
      height: 430px;
      padding: 40px;
   }
   .bar-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 105px;
   }
   .graph-data {
      color: #fff;
      margin-bottom: 8px;
   }
   .bar {
      width: 120px;
      background: #bf1e2e;
      margin-bottom: 10px;
      height: 0;
      animation: growBar 1s ease-out forwards;
   }
   .bar1 { --bar-final: 158px; animation-delay: 0s;}
   .bar2 { --bar-final: 200px; animation-delay: .15s;}
   .bar3 { --bar-final: 240px; animation-delay: .3s;}
   .bar4 { --bar-final: 302px; animation-delay: .45s;}

   @keyframes growBar {
      to { height: var(--bar-final); }
   }
   .label {
      margin-top: 6px;
      color: #FFF;
      font-weight: 800;
      font-size: 25px;
   }
   .bar-label {
      margin-top: 6px;
      color: #FFF;
      font-weight: 700;
      font-size: 20px;
   }
   @media (min-width: 992px) and (max-width: 1199px) {
      .bar { width: 70px; }
   }
   @media (max-width: 991px) {
      .bar-group { gap: 24px; }
      .bar { width: 120px; }
   }
   @media (max-width: 430px) {
      .bar-group { gap: 0px; }
      .bar { width: 70px; }
   }


   @media (max-width: 991px) {
  .sf-market-growth .sfmg-content {
    padding: 20px 0 10px 0; /* Reduced bottom padding to close text-chart gap */
  }

  .sf-market-growth .sfmg-chart {
    margin-top: 0; /* Tighten the space */
    margin-bottom: -80px; /* Still allows the rounded box to hang */
    padding: 20px 12px;
    border-radius: 40px;
  }

  .sf-market-growth .sfmg-wrapper {
    background-attachment: scroll; /* Prevent stuttering on mobile */
  }

  .sf-market-growth .overlay-grow {
    height: 100%;
    min-height: 100%; /* Ensures full coverage */
    z-index: 1;
  }

  .sf-market-growth .sfmg-inner-content {
    position: relative;
    z-index: 2;
  }

  .sf-market-growth .bar-label {
    font-size: 18px;
  }

  .sf-market-growth .label {
    font-size: 20px;
  }

  .bar-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 30px 0;
  }

  .bar-item {
    min-width: 70px;
  }
}

.sf-market-growth {
  position: relative;
  padding: 0 !important;
}

.sf-market-growth .sfmg-wrapper {
  min-height: 100%;
  position: relative;
}

/* .sf-market-growth .overlay-grow {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(16, 16, 16, 0.67);
  z-index: 1;
  pointer-events: none;
} */

.sfmg-content {
    color:#fff !important;
    z-index: 9 !important;
  }

.sf-market-growth .sfmg-content {
  padding: 20px 16px 0 16px;
  margin-bottom: 0;
}

.sf-market-growth .sfmg-chart {
  margin-top: 0;
  margin-bottom: -60px;
  padding: 12px;
}

@media (max-width: 768px) {
  .sf-market-growth .sfmg-content {
    padding-top: 16px;
    padding-bottom: 0;
  }

  .sf-market-growth .sfmg-chart {
    margin-top: 0;
    padding-top: 12px;
  }

  .bar-group {
    padding-top: 20px;
  }
}

/* Tighter spacing for mobile */
@media (max-width: 768px) {
  .sf-market-growth .sfmg-content {
    padding-top: 12px;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .sf-market-growth .section-title h2 {
    margin-bottom: 8px; /* Reduce space below headline */
  }

  .sf-market-growth .sfmg-content p {
    margin-bottom: 4px; /* Reduce space below paragraph */
  }

  .sf-market-growth .sfmg-chart {
    margin-top: 0;
    padding-top: 8px;
    padding-bottom: 12px;
  }

  .bar-group {
    padding-top: 12px;
  }
}
@media (max-width: 768px) {
  .sf-market-growth .pb-xl {
    padding-bottom: 50px !important; /* or even 40px if you want it extra snug */
  }
}
