/* ================================================================
   SPACING FIXES - REMOVE GAPS FROM HIDDEN TITLES & FOOTER
   ================================================================ */

/* Hide custom page titles BUT NOT hero title */
.workagh-jobs-listing h1:first-of-type,
.workagh-submission-form-v3 h1:first-of-type,
body.post-type-archive-job main h1:first-of-type,
body.page main > article > h1:first-of-type {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

/* EXCEPTION: Show hero title */
.workagh-hero h1.hero-title,
.workagh-hero .hero-title {
    display: block !important;
    height: auto !important;
}

/* Remove top padding/margin */
.workagh-jobs-listing,
.workagh-submission-form-v3,
.site-main > .ast-container,
main#main {
    padding-top: 20px !important;
    margin-top: 0 !important;
}

.workagh-jobs-listing > div:first-child,
.workagh-submission-form-v3 > div:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.post-type-archive-job .site-main,
body.tax-job_category .site-main,
body.page .site-main {
    padding-top: 20px !important;
}

.site-main > article {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.site-main > article > div:first-child {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Remove footer spacing */
footer.site-footer,
.workagh-footer,
.site-footer {
    margin-bottom: 0 !important;
}

.site-info,
contentinfo.site-info {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

body, html {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

body > p:last-of-type {
    margin-bottom: 0 !important;
    padding-bottom: 15px !important;
}

#page {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.ast-container,
#primary {
    margin-bottom: 0 !important;
}
