/* --- 全局与基础样式 --- */
:root {
    --primary-color: #daa520; /* 主题金色 (Logo黄) */
    --secondary-color: #1E8449; /* 点缀绿色 */
    --text-color: #333;
    --light-gray: #f4f4f4;
    --white-color: #fff;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

h1, h2, h3 {
    color: var(--text-color);
    margin-bottom: 20px;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 20px auto 0;
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--primary-color);
    color: var(--white-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-weight: bold;
}

.btn:hover {
    background-color: #c7951a;
    transform: translateY(-2px);
}

/* --- 顶部导航栏 --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

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

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --- Logo 组合样式 (最终修复版) --- */
.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0; /* 防止logo在空间不足时被压缩变形 */
}
.logo-container .logo-img {
    height: 50px; /* 控制logo图片的高度 */
    width: auto;  /* 宽度自动按比例缩放 */
    display: block; /* 移除图片下方的默认空隙 */
    margin-right: 12px;
}
.logo-container .logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    justify-content: center;
}
.logo-container .logo-title-cn {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}
.logo-container .logo-title-en {
    font-size: 11px;
    color: #7f8c8d;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}


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

.nav-links li {
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    padding: 20px 18px;
    display: block;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links .active a {
    color: var(--primary-color);
}

/* 下拉菜单 */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white-color);
    min-width: 180px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
}

.dropdown-content a {
    padding: 12px 16px;
    white-space: nowrap;
}

.dropdown:hover .dropdown-content {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 移动端汉堡菜单 */
.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* --- 主视觉区 (Hero) --- */
#hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/hero-background.png');
    background-size: cover;
    background-position: center;
    color: var(--white-color);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--white-color);
}

.hero-content h1::after {
    display: none;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* --- 内容区块通用样式 --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card-link {
    text-decoration: none;
    color: inherit;
}

.card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

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

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

.card-content {
    padding: 25px;
}

/* --- 关于我们 (首页) --- */
#about .about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}
#about .about-text { flex: 1; }
#about .about-image { flex: 1; }
#about .about-image img {
    width: 100%;
    border-radius: var(--border-radius);
}

/* --- 产品与技术 (首页) --- */
#products {
    background-color: var(--light-gray);
}
#products .card h3 {
    color: var(--primary-color);
}

/* --- 新闻中心 (首页) --- */
.news-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--border-radius);
}
.news-item-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.news-item {
    display: flex;
    gap: 20px;
    background: var(--white-color);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}
.news-item img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--border-radius);
    flex-shrink: 0;
}
.news-item-content h4 { margin-bottom: 10px; }
.news-item-content .date {
    font-size: 0.9rem;
    color: #777;
}

/* --- 联系我们 (首页) --- */
#contact {
     background-color: var(--light-gray);
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
}
.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}
.contact-info i {
    color: var(--primary-color);
    margin-right: 10px;
    width: 20px;
}

/* --- 页脚 --- */
footer {
    background-color: #222;
    color: #aaa;
    padding: 40px 0;
    text-align: center;
}

/* --- 响应式设计 --- */
@media (max-width: 768px) {
    h2 { font-size: 2rem; }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px;
        left: 0;
        background-color: var(--white-color);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links li { width: 100%; text-align: center; }
    .dropdown-content { position: static; box-shadow: none; border-top: 1px solid var(--light-gray); }

    .menu-toggle {
        display: block;
    }

    #hero { height: 60vh; }
    .hero-content h1 { font-size: 2.5rem; }

    #about .about-content, .contact-grid {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
}
