<script setup>
defineProps({
  title: {
    type: String,
    required: true,
  },
  subtitle: {
    type: String,
    default: "",
  },
  icon: {
    type: String,
    default: "pi pi-home",
  },
});
</script>

<template>
  <div class="hero-section">
    <div class="hero-gloss"></div>

    <div class="hero-content">
      <div class="hero-text">
        <h1 class="hero-title">{{ title }}</h1>
        <p v-if="subtitle" class="hero-subtitle">{{ subtitle }}</p>
      </div>
    </div>
  </div>
</template>

<style scoped>
.hero-section {
  position: relative;
  background: var(--ye-hero-bg, #003b6f);
  padding: 1.125rem 0;
  border-radius: var(--ye-listing-card-radius, 12px);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  box-shadow: var(--ye-hero-shadow, 0 4px 20px rgba(0, 59, 111, 0.25));
  margin-bottom: 0;
}

.hero-gloss {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.07) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--ye-listing-max-width, 1400px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--ye-listing-content-pad-x, 1.5rem);
  padding-right: var(--ye-listing-content-pad-x, 1.5rem);
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  box-sizing: border-box;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.15rem 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: 0.8125rem;
  color: var(--ye-hero-subtitle, rgba(255, 255, 255, 0.88));
  margin: 0;
  line-height: 1.45;
  font-weight: 400;
  max-width: 480px;
}

@media (max-width: 768px) {
  .hero-section {
    padding: 1rem;
    border-radius: 10px;
  }

  .hero-title {
    font-size: 1.125rem;
  }
}
</style>
