/* ==========================================================================
   Project: Nanjing Weila Apparel Co., Ltd. - Official One-Page Site
   Author: Senior Front-End Architect & UI/UX Designer
   Version: 1.1.0 (Refactored & Fully Responsive)
   Description: Premium, Modern, Responsive, and SEO-optimized stylesheet.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (Variables) & Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette (Premium Classic) */
  --color-primary: #12161A;       /* Obsidian Black - Deep & Luxurious */
  --color-secondary: #1F2429;     /* Charcoal Dark - Secondary Elements */
  --color-accent: #C5A880;        /* Champagne Gold - High-End Luxury Accent */
  --color-accent-hover: #DBC4A5;  /* Soft Warm Gold - Hover State */
  --color-light-bg: #F8F9FA;      /* Off-White - For breathing room and contrast */
  --color-border: #E5E8EB;        /* Subtle Border Gray */
  --color-text-main: #2D3136;     /* High Contrast Gray - Extremely Readable */
  --color-text-muted: #6C757D;    /* Soft Muted Gray - For secondary descriptions */
  --color-white: #FFFFFF;

  /* Typography */
  --font-sans: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Layout & Spacing */
  --container-width: 1200px;
  --header-height: 80px;
  --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --box-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --box-shadow-md: 0 10px 15px -3px rgba(18, 22, 26, 0.08);
  --box-shadow-lg: 0 20px 25px -5px rgba(18, 22, 26, 0.12);
}

/* --------------------------------------------------------------------------
   2. Reset & Base Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth; /* Native smooth scroll fallback */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-white);
  color: var(--color-text-main);
  line-height: 1.7;
  overflow-x: hidden; /* 核心防溢出保障 */
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  outline: none;
}

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   3. Typography & Headings
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.3;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem); /* Responsive fluid typography */
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

/* Elegant gold bottom border for main H2 titles */
h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--color-accent);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   4. Reusable Layout Utilities & Grid
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-padding {
  padding: 8rem 0; /* High-end breathing room */
}

@media (max-width: 768px) {
  .section-padding {
    padding: 5rem 0;
  }
}

