<template>
  <div class="top-navbar">
    <div class="navbar-left">
      <img class="logo" :src="WiTourLogo" alt="logo" />
      <span class="brand">WiTour</span>
    </div>
    <div class="navbar-center">
      <div
        class="nav-item"
        v-for="(item, idx) in navs"
        :key="item.name"
        :class="{ 'gradient-text': idx === 0 }"
      >
        {{ item.name }}
        <img v-if="item.hasArrow" :src="down" alt="down" class="arrow" />
      </div>
    </div>
    <div class="navbar-right">
      <div style="display: flex;align-items: center;">
        <span class="lang">EN</span>
        <img :src="EN" alt="EN">
      </div>

      <button class="login-btn">
        Log In
        <img :src="user" alt="user">
      </button>
      <button class="download-btn">Download WiTour</button>
    </div>
  </div>
</template>

<script setup>
import WiTourLogo from '@/assets/images/main-top/WiTour-Logo.svg'
import EN from '@/assets/images/main-top/EN.svg'
import user from '@/assets/images/main-top/user.svg'
import down from '@/assets/images/main-top/down.svg'
const navs = [
  { name: 'Home' },
  { name: 'eSIM Plan', hasArrow: true },
  { name: 'Why WiTour', hasArrow: true },
  { name: 'Resources', hasArrow: true },
  { name: 'Business' },
  { name: 'Help Center' },
]
</script>

<style scoped lang="scss">
.top-navbar {
  width: 100%;
  height: 102px;
  box-shadow: 0px 2px 7px 0px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.05);
  padding: 30px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;

  .navbar-left {
    display: flex;
    align-items: center;
    .logo {
      width: 36px;
      height: 36px;
      margin-right: 10px;
    }
    .brand {
      background: linear-gradient(132.53deg, rgba(18, 0, 255, 0.96),rgba(140, 30, 153, 1) 99%);
      -webkit-background-clip:text;
      -webkit-text-fill-color:transparent;
      background-clip:text;
      text-fill-color:transparent;
      font-family: Inter;
      width: 126px;
      font-size: 34px;
      line-height: 1.2;
      font-weight: 800;
      padding-bottom: 2px;
      display: inline-block;
      font-style: italic;
    }
  }

  .navbar-center {
    display: flex;
    align-items: center;
    gap: 24px;
    .nav-item {
      color: #111;
      font-size: 18px;
      cursor: pointer;
      padding: 6px 20px;
      border-radius: 6px;
      font-weight: 500;
      transition: background 0.2s, color 0.2s;
      display: flex;
      align-items: center;
      .arrow {
        font-size: 12px;
        margin-left: 4px;
      }
    }
    .gradient-text {
      background: linear-gradient(132.53deg, rgba(18, 0, 255, 0.96), rgba(140, 30, 153, 1) 99%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      color: transparent;
      font-weight: bold;
    }
  }

  .navbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: 32px;
    .lang {
      font-size: 18px;
      font-weight: 700;
      color: #111;
      margin-right: 2px;
    }
    .icon-earth {
      font-size: 20px;
      margin-right: 18px;
    }
    .login-btn {
      width: 120px;
      height: 42px;
      background: #fff;
      color: #6c1bb7;
      border: 1px solid #6c1bb7;
      border-radius: 24px;
      padding: 9px 16px;
      font-size: 18px;
      cursor: pointer;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 6px;
      box-shadow: 0 2px 8px rgba(18,0,255,0.08);
      transition: background 0.2s, color 0.2s;
      .login-icon {
        font-size: 18px;
        margin-left: 4px;
      }
      &:hover {
        background: #f3eaff;
        color: #3a0ca3;
      }
    }
    .download-btn {
      background: linear-gradient(132.53deg, rgba(18, 0, 255, 0.96), rgba(140, 30, 153, 1) 99%);
      color: #fff;
      border: none;
      width: 168px;
      height: 42px;
      border-radius: 24px;
      padding: 9px 14px;
      font-weight: bold;
      font-size: 18px;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(18,0,255,0.08);
      min-width: 180px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: box-shadow 0.2s;
    }
  }
}
</style>
