/* ========================================
   WPS Office - 首页专属样式
   依赖：common.css (变量已在 :root 定义)
   ======================================== */

/* ---------- Platform (Hero) ---------- */
.platform {
  padding-top: calc(var(--header-height) + 64px);
  padding-bottom: var(--space-2xl);
  text-align: center;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg-white) 100%);
  position: relative;
  overflow: hidden;
}

.platform::before {
  content: '';
  position: absolute;
  top: -120px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(22, 119, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.platform::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(64, 150, 255, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.platform .platform-title h1 {
  font-weight: 700;
  font-size: var(--font-hero);
  color: var(--text-primary);
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--primary) 0%, #4096FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.platform .platform-title p {
  padding-top: var(--space-md);
  font-weight: 400;
  font-size: var(--font-2xl);
  color: var(--text-primary);
}

.platform .platform-title p:last-child {
  padding-top: var(--space-sm);
  font-weight: 400;
  font-size: var(--font-lg);
  color: var(--text-secondary);
}

.platform .platform-image {
  padding-top: var(--space-xl);
}

.platform .platform-image img {
  width: 100%;
  max-width: 800px;
  animation: float 6s ease-in-out infinite;
}

/* Hero CTA Button */
.platform .platform-cta {
  padding-top: var(--space-lg);
}

.platform .platform-cta .btn-hero {
  display: inline-block;
  width: 240px;
  height: 56px;
  line-height: 56px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, #4096FF 100%);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--font-lg);
  color: var(--text-white);
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  box-shadow: 0 4px 16px rgba(22, 119, 255, 0.25);
}

.platform .platform-cta .btn-hero:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(22, 119, 255, 0.4);
  color: #fff !important;
}

.platform .platform-cta .cta-hint {
  padding-top: var(--space-sm);
  font-weight: 400;
  font-size: var(--font-sm);
  color: var(--text-muted);
}

/* ---------- Section Divider ---------- */
.section-divider {
  position: relative;
}
.section-divider::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bg-medium), transparent);
}

/* ---------- Language ---------- */
.language {
  padding: var(--space-2xl) 0;
  text-align: center;
  background: var(--bg-white);
  position: relative;
}

.language::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bg-medium), transparent);
  pointer-events: none;
}

.language .language-title h2 {
  font-weight: 600;
  font-size: var(--font-2xl);
  color: var(--text-primary);
}

.language .language-title p {
  padding-top: var(--space-md);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
  font-weight: 400;
  font-size: var(--font-base);
  color: var(--text-secondary);
}

.language .language-image {
  padding-top: var(--space-lg);
}

.language .language-image img {
  width: 100%;
  max-width: 900px;
}

/* ---------- Security ---------- */
.security {
  padding: var(--space-2xl) 0;
  background: linear-gradient(135deg, #1A1F3A 0%, #1E2D5C 40%, #2D1B3D 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.security::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(22, 119, 255, 0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(22, 119, 255, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.security::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(22, 119, 255, 0.3), transparent);
  pointer-events: none;
}

.security .security-title {
  position: relative;
  z-index: 1;
}

.security .security-title h2 {
  font-weight: 600;
  font-size: var(--font-2xl);
  color: var(--text-white);
}

.security .security-title p {
  padding-top: var(--space-md);
  max-width: 650px;
  margin: 0 auto;
  font-weight: 400;
  font-size: var(--font-base);
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.8;
}

.security .security-image {
  padding-top: var(--space-lg);
  position: relative;
  z-index: 1;
}

.security .security-image img {
  width: 100%;
  max-width: 900px;
}

/* ---------- UI (Plugins) ---------- */
.ui {
  padding: var(--space-2xl) 0;
  background: var(--bg-light);
  text-align: center;
  position: relative;
}

.ui::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bg-medium), transparent);
  pointer-events: none;
}

.ui .ui-title h2 {
  font-weight: 600;
  font-size: var(--font-2xl);
  color: var(--text-primary);
}

.ui .ui-title p {
  padding-top: var(--space-md);
  max-width: 650px;
  margin: 0 auto;
  font-weight: 400;
  font-size: var(--font-base);
  color: var(--text-secondary);
  line-height: 1.8;
}

.ui .ui-image {
  padding: var(--space-xl) 10% var(--space-2xl);
}

.ui .ui-image img {
  width: 100%;
}

