/* Universal Padding Fix - Applies to All Sub-Pages */

/* Start content below header (header is ~80px tall) */
body.page main,
body.single main,
body.archive main,
body.category main {
    margin-top: 80px !important;
    padding-top: 20px !important;
}

/* Page headers - reduce padding */
.page-header,
.entry-header {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
    margin-bottom: 0 !important;
}

.wp-block-cover,
.hero-section:not(.local-image) {
    padding-top: 100px !important;
    padding-bottom: 40px !important;
    margin-bottom: 0 !important;
}

/* Main content areas - reduce padding */
.entry-content,
.page-content,
.site-content,
.content-area {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* WordPress blocks - reduce spacing */
.wp-block-group {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Sections - tighter spacing */
section {
    padding: 20px 20px !important;
    margin: 0 !important;
}

/* Between sections spacing */
section + section {
    margin-top: 0 !important;
    padding-top: 20px !important;
}

/* Paragraphs and content blocks */
p {
    margin-bottom: 0.8rem !important;
}

/* Headings spacing */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
}

/* Lists spacing */
ul, ol {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

/* WordPress cover blocks */
.wp-block-cover__inner-container {
    padding: 2rem !important;
}

/* Columns spacing */
.wp-block-columns {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    gap: 30px !important;
}

.wp-block-column {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Spacer blocks - reduce */
.wp-block-spacer {
    height: 30px !important;
    margin: 0 !important;
}

/* Service and content containers */
.services-container,
.contact-container,
.about-container,
.content-wrapper {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

/* Remove extra spacing from separators */
hr,
.wp-block-separator {
    margin: 15px 0 !important;
}

/* Sidebar spacing */
.widget-area,
.sidebar {
    padding-top: 20px !important;
    padding-left: 20px !important;
    padding-right: 0 !important;
}

.widget {
    margin-bottom: 20px !important;
    padding: 15px !important;
}

/* Footer spacing */
.site-footer {
    margin-top: 0 !important;
    padding-top: 40px !important;
}

/* Special sections that need to maintain some spacing */
.cta-section,
.emergency-banner {
    padding: 50px 40px !important;
}

/* FAQ sections */
.faq-section {
    padding: 40px 40px !important;
}

/* Process sections */
.process-section {
    padding: 40px 40px !important;
}

/* Override WordPress default spacing */
.entry-content > * {
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
}

.entry-content > *:last-child {
    margin-bottom: 0 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    section {
        padding: 30px 20px !important;
    }
    
    .page-header,
    .entry-header,
    .wp-block-cover {
        padding-top: 80px !important;
        padding-bottom: 30px !important;
    }
    
    .services-container,
    .contact-container,
    .about-container,
    .content-wrapper {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }
}