@import "./common-var.css";

.numbers-section {
  position: relative;
  color: var(--white);
  background: var(--background-dark);
}

.numbers-section__bg {
  position: absolute;
  inset: 0;
  background: var(--background-dark);
  z-index: 0;
}

.numbers-wrapper {
  position: relative;
  z-index: 2;
}

.numbers-title {
  margin-bottom: 48px;

  @media (max-width: 991px) {
    margin-bottom: 40px;
  }

  @media (max-width: 576px) {
    margin-bottom: 32px;
  }
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;

  

  @media (max-width: 991px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 30px;

    &::before {
      left: calc(50% - 15px);
      height: 100%;
    }

    &::after {
      display: none;
    }
  }

  @media (max-width: 576px) {  
    gap: 40px;

    &::before {
      display: none;
    }
  }
}

.numbers-grid::after {
  left: calc(75% - 15px);

  @media (max-width: 991px) {
    display: none;
  }
}

.number-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  &::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 175px;
    background: rgba(255, 255, 255, 0.12);
    
  }
  @media (max-width: 576px) { 
    &::after {
      display: none;
    }
  }
  &:nth-child(4n)::after {
    display: none;
  }
  @media (max-width: 991px) {
    &::after {
      height: 100%;
    }
    &:nth-child(2n)::after {
      display: none;
    }
  }
}

.number-item__label {
  font-family: var(--font-type1);
  font-size: 25px;
  font-weight: 700;
  line-height: 34px;
  color: #8C684A;

  @media (max-width: 1200px) {
    font-size: 22px;
    line-height: 30px;
  }

  @media (max-width: 576px) {
    font-size: 20px;
    line-height: 28px;
  }
}

.number-item__unit {
  font-family: var(--font-type1);
  font-size: 25px;
  font-weight: 700;
  line-height: 34px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 6px;

  @media (max-width: 1200px) {
    font-size: 22px;
    line-height: 30px;
  }

  @media (max-width: 576px) {
    font-size: 20px;
    line-height: 28px;
  }
}

.sar-icon {
  fill: var(--white);
  width: 16px;
  height: 18px;
  flex-shrink: 0;
}

.number-item__value {
  margin-top: 8px;

  .counter-number {
    font-family: var(--font-type1);
    font-size: 70px;
    font-weight: 700;
    line-height: 1;
    color: var(--white);

    @media (max-width: 1366px) {
      font-size: 60px;
    }

    @media (max-width: 1200px) {
      font-size: 54px;
    }

    @media (max-width: 991px) {
      font-size: 50px;
    }

    @media (max-width: 576px) {
      font-size: 38px;
    }
  }
}

/* RTL Support */
[dir="rtl"] {
  .numbers-grid {
    &::before {
      left: auto;
      right: calc(25% - 15px);
    }

    &::after {
      left: auto;
      right: calc(50% - 15px);

      @media (min-width: 992px) {
        right: calc(75% - 15px);
      }
    }

    @media (max-width: 991px) {
      &::before {
        left: auto;
        right: calc(50% - 15px);
      }
    }
  }

  .number-item {
    text-align: right;
    &::after{
      right: auto;
      left: 0;
    }
  }
}
