/* 华达机械科技有限公司 - 官方网站样式表 */
/* 蓝色大气风格，专业企业官网 */

/* ==================== 变量定义 ==================== */
:root {
    --primary: #0052D4;
    --primary-dark: #003d9e;
    --primary-light: #4a7fd1;
    --secondary: #00A8E8;
    --accent: #FFB800;
    --dark: #1a1a2e;
    --gray-dark: #333;
    --gray: #666;
    --gray-light: #999;
    --gray-lighter: #f5f6fa;
    --white: #fff;
    --shadow: 0 2px 20px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* ==================== 基础重置 ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.8;
    color: var(--gray-dark);
    background: var(--white);
    overflow-x: hidden;
}

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

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

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

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

.section {
    padding: 80px 0;
}

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

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--dark);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

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

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

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

.header.scrolled {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 50px;
    height: 50px;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}

.logo-text span {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--gray);
}

.nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav a {
    position: relative;
    font-size: 1rem;
    color: var(--gray-dark);
    font-weight: 500;
    padding: 8px 0;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

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

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ==================== 轮播Banner ==================== */
.banner {
    position: relative;
    height: 600px;
    margin-top: 80px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--primary-light) 100%);
}

.banner-slider {
    position: relative;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.banner-slide.active {
    opacity: 1;
}

.banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.banner-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,82,212,0.85) 0%, rgba(0,168,232,0.7) 100%);
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.banner-text {
    max-width: 650px;
    color: var(--white);
}

.banner-text h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.banner-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
    line-height: 1.8;
}

.banner-btn {
    display: inline-block;
    padding: 14px 35px;
    background: var(--accent);
    color: var(--dark);
    font-weight: 600;
    border-radius: 4px;
    transition: var(--transition);
}

.banner-btn:hover {
    background: #ffc933;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(255,184,0,0.4);
}

/* 轮播指示器 */
.banner-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.banner-indicators span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}

.banner-indicators span.active {
    background: var(--white);
    transform: scale(1.2);
}

/* ==================== 关于我们 ==================== */
.about {
    background: var(--white);
}

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

.about-images {
    position: relative;
}

.about-img-main {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 5rem;
}

.about-img-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 150px;
    height: 150px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    box-shadow: var(--shadow);
}

.about-img-badge strong {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.about-img-badge span {
    font-size: 0.9rem;
    font-weight: 500;
}

.about-content h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 20px;
}

.about-content p {
    color: var(--gray);
    margin-bottom: 25px;
    line-height: 1.9;
}

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

.about-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--gray-lighter);
    border-radius: 8px;
    transition: var(--transition);
}

.about-feature:hover {
    background: var(--primary);
    color: var(--white);
}

.about-feature-icon {
    width: 45px;
    height: 45px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.about-feature:hover .about-feature-icon {
    background: var(--white);
    color: var(--primary);
}

.about-feature span {
    font-weight: 500;
    font-size: 0.95rem;
}

/* ==================== 服务项目 ==================== */
.services {
    background: var(--gray-lighter);
}

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

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--white);
    font-size: 2rem;
}

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

.service-card p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ==================== 产品展示 ==================== */
.products {
    background: var(--white);
}

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

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

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

.product-image {
    height: 220px;
    background: linear-gradient(135deg, #e8f4fd 0%, #d4e9fc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.product-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, rgba(255,255,255,0.8));
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: var(--dark);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-size: 1.15rem;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.5;
}

.product-info h3 a:hover {
    color: var(--primary);
}

.product-info p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-lighter);
}

.product-views {
    color: var(--gray-light);
    font-size: 0.85rem;
}

.product-more {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.product-more:hover {
    text-decoration: underline;
}

/* ==================== 新闻动态 ==================== */
.news {
    background: var(--gray-lighter);
}

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

.news-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
}

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

.news-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
}

.news-content {
    padding: 25px;
}

.news-date {
    color: var(--primary);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.5;
}

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

.news-content p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== 合作伙伴 ==================== */
.partners {
    background: var(--white);
    padding: 60px 0;
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.partner-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 60px;
    background: var(--gray-lighter);
    border-radius: 8px;
    color: var(--gray);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.partner-item:hover {
    background: var(--primary);
    color: var(--white);
}

/* ==================== 统计数字 ==================== */
.stats {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 80px 0;
}

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

.stat-item {
    text-align: center;
    color: var(--white);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ==================== 联系方式 ==================== */
.contact {
    background: var(--gray-lighter);
}

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

.contact-info {
    padding: 20px;
}

.contact-info h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 20px;
}

.contact-info > p {
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.8;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 5px;
}

.contact-text p {
    color: var(--gray);
    font-size: 0.95rem;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.contact-form h3 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,82,212,0.1);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.form-btn:hover {
    background: var(--primary-dark);
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
}

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

.footer-about h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.footer-about p {
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
    font-size: 0.9rem;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-contact p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: rgba(255,255,255,0.6);
}

.footer-bottom a:hover {
    color: var(--white);
}

/* ==================== 页面标题 ==================== */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 120px 0 60px;
    text-align: center;
    color: var(--white);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.breadcrumb {
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ==================== 列表页 ==================== */
.list-section {
    padding: 60px 0;
}

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

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.pagination a,
.pagination span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: var(--gray-dark);
    font-weight: 500;
    transition: var(--transition);
}

.pagination a:hover,
.pagination .current {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* ==================== 详情页 ==================== */
.article-section {
    padding: 60px 0;
}

.article-container {
    max-width: 900px;
    margin: 0 auto;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

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

.article-meta {
    color: var(--gray-light);
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.article-content {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--gray-dark);
}

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

.article-content h2 {
    font-size: 1.5rem;
    color: var(--dark);
    margin: 35px 0 20px;
}

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

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

.article-content li {
    margin-bottom: 10px;
    list-style: decimal;
}

.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.article-nav a {
    color: var(--primary);
    font-size: 0.95rem;
}

.article-nav a:hover {
    text-decoration: underline;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 992px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .services-grid,
    .products-grid,
    .news-grid,
    .list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .banner-text h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 70px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav a {
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }
    
    .banner {
        height: 500px;
    }
    
    .banner-text h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .services-grid,
    .products-grid,
    .news-grid,
    .list-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .about-images {
        order: -1;
    }
    
    .about-img-main {
        height: 300px;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        padding: 100px 0 50px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .banner-text h1 {
        font-size: 1.6rem;
    }
    
    .banner-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    .about-img-badge {
        width: 120px;
        height: 120px;
    }
    
    .about-img-badge strong {
        font-size: 2.5rem;
    }
    
    .article-header h1 {
        font-size: 1.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* 加载更多按钮 */
.load-more {
    text-align: center;
    margin-top: 50px;
}

.load-more-btn {
    display: inline-block;
    padding: 14px 50px;
    background: var(--white);
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    border-radius: 30px;
    transition: var(--transition);
}

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