﻿/* ===== 阿里云风格 - 矩阵软件官网样式（优化版）===== */

/* CSS Variables - 阿里云配色 */
:root {
    --primary-color: #0052D9;
    --primary-hover: #003DAB;
    --primary-light: #E8F3FF;
    --secondary-color: #FF6A00;
    --secondary-light: #FFF5E6;
    --text-primary: #1D2129;
    --text-secondary: #4E5969;
    --text-light: #86909C;
    --border-color: #E5E6EB;
    --bg-light: #F7F8FA;
    --bg-white: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-white);
    overflow-x: hidden;
}

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

a:hover {
    color: var(--primary-hover);
}

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 82, 217, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

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

.btn-white {
    background: #fff;
    color: var(--primary-color);
    border: none;
}

.btn-white:hover {
    background: var(--primary-light);
    color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline-white {
    background: transparent;
    color: #fff;
    border: 1px solid #fff;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ===== Hero Banner - 优化版 ===== */
.hero-banner {
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}

.hero-swiper {
    width: 100%;
    height: 500px;
}

.hero-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-decoration: none;
}

.hero-overlay {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 82, 217, 0.85) 0%, rgba(0, 164, 255, 0.75) 100%);
    display: flex;
    align-items: center;
}

.hero-text {
    max-width: 600px;
    color: #fff;
}

.hero-text h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    opacity: 1;
    transform: translateY(0);
    transition: var(--transition-slow);
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    transition: var(--transition-slow);
}

.hero-actions {
    display: flex;
    gap: 16px;
    transition: var(--transition-slow);
}

.hero-actions .btn-primary {
    background: #fff;
    color: var(--primary-color);
}

.hero-actions .btn-primary:hover {
    background: rgba(255, 255, 255, 0.95);
}

.hero-actions .btn-outline {
    border-color: #fff;
    color: #fff;
}

.hero-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Swiper 样式优化 */
.hero-swiper .swiper-pagination {
    bottom: 30px;
}

.hero-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: all 0.3s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
    background: #fff;
    width: 30px;
    border-radius: 5px;
}

/* Swiper导航按钮 - Swiper 3.x兼容 */
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.hero-swiper .swiper-button-prev {
    left: 20px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E");
    background-size: 12px 20px;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-swiper .swiper-button-next {
    right: 20px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E");
    background-size: 12px 20px;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.hero-swiper .swiper-button-prev:active,
.hero-swiper .swiper-button-next:active {
    transform: scale(0.95);
}

/* ===== Stats Section ===== */
.stats-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.stat-item {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.stat-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-6px);
    border-color: var(--primary-light);
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 12px;
}

.stat-unit {
    font-size: 24px;
    font-weight: 600;
}

.stat-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-desc {
    font-size: 13px;
    color: var(--text-light);
}

/* ===== Products Section ===== */
.products-section {
    padding: 100px 0;
    background: var(--bg-white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.product-card {
    position: relative;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    transition: var(--transition);
}

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

.product-card.featured {
    border-color: var(--secondary-color);
    background: linear-gradient(180deg, var(--secondary-light) 0%, var(--bg-white) 100%);
}

/* featured卡片顶部彩色横条 */
.product-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, #FF9A00 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--secondary-color);
    color: #fff;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 14px;
    font-weight: 500;
}

.product-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 24px;
}

.product-icon svg {
    width: 100%;
    height: 100%;
}

.product-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.product-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 18px;
}

.product-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 12px;
    border-radius: 14px;
    font-weight: 500;
}

.product-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.product-link:hover {
    color: var(--primary-hover);
}

.product-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.product-card:hover .product-link::after {
    transform: translateX(4px);
}

/* ===== Tech Section ===== */
.tech-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.tech-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    transition: var(--transition);
}

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

.tech-number {
    font-size: 56px;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 20px;
    transition: var(--transition);
}

.tech-card:hover .tech-number {
    color: var(--primary-color);
}

.tech-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.tech-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.tech-card strong {
    color: var(--primary-color);
}

/* ===== Video Section ===== */
.video-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #003DAB 0%, #0052D9 100%);
    color: #fff;
}

.video-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.video-content h2 {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 20px;
}

.video-content p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 36px;
}

.video-content .btn-primary {
    background: #fff;
    color: var(--primary-color);
}

.video-content .btn-primary:hover {
    background: rgba(255, 255, 255, 0.95);
}

.video-player video {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ===== Solution Section ===== */
.solution-section {
    padding: 100px 0;
}

.solution-image {
    text-align: center;
}

.solution-image img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.solution-image img:hover {
    box-shadow: var(--shadow-lg);
}

/* ===== News Section ===== */
.news-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* 2列居中布局 */
.news-grid-2col {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    margin: 0 auto;
    justify-items: center;
}

.news-grid-2col .news-card {
    width: 100%;
    max-width: 420px;
}

.news-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 28px;
    height: fit-content;
    transition: var(--transition);
}

.news-card:hover {
    box-shadow: var(--shadow-md);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 18px;
}

.news-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.more-link {
    font-size: 13px;
    color: var(--text-light);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.news-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    transition: var(--transition);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background: var(--bg-light);
    margin: 0 -12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
}

.news-title {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 14px;
}

.news-item:hover .news-title {
    color: var(--primary-color);
}

.news-date {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
}

/* ===== Service Section ===== */
.service-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    justify-items: center;
}

.service-item {
    text-align: center;
    padding: 32px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.service-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-6px);
}

.service-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-item:hover .service-icon {
    transform: scale(1.1);
}

.service-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.service-item p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== AI Section ===== */
.ai-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
    text-align: center;
}

.ai-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 56px;
}

.ai-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-bottom: 56px;
}

.ai-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 28px;
    transition: var(--transition);
}

.ai-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-6px);
}

.ai-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.ai-item h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.ai-action {
    text-align: center;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #0052D9 0%, #00A4FF 100%);
    text-align: center;
    color: #fff;
}

.cta-content h2 {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 36px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.cta-actions .btn-primary {
    background: #fff;
    color: var(--primary-color);
}

.cta-actions .btn-outline {
    border-color: #fff;
    color: #fff;
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 82, 217, 0.3);
    z-index: 999;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 82, 217, 0.4);
}

/* ===== 悬浮客服按钮 ===== */
.floating-service {
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: var(--secondary-color);
    color: #fff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 106, 0, 0.3);
    z-index: 999;
    transition: var(--transition);
}

.floating-service:hover {
    background: #E85D00;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.4);
}

.floating-service .service-text {
    display: none;
    font-size: 10px;
    margin-top: 2px;
}

.floating-service:hover .service-text {
    display: block;
}

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .hero-text h1 {
        font-size: 40px;
    }
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid,
    .tech-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .ai-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .video-wrapper {
        grid-template-columns: 1fr;
    }
    
    .video-content {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero-swiper {
        height: 550px;
    }
    
    .hero-text h1 {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .stats-grid,
    .products-grid,
    .tech-grid,
    .news-grid,
    .service-grid,
    .ai-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-actions,
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-content h2 {
        font-size: 28px;
    }
    
    .back-to-top,
    .floating-service {
        right: 20px;
        width: 44px;
        height: 44px;
    }
    
    .floating-service {
        bottom: 80px;
    }
}