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

html {
    scroll-behavior: smooth;
    /* 移除 overflow-x: hidden，这可能影响 sticky 定位 */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    /* 移除 overflow-x: hidden，这可能影响 sticky 定位 */
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: #666;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-full {
    width: 100%;
}

/* Header Styles */
.header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    will-change: transform;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar {
    padding: 1rem 0;
}

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

/* Navigation Brand */
.nav-brand {
    display: flex;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
}

.brand-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 0;
}

.brand-text .tagline {
    font-size: 0.875rem;
    color: #666;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
    background-color: rgba(37, 99, 235, 0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    /* 移除 overflow: hidden，这可能影响 sticky 定位 */
    /* overflow: hidden; */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" style="stop-color:%232563eb;stop-opacity:0.1"/><stop offset="100%" style="stop-color:%232563eb;stop-opacity:0"/></radialGradient></defs><circle cx="200" cy="200" r="300" fill="url(%23a)"/><circle cx="800" cy="800" r="400" fill="url(%23a)"/></svg>') no-repeat center center;
    background-size: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(37, 99, 235, 0.05), rgba(29, 78, 216, 0.1));
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #1e293b, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 3rem;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    margin-right: 0.5rem;
    margin-bottom: 0;
    color: #fff;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.feature:hover .feature-icon {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.1);
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

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

.phone-label {
    display: block;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.phone-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #dc2626;
    text-decoration: none;
}

.phone-number:hover {
    color: #b91c1c;
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.125rem;
    border: 2px dashed #94a3b8;
}

/* Products Section */
.products {
    background: white;
}

.product-featured {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
    padding: 3rem;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 16px;
    align-items: center;
}

.featured-content h3 {
    color: #1e293b;
    margin-bottom: 2rem;
}

.product-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.product-specs h4,
.product-features h4 {
    color: #2563eb;
    margin-bottom: 1rem;
}

.product-specs ul,
.product-features ul {
    list-style: none;
}

.product-specs li,
.product-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.product-specs li:last-child,
.product-features li:last-child {
    border-bottom: none;
}

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

.product-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

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

.product-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    margin-bottom: 1rem;
    color: #fff;
    transition: all 0.3s ease;
}

.product-icon svg {
    width: 48px;
    height: 48px;
    fill: currentColor;
}

.product-card:hover .product-icon {
    transform: scale(1.1);
}

.product-card h4 {
    color: #1e293b;
    margin-bottom: 1rem;
}

/* Advantages Section */
.advantages {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
}

.advantages .section-title {
    color: white;
}

.advantages .section-subtitle {
    color: #cbd5e1;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.advantage-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.advantage-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.advantage-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-bottom: 1rem;
    color: #fff;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.advantage-icon svg {
    width: 64px;
    height: 64px;
    fill: currentColor;
}

