<template>
  <header class="header">
    <div class="container">
      <div class="header-content">
        <!-- Логотип -->
        <NuxtLink to="/about" class="logo">
          <div class="logo-icon">
            <span class="logo-text">ES</span>
          </div>
          <span class="logo-name">EasySite102</span>
        </NuxtLink>
        <div class="header-paln-menu">
          <div class="header-plan">
            <!-- Трифы -->
            <Plan />
          </div>
          <!-- Гамбургер меню для всех устройств -->
          <div class="hamburger-nav">
            <HamburgerMenu />
          </div>
        </div>
      </div>
    </div>
  </header>
</template>

<script setup lang="ts">
import Plan from '~/components/layout/PlanBadge.vue'
import HamburgerMenu from '~/components/layout/HamburgerMenu.vue'
</script>

<style scoped>
.header {
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-light);
  width: 100%;
  transition: all 0.3s ease;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.logo:hover {
  color: var(--primary-500);
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary-500);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.logo-text {
  color: var(--text-inverse);
  font-weight: bold;
  font-size: 1.125rem;
}

.logo-name {
  font-weight: bold;
  font-size: 1.5rem;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.header-paln-menu {
  display: flex;
  flex-direction: row;
}

.header-plan {
  margin: 0 1rem 0 0;
}

.hamburger-nav {
  display: block;
}

@media (max-width: 768px) {
  .header-content {
    padding: 0.75rem 0;
  }

  .logo-name {
    font-size: 1.25rem;
  }

  .logo-icon {
    width: 2rem;
    height: 2rem;
  }

  .logo-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .logo-name {
    display: none;
  }
}
</style>