<script setup>
import { Icon } from "@iconify/vue";
const links = {
  产品: [
    { label: "工业PaaS", hint: "平台能力与组件化", to: "/products" },
    { label: "设备接入", hint: "边缘与协议适配", to: "/products" },
    { label: "数据治理", hint: "资产、主数据与指标", to: "/products" },
  ],
  解决方案: [
    { label: "离散制造", hint: "质量与效率提升", to: "/solutions" },
    { label: "流程工业", hint: "预测与能效优化", to: "/solutions" },
    { label: "园区与能源", hint: "可视化与运行管理", to: "/solutions" },
  ],
  资源: [
    { label: "新闻动态", hint: "平台更新与活动", to: "/news" },
    { label: "客户案例", hint: "行业实践与价值", to: "/cases" },
    { label: "联系我们", hint: "咨询与演示申请", to: "/contact" },
  ],
};
</script>

<template>
  <footer class="footer">
    <div class="container footer__top">
      <div class="footer__brand">
        <img
          src="../../assets//images/logo.png"
          alt=""
          style="width: auto; height: 36px"
        />
        <div class="footer__brandText">
          <div class="footer__brandName">工业互联网门户</div>
          <div class="muted">
            连接设备、数据与业务，打造可持续的工业数字化底座。
          </div>
          <!-- <div class="footer__badges">
            <span class="pill">安全合规</span>
            <span class="pill">开放生态</span>
            <span class="pill">工业级稳定</span>
          </div> -->
        </div>
      </div>

      <div class="footer__cols">
        <div
          v-for="(group, title) in links"
          :key="title"
          class="footer__col"
          style="
            display: flex;
            flex-direction: column;

            justify-content: center;
          "
        >
          <div class="footer__colTitle">{{ title }}</div>
          <RouterLink
            v-for="item in group"
            :key="item.label"
            class="footer__link"
            :to="item.to"
          >
            <span class="footer__linkLabel">{{ item.label }}</span>
            <span class="footer__linkHint muted">{{ item.hint }}</span>
          </RouterLink>
        </div>
      </div>
    </div>

    <div class="container footer__bottom">
      <div class="muted">
        © {{ new Date().getFullYear() }} Industrial Internet Portal.
        保留所有权利。
      </div>
      <div class="muted" style="display: flex; gap: 15px">
        <div style="display: flex; align-items: center; gap: 6px">
          <Icon icon="ri:phone-fill" width="20" height="20" />
          <span>400-000-0000</span>
        </div>

        <div style="display: flex; align-items: center; gap: 6px">
          <Icon icon="ri:mail-fill" width="20" height="20" />
          <span>kerui@deepOil.com</span>
        </div>
      </div>
    </div>
  </footer>
</template>

<style scoped>
.footer {
  background: #3b4660;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.footer__top {
  padding: 46px 0 28px;
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 28px;
}

.footer__brand {
  display: flex;
  gap: 14px;
}

.footer__logo {
  width: 44px;
  height: 44px;

  background: radial-gradient(
    circle at 30% 30%,
    var(--brand-200),
    var(--brand-600)
  );
  box-shadow: 0 12px 20px rgba(29, 78, 216, 0.18);
  flex: 0 0 auto;
}

.footer__brandName {
  font-weight: 850;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: #ffffff;
}

.footer__badges {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.footer__colTitle {
  margin-bottom: 10px;
  color: #ffffff;
  text-align: left;
}

.footer__link {
  display: grid;
  padding: 10px 0px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: 160ms ease;
  color: #ffffff;
}

.footer__linkLabel {
  color: #c5c8d0;
  font-size: 14px;
}

.footer__linkLabel:hover {
  color: #fff;
}

.footer__linkHint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.footer__bottom {
  padding: 16px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .footer__top {
    grid-template-columns: 1fr;
  }

  .footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .footer__cols {
    grid-template-columns: 1fr;
  }
}
</style>