/* ---------- Cloud (Tutorials) ---------- */
.cloud {
  padding: var(--space-2xl) 0;
  background: linear-gradient(180deg, #2A3563 0%, #1C2541 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cloud::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(22, 119, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cloud::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(22, 119, 255, 0.2), transparent);
  pointer-events: none;
}

.cloud .cloud-title {
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

.cloud .cloud-title h2 {
  font-weight: 600;
  font-size: var(--font-2xl);
  color: var(--text-white);
}

.cloud .cloud-title p {
  padding-top: var(--space-md);
  max-width: 700px;
  margin: 0 auto;
  font-weight: 400;
  font-size: var(--font-base);
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.8;
}

.cloud .cloud-article {
  padding-top: var(--space-xl);
  position: relative;
  z-index: 1;
}

.cloud .cloud-article ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.cloud .cloud-article ul li {
  height: 380px;
  overflow: hidden;
  box-sizing: border-box;
}

.cloud .cloud-article ul li a {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 380px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-white);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.cloud .cloud-article ul li a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.cloud .cloud-article ul li a .images {
  width: 100%;
  height: 220px;
  flex-shrink: 0;
  overflow: hidden;
}

.cloud .cloud-article ul li a .images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.cloud .cloud-article ul li a:hover .images img {
  transform: scale(1.05);
}

.cloud .cloud-article ul li a .info {
  padding: var(--space-md);
  background-color: var(--bg-white);
  text-align: left;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cloud .cloud-article ul li a .info h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: var(--font-lg);
  color: var(--text-primary);
  flex-shrink: 0;
}

.cloud .cloud-article ul li a .info p {
  padding-top: var(--space-xs);
  text-align: left;
  font-weight: 400;
  font-size: var(--font-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.cloud .cloud-article ul li a .info p.ellipsis-multiline {
  margin: 0;
  overflow: hidden;
  height: 100px !important;
  max-height: 100px !important;
  flex: none !important;
}

/* ---------- Excel ---------- */
.excel {
  padding: var(--space-2xl) 0;
  background: var(--bg-white);
  position: relative;
}

.excel::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bg-medium), transparent);
  pointer-events: none;
}

.excel .excel-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) 48px var(--space-xl) 0;
}

.excel .excel-title h2 {
  font-weight: 600;
  font-size: var(--font-2xl);
  color: var(--text-primary);
  position: relative;
  padding-left: 20px;
}

.excel .excel-title h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: linear-gradient(180deg, var(--primary) 0%, #4096FF 100%);
  border-radius: 2px;
}

.excel .excel-title p {
  padding-top: var(--space-md);
  padding-left: 20px;
  font-weight: 400;
  font-size: var(--font-base);
  color: var(--text-secondary);
  line-height: 1.8;
  text-align: left;
}

.excel .excel-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.excel .excel-image img {
  width: 100%;
  transition: transform var(--transition-smooth);
}

.excel .excel-image:hover img {
  transform: scale(1.02);
}

/* ---------- Download ---------- */
.download {
  padding: var(--space-2xl) 0 var(--space-xl);
  text-align: center;
  background: var(--bg-light);
}

.download .download-title h2 {
  font-weight: 600;
  font-size: var(--font-2xl);
  color: var(--text-primary);
}

.download .download-list {
  padding-top: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

.download .download-list .item {
  flex: 1 1 280px;
  max-width: 340px;
  min-width: 260px;
  padding: var(--space-xl) var(--space-md);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: 1px solid var(--bg-medium);
  position: relative;
  overflow: hidden;
}

.download .download-list .item:first-child::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.download .download-list .item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.download .download-list .item img {
  width: 72px;
  height: auto;
  transition: transform var(--transition-base);
}

.download .download-list .item:hover img {
  transform: scale(1.08);
}

.download .download-list .item .name {
  padding-top: var(--space-md);
  font-weight: 600;
  font-size: var(--font-base);
  color: var(--text-primary);
  line-height: 1.5;
}

.download .download-list .item .version {
  padding-top: var(--space-xs);
  font-weight: 400;
  font-size: var(--font-sm);
  color: var(--text-muted);
  line-height: 1.5;
}

.download .download-list .item button {
  width: 140px;
  height: 44px;
  margin-top: var(--space-md);
  line-height: 44px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, #4096FF 100%);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--font-sm);
  color: var(--text-white);
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.2);
}

.download .download-list .item button:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #1677FF 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(22, 119, 255, 0.4);
}

/* ========================================
   Responsive - Tablet (768px-991px)
   ======================================== */
@media (max-width: 991px) {
  .platform {
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: var(--space-xl);
  }

  .platform::before,
  .platform::after {
    display: none;
  }

  .platform .platform-image img {
    animation: none;
  }

  .platform .platform-title h1 {
    font-size: var(--font-hero);
  }

  .platform .platform-title p {
    font-size: var(--font-xl);
  }

  .platform .platform-title p:last-child {
    font-size: var(--font-base);
  }

  .language,
  .security,
  .ui,
  .cloud,
  .excel {
    padding: var(--space-xl) 0;
  }

  .language::after,
  .ui::after,
  .excel::after {
    left: 12%;
    right: 12%;
  }

  .security::after,
  .cloud::after {
    display: none;
  }

  .download {
    padding: var(--space-xl) 0 var(--space-lg);
  }

  .download .download-list .item:first-child::before {
    display: none;
  }

  .excel .excel-title {
    padding: 0;
    text-align: center;
    margin-bottom: var(--space-md);
  }

  .excel .excel-title h2 {
    padding-left: 0;
  }

  .excel .excel-title h2::before {
    display: none;
  }

  .excel .excel-title p {
    text-align: center;
    padding-left: 0;
  }

  .excel .excel-image {
    padding: 0;
  }

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

  .cloud .cloud-article ul li {
    height: 340px;
  }

  .cloud .cloud-article ul li a {
    height: 340px;
  }

  .cloud .cloud-article ul li a .images {
    height: 180px;
  }
}

