/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 导航栏样式 */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 50px;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF8C00;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* 首页样式 */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/banner.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding-top: 80px;
    position: relative;
}

.hero-content {
    max-width: 800px;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #FF8C00;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #FF7000;
    transform: translateY(-2px);
}

/* 向下滚动按钮样式 */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: #fff;
    font-size: 24px;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5em;
    }
    
    .hero-content p {
        font-size: 1em;
    }
}

/* 关于我们样式 */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 50px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
    text-align: center;
}

.stat-item .number {
    font-size: 2.5em;
    color: #FF8C00;
    font-weight: bold;
}

/* 服务内容样式 */
.services {
    background: #f9f9f9;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    font-size: 40px;
    color: #FF8C00;
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
}

.service-card ul {
    list-style: none;
}

.service-card li {
    margin: 10px 0;
    padding-left: 20px;
    position: relative;
}

.service-card li::before {
    content: '•';
    color: #FF8C00;
    position: absolute;
    left: 0;
}
/* 联系我们样式 */
.contact {
    background: #f9f9f9;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-item {
    background: #fff;
    padding: 40px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-10px);
}

.contact-item .icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: #FF8C00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item .icon i {
    font-size: 30px;
    color: #fff;
}

.contact-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.contact-item p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 5px;
}

/* 响应式布局 */
@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-item {
        padding: 30px 20px;
    }
    
    .contact-item .icon {
        width: 60px;
        height: 60px;
    }
    
    .contact-item .icon i {
        font-size: 24px;
    }
}

/* 页脚样式 */
.footer {
    background: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

/* 响应式样式 */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 20px 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: block;
    }

    .nav-menu li {
        margin: 10px 0;
        text-align: center;
    }

    .hamburger {
        display: block;
        cursor: pointer;
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background: #333;
        margin: 5px 0;
        transition: 0.3s;
    }

    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.5em;
    }
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2em;
    }
}

/* 工程案例样式 */
.projects {
    background: #f9f9f9;
    padding: 100px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    color: #fff;
    text-align: center;
    padding: 20px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.project-card:hover .project-info {
    transform: translateY(0);
}

.project-info h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.project-info p {
    margin-bottom: 15px;
    opacity: 0.8;
}

.project-details {
    margin: 15px 0;
}

.project-details span {
    display: block;
    margin: 5px 0;
    font-size: 0.9em;
    opacity: 0.8;
}

.project-link {
    display: inline-block;
    padding: 10px 25px;
    background: #FF8C00;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: background 0.3s ease;
}

.project-link:hover {
    background: #FF7000;
}

/* 响应式布局 */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* 图片尺寸控制 */
/* 首页横幅图片 */
.hero {
    /* ... 其他样式保持不变 ... */
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/banner.jpg');
    background-size: cover;
    background-position: center;
}

/* 关于我们图片 */
.about-image {
    width: 100%;
    max-width: 600px; /* 限制最大宽度 */
    height: auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: 400px; /* 固定高度 */
    object-fit: cover; /* 保持图片比例 */
    display: block;
}

/* 工程案例图片 */
.project-image {
    width: 100%;
    height: 300px; /* 固定高度 */
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 后台管理项目图片 */
.project-card .project-image {
    width: 100%;
    height: 250px;
}

.project-card .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 编辑器中的图片 */
.project-description img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .about-image img {
        height: 300px;
    }

    .project-image {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .about-image img {
        height: 250px;
    }

    .project-image {
        height: 200px;
    }
}

/* 项目详情浮窗样式 */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 50px auto;
    padding: 0;
    width: 90%;
    max-width: 1000px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.close-modal {
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #FF8C00;
}

.modal-body {
    padding: 20px;
}

.project-detail-image {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.project-detail-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.project-detail-info {
    color: #333;
}

.description {
    margin-bottom: 20px;
    line-height: 1.6;
}

.description img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.project-specs {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.spec-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.spec-item:last-child {
    margin-bottom: 0;
}

.spec-item label {
    font-weight: bold;
    margin-right: 10px;
    color: #666;
    min-width: 100px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px auto;
        width: 95%;
    }

    .modal-header h3 {
        font-size: 20px;
    }

    .project-detail-image img {
        max-height: 300px;
    }

    .spec-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .spec-item label {
        margin-bottom: 5px;
    }
}