html,
body {
    overflow-y: auto !important;
    height: auto !important;
}

.fluent_com {
    width: 100%;
    min-height: 100vh;
    background: #f5f6f8;
    height: auto;
}

.fhr_wrap {
    width: 100% !important;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
    height: auto !important;
}

.fhr_content {
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    height: auto;
}

/* FC Sidebar Wrapper - sorgt für korrektes Layout */
.fluent_com .spaces {
    background: #f7f8fa;
    border-right: 1px solid #e5e7eb;
    width: 280px;
    min-height: 100vh;
    height: auto;
    overflow-y: auto;
}

/* Sidebar Content Wrapper */
.fluent_com .space_contents {
    padding-top: 16px;
    padding-bottom: 16px;
}

/* Feed Layout Container */
.fluent_com .feed_layout {
    display: flex;
    min-height: calc(100vh - 60px);
    height: auto;
    overflow: visible;
}

/* Page Content Area */
.fluent_com .fcom_wp_page {
    #flex: 1 !important;
    #overflow-y: auto !important;
    #padding: 24px;
    #background: #ffffff;
    #border-left: 1px solid #e5e7eb;
    max-width: 1080px;
    padding: 0 2rem 2rem;
    margin: 2rem auto;
    width: 100%;
    height: auto !important;
    overflow: visible !important;
}

.fluent_com .fcom_wp_page > *:first-child {
    margin-top: 0;
}

.fluent_com .fcom_wp_page > *:last-child {
    margin-bottom: 0;
}

@media (max-width: 960px) {
    .fluent_com .feed_layout {
        flex-direction: column;
        height: auto;
    }

    .fluent_com .spaces {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .fluent_com .fcom_wp_page {
        border-left: none;
    }
}

@media (max-width: 640px) {
    .fhr_wrap {
        padding: 12px;
    }

    .fluent_com .fcom_wp_page {
        padding: 16px;
    }
}

/* Responsive layout for FluentCommunity header + sidebar on WP pages */
.fc-content-wrapper {
    display: block;
    width: 100% !important;
    margin: 0 auto;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.fc-header,
.fc-sidebar {
    width: 100% !important;
    box-sizing: border-box;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .fc-content-wrapper {
        display: flow-root; /* Clearfix für floats */
    }

    .fc-header {
        margin-bottom: 0;
        width: calc(70% - 1rem);
        float: left;
        padding-right: 0px !important;
    }

    .fc-sidebar {
        float: right;
        width: 30%;
        margin-left: 2rem;
        margin-bottom: 0;
    }
}

@media (max-width: 767px) {
    .fc-sidebar {
        width: 100%;
        float: none;
        margin-left: 0;
    }
}

/* fhr_wrap Padding/Margin zurücksetzen */
.fhr_wrap {
    padding: 0 !important;
    margin: 0 !important;
}

/* Clearfix für fc-content-wrapper */
.fc-content-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* fc-header optimiert */
.fc-header {
    float: left;
    width: calc(70% - 1rem);
    padding-right: 1rem;
    box-sizing: border-box;
}

/* fc-sidebar optimiert */
.fc-sidebar {
    float: right;
    width: 30%;
    box-sizing: border-box;
    min-height: 200px;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 4px;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .fc-header,
    .fc-sidebar {
        float: none;
        width: 100%;
        padding: 0;
        margin-bottom: 1rem;
    }

    .fc-sidebar {
        background: transparent;
    }
}
