#page-wrapper{
    background: var(--margin-background-color);
    width: 100%;
    min-height: 100vh;
    max-width: 100%;


}



#page{

    

    width: 100%;
    min-height: 100vh;
    /* max-width: var(--default-max-width); */
    margin: 0 auto; /* Center the page horizontally */

    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "header"
        "main"
        "footer";
    
    align-items: center;

    gap: var(--section-gap) var(--section-gap) 0;
}

/* Ensure the page wrapper background extends full width */
.page-wrapper {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}







/* ========================================
   移动端响应式样式 (Mobile Responsive)
   ======================================== */

@media (max-width: 768px) {
    .page-wrapper,
    #page{
        display: block;
    }

    /* 两列布局改为单列 */
    .layout--twocol-section.layout--twocol-section--67-33 {
        display: block !important;
        width: 100%;
    }

    .layout--twocol-section .layout__region--first,
    .layout--twocol-section .layout__region--second {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin-bottom: 2rem;
    }

    /* 表格响应式处理 */
    .field--name-field-body-text table {
        display: block;
        width: 100%;
        border: none;
    }

    .field--name-field-body-text tbody {
        display: block;
        width: 100%;
    }

    .field--name-field-body-text tr {
        display: block;
        width: 100%;
        margin-bottom: 1.5rem;
        border-bottom: 1px solid #ddd;
        padding-bottom: 1.5rem;
    }

    .field--name-field-body-text td {
        display: block !important;
        width: 100% !important;
        padding: 0.5rem 0 !important;
        border: none !important;
        box-sizing: border-box;
    }

    /* 图片自适应 */
    .field--name-field-body-text td img {
        width: 100% !important;
        height: auto !important;
        max-width: 100%;
        display: block;
        margin: 0 auto;
    }

    /* 文本内容调整 */
    .field--name-field-body-text td span {
        display: block;
        padding: 0.75rem 0;
        line-height: 1.6;
        font-size: 1rem;
    }

    /* 媒体容器调整 */
    .media.media--type-image {
        width: 100%;
        margin: 0.5rem 0;
    }

    .field--name-field-media-image {
        width: 100%;
    }

    .field--name-field-media-image .field__item {
        width: 100%;
        text-align: center;
    }

    /* 节点内容区域调整 */
    .node--view-mode-full {
        max-width: 100% !important;
        padding: 1rem !important;
        margin: 0 !important;
        box-shadow: none !important;
    }

    /* 侧边栏内容调整 */
    .layout__region--second .views-element-container {
        margin-top: 2rem;
    }

    /* 小型文本预览调整 */
    .node--view-mode-small-text-teaser {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .node--view-mode-small-text-teaser .node__title {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    /* 字段标签调整 */
    .field__label {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    /* 确保内容区域有适当的间距 */
    .layout__region {
        padding: 0 0.5rem;
    }
}

/* 小手机端优化 - 480px以下 */
@media (max-width: 480px) {
    
    /* 进一步减小内边距 */
    .node--view-mode-full {
        padding: 0.75rem !important;
    }

    .layout__region {
        padding: 0 0.25rem;
    }

    /* 文本大小调整 */
    .field--name-field-body-text td span {
        font-size: 0.95rem;
        line-height: 1.5;
        padding: 0.5rem 0;
    }

    /* 表格行间距调整 */
    .field--name-field-body-text tr {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    /* 节点标题调整 */
    .node__title {
        font-size: 1.3rem;
        line-height: 1.3;
    }

    .node--view-mode-small-text-teaser .node__title {
        font-size: 1rem;
    }

    /* 字段标签调整 */
    .field__label {
        font-size: 1rem;
    }

    /* 时间字段调整 */
    .field--name-field-date-of-creation time {
        font-size: 0.9rem;
    }

    /* 视图内容行间距 */
    .views-row {
        margin-bottom: 0.75rem;
    }
}