/* ==========================================================================
   官网前台（AuthHome 模板）通用增强样式 —— 移动端适配 + 统一蓝白主题
   引入位置：app/index/view/AuthHome/public/header.html 与 AuthHome/index.html
   ========================================================================== */

/* ---------- 移动端汉堡按钮 ---------- */
.ew-menu-btn {
    display: none;
    width: 40px; height: 40px; padding: 0; margin: 0;
    border: 0; background: transparent; cursor: pointer;
    position: relative; flex: 0 0 auto;
}
.ew-menu-btn span {
    display: block; width: 22px; height: 2px; margin: 5px auto;
    background: #3d4757; border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
}
body.ew-nav-open .ew-menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.ew-nav-open .ew-menu-btn span:nth-child(2) { opacity: 0; }
body.ew-nav-open .ew-menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 移动端断点 ---------- */
@media (max-width: 935px) {
    .ew-menu-btn { display: block; }

    /* 顶部栏 */
    .ew-header { padding: 0 14px; }
    .ew-header .ew-nav-group { display: flex; align-items: center; right: 8px; top: 0; bottom: 0; }

    /* 导航：全屏下拉面板（位于顶栏之下） */
    .ew-header .ew-nav,
    .ew-header .layui-nav {
        position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
        display: none !important; flex-direction: column; align-items: stretch;
        background: #fff; margin: 0; padding: 4px 0 24px;
        width: auto !important; max-height: none !important;
        overflow-y: auto;
        transform: none !important; opacity: 1 !important;
        border-radius: 0; z-index: 999;
    }
    body.ew-nav-open .ew-header .ew-nav,
    body.ew-nav-open .ew-header .layui-nav { display: block !important; }

    .ew-header .ew-nav a,
    .ew-header .layui-nav > .layui-nav-item,
    .ew-header .layui-nav > .layui-nav-item > a {
        display: block; float: none; width: 100%; height: auto;
        line-height: 1.5; padding: 14px 20px; font-size: 15px;
        color: #3d4757; border-bottom: 1px solid #f2f4f7;
        text-align: left; box-sizing: border-box;
    }
    .ew-header .layui-nav > .layui-nav-item { padding: 0 !important; }
    .ew-header .layui-nav > .layui-nav-item:last-child > a { border-bottom: 0; }
    .ew-header .ew-nav a:last-child { border-bottom: 0; }
    .ew-header .ew-nav a.on,
    .ew-header .layui-nav > .layui-nav-item.layui-this > a { color: #1890ff; background: #f4f9ff; }
    .ew-header .ew-nav a.ew-user {
        margin: 10px 20px 4px; padding: 12px 20px; border-radius: 22px;
        text-align: center; border-bottom: 0;
    }
    .ew-header .layui-nav .layui-nav-bar,
    .ew-header .ew-nav-group::after { display: none; }

    /* 首屏 */
    .ew-hero { padding: 30px 0 28px; }
    .ew-hero h1 { font-size: 24px; }
    .ew-hero p { font-size: 13px; }
    .ew-banner > .layui-container { padding: 92px 18px 48px !important; text-align: center !important; }
    .ew-banner h1 { font-size: 30px !important; }
    .ew-banner h2 { font-size: 19px !important; }
    .hero-btns .layui-btn { height: 42px; line-height: 42px; padding: 0 26px; font-size: 15px; }
    .hero-tags { justify-content: center; gap: 10px 18px; }

    /* 区块 & 容器 */
    .section { padding: 34px 0 6px; }
    .section-title { margin-bottom: 22px; padding: 0 18px; }
    .section-title h2 { font-size: 22px; }
    .section-title p { font-size: 13px; }
    .ew-container, .ew-body .layui-container { padding-left: 14px; padding-right: 14px; }

    /* 卡片 & 表单 */
    .ew-body { padding: 20px 0 40px; }
    .card-body { padding: 18px; }
    .card-header { padding: 14px 18px; }
    .card-header h4 { font-size: 16px; }
    .form-control { height: 42px; font-size: 15px; }
    .layui-col-md4, .layui-col-md6, .layui-col-sm6 { margin-bottom: 0; }

    /* 底部 */
    .ew-footer { padding: 30px 0 16px; }
    .ew-footer .ew-ft-title { font-size: 16px; margin-bottom: 10px; }
    .ew-footer p { font-size: 13px; }
}

/* ---------- 小屏再收窄 ---------- */
@media (max-width: 420px) {
    .ew-header { padding: 0 10px; }
    .ew-header .ew-logo { font-size: 17px; }
    .ew-banner h1 { font-size: 26px !important; }
    .hero-tags span { font-size: 13px; }
    .ew-body .card-body { padding: 15px; }
}

/* 顶部 logo：隐藏 main.css 自带的背景图，避免出现双 logo */
.ew-header .layui-logo { background-image: none !important; }

/* ---------- 通用小工具 ---------- */
.ew-wrap { word-break: break-word; overflow-wrap: anywhere; }

/* ---------- 表单辅助提示 ---------- */
.form-hint { margin-top: 6px; font-size: 12px; line-height: 1.6; color: #8a94a6; }