.section-subtitle {
  text-align: center;
  color: var(--color-accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}

.section-intro {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 4.5rem;
  color: var(--color-text-muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

@media (max-width: 992px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --------------------------------------------------------------------------
   5. Interactive Buttons & CTA Style (CRO Optimized)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  border-radius: 4px;
  transition: var(--transition-smooth);
  cursor: pointer;
  will-change: transform, box-shadow;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(197, 168, 128, 0.3);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(197, 168, 128, 0.45);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
  transform: translateY(-3px);
}

.btn-dark {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-dark:hover {
  background-color: var(--color-secondary);
  transform: translateY(-3px) scale(1.02);
}

/* --------------------------------------------------------------------------
   6. Header & Navigation (Sticky & Hamburger Menu)
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(18, 22, 26, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}

.header.scrolled {
  height: 70px;
  box-shadow: var(--box-shadow-md);
  background-color: var(--color-primary);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo a {
  display: flex;
  align-items: center;
}

.logo img {
  height: 42px; /* Adaptive for brand identity */
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-cta {
  padding: 0.6rem 1.5rem;
  font-size: 0.85rem;
}

/* Hamburger Icon for Mobile */
.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  margin: 5px auto;
  background-color: var(--color-white);
  transition: var(--transition-smooth);
}

/* --------------------------------------------------------------------------
   7. Hero Section
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(18, 22, 26, 0.9) 0%, rgba(18, 22, 26, 0.8) 100%),
              url('images/photo-1507679799987-c73779587ccf.jpg?auto=format&fit=crop&w=1920&q=80') no-repeat center center/cover;
  color: var(--color-white);
  padding-top: var(--header-height);
}

.hero-content {
  max-width: 650px;
}

.hero-tag {
  display: inline-block;
  background-color: rgba(197, 168, 128, 0.15);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  padding: 0.4rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1.25rem;
}

/* ==========================================================================
   Hero 文字对比度与可读性修复
   ========================================================================== */
.hero h1 {
  color: var(--color-white) !important; /* 强制覆盖全局 h1 的深黑色，改为高亮纯白 */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* 增加一层柔和阴影，确保在任何背景图下字迹都极度清晰 */
}

/* 提高描述文字与按钮字体的可读性 */
.hero-desc {
  color: rgba(255, 255, 255, 0.9) !important; /* 提升至 90% 不透明度白色 */
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   8. Pain Points Section
   -------------------------------------------------------------------------- */
.pain-points {
  background-color: var(--color-light-bg);
}

.pain-card {
  background-color: var(--color-white);
  padding: 3rem 2rem;
  border-radius: 8px;
  box-shadow: var(--box-shadow-sm);
  transition: var(--transition-smooth);
  border-top: 4px solid #DFE3E6;
}

.pain-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-md);
  border-top-color: #D32F2F; /* Triggered critical alert accent color */
}

.pain-icon-wrapper {
  width: 60px;
  height: 60px;
  background-color: rgba(211, 47, 47, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.pain-icon-wrapper svg {
  width: 28px;
  height: 28px;
  fill: #D32F2F;
}

/* --------------------------------------------------------------------------
   9. Solutions Section
   -------------------------------------------------------------------------- */
.solution-card {
  background-color: var(--color-white);
  padding: 3rem 2rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  transition: var(--transition-smooth);
}

.solution-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--box-shadow-lg);
  border-color: var(--color-accent);
}

.sol-icon-wrapper {
  width: 64px;
  height: 64px;
  background-color: rgba(197, 168, 128, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.sol-icon-wrapper svg {
  width: 32px;
  height: 32px;
  fill: var(--color-accent);
}

/* --------------------------------------------------------------------------
   10. Social Proof Section
   -------------------------------------------------------------------------- */
.social-proof {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.social-proof h2 {
  color: var(--color-white);
}

.trust-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
  margin-bottom: 5rem;
}

.stat-item .number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-item .label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

.client-logos {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  opacity: 0.65;
}

.client-logos img {
  height: 45px;
  filter: grayscale(100%) brightness(200%);
  transition: var(--transition-smooth);
}

.client-logos img:hover {
  filter: grayscale(0%) brightness(100%);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   11. About Us Section
   -------------------------------------------------------------------------- */
.about-image-wrapper {
  position: relative;
}

.about-image {
  border-radius: 8px;
  box-shadow: var(--box-shadow-lg);
  width: 100%;
}

.about-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background-color: var(--color-accent);
  color: var(--color-white);
  padding: 1.5rem 2rem;
  border-radius: 4px;
  box-shadow: var(--box-shadow-md);
  text-align: center;
}

.about-badge .badge-num {
  font-size: 2rem;
  font-weight: 700;
  display: block;
  line-height: 1;
}

.about-badge .badge-text {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

@media (max-width: 768px) {
  .about-badge {
    position: static;
    margin-top: 1.5rem;
  }
}

/* --------------------------------------------------------------------------
   12. FAQ Section
   -------------------------------------------------------------------------- */
.faq {
  background-color: var(--color-light-bg);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  width: 100%;
  text-align: left;
  font-weight: 600;
  color: var(--color-primary);
  background: none;
  cursor: pointer;
}

.faq-icon {
  width: 20px;
  height: 20px;
  position: relative;
  transition: var(--transition-smooth);
}

.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  background-color: var(--color-accent);
  transition: var(--transition-smooth);
}

/* Plus to Minus Shape Transform CSS */
.faq-icon::before {
  top: 9px;
  left: 0;
  width: 100%;
  height: 2px;
}

.faq-icon::after {
  top: 0;
  left: 9px;
  width: 2px;
  height: 100%;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  background-color: #FAFAFA;
}

.faq-answer p {
  padding: 0 2rem 1.5rem;
  color: var(--color-text-muted);
}

/* Active Class driven by JavaScript */
.faq-item.active .faq-icon {
  transform: rotate(135deg);
}

.faq-item.active .faq-answer {
  max-height: 300px; /* Safe upper bound */
}

/* --------------------------------------------------------------------------
   13. Final CTA (Lead Generation Form)
   -------------------------------------------------------------------------- */
.final-cta {
  background: linear-gradient(135deg, rgba(18, 22, 26, 0.95) 0%, rgba(18, 22, 26, 0.85) 100%),
              url('images/photo-1441986300917-64674bd600d8.jpg?auto=format&fit=crop&w=1920&q=80') no-repeat center center/cover;
  color: var(--color-white);
  text-align: center;
}

.final-cta h2 {
  color: var(--color-white);
}

.final-cta .section-intro {
  color: rgba(255, 255, 255, 0.7);
}

.lead-form {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--color-white);
  padding: 3rem;
  border-radius: 8px;
  box-shadow: var(--box-shadow-lg);
  color: var(--color-text-main);
  text-align: left;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: var(--transition-smooth);
  background-color: var(--color-light-bg);
}

.form-control:focus {
  border-color: var(--color-accent);
  background-color: var(--color-white);
  box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.15);
}

.lead-form .btn {
  width: 100%;
  margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   14. Footer Section
   -------------------------------------------------------------------------- */
.footer {
  background-color: #0B0E11; /* Even darker shade for grounding */
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  padding: 5rem 0 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (max-width: 992px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-logo img {
  height: 40px;
  margin-bottom: 1.5rem;
}

.footer-desc {
  max-width: 320px;
  margin-bottom: 1.5rem;
}

.footer-title {
  color: var(--color-white);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-contact li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

.beian-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.beian-link:hover {
  color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   15. Mobile Navigation & Responsiveness
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .hamburger {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background-color: var(--color-primary);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 2.5rem;
    box-shadow: -10px 10px 20px rgba(0,0,0,0.25);
    transition: var(--transition-smooth);
    z-index: 999;
    overflow-y: auto;
  }

  /* Hamburger Toggle Classes */
  .nav-menu.active {
    right: 0;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-link {
    display: block;
    padding: 1.2rem 0;
    font-size: 1.1rem;
    width: 100%;
  }

  .nav-link::after {
    display: none;
  }

  .nav-menu .nav-cta {
    margin-top: 2rem;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .trust-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* --------------------------------------------------------------------------
   16. Unified Mobile Adaptions & Fixes (Max-Width: 576px)
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
  /* 1. 窄屏全局留白补偿 */
  .container {
    padding: 0 1.25rem;
  }

  /* 2. 核心溢出修复：将 Hero 区的并排按钮转为优雅的垂直排布 */
  .hero-actions {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 0.85rem 1.5rem; /* 稍微压缩内边距，确保文字不会因过长在按钮内换行 */
  }

  /* 3. 原 13 区：咨询表单在极窄屏幕下的内边距优化 */
  .lead-form {
    padding: 2rem 1.5rem;
  }

  /* 4. 原 14 区：页脚上部网格布局在超小屏下转化为单列 */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* 5. 预防一切长标题和文本在手机端的物理撑破 */
  h1, h2, h3, h4, p {
    word-break: break-word;
    overflow-wrap: break-word;
  }
}