/* 移动端通用修复 - 适用于所有内容页面 */

/* 基础响应式设置 */
@media screen and (max-width: 768px) {
    /* 全局容器 */
    .layout-container {
        width: 100%;
        overflow-x: hidden;
    }
    
    /* 内容区域 */
    .content-wrapper {
        width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box;
    }
    
    .section-content {
        width: 100% !important;
        padding: 0 5px !important;
    }
    
    /* 表格响应式 */
    table {
        width: 100% !important;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        border-collapse: collapse;
        margin: 15px 0;
    }
    
    table th,
    table td {
        padding: 8px 6px !important;
        font-size: 14px !important;
        min-width: 80px;
        border: 1px solid #ddd;
    }
    
    /* 图片响应式 */
    img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    /* 浮动元素清除 */
    .left,
    .right,
    .float-left,
    .float-right {
        float: none !important;
        margin: 10px 0 !important;
    }
    
    /* 字体大小调整 */
    body {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }
    
    h1, .page-title {
        font-size: 22px !important;
        line-height: 1.3 !important;
        margin: 15px 0 !important;
    }
    
    h2 {
        font-size: 20px !important;
        margin: 20px 0 10px !important;
    }
    
    h3 {
        font-size: 18px !important;
        margin: 15px 0 8px !important;
    }
    
    p {
        font-size: 16px !important;
        line-height: 1.6 !important;
        margin-bottom: 12px !important;
        text-indent: 0 !important;
    }
    
    /* 列表样式 */
    
    li {
        font-size: 16px !important;
        line-height: 1.6 !important;
        margin-bottom: 6px !important;
    }
    
    /* 区块间距 */
    .field--name-body,
    .node__content,
    .content {
        margin-bottom: 20px !important;
    }
    
    /* 按钮和链接 */
    a {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }
    
    .btn,
    .button,
    input[type="submit"],
    button {
        width: 100% !important;
        padding: 12px !important;
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }
    
    /* 表单元素 */
    input,
    textarea,
    select {
        width: 100% !important;
        box-sizing: border-box !important;
        font-size: 16px !important;
        padding: 8px !important;
    }
    
    /* 代码块 */
    pre,
    code {
        font-size: 14px !important;
        overflow-x: auto !important;
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
    }
    
    /* 侧边栏隐藏 */
    .section-sidebar {
        display: none !important;
    }
    
    /* 全宽内容 */
    .sidebar-first .section-content {
        width: 100% !important;
    }
    
    /* 间距调整 */
    .margin-top-20,
    .mt-20 {
        margin-top: 15px !important;
    }
    
    .margin-bottom-20,
    .mb-20 {
        margin-bottom: 15px !important;
    }
    
    /* 标题栏调整 */
    .page-header #block-oval-branding {
        padding: 16px 10px !important;
    }
    
    .page-header #block-oval-branding .site-logo {
        width: 200px !important;
        height: auto !important;
    }
}

/* 小屏幕优化 */
@media screen and (max-width: 480px) {
    /* 更紧凑的布局 */
    .content-wrapper {
        padding: 0 5px !important;
    }
    
    h1, .page-title {
        font-size: 20px !important;
    }
    
    h2 {
        font-size: 18px !important;
    }
    
    h3 {
        font-size: 16px !important;
    }
    
    table th,
    table td {
        padding: 6px 4px !important;
        font-size: 13px !important;
        min-width: 60px;
    }
}
