﻿/* 基础样式和布局 */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width:initial ;/* 适应性最大宽度 */
    margin: 0 auto;
    padding: 0 20px;
    
}

.header-top {
    display: flex;
    justify-content: space-between; /* 核心代码：让子元素两端对齐 */
    align-items: center; /* 可选：垂直居中对齐 */
    padding: 10px 0;
}

.logo {
    height: 60px; /* 调整 Logo 高度 */
    width: auto;
}
.logo-link {
    display: flex;
    align-items: center; /* 垂直居中对齐 */
    text-decoration: none; /* 移除下划线 */
}

.company-name {
    
    margin-left: 5px; /* 在 Logo 和名称之间添加一些间距 */
    font-size: 20px; /* 调整字体大小 */
    color: #333; /* 字体颜色，根据你的网站主题调整 */
    font-weight: bold;
    white-space: nowrap; /* 强制文本不换行 */
    overflow: hidden; /* 隐藏超出容器的部分 */
    text-overflow: ellipsis; /* 用省略号 (...) 代替隐藏的部分 */
}

.contact-info {
    margin-left: 400px;
    display: flex;
    align-items: flex-end;
    font-size: 14px;
    color: #555;
}

.phone-number {
    margin-left: 10;
    font-size: 18px;
    font-weight: bold;
    color: #007bff; /* 电话号码颜色，可自定义 */
    text-decoration: none; /* 移除下划线 */
    transition: color 0.3s;
}

    .phone-number:hover {
        color: #0056b3;
    }

/* 导航菜单样式 */
.main-nav {
    border-top: 1px solid #e0e0e0;
    background: #e0e0e0;
}

.nav-list {
    display: flex;
    justify-content: flex-start; /* 导航项靠左对齐 */
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    padding: 0;
}

    .nav-item a {
        display: block;
        padding: 15px 25px;
        text-decoration: none;
        color: #555;
        font-size: 16px;
        font-weight: 500;
        transition: color 0.3s, background-color 0.3s;
    }

        .nav-item a:hover {
            color: #007bff;
            background-color: #f8f9fa;
        }

    .nav-item.current-item a {
        color: #007bff;
        border-bottom: 2px solid #007bff;
        background-color: #f8f9fa;
    }

/* 移动设备响应式 */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        text-align: center;
    }

    .contact-info {
        margin-top: 10px;
    }

    .main-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-top: none;
    }

    .nav-list {
        justify-content: flex-start;
        flex-wrap: nowrap;
    }

    .nav-item a {
        white-space: nowrap;
    }
}
