/* Background Section Block - Frontend Styles */

.background-section-block {
    position: relative;
    display: flex;
    background-repeat: no-repeat;
    overflow: hidden;
    /* Make background full viewport width */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Vertical alignment */
.background-section-block.vertical-top {
    align-items: flex-start;
}

.background-section-block.vertical-center {
    align-items: center;
}

.background-section-block.vertical-bottom {
    align-items: flex-end;
}

/* Content container - respects page margins */
.background-section-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px; /* Adjust to match your theme's content width */
    margin: 0 auto;
    padding-left: 30px; /* Matches page side padding */
    padding-right: 30px; /* Matches page side padding */
}

/* Text alignment */
.background-section-block.align-left .background-section-content {
    text-align: left;
}

.background-section-block.align-center .background-section-content {
    text-align: center;
}

.background-section-block.align-right .background-section-content {
    text-align: right;
}

/* Padding variations - only vertical padding, horizontal handled by content wrapper */
.background-section-block.padding-small {
    padding-top: 40px;
    padding-bottom: 40px;
}

.background-section-block.padding-medium {
    padding-top: 60px;
    padding-bottom: 60px;
}

.background-section-block.padding-large {
    padding-top: 80px;
    padding-bottom: 80px;
}

.background-section-block.padding-xlarge {
    padding-top: 120px;
    padding-bottom: 120px;
}

/* Text color variations */
.background-section-block.text-light {
    color: #ffffff;
}

.background-section-block.text-light h1,
.background-section-block.text-light h2,
.background-section-block.text-light h3,
.background-section-block.text-light h4,
.background-section-block.text-light h5,
.background-section-block.text-light h6,
.background-section-block.text-light p {
    color: #ffffff;
}

.background-section-block.text-dark {
    color: #333333;
}

.background-section-block.text-dark h1,
.background-section-block.text-dark h2,
.background-section-block.text-dark h3,
.background-section-block.text-dark h4,
.background-section-block.text-dark h5,
.background-section-block.text-dark h6,
.background-section-block.text-dark p {
    color: #333333;
}

/* Overlay */
.background-section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Parallax effect */
.background-section-block.parallax {
    background-attachment: fixed;
}

/* Ensure buttons and links are visible */
.background-section-block.text-light a,
.background-section-block.text-light .wp-block-button__link {
    color: #ffffff;
}

.background-section-block.text-dark a,
.background-section-block.text-dark .wp-block-button__link {
    color: #333333;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .background-section-content {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .background-section-block.padding-small {
        padding-top: 30px;
        padding-bottom: 30px;
    }
    
    .background-section-block.padding-medium {
        padding-top: 40px;
        padding-bottom: 40px;
    }
    
    .background-section-block.padding-large {
        padding-top: 50px;
        padding-bottom: 50px;
    }
    
    .background-section-block.padding-xlarge {
        padding-top: 70px;
        padding-bottom: 70px;
    }
    
    /* Disable parallax on mobile for better performance */
    .background-section-block.parallax {
        background-attachment: scroll;
    }
}

@media (max-width: 480px) {
    .background-section-content {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .background-section-block {
        min-height: 300px !important;
    }
}