/* ============================================
   WPS Office Download Site - Shared Styles
   ============================================ */

/* CSS Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Satoshi', sans-serif;
  color: #1D1D1F;
  background: #FFFFFF;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ============================================
   CSS Variables
   ============================================ */
:root {
  --primary: #003087;
  --primary-dark: #001a4d;
  --cta-red: #FF4D4F;
  --cta-red-dark: #e64446;
  --text-black: #1D1D1F;
  --text-gray: #86868B;
  --text-body: #333333;
  --bg-main: #F5F5F7;
  --bg-white: #FFFFFF;
  --border-light: #E5E5E5;
  --shadow-card: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-card-hover: 0 12px 32px rgba(0,0,0,0.12);
  --shadow-blue: 0 8px 24px rgba(0,48,135,0.1);
  --radius: 16px;
  --max-width: 1200px;
  --nav-height: 64px;
}

/* ============================================
   Keyframes
   ============================================ */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes underlineSlide {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ============================================
   Global Utility Classes
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   Navigation Bar
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

.navbar-brand svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-nav a {
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-black);
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.navbar-nav a:hover {
  color: var(--primary);
  background: rgba(0,48,135,0.05);
}

.navbar-nav a.active {
  color: var(--primary);
  background: rgba(0,48,135,0.08);
  font-weight: 600;
}

.navbar-cta {
  padding: 10px 24px;
  background: var(--cta-red);
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar-cta:hover {
  background: var(--cta-red-dark);
  transform: scale(1.02);
}

.navbar-cta svg {
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-red {
  background: var(--cta-red);
  color: #fff;
  border: none;
}

.btn-red:hover {
  background: var(--cta-red-dark);
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(255,77,79,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-spinner {
  animation: spin 1s linear infinite;
}

/* ============================================
   Card Styles
   ============================================ */
.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
}

/* ============================================
   CTA Banner Section
   ============================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 80px 24px;
  text-align: center;
}

.cta-banner-title {
  font-size: 36px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.cta-banner-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: #2d2d2f;
  color: rgba(255,255,255,0.6);
  padding: 40px 24px;
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
}

.site-footer p {
  margin: 4px 0;
}

.site-footer .footer-safe {
  color: #34c759;
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ============================================
   Page Header (common for inner pages)
   ============================================ */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 120px 24px 60px;
  text-align: center;
}

.page-header h1 {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 18px;
  color: rgba(255,255,255,0.85);
}

/* ============================================
   Section Title
   ============================================ */
.section-title {
  font-size: 36px;
  font-weight: 600;
  color: var(--text-black);
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-gray);
  text-align: center;
  margin-bottom: 48px;
}

/* ============================================
   News Card (common for news and article lists)
   ============================================ */
.news-card {
  display: flex;
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
  margin-bottom: 24px;
}

.news-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.news-card-image {
  width: 40%;
  min-height: 220px;
  flex-shrink: 0;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

.news-card-content {
  padding: 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
  align-self: flex-start;
}

.tag-blue { background: rgba(0,48,135,0.1); color: var(--primary); }
.tag-green { background: rgba(52,199,89,0.1); color: #34a853; }
.tag-orange { background: rgba(255,149,0,0.1); color: #ff9500; }

.news-card-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-black);
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-card-meta {
  font-size: 13px;
  color: var(--text-gray);
  margin-bottom: 12px;
}

.news-card-excerpt {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-link {
  color: var(--cta-red);
  font-weight: 500;
  font-size: 15px;
  margin-top: auto;
  transition: color 0.3s ease;
}

.news-card-link:hover {
  color: var(--cta-red-dark);
}

/* ============================================
   Article Page Styles
   ============================================ */
.article-hero-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

.article-header {
  padding: 40px 0;
}

.article-title {
  font-size: 36px;
  font-weight: 600;
  color: var(--text-black);
  margin-bottom: 16px;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.article-meta-tag {
  padding: 4px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

.article-meta-date,
.article-meta-readtime {
  font-size: 14px;
  color: var(--text-gray);
}

.article-body {
  padding: 40px 0 60px;
}

.article-body p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-body);
  margin-bottom: 24px;
}

.article-body h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-black);
  margin: 40px 0 20px;
}

.article-body h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-black);
  margin: 32px 0 16px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 40px;
  transition: color 0.3s ease;
}

.article-back:hover {
  color: var(--cta-red);
}

/* ============================================
   FAQ Accordion
   ============================================ */
.faq-item {
  border-bottom: 1px solid var(--border-light);
}

.faq-question {
  width: 100%;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-black);
  cursor: pointer;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 24px;
}

.faq-answer p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-body);
}

/* ============================================
   Feature Module (zh-cn page)
   ============================================ */
.feature-module {
  padding: 80px 24px;
}

.feature-module:nth-child(even) {
  background: var(--bg-main);
}

.feature-module:nth-child(odd) {
  background: var(--bg-white);
}

.feature-module-inner {
  max-width: 900px;
  margin: 0 auto;
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--primary);
  stroke-width: 1.5;
  fill: none;
}

.feature-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-black);
  margin-bottom: 20px;
}

.feature-desc {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-body);
}

.feature-desc p {
  margin-bottom: 16px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }
  
  .navbar-nav {
    display: none;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .page-header {
    padding: 100px 24px 40px;
  }
  
  .page-header h1 {
    font-size: 30px;
  }
  
  .cta-banner-title {
    font-size: 28px;
  }
  
  .news-card {
    flex-direction: column;
  }
  
  .news-card-image {
    width: 100%;
    min-height: 180px;
  }
  
  .article-title {
    font-size: 28px;
  }
  
  .feature-title {
    font-size: 26px;
  }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
