/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* 头部导航 */
header {
    background-color: #fff;
    color: #333;
    padding: 0rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #007bff; /* 主题色 */
    text-decoration: none;
}

header .logo img {
    height: 40px; /* 如果使用图片Logo */
    vertical-align: middle;
}

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

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: #007bff;
    color: #fff;
}

/* 主要内容区域 */
main {
    flex-grow: 1;
    padding: 2rem 0;
}

.page-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid #007bff;
    display: inline-block; /* 让下划线只跟随文字长度 */
    padding-bottom: 0.5rem;
}

.content-section {
    background-color: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.content-section h2 {
    color: #007bff;
    margin-bottom: 15px;
}

.content-section p {
    margin-bottom: 15px;
    color: #555;
}

/* 首页特定样式 */
.hero {
    background: url('../images/hero-bg.jpg') no-repeat center center/cover; /* 替换为你自己的图片 */
    color: white;
    text-align: center;
    padding: 100px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    max-width: 700px;
    text-shadow: 3px 3px 3px rgba(0,0,0,1);
    background-color: #00000030;
}

.cta-button {
    display: inline-block;
    background-color: #28a745; /* 另一个醒目的颜色 */
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    font-size: 1.2rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #218838;
}

.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.feature-item {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
    flex-basis: calc(33.333% - 20px); /* 三列布局 */
    min-width: 280px; /* 响应式处理 */
}

.feature-item i { /* 假设使用Font Awesome图标 */
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 15px;
}

.feature-item h3 {
    margin-bottom: 10px;
    color: #333;
}

/* 公告页面 */
.announcement-list {
    list-style: none;
}

.announcement-item {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 5px solid #007bff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.announcement-item h3 {
    color: #0056b3;
    margin-bottom: 8px;
}

.announcement-item .date {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 10px;
}

/* 联系客服页面 */
.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: #0056b3;
}

.contact-info p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}
.contact-info p strong {
    color: #333;
}

/* 页脚 */
footer {
    background-color: #333;
    color: #bbb;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto; /* 将页脚推到底部 */
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

footer a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff; /* 鼠标悬停时变成白色，增加对比 */
    /* 或者 color: #66a3ff; (悬停时变成更亮的蓝色) */
    text-decoration: underline; /* 悬停时显示下划线，可选 */
}

/* 汉堡包菜单样式 */
.nav-toggle {
    display: none; /* 默认在桌面端隐藏 */
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.5em;
    position: absolute; /* 相对于 header 定位 */
    right: 1em;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001; /* 确保在导航之上 */
}

.hamburger {
    display: block;
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 2em;
    height: 3px;
    background-color: #333; /* 汉堡包图标颜色 */
    border-radius: 3px;
    transition: transform 0.3s ease-in-out, opacity 0.2s ease;
}

.hamburger::before {
    position: absolute;
    bottom: 7px;
}

.hamburger::after {
    position: absolute;
    top: 7px;
}

/* 导航展开时的汉堡包图标 (变成 X) */
.nav-open .nav-toggle .hamburger {
    transform: rotate(45deg);
}

.nav-open .nav-toggle .hamburger::before {
    opacity: 0;
}

.nav-open .nav-toggle .hamburger::after {
    transform: rotate(-90deg) translateX(7px); /* 调整X的对齐 */
}

.announcement-title-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.announcement-title-link:hover h3 {
    color: #0056b3;
    text-decoration: underline;
}

.announcement-item h3 {
    color: #0056b3;
    margin-bottom: 8px;
}


/* 手机端导航样式调整 */
@media (max-width: 768px) {
    header .container {
        /* 确保容器能容纳绝对定位的按钮 */
        position: relative;
        /* 如果logo和按钮不在一行，flex-direction: row; justify-content: space-between; */
    }

    .nav-toggle {
        display: block; /* 在手机端显示汉堡包按钮 */
    }

    .main-nav {
        display: none; /* 默认隐藏导航菜单 */
        position: absolute;
        top: 100%; /* 从header底部开始 */
        left: 0;
        right: 0;
        background-color: #fff; /* 菜单背景色 */
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 1000; /* 确保在其他内容之上 */
    }

    .nav-open .main-nav {
        display: block; /* 当 .nav-open 类添加到 body 或 header 时显示菜单 */
    }

    .main-nav ul {
        flex-direction: column; /* 菜单项垂直排列 */
        align-items: center; /* 菜单项居中 */
        padding: 1em 0; /* 给菜单一些内边距 */
    }

    .main-nav ul li {
        margin: 0; /* 移除桌面端的 margin-left */
        width: 100%;
    }

    .main-nav ul li a {
        display: block;
        padding: 1em 1.5em; /* 调整链接内边距 */
        text-align: center;
        border-bottom: 1px solid #eee; /* 菜单项之间的分隔线 */
        width: 100%;
    }
    .main-nav ul li:last-child a {
        border-bottom: none;
    }

    .main-nav ul li a:hover,
    .main-nav ul li a.active {
        background-color: #007bff;
        color: #fff;
    }
}

@media (max-width: 600px) {
    .product-card {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 20px 10px;
    }
    .page-title {
        font-size: 1.8rem;
    }
    .hero {
        padding: 60px 10px;
    }
     .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .team-member {
        flex-basis: 100%;
    }
    .contact-form button {
        width: 100%;
    }
}
