/**
 * ============================================================
 * 访问路径：/static/css/mobile.css
 * 功能说明：手机端专用样式覆盖
 * 引入方式：head.php 中通过 <link> 标签引入（全设备加载，CSS媒体查询控制生效范围）
 * ============================================================
 */

/* ==================== 手机端品牌 & 语言切换 ==================== */

/* 手机端品牌简写 */
.mobile-brand {
    font-size: 1.25rem;
    letter-spacing: 1px;
    color: var(--white);
}

/* 手机端语言切换按钮 */
.lang-switcher-mobile .btn-outline-light {
    border-color: rgba(255,255,255,0.4);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 42px;
    text-align: center;
    border-radius: 6px;
}

.lang-switcher-mobile .btn-outline-light:hover,
.lang-switcher-mobile .btn-outline-light:focus {
    background: rgba(255,255,255,0.15);
    border-color: var(--accent);
}

.lang-switcher-mobile .dropdown-menu {
    min-width: 80px;
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border-radius: 8px;
    font-size: 0.85rem;
}

.lang-switcher-mobile .dropdown-item {
    padding: 0.35rem 0.75rem;
    text-align: center;
    font-weight: 500;
}

.lang-switcher-mobile .dropdown-item.active,
.lang-switcher-mobile .dropdown-item:hover {
    background: #e6f9f7;
    color: #00b4a0;
}

/* 导航栏滚动效果：手机端下滑时固定+阴影 */
#mainNav.nav-scrolled {
    background: linear-gradient(135deg, #06142e, #0a1f44) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25) !important;
    backdrop-filter: blur(12px);
}

/* ==================== 手机端全局布局优化 (<=991.98px) ==================== */
@media (max-width: 991.98px) {
    /* 导航栏高度调整 */
    .nav-placeholder {
        height: 60px;
    }

    #mainNav {
        min-height: 60px;
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }

    #mainNav .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* 导航栏展开菜单样式 */
    #mainNav .navbar-collapse {
        background: linear-gradient(135deg, #06142e, #0a1f44);
        border-radius: 12px;
        margin-top: 0.5rem;
        padding: 0.75rem;
        box-shadow: 0 8px 32px rgba(0,0,0,0.16);
        max-height: 70vh;
        overflow-y: auto;
    }

    #mainNav .navbar-nav {
        margin-bottom: 0.5rem !important;
    }

    #mainNav .nav-link {
        padding: 0.6rem 0.75rem !important;
        font-size: 0.95rem;
    }

    /* 页面内容间距调整 */
    body {
        overflow-x: hidden;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* 首页内容在手机端上移（因为banner隐藏了） */
    .why-section,
    .featured-section {
        padding-top: 2rem;
    }
}

/* ==================== 小屏手机优化 (<=575.98px) ==================== */
@media (max-width: 575.98px) {
    .mobile-brand {
        font-size: 1.1rem;
    }

    .nav-placeholder {
        height: 56px;
    }

    #mainNav {
        min-height: 56px;
    }

    /* 全屏铺满，无溢出 */
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    img, video, iframe, table {
        max-width: 100%;
        height: auto;
    }

    /* 表格横向滚动 */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
