<script setup>
import topBar from "@/components/top/title-bar.vue";
import footBar from "@/components/bottom/foot-bar.vue";
import { useRouter } from "#imports";
import { useI18n } from "#imports";
import { computed } from "vue";
import { usePageTitle } from "@/composables/usePageTitle.js";
import { useImagePath } from "@/composables/useImagePath.js";

const router = useRouter();
const { t } = useI18n();
const { cdnImageUrl } = useImagePath();

// 设置页面标题
usePageTitle("page.contact-us");

// 计算banner背景样式
const bannerStyle = computed(() => ({
  background: `url("${cdnImageUrl('/static/contact-us/contact-us_banner.jpg')}") center/cover no-repeat`
}));

// 路由跳转
const goTab = (path) => {
  router.push({
    name: path,
  });
};
</script>
<template>
  <div>
    <topBar class="define-topBar__components"></topBar>
    
    <!-- Banner -->
    <div class="banner">
      <div class="banner-overlay" :style="bannerStyle"></div>
      <div class="banner-content">
        <h1 class="banner-title">{{ t("contact.page.title") }}</h1>
        <p class="banner-subtitle">{{ t("contact.page.subtitle") }}</p>
      </div>
    </div>

    <!-- 面包屑导航 -->
    <div class="breadcrumb">
      <div class="breadcrumb-container">
        <a @click="goTab('home')" class="breadcrumb-link">
          <img :src="cdnImageUrl('/static/common/home.png')" :alt="t('page.home')" />
          {{ t("contact.breadcrumb.home") }}
        </a>
        <span class="breadcrumb-separator">&gt;</span>
        <span class="breadcrumb-current">{{ t("contact.breadcrumb.contact") }}</span>
      </div>
    </div>

    <!-- 主要内容 -->
    <main class="main-content">
      <div class="container">
        <!-- 欢迎语 -->
        <div class="welcome-text">
          {{ t("contact.welcome") }}
        </div>

        <!-- 联系信息 -->
        <div class="contact-grid">
          <div class="contact-item">
            <div class="contact-label">{{ t("contact.company.label") }}</div>
            <div class="contact-value">{{ t("contact.company.name") }}</div>
            <div class="contact-value">{{ t("contact.company.address") }}</div>
          </div>
          
          <div class="contact-item">
            <div class="contact-label">{{ t("contact.phone.label") }}</div>
            <div class="contact-value">86-0755-2373 6296</div>
            <div class="contact-value">86-15278708583</div>
          </div>
          
          <div class="contact-item">
            <div class="contact-label">{{ t("contact.email.label") }}</div>
            <div class="contact-value">business@mingyanglg.com</div>
            <div class="contact-value">sales@mingyanglg.com</div>
            <div class="contact-value">service@mingyanglg.com</div>
          </div>
        </div>
      </div>
    </main>

    <foot-bar></foot-bar>
  </div>
</template>

<style lang="scss" scoped>
/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;

  // 4K 和超大屏幕
  @media (min-width: 2560px) {
    max-width: 1800px;
    padding: 0 80px;
  }

  @media (min-width: 1920px) and (max-width: 2559px) {
    max-width: 1500px;
    padding: 0 60px;
  }

  @media (min-width: 1440px) and (max-width: 1919px) {
    max-width: 1300px;
    padding: 0 40px;
  }

  @media (max-width: 1024px) {
    padding: 0 30px;
  }

  @media (max-width: 768px) {
    padding: 0 24px;
  }

  @media (max-width: 480px) {
    padding: 0 20px;
  }

  @media (max-width: 375px) {
    padding: 0 16px;
  }
}

