<template>
  <div class="d-flex">
    <svg style="position: absolute;" width="0" height="0">
      <defs>
        <linearGradient id="card-item-color" x1="50%" y1="0%" x2="50%" y2="100%">
          <stop offset="0%" stop-color="#00000033"></stop>
          <stop offset="100%" stop-color="#3eb29c66"></stop>
        </linearGradient>
      </defs>
    </svg>
    <dv-border-box-13 v-for="item in items" class="dv-box">
      <div class="card">
        <div class="card-left">
          <p class="card__title">{{ item.text }}</p>
          <p class="card__text">
            <span class="card__text--num">{{ item.num }}</span>
            <span class="card__text--unit">{{ item.unit }}</span>
          </p>
        </div>
        <div class="card-right">
          <SvgIcon icon-class="house" class="img"></SvgIcon>

          <div class="img-base">
            <div class="square1"></div>
          </div>
        </div>
      </div>
    </dv-border-box-13>
  </div>
</template>

<script>
import SvgIcon from "@/components/SvgIcon"
export default {
  components: {
    SvgIcon
  },
  data() {
    return {
      items: [
        {
          text: "资产总量",
          num: 36650,
          unit: "平方"
        },
        {
          text: "土地资产",
          num: 99966,
          unit: "亩"
        },
        {
          text: "房屋资产",
          num: 8888,
          unit: "平方"
        }
      ]
    }
  },
  methods: {},
  computed: {}
}
</script>

<style scoped lang="scss">
.card {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 20px 30px;
  &__title {
    line-height: 2;
    font-size: 22px;
    font-weight: 600;
    color: #73f3df;
  }
  &__text {
    color: #fff;
    font-size: 20px;

    &--num {
      font-size: 28px;
      font-weight: 600;
      padding-right: 10px;
    }
  }
  & > .card-right {
    z-index: 2;
    position: relative;
    & > .img {
      color: #73f3e0;
      width: 60px;
      height: 60px;
      z-index: 3;
      transform: translateY(-8px);
      position: relative;
    }
    .img-base {
      width: 100%;
      perspective: 100px;

      z-index: 1;
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;

      &::before {
        content: "";
        width: 110%;
        height: 100%;
        background: linear-gradient(to bottom, #00000033 , #61b9ac);
        transform: translateY(-86%);
        position: absolute;
        left: -5%;
        top: 0;
      }
      .square1 {
        background: linear-gradient(to bottom, #00000033 ,#4fa497);
        width: 100%;
        height: 34px;
        box-shadow: 0 0 2px 2px #7ddacd;
        transform: rotateX(45deg);
        position: relative;

        &::after {
          content: "";
          width: 120%;
          height: 136%;
          background: transparent;
          border: 2px solid #7ddacd;
          position: absolute;
          left: -10%;
          top: -18%;
        }
      }
    }
  }
}
.dv-box + .dv-box {
  margin-left: .5rem;
}
</style>
<style>
.dv-box path:nth-child(1) {
  fill: url(#card-item-color);
}
</style>
