/**
 * Section Border Fix
 * Remove border-top when section title is hidden
 * @package SoiCauPro
 */

/* Remove border-top when section title is hidden */
.homepage-section:not(:has(.section-header)) .section-content {
    border-top: none !important;
}

/* Alternative selector for better compatibility */
.homepage-section .section-content {
    border-top: none;
}

/* Only add border-top if section has header and it's followed by content without padding */
.homepage-section .section-header + .section-content.full-width {
    border-top: none;
}

/* Specific fixes for each section when title is hidden */
.results-section:not(:has(.section-header)) .section-content,
.soicau-section:not(:has(.section-header)) .section-content,
.statistics-section:not(:has(.section-header)) .section-content,
.blog-section:not(:has(.section-header)) .section-content {
    border-top: none !important;
    padding-top: 10px; /* Add some padding to compensate */
}

/* Clean transition when toggling title visibility */
.homepage-section .section-content {
    transition: border 0.3s ease, padding 0.3s ease;
}

/* Optional: Add subtle shadow instead of border when no title */
.homepage-section:not(:has(.section-header)) {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Ensure proper spacing */
@media (min-width: 768px) {
    .homepage-section:not(:has(.section-header)) .section-content {
        padding-top: 15px;
    }
}

@media (min-width: 992px) {
    .homepage-section:not(:has(.section-header)) .section-content {
        padding-top: 20px;
    }
}