/* ========== 全局重置与变量 ========== */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #1a2a4f;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --bg-gray: #f0f4fa;
    --white: #fff;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
    --border-radius: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Roboto, Arial, sans-serif;
    color: var(--text-dark);
    background: var(--white);
    line-height: 1.6;
    font-size: 16px;
}

/* ========== 响应式容器 ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 头部导航（移动优先） ========== */
.header {
    background: var(--secondary-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 20px;
}

.logo {
    flex: 0 0 auto;
}

.logo img {
    height: 44px;
    width: auto;
    display: block;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 3px;
}

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

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

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

/* 导航菜单 */
.nav {
    flex: 1 1 auto;
}

.nav ul {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    gap: 30px;
}

.nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    padding: 8px 0;
    display: inline-block;
    transition: var(--transition);
    position: relative;
}

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

.nav ul li.active a:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* 平板端适配 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav {
        display: none;
        width: 100%;
        background: var(--secondary-color);
        margin-top: 12px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav.active {
        display: block;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
    }
    
    .nav ul li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .nav ul li a {
        display: block;
        padding: 12px;
    }
}

/* ========== Banner轮播 ========== */
.banner {
    width: 100%;
    height: 80vh;
    min-height: 450px;
    max-height: 700px;
    overflow: hidden;
    position: relative;
    margin-top: 68px;
    background: linear-gradient(135deg, var(--secondary-color), #0f1a3a);
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

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

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    z-index: 10;
    width: 90%;
    max-width: 800px;
    padding: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.banner-content h2 {
    font-size: clamp(28px, 5vw, 52px);
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.banner-content p {
    font-size: clamp(16px, 3vw, 22px);
    margin-bottom: 30px;
    opacity: 0.92;
}

@media (max-width: 768px) {
    .banner {
        height: 60vh;
        min-height: 380px;
        margin-top: 60px;
    }
}

@media (max-width: 480px) {
    .banner {
        height: 50vh;
        min-height: 320px;
        margin-top: 56px;
    }
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-block;
    padding: 14px 36px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(59,130,246,0.4);
}

.btn-sm {
    display: inline-block;
    padding: 8px 24px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-sm:hover {
    background: var(--primary-dark);
    transform: translateX(3px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    box-shadow: none;
}

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

@media (max-width: 480px) {
    .btn {
        padding: 12px 28px;
        font-size: 14px;
    }
}

/* ========== 通用板块 ========== */
.section {
    padding: 80px 0;
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 50px 0;
    }
}

.section-title {
    text-align: center;
    font-size: clamp(28px, 5vw, 36px);
    margin-bottom: 16px;
    color: var(--secondary-color);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-sub {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 50px;
    font-size: clamp(14px, 2vw, 16px);
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-sub:before,
.section-sub:after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 1px;
    background: var(--primary-color);
}

.section-sub:before {
    left: calc(50% - 60px);
}

.section-sub:after {
    right: calc(50% - 60px);
}

@media (max-width: 480px) {
    .section-sub:before,
    .section-sub:after {
        display: none;
    }
}

/* ========== 产品网格 ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid #eee;
}

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

.product-img {
    height: 240px;
    overflow: hidden;
    background: var(--bg-light);
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.08);
}

.product-info {
    padding: 22px;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.product-info h3 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

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

.product-info p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 18px;
    font-size: 14px;
}

@media (max-width: 480px) {
    .product-info {
        padding: 18px;
    }
}

/* ========== 关于我们 ========== */
.about-wrap {
    display: flex;
    gap: 60px;
    align-items: center;
    flex-wrap: wrap;
}

.about-text {
    flex: 1 1 350px;
}

.about-text h3 {
    font-size: clamp(24px, 4vw, 32px);
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

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

.about-stats {
    flex: 1 1 350px;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 28px 20px;
    background: var(--bg-gray);
    border-radius: var(--border-radius);
    flex: 1 1 120px;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.stat-num {
    font-size: clamp(32px, 5vw, 42px);
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.2;
}

.stat-label {
    color: var(--text-light);
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .about-wrap {
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .stat-item {
        padding: 20px;
    }
}

/* ========== 新闻列表 ========== */
.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.news-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    transition: var(--transition);
    border: 1px solid #eee;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.news-date {
    color: var(--primary-color);
    font-size: 14px;
    margin-bottom: 12px;
    display: inline-block;
    padding: 4px 12px;
    background: rgba(59,130,246,0.1);
    border-radius: 20px;
}

.news-title {
    font-size: 18px;
    margin: 12px 0;
}

.news-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

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

.news-summary {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .news-list {
        grid-template-columns: 1fr;
    }
}

/* ========== 底部 ========== */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 25px;
}

.footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 45px;
}

.footer-info h3 {
    font-size: 20px;
    margin-bottom: 18px;
    font-weight: 600;
}

.footer-info p {
    margin: 10px 0;
    opacity: 0.75;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links h4 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.footer-links h4:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

.footer-links a {
    color: var(--white);
    opacity: 0.7;
    text-decoration: none;
    display: block;
    margin: 12px 0;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    padding-left: 8px;
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 35px;
    margin-top: 35px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    opacity: 0.6;
}

.copyright a {
    color: var(--white);
    text-decoration: none;
}

@media (max-width: 768px) {
    .footer {
        padding: 50px 0 20px;
    }
    
    .footer .container {
        text-align: center;
        gap: 35px;
    }
    
    .footer-links h4:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links a:hover {
        padding-left: 0;
    }
    
    .footer-info p {
        justify-content: center;
    }
}

/* ========== 面包屑 ========== */
.position {
    padding: 20px 0;
    color: var(--text-light);
    font-size: 14px;
    margin-top: 80px;
    background: var(--bg-light);
    margin-bottom: 30px;
}

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

@media (max-width: 768px) {
    .position {
        margin-top: 70px;
        font-size: 12px;
    }
}

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

.pagination a, 
.pagination span {
    display: inline-block;
    padding: 10px 18px;
    background: var(--white);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    font-size: 14px;
}

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

@media (max-width: 480px) {
    .pagination a,
    .pagination span {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* ========== 询价表单 ========== */
.inquiry-form {
    max-width: 650px;
    margin: 0 auto;
    width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.submit-btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: var(--transition);
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ========== 工具类 ========== */
.clearfix:after {
    content: "";
    display: table;
    clear: both;
}

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

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

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

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