<template>
  <div class="section-header">
    <div class="header-left">
      <span class="icon">{{ icon }}</span>
      <h2 class="title">{{ title }}</h2>
    </div>
    <NuxtLink v-if="moreLink" :to="moreLink" class="more-link">
      查看更多 ›
    </NuxtLink>
  </div>
</template>

<script lang="ts" setup>
defineProps<{
  title: string
  icon?: string
  moreLink?: string
}>()
</script>

<style scoped>
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 3px solid #1e3a5f;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon {
  font-size: 24px;
}

.title {
  font-size: 22px;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0;
}

.more-link {
  color: #666;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.more-link:hover {
  color: #1e3a5f;
}
</style>
