<template>
  <header class="service-header">
    <div class="service-header-inner">
      <router-link class="service-brand" to="/query" aria-label="返回证书查询首页">
        <span class="brand-mark"><img src="/brand/huiyu-logo.png" alt="" /></span>
        <span>
          <strong>慧遇书院</strong>
          <small>电子证书服务</small>
        </span>
      </router-link>
      <span class="service-state"><i></i>证书查询与核验</span>
    </div>
  </header>
</template>

<style scoped>
.service-header {
  width: 100%;
  border-bottom: 1px solid #e2e7e9;
  background: rgba(255, 255, 255, 0.96);
}

.service-header-inner {
  width: min(1120px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.service-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #18232c;
}

.service-brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}

.brand-mark img {
  width: 36px;
  height: 32px;
  object-fit: contain;
}

.service-brand > span:last-child {
  display: grid;
  gap: 2px;
}

.service-brand strong {
  font-size: 16px;
  letter-spacing: 0;
}

.service-brand small {
  color: #75818a;
  font-size: 11px;
}

.service-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5d6d78;
  font-size: 13px;
}

.service-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f8a69;
  box-shadow: 0 0 0 4px #e6f2ed;
}

@media (max-width: 640px) {
  .service-header-inner {
    width: calc(100% - 28px);
    min-height: 66px;
  }

  .service-state {
    font-size: 0;
  }
}
</style>
