/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    scroll-behavior: smooth;
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 页面加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4a6fa5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 按钮点击效果 */
.btn,
.btn-sm {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.primary-btn .ripple {
    background-color: rgba(74, 111, 165, 0.3);
}

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

/* 导航栏 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 40px;
    margin-right: 15px;
}

.logo h1 {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 30px;
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 10px 0;
    display: block;
}

.nav-links a:hover,
.nav-links a.active {
    color: #4a6fa5;
}

/* 二级导航 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    padding: 10px 20px;
    font-size: 14px;
    color: #666;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: #4a6fa5;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* 英雄区 */
.hero {
    background: linear-gradient(rgba(74, 111, 165, 0.9), rgba(74, 111, 165, 0.9)), url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=high%20quality%20pencil%20factory%20production%20line%2C%20traditional%20craftsmanship%2C%20modern%20facility%2C%20warm%20lighting&image_size=landscape_16_9');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 160px 0 120px;
    text-align: center;
    margin-top: 80px;
}

.hero-content h1 {
    font-size: 56px;
    margin-bottom: 25px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

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

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 16px;
}

.primary-btn {
    background-color: #fff;
    color: #4a6fa5;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.secondary-btn {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.primary-btn:hover {
    background-color: #f0f0f0;
}

.secondary-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

/* 核心优势 */
.features {
    padding: 80px 0;
    background-color: #fff;
}

.features h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    text-align: center;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.feature-icon {
    margin-bottom: 20px;
    color: #4a6fa5;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* 产品精选 */
.products-preview {
    padding: 80px 0;
    background-color: #f5f5f5;
}

.products-preview h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    color: #333;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

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

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

.product-card .card-content {
    padding: 20px;
}

.product-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #333;
    transition: color 0.3s ease;
}

.product-card:hover h3 {
    color: #4a6fa5;
}

.product-card p {
    margin-bottom: 16px;
    color: #666;
    line-height: 1.5;
}

.product-card .price {
    font-weight: bold;
    color: #4a6fa5;
    margin-bottom: 16px;
    font-size: 18px;
}

.btn-sm {
    display: inline-block;
    background-color: #4a6fa5;
    color: #fff;
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-sm:hover {
    background-color: #3a5a85;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(74, 111, 165, 0.2);
}

.quick-view {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(255,255,255,0.9);
    color: #4a6fa5;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-card:hover .quick-view {
    opacity: 1;
    transform: translateY(0);
}

.quick-view:hover {
    background-color: #4a6fa5;
    color: #fff;
}

/* 品牌故事 */
.brand-story {
    padding: 80px 0;
    background-color: #4a6fa5;
    color: #fff;
    text-align: center;
}

.story-content h2 {
    font-size: 36px;
    margin-bottom: 30px;
}

.story-content p {
    font-size: 18px;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.story-content .btn {
    background-color: #fff;
    color: #4a6fa5;
    margin-top: 20px;
}

.story-content .btn:hover {
    background-color: #f0f0f0;
}

/* 客户评价 */
.testimonials {
    padding: 80px 0;
    background-color: #fff;
    text-align: center;
}

.testimonials h2 {
    font-size: 36px;
    margin-bottom: 40px;
    color: #333;
}

.testimonials p {
    color: #666;
    line-height: 1.6;
}

.testimonials h4 {
    color: #333;
    font-size: 16px;
    margin-bottom: 5px;
}

/* 页脚 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

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

.footer-links h4,
.footer-contact h4 {
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

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

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-contact p {
    margin-bottom: 10px;
    color: #ccc;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    color: #ccc;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        padding: 10px 20px;
    }

    .logo img {
        height: 30px;
        margin-right: 10px;
    }

    .logo h1 {
        font-size: 18px;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        right: -100%;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: left;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.1);
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-links a {
        padding: 15px 20px;
        display: block;
    }

    /* 移动设备上的二级导航 */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        min-width: 100%;
        display: none;
    }

    .dropdown:hover .dropdown-menu {
        display: block;
    }

    .dropdown-menu li {
        border-bottom: 1px solid #f0f0f0;
    }

    .dropdown-menu a {
        padding: 10px 30px;
        font-size: 14px;
    }

    .hamburger {
        display: block;
    }

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

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero {
        padding: 120px 0 80px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 200px;
        text-align: center;
    }

    .features h2,
    .products-preview h2,
    .story-content h2 {
        font-size: 28px;
    }

    .features-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-card img {
        height: 200px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 16px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
        width: 180px;
    }

    .features h2,
    .products-preview h2,
    .story-content h2 {
        font-size: 24px;
    }

    .feature-card,
    .product-card {
        padding: 20px;
    }

    .product-card img {
        height: 180px;
    }

    .process-content {
        padding: 0 10px;
    }

    .contact-form {
        padding: 20px;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px;
        font-size: 14px;
    }

    .footer-content {
        gap: 30px;
    }

    .footer-info h3 {
        font-size: 18px;
    }

    .footer-links h4,
    .footer-contact h4 {
        font-size: 14px;
    }
}

/* 其他页面通用样式 */
.page-content {
    padding: 120px 0 80px;
    background-color: #fff;
}

.page-content h2 {
    font-size: 36px;
    margin-bottom: 40px;
    color: #333;
    text-align: center;
}

.page-content p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

/* 关于我们页面 */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* 产品中心页面 */
.products-content {
    max-width: 1000px;
    margin: 0 auto;
}

/* 工艺介绍页面 */
.process-content {
    max-width: 800px;
    margin: 0 auto;
}

/* 联系方式页面 */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-form {
    background-color: #f9f9f9;
    padding: 40px;
    border-radius: 8px;
    margin-top: 40px;
}



.contact-info {
    margin-top: 40px;
    text-align: center;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.contact-info p {
    margin-bottom: 10px;
    color: #666;
}