/**
 * 📱 响应式适配：彻底消除移动端布局痛点
 */

/* 核心防护：全屏溢出禁制 */
html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    width: 100% !important;
}

@media (max-width: 1100px) {
    .container {
        padding: 0 15px !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    .d-flex:not(.pagination) {
        flex-wrap: wrap !important;
    }

    .main-navbar .d-flex {
        flex-direction: column !important;
        gap: 12px;
    }

    .nav-menu {
        width: 100% !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    /* 核心修复：公告列表项日期不溢出 (响应式堆叠) */
    .list-item .d-flex.justify-content-between {
        display: block !important;
        position: relative !important;
    }

    .list-item h6 {
        padding-right: 90px !important;
        white-space: normal !important;
    }

    .list-item small.text-muted {
        position: absolute !important;
        right: 0 !important;
        top: 0 !important;
        background: rgba(255,255,255,0.9);
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .search-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .hc-toolbar {
        width: 100%;
        margin-top: 15px;
    }
    
    .hc-btn {
        flex: 1;
        min-height: 44px; /* 💡 触摸友好 */
    }
}

@media (max-width: 480px) {
    .top-navbar {
        display: none;
    }
    
    .main-navbar .site-title h1 {
        font-size: 20px;
    }
}
