/* 
 * 华信达科技 - 企业官网样式表
 * 移动端优先设计 | Mobile-First Design
 * 版本: 1.0.0
 */

/* ========== 基础重置与变量 ========== */
:root {
    --primary-color: #1a5fb4;
    --primary-dark: #0d3b7a;
    --secondary-color: #2ec4b6;
    --accent-color: #ff6b35;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --text-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
    list-style: none;
}

/* ========== 容器与布局 ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
}

.section-title h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-title p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 15px;
}

/* ========== 头部导航 ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1rem;
}

/* 移动端导航按钮 */
.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 导航菜单 */
.nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 20px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

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

.nav-menu ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-menu a {
    display: block;
    padding: 10px 15px;
    font-size: 1rem;
    color: var(--text-dark);
    border-radius: 6px;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* ========== 横幅区域 ========== */
.banner {
    margin-top: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: pulse 15s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.banner p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.banner-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--text-white);
    color: var(--primary-color);
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
}

.banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========== 公司简介区域 ========== */
.about-preview {
    background: var(--bg-light);
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.about-text h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.about-text p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    background: var(--bg-white);
    padding: 20px 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
}

/* ========== 服务项目区域 ========== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.service-card {
    background: var(--bg-white);
    padding: 25px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.service-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ========== 产品展示区域 ========== */
.products {
    background: var(--bg-light);
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.product-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.product-image {
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.product-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ========== 解决方案区域 ========== */
.solutions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.solution-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.solution-item:hover {
    box-shadow: var(--shadow-md);
}

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

.solution-content h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.solution-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ========== 客户案例区域 ========== */
.cases {
    background: var(--bg-light);
}

.cases-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.case-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.case-image {
    height: 160px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

.case-info {
    padding: 20px;
}

.case-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-light);
    color: var(--primary-color);
    font-size: 0.75rem;
    border-radius: 20px;
    margin-bottom: 10px;
}

.case-info h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.case-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ========== 新闻资讯区域 ========== */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.news-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.news-image {
    height: 160px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.news-content {
    padding: 20px;
}

.news-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.news-content h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-content h3 a:hover {
    color: var(--primary-color);
}

.news-content p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
}

.news-more {
    text-align: center;
    margin-top: 30px;
}

.btn-outline {
    display: inline-block;
    padding: 10px 25px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
}

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

/* ========== 合作伙伴区域 ========== */
.partners {
    background: var(--bg-light);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.partner-item {
    background: var(--bg-white);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    box-shadow: var(--shadow-sm);
    font-weight: 600;
    color: var(--text-light);
    transition: var(--transition);
}

.partner-item:hover {
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
}

/* ========== 联系我们区域 ========== */
.contact {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
}

.contact .section-title h2 {
    color: var(--text-white);
}

.contact .section-title h2::after {
    background: var(--text-white);
}

.contact .section-title p {
    color: rgba(255,255,255,0.8);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.contact-icon {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.contact-info p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.5;
}

/* ========== 页脚区域 ========== */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.8);
    padding: 40px 0 20px;
}

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

.footer-col h4 {
    font-size: 1.1rem;
    color: var(--text-white);
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    font-size: 0.9rem;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-col ul a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ========== 内页通用样式 ========== */
.page-banner {
    margin-top: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    padding: 50px 0;
    text-align: center;
}

.page-banner h1 {
    font-size: 1.75rem;
    margin-bottom: 10px;
}

.breadcrumb {
    font-size: 0.9rem;
    opacity: 0.8;
}

.breadcrumb a {
    opacity: 0.8;
}

.breadcrumb a:hover {
    opacity: 1;
}

.page-content {
    padding: 40px 0;
}

/* 关于我们页面 */
.about-section {
    margin-bottom: 40px;
}

.about-section h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.about-section p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.9;
    margin-bottom: 15px;
}

.culture-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.culture-item {
    background: var(--bg-light);
    padding: 25px 20px;
    border-radius: 10px;
    text-align: center;
}

.culture-item h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.culture-item p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.timeline-year {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.timeline-content {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* 新闻列表页 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.news-list-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.news-list-image {
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.news-list-content h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-list-content h3 a:hover {
    color: var(--primary-color);
}

.news-list-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.news-list-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* 新闻详情页 */
.article-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
    font-size: 1.5rem;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 15px;
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.article-meta span {
    margin: 0 10px;
}

.article-content {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-dark);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h2 {
    font-size: 1.25rem;
    margin: 30px 0 15px;
    color: var(--text-dark);
}

.article-content h3 {
    font-size: 1.1rem;
    margin: 25px 0 12px;
    color: var(--text-dark);
}

.article-content ul,
.article-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.article-content li {
    margin-bottom: 8px;
    list-style: disc;
}

.article-content ol li {
    list-style: decimal;
}

.article-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.article-nav a {
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.article-nav a:hover {
    background: var(--primary-color);
    color: white;
}

.article-nav-label {
    font-size: 0.8rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 5px;
}

/* ========== 平板端适配 ========== */
@media (min-width: 576px) {
    .about-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .culture-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-list-item {
        flex-direction: row;
    }
    
    .news-list-image {
        width: 200px;
        height: 140px;
        flex-shrink: 0;
    }
    
    .article-nav {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .article-nav a {
        flex: 1;
    }
}

/* ========== 桌面端适配 ========== */
@media (min-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .header-inner {
        height: 70px;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .nav-toggle {
        display: none;
    }
    
    .nav-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        padding: 0;
        box-shadow: none;
        background: transparent;
    }
    
    .nav-menu ul {
        flex-direction: row;
        gap: 5px;
    }
    
    .nav-menu a {
        padding: 8px 15px;
        font-size: 0.95rem;
    }
    
    .banner {
        margin-top: 70px;
        padding: 100px 0;
    }
    
    .banner h1 {
        font-size: 2.5rem;
    }
    
    .banner p {
        font-size: 1.1rem;
    }
    
    .about-content {
        flex-direction: row;
        align-items: center;
    }
    
    .about-text {
        flex: 1;
    }
    
    .about-stats {
        width: 350px;
        flex-shrink: 0;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .cases-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .partners-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .page-banner {
        padding: 70px 0;
    }
    
    .page-banner h1 {
        font-size: 2.25rem;
    }
    
    .culture-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .article-header h1 {
        font-size: 1.75rem;
    }
}

/* ========== 大屏幕适配 ========== */
@media (min-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .section {
        padding: 80px 0;
    }
    
    .banner {
        padding: 120px 0;
    }
    
    .banner h1 {
        font-size: 3rem;
    }
    
    .service-card {
        padding: 35px 25px;
    }
    
    .stat-number {
        font-size: 2.25rem;
    }
    
    .partners-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ========== 返回顶部按钮 ========== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

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

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ========== 加载动画 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}
