/* 基础样式和字体 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

:root {
    --primary-color: #0056b3;
    --secondary-color: #f4f4f4;
    --text-color: #333;
    --light-text-color: #fff;
    --hover-color: #004494;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #fff;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: var(--light-text-color);
    color: var(--text-color);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 700;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo span {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.logo:hover span {
    color: var(--hover-color);
}

.nav-links ul {
    list-style: none;
    display: flex;
}

.nav-links ul li {
    margin-right: 20px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.lang-switch #lang-btn {
    background: var(--primary-color);
    color: var(--light-text-color);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.lang-switch #lang-btn:hover {
    background: var(--hover-color);
}

/* 主视觉区 */
.hero-section {
    background: url('https://imgbed.captainzeqi.com/file/1757128418286_pexels-tiger-lily-4483775.jpg') no-repeat center center/cover;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--light-text-color);
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-section .container {
    z-index: 1;
}

.headline {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.sub-headline {
    font-size: 1.2rem;
    font-weight: 400;
}

/* 通用部分样式 */
section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 10px auto 0;
}

/* 核心服务板块 */
.services-section {
    background: var(--secondary-color);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    text-align: center;
}

.service-item {
    background: var(--light-text-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-item h3 {
    margin-bottom: 0.5rem;
}

/* 定制材料板块 */
.materials-section {
    background: #fff;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.material-item {
    padding: 1rem;
    background: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.material-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.material-item h3 {
    margin-bottom: 0;
}

/* 定制工艺板块 */
.crafts-section {
    background: var(--secondary-color);
}

.craft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.craft-item {
    overflow: hidden;
    border-radius: 10px;
    background: var(--light-text-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding-bottom: 1rem;
}

.craft-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.craft-image-container {
    width: 100%;
    padding-top: 100%; /* 创建正方形容器，1:1 比例 */
    position: relative;
    overflow: hidden;
}

.craft-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.craft-item:hover .craft-image {
    transform: scale(1.05);
}

.craft-item h3 {
    margin-top: 1rem;
    color: var(--primary-color);
}


/* 产品案例板块 */
.cases-section {
    background: #fff;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.case-item {
    overflow: hidden;
    border-radius: 10px;
    background: var(--light-text-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding-bottom: 1rem;
}

.case-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.case-image {
    width: 100%;
    height: 200px; /* 固定高度，确保图片为正方形或统一尺寸 */
    object-fit: cover; /* 裁剪图片以适应容器 */
    transition: transform 0.3s ease;
}

.case-item:hover .case-image {
    transform: scale(1.05); /* 鼠标悬停放大效果 */
}

.case-item h3 {
    margin-top: 1rem;
    color: var(--primary-color);
}

/* 关于我们 */
.about-section {
    background: var(--secondary-color);
}
.about-section p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* 联系方式和表单 */
.contact-section {
    background: #fff;
}

.contact-info {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon {
    color: var(--primary-color);
    margin-right: 10px;
}

.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
    background: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.contact-form-container h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
}

.contact-form button {
    background: var(--primary-color);
    color: var(--light-text-color);
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background: var(--hover-color);
}

/* 页脚 */
.footer {
    background: var(--primary-color);
    color: var(--light-text-color);
    text-align: center;
    padding: 1.5rem 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
    }
    .nav-links ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-links ul li {
        margin: 5px 10px;
    }
    .logo {
        flex-direction: column;
        text-align: center;
    }
    .logo img {
        margin-right: 0;
        margin-bottom: 5px;
    }
    .headline {
        font-size: 2rem;
    }
    .sub-headline {
        font-size: 1rem;
    }
    .section-title {
        font-size: 2rem;
    }
}
