/**
 * Header → content spacing
 * Page title is a flush topbar under the header (no card gap).
 * Homepage excluded (full-bleed hero).
 */

/* --- Theme Builder page title (most Elementor pages) --- */
body:not(.home):not(.front-page) #uicore-tb-pagetitle > .elementor > .elementor-element:first-child {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Tablet/mobile: topbar stays visible (styled in page-title.css) */
@media (max-width: 1024px) {
    body:not(.home):not(.front-page):not(.single-post) #uicore-tb-pagetitle {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        overflow: visible !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    body:not(.home):not(.front-page):not(.single-post) #uicore-tb-pagetitle > .elementor > .elementor-element:first-child {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
}

/* --- Single posts (TB page-title hidden; title lives in layout) --- */
body.single-post .uicore-single-post-layout {
    margin-top: 1% !important;
}

@media (max-width: 1024px) {
    body.single-post .uicore-single-post-layout {
        margin-top: 20px !important;
    }

    body.single-post #main.site-main,
    body.single-post #main.site-main > .uicore-content-wrapper,
    body.single-post .uicore-container.uicore-content-wrapper {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* --- CPT singles without Theme Builder page title --- */
body.single-kultur_varliklari .kultur-single-container {
    padding-top: 1% !important;
}

@media (max-width: 1024px) {
    body.single-kultur_varliklari .kultur-single-container {
        padding-top: 20px !important;
    }
}

/* Fallback: any non-home page without TB page title */
body:not(.home):not(.front-page):not(.single-post):not(:has(#uicore-tb-pagetitle)) #content.uicore-content > #main,
body:not(.home):not(.front-page):not(.single-post):not(:has(#uicore-tb-pagetitle)) #content.uicore-content > main {
    margin-top: 1%;
}

@media (max-width: 1024px) {
    body:not(.home):not(.front-page):not(.single-post):not(:has(#uicore-tb-pagetitle)) #content.uicore-content > #main,
    body:not(.home):not(.front-page):not(.single-post):not(:has(#uicore-tb-pagetitle)) #content.uicore-content > main {
        margin-top: 20px;
    }
}
