<template>
  <div class="mta-card-lv4">

    <div class="mta-card-content-pc mta-hidden-xs" :class="[img.order > contentOrder ? 'img-left': 'img-right']">
      <img :style="`order:${img.order}`" :src="img.url">
      <div class="card-info" :style="`order: ${contentOrder}`">
        <p class="p-top">{{ des1 }}</p>
        <h5>解决方案</h5>
        <p class="p-bottom">{{des}}</p>
        <slot></slot>
      </div>
    </div>


    <div class="mta-card-content-h5 mta-hidden-sm">
      <img :src="img.url">
      <div class="card-info">
        <p class="p-top">{{ des1 }}</p>
        <h5>解决方案</h5>
        <em></em>
        <p class="p-bottom">{{des}}</p>
        <slot></slot>
      </div>
    </div>

  </div>
</template>

<script>
export default {
  name: "imgCardLv4",
  props: {
    option: {
      type: Object,
      required: true,
    },
  },
  data() {
    return {}
  },
  computed: {
    img() {
      return {url: this.option.img.url, order: this.option.img.order}
    },
    title() {
      return this.option.content.title;
    },
    des() {
      return this.option.content.des;
    },
    des1() {
      return this.option.content.des1;
    },
    contentOrder() {
      return this.option.content.order;
    },
    tagesPc() {
      return this.option.content.list;
    },
    tagesH5() {
      return this.option.content.list;
    }
  }
}
</script>

<style lang="scss" scoped>
.mta-card-lv4 {
  margin: 0 auto 120px;

  .mta-card-content-pc {
    display: flex;
    align-items: center;
    justify-content: center;
    img {
      width: 480px;
      height: 370px;
    }

    .card-info {
      width: 503px;
      h5 {
        font-size: 24px;
        font-weight: 800;
        text-align: left;
        color: #333;
        margin: 0 0 20px;
        position: relative;

        &:before {
          content: '';
          position: absolute;
          bottom: -5px;
          width: 100px;
          height: 3px;
          background: #00b96b;
        }
      }

      p {
        font-size: 14px;
        font-weight: 500;
        color: #333;
        line-height: 24px;
      }

      p.p-top {
        margin-top: 30px;
        margin-bottom: 30px;
      }

      p.p-bottom {
        margin-top: 20px;
        margin-bottom: 40px;
      }
    }
  }

  .img-left {
    img {
      margin-left: 100px;
    }

  }

  .img-right {
    img {
      margin-right: 100px;
    }
  }

  @media (max-width: 768px) {
    margin: 0 auto 60px;
    .mta-card-content-h5 {
      img {
        width: 80%;
        display: block;
        margin: 0 auto;
        text-align: center;
      }
      // card--info
      .card-info {
        width: 100%;
        h5 {font-size: 16px;margin: 20px 0 10px;}
        em{width: 35px;height: 3px;background: #00b96b;display: block;margin-bottom: 20px;}
        p{
          font-size: 14px;margin: 20px 0 10px;text-align: justify;line-height: 22px;
        }
      }
    }

  }

}
</style>