/* Banner 样式 */
.banner {
  // background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #ffffff;
  text-align: center;
  padding: 50px 0;
  position: relative;
  overflow: hidden;
  height: 350px;

  // 4K 和超大屏幕
  @media (min-width: 2560px) {
    padding: 100px 0;
    height: 600px;
  }

  @media (min-width: 1920px) and (max-width: 2559px) {
    padding: 80px 0;
    height: 500px;
  }

  @media (min-width: 1440px) and (max-width: 1919px) {
    padding: 70px 0;
    height: 450px;
  }

  @media (max-width: 1024px) {
    padding: 60px 0;
    height: 400px;
  }

  @media (max-width: 768px) {
    padding: 50px 0;
    height: 350px;
  }

  @media (max-width: 480px) {
    padding: 40px 0;
    height: 300px;
  }

  @media (max-width: 375px) {
    padding: 35px 0;
    height: 280px;
  }

  .banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.9;
    z-index: 1;
  }

  .banner-content {
    position: relative;
    z-index: 2;
  }

  .banner-title {
    font-size: 46px !important;
    font-weight: 300;
    font-family: var(--font-light);
    letter-spacing: 1px;

    // 4K 和超大屏幕
    @media (min-width: 2560px) {
      font-size: 56px;
      margin-bottom: 25px;
      letter-spacing: 2px;
    }

    @media (min-width: 1920px) and (max-width: 2559px) {
      font-size: 48px;
      letter-spacing: 1.5px;
    }

    @media (min-width: 1440px) and (max-width: 1919px) {
      font-size: 40px;
      margin-bottom: 20px;
    }

    @media (max-width: 1024px) {
      font-size: 36px;
      margin-bottom: 18px;
    }

    @media (max-width: 768px) {
      font-size: 32px;
      margin-bottom: 15px;
    }

    @media (max-width: 480px) {
      font-size: 28px;
      margin-bottom: 12px;
      letter-spacing: 0.5px;
    }

    @media (max-width: 375px) {
      font-size: 24px;
      margin-bottom: 10px;
      letter-spacing: 0;
    }
  }

  .banner-subtitle {
    font-size: 18px !important;
    opacity: 0.8;
    letter-spacing: 2px;
    font-weight: 300;
    font-family: var(--font-light);
  }

  @media (max-width: 768px) {
    padding: 40px 0;

    .banner-title {
      font-size: 32px;
    }

    .banner-subtitle {
      font-size: 14px;
      letter-spacing: 2px;
    }
  }
}

/* 面包屑导航 */
.breadcrumb {
  background: #f8f9fa;
  padding: 20px 0;
  border-bottom: 1px solid #e9ecef;

  .breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
  }

  .breadcrumb-link {
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;

    &:hover {
      color: #333;
    }

    img {
      width: 16px;
      height: 16px;
    }
  }

  .breadcrumb-separator {
    color: #ccc;
  }

  .breadcrumb-current {
    color: #333;
    font-weight: 500;
  }
}

/* 主要内容 */
.main-content {
  background: #ffffff;
  padding: 60px 0 80px;

  // 4K 和超大屏幕
  @media (min-width: 2560px) {
    padding: 120px 0 140px;
  }

  @media (min-width: 1920px) and (max-width: 2559px) {
    padding: 100px 0 120px;
  }

  @media (min-width: 1440px) and (max-width: 1919px) {
    padding: 80px 0 100px;
  }

  @media (max-width: 1024px) {
    padding: 60px 0 80px;
  }

  @media (max-width: 768px) {
    padding: 50px 0 60px;
  }

  @media (max-width: 480px) {
    padding: 40px 0 50px;
  }

  @media (max-width: 375px) {
    padding: 35px 0 45px;
  }
}

/* 欢迎语 */
.welcome-text {
  text-align: center;
  font-size: 18px !important;
  color: #666;
  margin-bottom: 50px;
  font-weight: 300;
  font-family: var(--font-light);
  letter-spacing: 0.5px;

  // 4K 和超大屏幕
  @media (min-width: 2560px) {
    font-size: 28px !important;
    margin-bottom: 80px;
    letter-spacing: 1px;
  }

  @media (min-width: 1920px) and (max-width: 2559px) {
    font-size: 24px !important;
    margin-bottom: 70px;
    letter-spacing: 0.8px;
  }

  @media (min-width: 1440px) and (max-width: 1919px) {
    font-size: 20px !important;
    margin-bottom: 60px;
  }

  @media (max-width: 1024px) {
    font-size: 18px !important;
    margin-bottom: 50px;
  }

  @media (max-width: 768px) {
    font-size: 16px !important;
    margin-bottom: 40px;
  }

  @media (max-width: 480px) {
    font-size: 15px !important;
    margin-bottom: 35px;
    letter-spacing: 0.3px;
  }

  @media (max-width: 375px) {
    font-size: 14px !important;
    margin-bottom: 30px;
    letter-spacing: 0;
  }
}

/* 联系信息网格 */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
  max-width: 900px;
  margin: 0 auto;

  // 4K 和超大屏幕
  @media (min-width: 2560px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 100px;
    max-width: 1400px;
  }

  @media (min-width: 1920px) and (max-width: 2559px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 80px;
    max-width: 1200px;
  }

  @media (min-width: 1440px) and (max-width: 1919px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 70px;
    max-width: 1000px;
  }

  @media (max-width: 1024px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
    max-width: 800px;
  }

  @media (max-width: 768px) {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 600px;
  }

  @media (max-width: 480px) {
    gap: 30px;
    max-width: 100%;
  }

  @media (max-width: 375px) {
    gap: 25px;
  }
}

.contact-item {
  text-align: left;
}

.contact-label {
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-medium);
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.contact-value {
  font-size: 16px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 8px;
  font-weight: 400;
  font-family: var(--font-regular);

  &:last-child {
    margin-bottom: 0;
  }
}

/* 响应式已在各个组件中处理 */
</style>