.advantage-card:hover .advantage-icon {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.advantage-card h3 {
    color: white;
    margin-bottom: 1rem;
}

.advantage-card p {
    color: #cbd5e1;
    line-height: 1.6;
}

/* Applications Section */
.applications {
    background: #f8fafc;
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.app-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.app-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.app-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 50%;
    margin-bottom: 1rem;
    color: #fff;
    transition: all 0.3s ease;
}

.app-icon svg {
    width: 48px;
    height: 48px;
    fill: currentColor;
}

.app-card:hover .app-icon {
    transform: scale(1.1) rotate(5deg);
}

.app-card h4 {
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.app-card p {
    color: #64748b;
    font-size: 0.875rem;
}

/* Knowledge Section */
.knowledge {
    background: white;
}

.knowledge-content {
    display: grid;
    gap: 2rem;
}

.knowledge-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid #2563eb;
}

.knowledge-card h3 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.knowledge-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.feature-tag {
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.structure-diagram {
    margin-top: 1rem;
}

.layer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.layer-name {
    font-weight: 600;
    color: #1e293b;
}

.layer-desc {
    color: #64748b;
    font-size: 0.875rem;
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    color: #1e293b;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: #fff;
    margin-top: 0.25rem;
    transition: all 0.3s ease;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

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

.contact-item strong {
    display: block;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.contact-item a {
    color: #2563eb;
    font-weight: 600;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.contact-form h3 {
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-info h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-info p {
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.footer-contact h4,
.footer-products h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-contact p {
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

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

.footer-products li {
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
}

.footer-bottom p {
    color: #9ca3af;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* 防止横向滚动 - 但不影响 sticky 定位 */
    body, html {
        max-width: 100%;
        /* 移除 overflow-x: hidden，使用其他方式防止横向滚动 */
        box-sizing: border-box;
    }
    
    /* 确保 header 在移动端也保持 sticky */
    .header {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    .container {
        padding: 0 15px;
        max-width: 100%;
        word-wrap: break-word;
    }

    /* 确保所有文本内容不会超出屏幕 */
    h1, h2, h3, h4, h5, h6, p, li, span {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        z-index: 1000;
    }

    .nav-menu.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        padding: 1rem;
        border-bottom: 1px solid #e2e8f0;
        display: block;
        width: 100%;
    }

    .nav-toggle {
        display: flex;
    }

    .brand-text h1 {
        font-size: 1.3rem;
    }

    .brand-text .tagline {
        font-size: 0.8rem;
    }

    .brand-logo svg {
        width: 35px;
        height: 35px;
    }

    .hero-title {
        font-size: 2.5rem;
        padding: 0 10px;
    }

    .hero-subtitle {
        padding: 0 10px;
    }

    .hero-content {
        max-width: 100%;
        padding: 0 10px;
    }

    .hero-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        padding: 0 10px;
    }

    .feature {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem 0.5rem;
        min-width: 0;
        word-wrap: break-word;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 0.5rem;
    }

    .feature-icon svg {
        width: 30px;
        height: 30px;
    }

    .about-content,
    .product-featured,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-featured {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }

    .featured-content h3 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 1.5rem;
        word-wrap: break-word;
        hyphens: auto;
    }

    .product-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-specs ul,
    .product-features ul {
        padding-left: 1rem;
    }

    .product-specs li,
    .product-features li {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        word-wrap: break-word;
    }

    .featured-image {
        order: -1; /* 在移动端让图片显示在文字之前 */
    }

    .featured-image svg {
        width: 100%;
        height: auto;
        max-width: 400px;
    }

    .about-stats {
        justify-content: center;
    }

    .advantages-grid,
    .applications-grid {
        grid-template-columns: 1fr;
    }

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

    .container {
        padding: 0 15px;
    }

    section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
        padding: 0 5px;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 5px;
    }

    .hero-content {
        max-width: 100%;
        padding: 0 5px;
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        max-width: 100%;
        width: 100%;
        padding: 0 5px;
    }

    .feature {
        flex-direction: row;
        text-align: left;
        align-items: center;
        gap: 1rem;
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .feature-icon svg {
        width: 24px;
        height: 24px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-featured {
        padding: 1.5rem 0.75rem;
        margin-bottom: 1.5rem;
    }

    .featured-content h3 {
        font-size: 1.3rem;
        line-height: 1.2;
        margin-bottom: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .product-info {
        gap: 1rem;
    }

    .product-specs h4,
    .product-features h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .product-specs li,
    .product-features li {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 0.4rem;
    }

    .featured-image svg {
        width: 100%;
        height: auto;
        max-width: 350px;
    }

    .image-placeholder {
        text-align: center;
        overflow: hidden;
    }

    section {
        padding: 2rem 0;
    }

    .section-title {
        font-size: 1.75rem;
        padding: 0 10px;
    }

    .section-subtitle {
        padding: 0 10px;
        font-size: 0.9rem;
    }

    .hero-cta {
        gap: 1rem;
    }

    .btn {
        padding: 12px 24px;
        font-size: 16px;
        width: 100%;
    }

    .phone-number {
        font-size: 1.25rem;
        font-weight: bold;
    }

    .brand-text h1 {
        font-size: 1.25rem;
    }

    .brand-text .tagline {
        font-size: 0.75rem;
    }
}

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

.hero-content {
    animation: fadeInUp 1s ease-out;
}

/* Scroll animations can be added with JavaScript */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

/* Ensure no pseudo elements or duplicate displays */
.back-to-top::before,
.back-to-top::after {
    display: none !important;
    content: none !important;
}

/* Ensure only one back to top button exists */
.back-to-top:not(:first-of-type) {
    display: none !important;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
