/* ------------------------------
* Counter Content Block (2026-09-26)
* ------------------------------
*/

.counter-wrapper {

  /* ------------------------------
  *  Default (2026-09-26)
  * ------------------------------
  */

  &.template-counter-default {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--ukm-space-small_16-32);
    font-size: clamp(26px, calc(18px + 1.5vw), 45px);
    background-color: var(--primary-300);
    border: 1px solid var(--primary-700);
    border-radius: .25em;
    padding: .4em 0 .7em 0;

    .counter-header-bodytext-icon {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-bottom: var(--ukm-space-small_16-32);

      .header {
        font-size: .75em;
        font-weight: 600;
      }

      .subheader {
        font-size: .55em;
      }

      .icon {
        height: 1.6em;
        width: auto;
        margin-top: var(--ukm-space-small_16-32)
      }
    }

    .counter-footer-label {
      display: flex;
      justify-content: center;
      align-items: baseline;
      column-gap: .1em;
      text-align: center;
      width: 100%;

      .label-start {
        font-size: .5em;
        text-align: right;
        flex-basis: 33%;
      }

      .counter {
        font-size: 1.5em;
        line-height: 1;
        font-feature-settings: "tnum";
        flex-basis: 33%;
      }

      .label-end {
        font-size: .5em;
        text-align: left;
        flex-basis: 33%;
      }
    }
  }

  /* ------------------------------
  * template-counter-pro-1 (2026-09-26)
  * ------------------------------
  */

  &.template-counter-pro-1 {
    font-size: clamp(26px, calc(18px + 1.5vw), 45px);
    background-color: var(--primary-300);
    border-radius: .25em;
    padding: .4em 0 .7em 0;

    .counter-header-bodytext-icon {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-bottom: var(--ukm-space-small_16-32);

      .header {
        font-size: .75em;
      }

      .subheader {
        font-size: .55em;
      }
    }

    .svg-and-counter {
      .counter-inner {
        display: flex;
        justify-content: center;
        align-items: baseline;
        font-size: 1em;
        position: relative;

        .counter {
          display: flex;
          justify-content: center;
          align-items: center;
          position: absolute;
          height: 100%;
          font-size: var(--font-size-h3_22-60);
          font-weight: var(--font-weight-bold);
          font-feature-settings: 'tnum';
          line-height: 1;
          color: var(--counter-circle-number);

          &.move-up {
            padding-bottom: 0.2em;
          }
        }

        svg {
          transform: rotate(-90deg) scale(1);
          background: transparent;
          border-radius: 50%;
        }

        circle.circle-animated.count-up {
          fill: transparent;
          stroke: var(--counter-circle-animated);
          stroke-width: 10;
          stroke-dasharray: 0 158;
          animation-iteration-count: 1;
        }

        circle.circle-animated.count-down {
          fill: transparent;
          stroke: var(--counter-circle-animated);
          stroke-width: 10;
          stroke-dasharray: 158 158;
          animation-iteration-count: 1;
        }

        circle.circle-trace {
          fill: transparent;
          stroke: var(--counter-circle-tracer);
          stroke-width: 10;
          stroke-dasharray: 158 158;
        }

        .counter-after {
          position: absolute;
          bottom: 1.2em;
          justify-content: center;
          font-size: .6em;
          font-weight: var(--font-weight-bold);
          color: var(--primary);
        }

        @keyframes fill-up {
          to {
            stroke-dasharray: 158 158;
          }
        }
        @keyframes fill-down {
          to {
            stroke-dasharray: 0 158;
          }
        }
      }
    }
  }

  &.effect-if-in-viewport {
    &.show {
      circle.circle-animated.count-up {
        animation: fill-up 1.3s linear forwards;
      }

      circle.circle-animated.count-down {
        animation: fill-down 1.3s linear forwards;
      }
    }
  }
}


.section.outer-counter {
  &.fp-table {
    justify-content: flex-start;
    padding-top: 40px;

    @media (min-width: var(--bs-breakpoint-lg)) {
      padding-top: 64px;
    }

    #c56-stage-slider {
      margin-bottom: 8px;
    }
  }
}


.row {
  &.row-counter {
    --bs-gutter-x: 180px;
    margin: 0 auto;
    max-width: var(--bs-breakpoint-sm);

    @media (min-width: 375px) {
      --bs-gutter-x: 220px;
    }

    @media (min-width: 430px) {
      --bs-gutter-x: 250px;
    }

    @media (min-width: 500px) {
      --bs-gutter-x: 260px;
    }

    @media (min-width: var(--bs-breakpoint-sm)) {
      --bs-gutter-x: 330px;
    }

    @media (min-width: var(--bs-breakpoint-md)) {
      max-width: var(--bs-breakpoint-md);
      --bs-gutter-x: 80px;
    }
    @media (min-width: var(--bs-breakpoint-lg)) {
      max-width: var(--bs-breakpoint-lg);
    }
    @media (min-width: var(--bs-breakpoint-xl)) {
      font-size: 150px;
      max-width: var(--bs-breakpoint-xl);
      --bs-gutter-x: 180px;
    }
    @media (min-width: var(--bs-breakpoint-xxl)) {
      max-width: var(--bs-breakpoint-xxl);
      --bs-gutter-x: 220px;
    }

    .counter-wrapper {
      display: flex;
      flex-direction: column;
      padding: var(--ukm-space-small_16-32);

      .header {
        font-weight: var(--font-weight-bold);
        color: var(--primary);
      }

      .subheader {
        font-size: var(--font-size-h3_22-60);
      }
    }
  }
}
