/*
 * Elementor Full Width Fix
 * 解决Elementor容器无法实现全宽的问题
 */

/* 移除Elementor容器的最大宽度限制 */
.elementor-section.elementor-section-full_width > .elementor-container,
.elementor-section.elementor-section-stretched > .elementor-container {
    max-width: none !important;
    width: 100% !important;
}

/* 确保Elementor全宽section能够延伸到浏览器边缘 */
.elementor-section.elementor-section-stretched {
    width: 100vw !important;
    position: relative;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

/* 针对主题容器的特殊处理 */
body:not(.elementor-editor-active) .elementor-section.elementor-section-full_width,
body:not(.elementor-editor-active) .elementor-section.elementor-section-stretched {
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    max-width: none !important;
    width: 100vw !important;
}

/* 确保容器内的内容正确对齐 */
.elementor-section.elementor-section-full_width > .elementor-container > .elementor-row,
.elementor-section.elementor-section-stretched > .elementor-container > .elementor-row {
    width: 100% !important;
    max-width: none !important;
}

/* 处理嵌套的Elementor容器 */
.elementor-section .elementor-container {
    max-width: none !important;
}

/* 确保在编辑器中也能正常显示 */
.elementor-editor-active .elementor-section.elementor-section-stretched {
    width: 100% !important;
    left: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 移除主题容器的宽度限制（仅针对Elementor页面） */
body.elementor-page .container,
body.elementor-default .container {
    max-width: none !important;
}

/* 确保主要内容区域不受限制 */
body.elementor-page #primary,
body.elementor-default #primary {
    width: 100% !important;
    max-width: none !important;
}

/* 处理响应式设计 */
@media (max-width: 1024px) {
    .elementor-section.elementor-section-stretched {
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
    }
}

@media (max-width: 767px) {
    .elementor-section.elementor-section-stretched {
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
    }
}