/**
 * Custom Section Spacing
 * Add proper spacing between adjacent custom sections
 */

/* Add 2px bottom margin to all custom sections */
.homepage-section.custom-section {
    margin-bottom: 2px !important;
}

/* Remove margin from last custom section to avoid extra space */
.homepage-section.custom-section:last-child {
    margin-bottom: 0 !important;
}

/* When two custom sections are adjacent */
.homepage-section.custom-section + .homepage-section.custom-section {
    margin-top: 0 !important; /* Ensure only bottom margin applies */
}

/* Ensure consistent spacing on mobile */
@media (max-width: 767px) {
    .homepage-section.custom-section {
        margin-bottom: 2px !important;
    }
    
    .homepage-section.custom-section:last-child {
        margin-bottom: 0 !important;
    }
}

/* Ensure consistent spacing on desktop */
@media (min-width: 768px) {
    .homepage-section.custom-section {
        margin-bottom: 2px !important;
    }
    
    .homepage-section.custom-section:last-child {
        margin-bottom: 0 !important;
    }
}

/* Special handling when sections have headers */
.homepage-section.custom-section:has(.stat-box-header) {
    margin-bottom: 2px !important;
}

/* Special handling when sections don't have headers */
.homepage-section.custom-section:not(:has(.stat-box-header)) {
    margin-bottom: 2px !important;
}

/* Make sure the spacing is visible between sections with different backgrounds */
.homepage-section.custom-section + .homepage-section.custom-section {
    position: relative;
}

/* Optional: Add a subtle separator line between sections if needed */
/*
.homepage-section.custom-section:not(:last-child)::after {
    content: '';
    display: block;
    height: 2px;
    background: transparent;
}
*/