/**
 * Language-specific styles for Chi Token Website
 * Optimized text rendering for Chinese and English
 */

/* Chinese text optimization */
.lang-zh h1,
.lang-zh h2,
.lang-zh h3,
.lang-zh .benefit-title,
.chinese-text {
  font-family: var(--heading-font), 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  letter-spacing: 0.05em;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.lang-zh p,
.lang-zh .nav-text,
.lang-zh .btn {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', var(--body-font), sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.7;
}

/* Hero title specific adjustments for Chinese */
.lang-zh .hero-section h1 {
  letter-spacing: 0.02em;
  line-height: 1.1;
  word-break: keep-all;
}

/* Navigation adjustments for Chinese */
.lang-zh nav a {
  white-space: nowrap;
  min-width: fit-content;
}

/* Button text centering for Chinese */
.lang-zh .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Language toggle now uses standard navigation link classes - no custom styling needed */

/* Mobile navigation optimizations */
@media (max-width: 768px) {
  /* Hide internal navigation links on mobile (less important than social CTAs) */
  .mobile-nav a[href^="#about"],
  .mobile-nav a[href^="#market"],
  .mobile-nav a[href^="#benefits"] {
    display: none !important;
  }
  
  /* Ensure language toggle matches mobile nav styling exactly - override any desktop styles */
  .mobile-nav .mobile-nav-item {
    /* Force mobile nav styling for dynamically created language toggle */
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    padding: 0.5rem 2rem !important;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
    margin: 0 !important;
  }
  
  .mobile-nav .mobile-nav-item:hover {
    color: var(--accent-glow) !important;
    transform: scale(1.05) !important;
    background: var(--card-bg) !important;
  }
  
  /* Ensure .nav-glow element gets proper styling */
  .mobile-nav .nav-glow {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%) !important;
    border-radius: 12px !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
  }
  
  .mobile-nav .mobile-nav-item:hover .nav-glow {
    opacity: 1 !important;
  }
}

/* Mobile-specific Chinese adjustments */
@media (max-width: 768px) {
  .lang-zh .hero-section h1 {
    font-size: 2.5rem;
    letter-spacing: 0.01em;
  }
  
  .lang-zh .hero-section p {
    font-size: 1.1rem;
    line-height: 1.6;
  }
  
  .lang-zh .benefit-title {
    font-size: 1.5rem;
  }
  
  .lang-zh .glass-card p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

/* Responsive navigation for Chinese */
@media (max-width: 1280px) {
  .lang-zh nav.hidden.md\\:flex {
    gap: 1rem;
    font-size: 1.1rem;
  }
}

@media (max-width: 1024px) {
  .lang-zh nav.hidden.md\\:flex {
    gap: 0.75rem;
    font-size: 1rem;
  }
}

/* Smooth transitions for language switching */
h1, h2, h3, p, a, button, .btn {
  transition: font-family 0.3s ease, letter-spacing 0.3s ease, line-height 0.3s ease;
}

/* Fix for token address box in Chinese */
.lang-zh .token-address-heading {
  letter-spacing: 0.08em;
}

/* Better Chinese rendering in glass cards - exclude market data cards */
.lang-zh .glass-card {
  text-align: center;
}

/* Only apply left alignment to benefit cards, not market data cards */
.lang-zh #benefits .glass-card p {
  text-align: left;
  text-align-last: left;
}

/* Ensure market data cards stay center-aligned */
.lang-zh .market-data-card,
.lang-zh .market-data-card p,
.lang-zh .market-data-card .market-label {
  text-align: center !important;
}

/* Footer text improvements for Chinese */
.lang-zh footer p,
.lang-zh footer span {
  letter-spacing: 0.02em;
  line-height: 1.6;
}