body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-image: url('images/bg_com.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* 头部和导航容器 */
header {
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.95) 40%,
        rgba(255, 255, 255, 0.7) 60%,
        rgba(255, 255, 255, 0.3) 80%,
        rgba(255, 255, 255, 0) 100%
    ), url('images/chui.png') right center/auto 100% no-repeat;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 3;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem 1rem;
}

header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 2.2rem;
    letter-spacing: -0.5px;
}

header .subtitle {
    margin: 0.3rem 0 1rem;
    color: #34495e;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.header-nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: 0 -2rem;
    padding: 0.8rem 2rem;
    border: 1px solid rgba(0,0,0,0.03);
}

.header-nav .nav-links {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

.header-nav .nav-links a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.3rem 0;
}

.header-nav .nav-links a:hover {
    color: #3498db;
}

.header-nav .nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #3498db;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.header-nav .nav-links a:hover::after {
    width: 100%;
}

.header-cta {
    margin: 1rem 0;
}

.cta-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    margin-right: 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cta-btn:first-child {
    background: #3498db;
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.cta-btn.secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: 1px solid rgba(0,0,0,0.1);
}

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

/* 主内容容器 */
.content-box {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35),
                0 8px 16px rgba(0, 0, 0, 0.25) !important;
    -webkit-box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35),
                        0 8px 16px rgba(0, 0, 0, 0.25) !important;
    -moz-box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35),
                     0 8px 16px rgba(0, 0, 0, 0.25) !important;
}

/* 内容区块 */
.content-section {
    margin: 1rem 0;
    padding: 1rem 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
                0 2px 6px rgba(0, 0, 0, 0.1) !important;
    -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
                        0 2px 6px rgba(0, 0, 0, 0.1) !important;
    -moz-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
                     0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

.content-section h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.8rem;
}

/* 嵌套内容区块 */
.content-section .content-section {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin: 1.5rem 0 0.75rem 0;
}

/* 图片轮播容器 */
.image-carousel-container {
    padding: 1rem;
    margin: 0.75rem 0;
}

.image-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.carousel-item {
    width: 300px;
    height: 200px;
    margin-right: 1rem;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2),
                0 2px 4px rgba(0, 0, 0, 0.1) !important;
    -webkit-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2),
                        0 2px 4px rgba(0, 0, 0, 0.1) !important;
    -moz-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2),
                     0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* 鼠标悬停时暂停动画 */
.image-carousel:hover .carousel-track {
    animation-play-state: paused;
}

/* 标题样式增强 */
h1, h2, h3, .subtitle {
    text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2) !important;
}

/* 页脚样式 */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0.5rem;
    height: 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 3rem;
    left: calc(50% + 600px + 1rem);
    width: 3rem;
    height: 3rem;
    border-radius: 4px;
    background: rgba(128, 128, 128, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    display: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.back-to-top:hover {
    background: rgba(128, 128, 128, 1);
}

.back-to-top.show {
    display: block;
    opacity: 1;
}

/* 服务卡片样式 */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.service-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.service-card .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.service-card:hover .icon {
    transform: scale(3);
}

.profile-photo img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

/* 联系表单样式 */
.contact-grid {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
    padding: 1rem;
}

.contact-form {
    flex: 1;
    padding: 1rem;
}

.contact-info h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin: 0.8rem 0;
    font-size: 1.1rem;
    color: #34495e;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 90%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.submit-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media screen and (max-width: 768px) {
    .contact-grid {
        flex-direction: column;
    }

    .contact-info {
        padding: 0.5rem;
    }

    .contact-form {
        padding: 0.5rem;
    }
}

@media screen and (max-width: 768px) {
    .contact-form form {
        max-width: 100%;
    }

    .contact-form button {
        width: 100%;
        align-self: center;
    }
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    /* 整体容器缩小padding */
    .container {
        padding: 0 0.5rem;
    }

    /* 头部样式优化 */
    header {
        background-size: 40% auto;
        padding: 1rem 0;
    }

    h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    /* 导航栏优化 */
    .header-nav {
        margin: 1rem -0.5rem 0;
        padding: 0.5rem;
    }

    .header-nav .nav-links {
        display: flex;
        flex-wrap: nowrap;
        gap: 1rem;
        justify-content: space-around;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        padding: 0.5rem 0;
    }

    .header-nav .nav-links::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .header-nav .nav-links a {
        font-size: 0.9rem;
        padding: 0.3rem 0.5rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media screen and (max-width: 480px) {
    .header-nav .nav-links {
        gap: 0.8rem;
    }

    .header-nav .nav-links a {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    .header-nav .nav-links {
        gap: 0.8rem;
        font-size: 0.8rem;
    }

    .header-nav .nav-links a {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .carousel-item {
        width: 200px;
        height: 130px;
    }

    .content-section {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 768px) {
    .service-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
        padding: 0.8rem;
        width: 95%;
        margin: 0 auto;
    }

    .service-item {
        padding: 0.8rem;
        aspect-ratio: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .service-item:nth-child(n+4) {
        display: none;
    }

    .service-item h3 {
        font-size: 0.9rem;
        margin: 0.5rem 0;
        text-align: center;
    }

    .service-item p {
        display: none;
    }

    .service-icon {
        font-size: 2rem;
    }
}

@media screen and (max-width: 480px) {
    .service-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        padding: 0.5rem;
        width: 98%;
    }

    .service-item {
        padding: 0.5rem;
    }

    .service-item h3 {
        font-size: 0.85rem;
        margin: 0.4rem 0;
    }

    .service-icon {
        font-size: 1.8rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    header .subtitle {
        font-size: 0.8rem;
    }

    .cta-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }
}
