/* ==================== 全局重置 & 基础设置 ==================== */
/* 清除默认边距，统一盒模型，设定默认字体 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

/*去掉A标签样式*/
a, a:link, a:visited, a:hover, a:active {
    text-decoration: none;
    color: inherit;
}

/* 页面背景（浅灰色，突出白色卡片） */
body {
    background-color: #f7f7f7;
    overflow: auto;
}
body::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* ==================== 页眉布局 ==================== */
/* 白色页眉，下边框分割，弹性布局使 logo 和导航左右分开 */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 70px;
    border-bottom: 2px solid #ffffff;
    box-shadow: -27px -1px 20px -5px rgb(252 168 80);

    /* ---- 关键改动：吸附顶部 ---- */
    position: sticky;
    top: 0;
    z-index: 1000; /* 确保在其他内容之上 */
}

/* Logo 行：图标＋文字，居左 */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.logo img {
    max-width: 200px; /* 最大宽度 */
    width: 100%; /* 宽度随容器缩放 */
    height: auto; /* 保持比例 */
}

/* Logo 图标尺寸单独控制 */
.logo-icon {
    font-size: 30px;
}

/* 导航容器：横排，撑满剩余高度 */
nav {
    display: flex;
    height: 100%;
}

/* 导航链接：纵向排列文字（支持主标题+小字），垂直居中 */
nav a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 30px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: background 0.2s;
}

/* ==================== 主容器 & 页脚 ==================== */
/* 统一宽度限制，自动居中，左右留白 */
.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 20px;
    color: #302925;
}

/* ==================== 移动端汉堡菜单按钮 ==================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ==================== 响应式设计 ==================== */

/* 平板设备 (< 1024px) */
@media (max-width: 1024px) {
    header {
        padding: 0 15px;
    }

    nav a {
        padding: 0 20px;
        font-size: 14px;
    }

    .container {
        max-width: 100%;
        padding: 0 15px;
    }
}

/* 手机设备 (< 768px) */
@media (max-width: 768px) {
    header {
        padding: 0 12px;
        height: 60px;
    }

    .logo img {
        max-width: 140px;
    }

    /* 显示汉堡菜单，隐藏导航 */
    .hamburger {
        display: flex;
    }

    nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #ffffff;
        height: auto;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    nav.open {
        display: flex;
    }

    nav a {
        padding: 14px 20px;
        font-size: 15px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 8px;
        border-bottom: 1px solid #f0f0f0;
    }

    nav a small {
        font-size: 12px;
        opacity: 0.7;
    }

    .container {
        margin: 10px auto;
        padding: 0 10px;
    }

    footer {
        font-size: 12px;
        padding: 12px;
    }
}

/* 小屏手机 (< 480px) */
@media (max-width: 480px) {
    header {
        height: 55px;
        padding: 0 10px;
    }

    .logo img {
        max-width: 120px;
    }

    nav {
        top: 55px;
    }

    nav a {
        padding: 12px 16px;
        font-size: 14px;
    }

    .container {
        padding: 0 8px;
    }
}
/*!* 卡片悬浮效果*!*/
/*.float {*/
/*    background-color: #f5d0c5; !* 默认背景色 *!*/
/*    border-radius: 12px;    !* 圆角，可去掉 *!*/
/*    display: flex;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    transition: all 0.3s ease; !* 平滑过渡 *!*/
/*    cursor: pointer;        !* 鼠标变手型 *!*/
/*    box-shadow: 0 4px 6px rgba(0,0,0,0.1); !* 默认阴影 *!*/
/*}*/

/*.float:hover {*/
/*    background-color: #f7a7a1;  !* 悬停背景颜色变化 *!*/
/*    transform: scale(1.05);      !* 悬停放大 5% *!*/
/*    box-shadow: 0 8px 12px rgba(0,0,0,0.2); !* 悬停阴影增强 *!*/
/*}*/

/* 页脚：居中、小字、灰色 */
footer {
    text-align: center;
    padding: 15px;
    font-size: 13px;
    color: #666;
}
