.chart_inner {
    color: #000000;
}
.chart_inner .heading_1 {
font-size: 2.4rem;
}

.chart_inner h2.heading_1 {
    text-align: center;
}

  canvas {
    background-color: transparent;
    padding: 0;
    border-radius: 8px;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
  }


  #financialChart {
    height: 500px !important;
  }


  .chart-row {
    display: flex;
    /* align-items: center; */
    flex-wrap: wrap;
    width: 100%;
  }

  .chart-col-lg {
    width: 70%;
    padding: 0 30px 0 0;
  }

  .chart-col-sm {
    width: 30%;
  }

  /* Custom styling for different categories */
  .total-spending .color-box {
    background-color: #48567b;
  }

  .elderly-care .color-box {
    background-color: #357cd6;
  }

  .childrens-wedding .color-box {
    background-color: #234376;
  }

  .childrens-flat .color-box {
    background-color: #433f8c;
  }

  .childrens-education .color-box {
    background-color: #6f5de7;
  }

  .cars .color-box {
    background-color: #bd579b;
  }

  .holidays .color-box {
    background-color: #e567b3;
  }

  .philanthropy .color-box {
    background-color: #d1586b;
  }

  .discretionary-expenses .color-box {
    background-color: #df8537;
  }

  .base-expenses .color-box {
    background-color: #eab25f;
  }

  .all-categories .color-box {
    background-color: transparent;
    border: 2px solid white;
  }

  .chart-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 20px;
  }

  .chart-area {
    flex: 1;
    max-width: 70%;
  }

  .legend h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 500;
  }

  .legend a img {
    width: 28px;
    height: 28px;
  }

  .legend-item-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .legend a {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 38px;
    gap: 10px;
    padding: 1px 10px;
    margin-bottom: 3px;
    border-radius: 30px;
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.95);
  }

  .legend a.loaded {
    opacity: 1;
    transform: scale(1);
  }

  .legend a.hidden {
    opacity: 0.3 !important;
  }

  .legend a span.title {
    font-size: 12px;
    font-weight: 500;
    line-height: normal;
  }

  .legend a span.desc {
    font-size: 10px;
    font-weight: normal;
    line-height: normal;
  }

  .elderly-care {
    background-color: #357cd6;
  }

  .childrens-wedding {
    background-color: #234376;
  }

  .childrens-flat {
    background-color: #433f8c;
  }

  .childrens-education {
    background-color: #6f5de7;
  }

  .cars {
    background-color: #bd579b;
  }

  .holidays {
    background-color: #e567b3;
  }

  .philanthropy {
    background-color: #d1586b;
    color: #333;
  }

  .discretionary-expenses {
    background-color: #df8537;
  }

  .base-expenses {
    background-color: #eab25f;
    color: #333;
  }

  .total-spending {
    background-color: #48567b;
    pointer-events: none;
  }

  .legend a:hover {
    filter: brightness(1.1);
  }

  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(20px) scale(0.95);
    }

    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .legend a.animating {
    animation: slideUp 0.5s ease-out forwards;
  }

  

  @media (min-width: 768px) and (max-width: 1024px) {}

  @media (max-width: 1199px) {
     .chart_inner .heading_1 {
      font-size: 2.4rem;
    }

    .chart-col-lg {
      width: 100%;
      padding: 0 0 20px 0;
    }

    .chart-col-sm {
      width: 100%;
    }

    .chart_inner .heading_1 {
      margin: 0 0 14px 0;
    }
  }

  @media (max-width: 767px) {
    .chart-scroll-container {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    .chart_inner .heading_1 {
      font-size: 18px;
    }
    .chart-scroll-container {
      min-height: auto;
      min-width: 0;
      width: 100%;
    }
    .chart {
      padding-right: 0;
      margin-bottom: 20px;
    }

    canvas {
      padding: 0;
    }

    .legend {
      padding: 0;
      max-width: 100%;
    }

    #financialChart{
      height: auto!important;
      max-height: 300px;
    }

  }


  @keyframes introPulse {

    0%,
    10% {
      transform: scale(1);
    }

    /* idle */
    25% {
      transform: scale(1.03);
    }

    /* pulse up */
    40% {
      transform: scale(1);
    }

    /* back down */
    60%,
    100% {
      transform: scale(1);
    }

    /* pause here before second run */
  }

  .legend a.loaded {
    animation: introPulse 4s ease-in-out 2;
    /* longer total time, runs twice */
    animation-delay: var(--delay, 0s);
    animation-fill-mode: forwards;
  }

  /* Staggered wave */
  .legend a:nth-child(2) {
    --delay: 0.2s;
  }

  .legend a:nth-child(3) {
    --delay: 0.4s;
  }

  .legend a:nth-child(4) {
    --delay: 0.6s;
  }

  .legend a:nth-child(5) {
    --delay: 0.8s;
  }

  .legend a:nth-child(6) {
    --delay: 1s;
  }

  .legend a:nth-child(7) {
    --delay: 1.2s;
  }

  .legend a:nth-child(8) {
    --delay: 1.4s;
  }

  .legend a:nth-child(9) {
    --delay: 1.6s;
  }

  .legend a:nth-child(10) {
    --delay: 1.8s;
  }

  .legend a:nth-child(11) {
    --delay: 2s;
  }