/* Custom Spacing for Consistent Section Layout */

/* Standard section spacing - ensures equal top and bottom padding */
.section-space {
    padding: 120px 0 !important;
}

.section-space-top {
    padding-top: 120px !important;
}

.section-space-bottom {
    padding-bottom: 120px !important;
}

/* Reduced spacing for smaller sections */
.section-space-sm {
    padding: 80px 0 !important;
}

.section-space-sm-top {
    padding-top: 80px !important;
}

.section-space-sm-bottom {
    padding-bottom: 80px !important;
}

/* Large spacing for hero/banner sections */
.section-space-lg {
    padding: 160px 0 !important;
}

.section-space-lg-top {
    padding-top: 160px !important;
}

.section-space-lg-bottom {
    padding-bottom: 160px !important;
}

/* Section title spacing consistency */
.section-title-space {
    margin-bottom: 60px !important;
}

.section-title-space-sm {
    margin-bottom: 40px !important;
}

.section-title-space-lg {
    margin-bottom: 80px !important;
}

/* Container spacing optimization */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Row spacing consistency */
.row.g-5 {
    --bs-gutter-x: 3rem;
    --bs-gutter-y: 3rem;
}

/* Responsive spacing adjustments */
@media (max-width: 768px) {
    .section-space {
        padding: 80px 0 !important;
    }
    
    .section-space-lg {
        padding: 100px 0 !important;
    }
    
    .section-title-space {
        margin-bottom: 40px !important;
    }
}

@media (max-width: 576px) {
    .section-space {
        padding: 60px 0 !important;
    }
    
    .section-space-lg {
        padding: 80px 0 !important;
    }
    
    .section-title-space {
        margin-bottom: 30px !important;
    }
}

/* Override any existing padding to ensure consistency */
.rs-banner-area,
.rs-about-area,
.rs-counter-area,
.rs-services-area,
.rs-portfolio-area,
.rs-experience-area,
.rs-cta-area,
.rs-why-choose-area,
.rs-testimonial-area,
.rs-blog-area,
.rs-contact-area {
    padding: 120px 0 !important;
}

/* Banner area special case */
.rs-banner-area {
    padding: 160px 0 120px !important;
}

/* Counter area special case */
.rs-counter-area {
    padding: 80px 0 !important;
}

/* Consistent margin between sections */
section + section {
    margin-top: 0 !important;
}

/* Optimized content spacing */
.rs-section-title-wrapper {
    margin-bottom: 40px !important;
}

.rs-section-title-wrapper .rs-section-title {
    margin-bottom: 25px !important;
}

/* Consistent button spacing */
.rs-btn {
    margin: 20px 0 !important;
}

/* Optimized form spacing */
.rs-contact-form {
    padding: 40px !important;
}

.rs-contact-input {
    margin-bottom: 20px !important;
}

/* Consistent card spacing */
.rs-services-item,
.rs-portfolio-item,
.rs-blog-item {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Footer spacing */
.rs-footer-area {
    padding: 80px 0 40px !important;
}

/* Back to top button optimization */
.backtotop-wrap {
    bottom: 30px;
    right: 30px;
}

/* Ensure all sections have equal spacing */
section {
    position: relative;
}

/* Remove any conflicting padding */
.rs-banner-area.rs-banner-ten,
.rs-about-area.rs-about-six,
.rs-services-area.rs-services-seven,
.rs-portfolio-area.rs-portfolio-eight,
.rs-experience-area.rs-experience-two,
.rs-cta-area.rs-cta-one,
.rs-why-choose-area.rs-why-choose-one,
.rs-testimonial-area.rs-testimonial-two,
.rs-blog-area.rs-blog-three,
.rs-contact-area.rs-contact-one {
    padding: 120px 0 !important;
}

/* Additional overrides for perfect consistency */
.rs-banner-area.rs-banner-ten.section-space-lg {
    padding: 160px 0 120px !important;
}

.rs-counter-area.rs-counter-three.section-space-bottom {
    padding: 80px 0 !important;
}

/* Ensure no extra margins between sections */
main > section {
    margin: 0 !important;
}

/* Optimize content within sections */
.rs-section-title-wrapper {
    margin-bottom: 40px !important;
}

.rs-section-paragraph {
    margin-bottom: 30px !important;
}

/* Consistent spacing for all content blocks */
.rs-about-content,
.rs-services-content,
.rs-portfolio-content,
.rs-experience-content,
.rs-cta-content,
.rs-why-choose-content,
.rs-testimonial-content,
.rs-blog-content,
.rs-contact-content {
    margin-bottom: 0 !important;
}

/* Ensure equal spacing for all sections */
section[class*="rs-"] {
    padding: 120px 0 !important;
}

/* Special cases */
section.rs-banner-area {
    padding: 160px 0 120px !important;
}

section.rs-counter-area {
    padding: 80px 0 !important;
}