/**
 * No Sidebar Layout Fix
 * When pages do not have a sidebar, make content take full width
 */

/* When wrapper has no-sidebar class, hide sidebar section and expand content */
.wrapper.no-sidebar .sidebar-section {
    display: none !important;
    flex: 0 !important;
    max-width: 0 !important;
    width: 0 !important;
}

.wrapper.no-sidebar .content-section {
    flex: 100% !important;
    max-width: 100% !important;
}

/* Also handle cases where sidebar-section is empty */
.sidebar-section:empty {
    display: none !important;
    flex: 0 !important;
    max-width: 0 !important;
}

/* For main-container inside content without sidebar */
.wrapper.no-sidebar main-container,
.wrapper.no-sidebar .main-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Center content nicely when no sidebar */
.wrapper.no-sidebar .content-section .content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Ensure d-fl-cont-page (contact us style) centers properly */
.wrapper.no-sidebar .d-fl-cont-page {
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .sidebar-section {
        display: none !important;
    }
    .content-section {
        flex: 100% !important;
        max-width: 100% !important;
    }
}