/* ========================================
   Responsive - Mobile (< 768px)
   ======================================== */
@media (max-width: 767px) {
  .platform {
    padding: calc(var(--header-height) + 24px) var(--space-sm) var(--space-lg);
  }

  .platform::before,
  .platform::after {
    display: none;
  }

  .platform .platform-image img {
    animation: none;
  }

  .platform .platform-title h1 {
    font-size: 36px;
  }

  .platform .platform-title p {
    font-size: 22px;
  }

  .platform .platform-title p:last-child {
    font-size: var(--font-base);
  }

  .platform .platform-image {
    padding-top: var(--space-md);
  }

  .language,
  .security,
  .ui,
  .cloud,
  .excel,
  .download {
    padding: var(--space-lg) var(--space-sm);
  }

  .language::after,
  .ui::after,
  .excel::after,
  .security::after,
  .cloud::after {
    display: none;
  }

  .excel .excel-title h2 {
    padding-left: 0;
  }

  .excel .excel-title h2::before {
    display: none;
  }

  .excel .excel-title p {
    padding-left: 0;
    text-align: center;
  }

  .excel .excel-image {
    padding: 0;
  }

  .download .download-list .item:first-child::before {
    display: none;
  }

  .cloud .cloud-title {
    padding: 0;
  }

  .cloud .cloud-article {
    padding: var(--space-md) var(--space-sm) 0;
  }

  .cloud .cloud-article ul {
    grid-template-columns: 1fr;
  }

  .cloud .cloud-article ul li {
    height: 360px;
  }

  .cloud .cloud-article ul li a {
    height: 360px;
  }

  .cloud .cloud-article ul li a .images {
    height: 200px;
  }

  .download .download-list {
    padding: var(--space-md) 0 0;
    flex-direction: column;
    align-items: center;
  }

  .download .download-list .item {
    width: 100%;
    max-width: 100%;
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .download .download-list .item button {
    margin-bottom: 30px;
  }

  .ui .ui-image {
    padding: var(--space-lg) 0 0;
  }
}

/* ========================================
   Responsive - Very Small Mobile (≤400px)
   ======================================== */
@media (max-width: 400px) {
  .platform .platform-title h1 {
    font-size: 30px;
  }

  .platform .platform-title p {
    font-size: 18px;
  }

  .platform .platform-cta .btn-hero {
    width: calc(100% - 32px);
    max-width: 320px;
  }

  .download .download-list .item {
    padding: var(--space-md) var(--space-sm);
  }
}

/* ========================================
   Responsive - Large Desktop (≥1400px)
   ======================================== */
@media (min-width: 1400px) {
  .platform {
    padding-top: calc(var(--header-height) + 80px);
    padding-bottom: 120px;
  }

  .platform::before {
    width: 700px;
    height: 700px;
    top: -160px;
    left: -140px;
  }

  .platform::after {
    width: 550px;
    height: 550px;
    bottom: -120px;
    right: -120px;
  }

  .platform .platform-title h1 {
    font-size: var(--font-hero);
  }

  .platform .platform-image img {
    max-width: 960px;
  }

  .platform .platform-cta .btn-hero {
    width: 280px;
    height: 60px;
    line-height: 60px;
    font-size: var(--font-lg);
  }

  .language,
  .security,
  .ui,
  .cloud,
  .excel {
    padding: var(--space-2xl) 0;
  }

  .language {
    padding: 110px 0;
  }

  .ui {
    padding: 110px 0;
  }

  .excel {
    padding: 110px 0;
  }

  .excel .excel-title {
    padding: var(--space-2xl) 64px var(--space-2xl) 0;
  }

  .download {
    padding: var(--space-2xl) 0 100px;
  }

  .download .download-list {
    gap: var(--space-lg);
  }

  .download .download-list .item {
    max-width: 380px;
    padding: var(--space-xl) var(--space-lg);
  }

  .cloud .cloud-article ul li {
    height: 420px;
  }

  .cloud .cloud-article ul li a {
    height: 420px;
  }

  .cloud .cloud-article ul li a .images {
    height: 260px;
  }
}
