<template>
  <header class="head_container">
    <div class="logo">
      <img src="../../assets/images/logo.png" alt="河北秦安安全科技股份有限公司"/>
    </div>
    <div style="display: flex">
      <nav class="nav_list">
        <ul>
          <li><NuxtLink to="">首页</NuxtLink></li>
          <li
            @mouseenter="isProductHovered = true"
            @mouseleave="isProductHovered = false"
          >
            <NuxtLink to="">产品</NuxtLink>
            <span v-if="isProductHovered">
              <a
                v-for="(item, index) in 5"
                :key="index"
                v-motion
                href=""
                :initial="{ opacity: 0, y: -10 }"
                :enter="{ opacity: 1, y: 0, transition: { delay: index * 50, duration: 300 } }"
                :leave="{ opacity: 0, y: -10, transition: { duration: 200 } }"
              >
                产品{{index}}
              </a>
            </span>
          </li>
          <li><NuxtLink to="">解决方案</NuxtLink></li>
          <li><NuxtLink to="">新闻资讯</NuxtLink></li>
          <li><NuxtLink to="">合作案例</NuxtLink></li>
          <li><NuxtLink to="">服务流程</NuxtLink></li>
          <li><NuxtLink to="">关于秦安</NuxtLink></li>
          <li><NuxtLink to="">秦安安全大模型</NuxtLink></li>
        </ul>
        <div class="num">股票代码：871771</div>
      </nav>
    </div>
  </header>
</template>
<script setup lang="ts">
const isProductHovered = ref(false);
</script>
<style scoped lang="scss">
.head_container{
  min-width: 1400px;
  width: 100%;
  height: 70px;
  background: rgba(4,17,40,0.52);
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 999;
  .nav_list{
    display: flex;
    justify-content: space-between;
    align-items: center;

    .num{
      color: #ffffff;
      font-size: 14px;
      margin-left: 50px;
    }
     ul{
      display: flex;
      justify-content: space-between;
      li{
        list-style: none;
        color: #ffffff;
        padding: 0 15px;
        font-size: 14px;
        box-sizing: border-box;
        position: relative;
        a{
          color: #ffffff;
          text-decoration: none;
          cursor: pointer;
          display: inline-block;
          position: relative;
          height: 70px;
          line-height: 70px;
          &:before{
            content: "";
            position: absolute;
            z-index: 1;
            -webkit-transition-property: left, right;
            transition-property: left, right;
            bottom: 0;
            background-color: #ffffff;
            height: 2px;
            width: 100%;
            border-radius: 2px 2px 0 0;
            opacity: 0;
          }
        }
        &:hover{
          a{
            &:before{
              opacity: 1;
              left: 0;
            }
          }
        }

        span{
          position: absolute;
          top: 70px;
          background: #fff;
          width: 150px;
          text-align: center;
          left: 50%;
          margin-left: -75px;
          box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.08);
          padding: 10px 0;
          border-radius: 4px;
          a{
            color: #333333;
            display: block;
            width: 100%;
            height: 50px;
            line-height: 50px;
            &:hover{
              color: #1d78ff;
              background: #ddebff;
            }
          }
        }
      }

    }
  }


}
</style>
