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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

.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;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

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

.navbar-brand h1 {
    color: #0066cc;
    font-size: 24px;
}

.navbar-nav ul {
    display: flex;
    list-style: none;
}

.navbar-nav ul li {
    margin: 0 15px;
}

.navbar-nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar-nav ul li a:hover {
    color: #0066cc;
}

.navbar-phone {
    display: flex;
    align-items: center;
}

.navbar-phone i {
    color: #0066cc;
    margin-right: 5px;
}

/* 英雄区域 */
.hero {
    position: relative;
    height: 45vh;
    margin-top: 70px;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4));
    z-index: 1;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 2;
    width: 90%;
    max-width: 800px;
}

.hero-content h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

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

.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: #fff;
}

.dot:hover {
    background-color: rgba(255,255,255,0.8);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #0066cc;
    color: #fff;
}

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

/* 服务区域 */
.services {
    padding: 80px 0;
    background-color: #f9f9f9;
}

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

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

.service-main-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.service-main-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.service-main-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-main-card h3 {
    font-size: 22px;
    margin: 20px 0 10px 0;
    color: #333;
}

.service-main-card p {
    color: #666;
    padding: 0 20px 20px 20px;
    font-size: 14px;
    line-height: 1.6;
}

.service-category {
    margin-bottom: 60px;
}

.category-title {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
    padding-left: 10px;
    border-left: 4px solid #0066cc;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.service-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.service-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 15px;
}

.service-card h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.service-card p {
    color: #666;
    padding: 0 15px 15px 15px;
    font-size: 14px;
}

/* 案例展示 */
.cases {
    padding: 80px 0;
}

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

.case-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.case-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.case-card h3 {
    font-size: 18px;
    margin: 15px 0 10px 0;
    padding: 0 20px;
}

.case-card p {
    color: #666;
    padding: 0 20px 20px 20px;
}

/* 施工工艺 */
.crafts {
    padding: 80px 0;
    background-color: #f9f9f9;
}

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

.craft-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.craft-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.craft-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.craft-card h3 {
    font-size: 20px;
    margin: 20px 0 10px 0;
    color: #333;
}

.craft-card p {
    color: #666;
    padding: 0 20px 20px 20px;
    font-size: 14px;
    line-height: 1.6;
}

/* 关于我们 */
.about {
    padding: 80px 0;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.about-text {
    flex: 1;
    min-width: 300px;
    padding-right: 40px;
}

.about-text p {
    margin-bottom: 20px;
    color: #666;
}

.about-stats {
    display: flex;
    margin-top: 40px;
}

.stat-item {
    margin-right: 40px;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #0066cc;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 联系我们 */
.contact {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-form h3 {
    margin-bottom: 30px;
    font-size: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

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

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.info-item i {
    color: #0066cc;
    margin-right: 10px;
    font-size: 18px;
}

/* 页脚 */
.footer {
    background-color: #f8f9fa;
    color: #555;
    padding: 50px 0 25px 0;
    border-top: 1px solid #e8e8e8;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo {
    flex: 1;
    min-width: 200px;
}

.footer-logo h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #333;
}

.footer-logo p {
    color: #888;
    line-height: 1.6;
}

.footer-links {
    flex: 1;
    min-width: 200px;
}

.footer-links h4 {
    font-size: 16px;
    margin-bottom: 18px;
    color: #333;
    font-weight: 600;
}

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

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

.footer-links ul li a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: #2d8cf0;
}

.footer-contact {
    flex: 1;
    min-width: 200px;
}

.footer-contact h4 {
    font-size: 16px;
    margin-bottom: 18px;
    color: #333;
    font-weight: 600;
}

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

.footer-contact ul li {
    margin-bottom: 10px;
    color: #666;
}

.footer-contact ul li i {
    color: #2d8cf0;
    margin-right: 10px;
}

.footer-social {
    flex: 1;
    min-width: 200px;
}

.footer-social h4 {
    font-size: 16px;
    margin-bottom: 18px;
    color: #333;
    font-weight: 600;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e8ecef;
    color: #666;
    transition: all 0.3s;
}

.social-icons a:hover {
    background-color: #2d8cf0;
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #999;
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-nav {
        display: none;
    }

    .hero {
        height: 35vh;
    }

    .hero-content h2 {
        font-size: 24px;
    }

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

    .section-title {
        font-size: 28px;
    }

    .about-text {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .about-stats {
        flex-direction: column;
    }

    .stat-item {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .contact-form {
        padding: 30px;
    }

    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 30vh;
    }

    .hero-content h2 {
        font-size: 20px;
    }

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

    .section-title {
        font-size: 24px;
    }

    .services-grid,
    .cases-grid,
    .crafts-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 20px;
    }
}

/* 管理后台样式 */
.service-item,
.case-item,
.craft-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.btn-remove {
    background-color: #ff4d4f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
}

.btn-remove:hover {
    background-color: #ff7875;
}

.btn-add {
    background-color: #1890ff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 15px;
}