/* ===================================
   GlobalSourcing Pro - Main Stylesheet
   =================================== */

/* CSS Variables */
:root {
  --primary: #1a365d;
  --secondary: #2d3748;
  --accent: #ed8936;
  --accent-hover: #dd6b20;
  --bg-light: #f7fafc;
  --white: #ffffff;
  --text-primary: #1a202c;
  --text-secondary: #718096;
  --border-color: #e2e8f0;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --transition: all 0.3s ease;
  --container-max: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-light);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}

h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 24px; }

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

ul {
  list-style: none;
}

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

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===================================
   Header
   =================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  z-index: 1000;
  transition: var(--transition);

}

.header.scrolled {
  background: var(--white);
  box-shadow: var(--shadow);
}

.header.scrolled .logo {
  color: var(--primary);
}

.header.scrolled .logo span {
  color: var(--accent);
}

.header.scrolled .nav-link {
  color: var(--secondary);
}

.header.scrolled .nav-link:hover,
.header.scrolled .nav-link.active {
  color: var(--primary);
}

.header.scrolled .btn-outline {
  color: var(--primary);
  border: 2px solid var(--primary);
}

.header.scrolled .btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.header.scrolled .menu-toggle span {
  background: var(--primary);
}

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

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
}

.logo span {
  color: var(--accent);
}

.nav-menu {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-weight: 600;
  color: #ffffff;
  position: relative;
}

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

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

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

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: #ffffff;
  transition: var(--transition);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, #2c5282 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 150%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></svg>') repeat;
  background-size: 200px;
  animation: rotate 60s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  color: var(--white);
}

.hero-subtitle {
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 20px;
  opacity: 0.9;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 24px;
  font-size: 56px;
}

.hero-text {
  font-size: 20px;
  opacity: 0.9;
  margin-bottom: 40px;
  line-height: 1.8;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(237, 137, 54, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

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

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.btn-outline:hover {
  background: #ffffff;
  color: var(--primary);
}

.btn-outline-page {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline-page:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-outline-page.btn-active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ===================================
   Sections
   =================================== */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 18px;
}

.bg-white {
  background: var(--white);
}

.bg-light {
  background: var(--bg-light);
}

/* ===================================
   Cards
   =================================== */
.card {
  background: var(--white);
  border-radius: 8px;
  padding: 40px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(237, 137, 54, 0.1);
  border-radius: 12px;
  margin-bottom: 24px;
}

.card-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent);
}

.card h3 {
  margin-bottom: 16px;
}

.card p {
  color: var(--text-secondary);
}

/* Grid */
.grid {
  display: grid;
  gap: 30px;
}

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

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

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

/* ===================================
   Features / Services
   =================================== */
.feature-box {
  text-align: center;
  padding: 50px 30px;
}

.feature-number {
  font-family: 'Playfair Display', serif;
  font-size: 64px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.3;
  margin-bottom: 10px;
}

/* Trust Badges */
.badge-grid {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.badge-item {
  text-align: center;
}

.badge-number {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
}

.badge-number-open {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
}

.badge-label {
  color: var(--text-secondary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===================================
   About / Process
   =================================== */
.process-step {
  position: relative;
  padding-left: 80px;
}

.process-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  border-radius: 50%;
}

.process-step h4 {
  margin-bottom: 12px;
  font-size: 20px;
}

.process-step p {
  color: var(--text-secondary);
}

/* ===================================
   Testimonials
   =================================== */
.testimonial-card {
  background: var(--white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.testimonial-quote {
  font-size: 18px;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.8;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.testimonial-info h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.testimonial-info span {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===================================
   Blog / Articles
   =================================== */
.article-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.article-image {
  height: 220px;
  background: linear-gradient(135deg, var(--primary), #2c5282);
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-image svg {
  width: 60px;
  height: 60px;
  stroke: rgba(255,255,255,0.3);
}

.article-content {
  padding: 24px;
}

.article-category {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(237, 137, 54, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.article-content h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.article-content p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  gap: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===================================
   Contact Form
   =================================== */
.contact-form {
  background: var(--white);
  padding: 50px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* ===================================
   Footer
   =================================== */
.footer {
  background: var(--primary);
  color: var(--white);
  padding: 80px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer h4 {
  color: var(--white);
  font-size: 18px;
  margin-bottom: 24px;
}

.footer p {
  opacity: 0.8;
  line-height: 1.8;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  opacity: 0.8;
}

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

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 14px;
  opacity: 0.6;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* ===================================
   Animations
   =================================== */
.fade-in-up {
  /* opacity: 0; */
  transform: translateY(6px);
  transition: all 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }

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

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }

  .section {
    padding: 60px 0;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 30px;
    gap: 20px;
    box-shadow: var(--shadow);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-content {
    text-align: center;
  }

  .badge-grid {
    gap: 30px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .contact-form {
    padding: 30px;
  }
}

/* ===================================
   Contact Popup Modal 联系弹窗
   每2分钟弹出，用户可关闭
   =================================== */
.popup-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.popup-modal.active {
  display: flex;
}

.popup-content {
  background: var(--white);
  border-radius: 12px;
  padding: 40px;
  max-width: 420px;
  width: 90%;
  position: relative;
  animation: popupSlide 0.3s ease;
}

@keyframes popupSlide {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  color: var(--text-secondary);
  background: none;
  border: none;
  transition: var(--transition);
}

.popup-close:hover {
  color: var(--primary);
}

.popup-header {
  text-align: center;
  margin-bottom: 24px;
}

.popup-header h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.popup-header p {
  color: var(--text-secondary);
}

.popup-contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-light);
  border-radius: 8px;
  margin-bottom: 12px;
}

.popup-contact-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(237, 137, 54, 0.1);
  border-radius: 8px;
  flex-shrink: 0;
}

.popup-contact-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
}

.popup-contact-info h4 {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 4px;
}

.popup-contact-info p {
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.popup-qrcode {
  text-align: center;
  padding: 20px;
  background: var(--bg-light);
  border-radius: 8px;
  margin-top: 8px;
}

.popup-qrcode p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.popup-qrcode img {
  width: 150px;
  height: 150px;
  border-radius: 8px;
}

.popup-dont-show {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.popup-dont-show input {
  width: 16px;
  height: 16px;
}

/* ===================================
   Article Detail Page 文章详情页样式
   =================================== */
.article-header {
  text-align: center;
}

.article-header h1 {
  font-size: 36px;
  line-height: 1.3;
  margin-bottom: 20px;
}

.article-header .article-category {
  display: inline-block;
  margin-bottom: 12px;
}

.article-cover img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 8px;
}

.article-body {
  line-height: 1.8;
}

.article-body p {
  margin-bottom: 16px;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  margin-top: 30px;
  margin-bottom: 16px;
}

.article-body h2 {
  font-size: 28px;
}

.article-body h3 {
  font-size: 22px;
}

.article-body h4 {
  font-size: 18px;
}

.article-body ul,
.article-body ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 20px;
  margin: 20px 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-body pre {
  background: #1a202c;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

.article-body a {
  color: var(--accent);
}

.article-body a:hover {
  text-decoration: underline;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}