/*--------------------------------------------------------------
# Block Spacing and Layout Enhancements
# Additional styles to ensure consistent block spacing
--------------------------------------------------------------*/

/* Ensure consistent spacing for all blocks */
.entry-content > * {
    margin-bottom: 1.5em;
}

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

/* Block container max-width for readability */
.entry-content .wp-block {
    max-width: none;
}

/* Ensure alignwide blocks work properly */
.entry-content .alignwide {
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px;
    width: 100%;
}

/* Ensure alignfull blocks work properly */
.entry-content .alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: none;
    width: auto;
}

/* Fix for nested blocks */
.wp-block-group .wp-block-group__inner-container > *:last-child {
    margin-bottom: 0;
}

/* Ensure proper spacing in columns */
.wp-block-columns .wp-block-column > *:last-child {
    margin-bottom: 0;
}

/* Media and text block responsive adjustments */
@media (max-width: 781px) {
    .wp-block-media-text.is-stacked-on-mobile {
        grid-template-columns: 100% !important;
        grid-template-areas: "media-text-media" "media-text-content" !important;
    }
}

/* Button block responsive spacing */
.wp-block-button {
    margin-bottom: 1.5em;
}

.wp-block-buttons {
    margin-bottom: 1.5em;
}

.wp-block-buttons .wp-block-button {
    margin-bottom: 0;
}

/* Gallery block spacing fixes */
.wp-block-gallery figcaption {
    margin-top: 0.5em;
    margin-bottom: 0;
}

/* Quote block spacing consistency */
.wp-block-quote {
    margin: 1.5em 0;
}

.wp-block-pullquote {
    margin: 2em 0;
}

/* Table responsive scrolling */
.wp-block-table {
    overflow-x: auto;
    margin: 1.5em 0;
}

@media (max-width: 768px) {
    .wp-block-table table {
        min-width: 600px;
    }
}

/* Cover block text readability */
.wp-block-cover .wp-block-cover__inner-container {
    width: 100%;
    z-index: 1;
    color: #fff;
}

/* Separator block variations */
.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
    max-width: 100px;
}

/* Latest posts block grid improvements */
.wp-block-latest-posts.is-grid {
    list-style: none;
}

.wp-block-latest-posts.is-grid li {
    margin-bottom: 1.5em;
}

/* Ensure consistent text alignment */
.has-text-align-left {
    text-align: left;
}

.has-text-align-center {
    text-align: center;
}

.has-text-align-right {
    text-align: right;
}

/* Block margin and padding utilities */
.has-small-font-size {
    font-size: 14px;
}

.has-normal-font-size {
    font-size: 17px;
}

.has-medium-font-size {
    font-size: 18px;
}

.has-large-font-size {
    font-size: 24px;
}

.has-larger-font-size {
    font-size: 32px;
}
