/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

/* 头部区域 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 7%;
    background-color: #eee;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 40px;
}

.logo span {
    font-size: 1.2rem;
    font-weight: bold;
    color: #007b8e;
}

.search-bar {
    flex-grow: 1;
    max-width: 500px;
    margin: 0 1rem;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
    font-size: 1rem;
}

.search-bar button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
}

.contact-btn {
    background-color: #d32f2f;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.contact-btn:hover {
    background-color: #b71c1c;
}

.contact-info {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-info i {
    font-size: 1.2rem;
}

/* 主标题横幅 */
/* 横幅 - 水平一排排列 */
.banner {
    background-color: #d12f27;
    color: white;
    padding: 1rem 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem; /* 元素之间的间距 */
    flex-wrap: wrap; /* 小屏自动换行，避免溢出 */
    font-size: 1.1rem;
}
.banner h1 {
    margin: 0;
    font-size: 1.4rem;
}

.banner .sun,
.banner .icon {
    font-size: 1.3rem;
}

.banner .text {
    font-weight: bold;
    white-space: nowrap; /* 防止中文断行（可选） */
}

/* Hot Topic */
.hot-topic {
    background-color: #fff;
    padding: 0.5rem 5%;
    text-align: center;
    color: #d32f2f;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.hot-topic .label {
    background-color: #d32f2f;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-weight: bold;
    margin-right: 0.5rem;
    display: inline-block;
}

/* 导航栏 */
.nav-container {
    background-color: white;
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    padding: 0.5rem 5%;
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.nav-item {
    position: relative;
    display: inline-block;
    margin-right: 2rem;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 0;
    display: block;
    position: relative;
}

.nav-link::after {
    content: "▼";
    font-size: 0.8rem;
    margin-left: 0.3rem;
    color: #999;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 100;
    border: 1px solid #ddd;
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background-color: #f0f0f0;
}

.nav-item:hover .dropdown-menu {
    display: block;
}
.contact-section {
    display: flex;
    align-items: center;       /* 垂直居中对齐 */
    gap: 1rem;                /* 按钮和文字之间的间距 */
    flex-wrap: wrap;          /* 小屏时允许换行，避免溢出 */
}
/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 5%;
    }

    .search-bar {
        max-width: 100%;
        margin: 0;
    }

    .contact-section {
        gap: 0.6rem;
        justify-content: center; /* 居中对齐（如果 header 是 column 布局） */
    }

    .contact-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .contact-info {
        font-size: 0.85rem;
    }

    .banner h1 {
        font-size: 1.5rem;
    }

    .banner .text {
        font-size: 1.2rem;
    }

    .nav-container {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .nav-item {
        width: 100%;
        text-align: center;
    }

    .dropdown-menu {
        left: 0;
        right: 0;
        min-width: auto;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        align-items: center;
    }

    .logo span {
        font-size: 1rem;
    }

    .search-bar input {
        font-size: 0.9rem;
    }

    .banner h1 {
        font-size: 1.3rem;
    }

    .banner .text {
        font-size: 1.1rem;
    }

    .hot-topic {
        font-size: 0.8rem;
    }
}