/* Group custom styles */
.wp-block-group {
    &.is-style-full-height{
        height: 100%;

        &:is(.is-layout-flex > .wp-block-group){
            align-self: stretch;
            height: unset;
        }
    }

    &[style*="padding-left:var(--wp--preset--spacing--extra-large)"],
    &[style*="padding-left:var(--wp--preset--spacing--huge)"],
    &[style*="padding-left:var(--wp--preset--spacing--massive)"] {
        @media (max-width: 1280px) {
            & {
                padding-left: 30px !important;
            }
        }
    }

    &[style*="padding-right:var(--wp--preset--spacing--extra-large)"],
    &[style*="padding-right:var(--wp--preset--spacing--huge)"],
    &[style*="padding-right:var(--wp--preset--spacing--massive)"] {
        @media (max-width: 1280px) {
            & {
                padding-right: 30px !important;
            }
        }
    }

    &[style*="padding-top:var(--wp--preset--spacing--extra-large)"],
    &[style*="padding-top:var(--wp--preset--spacing--huge)"],
    &[style*="padding-top:var(--wp--preset--spacing--massive)"] {
        @media (max-width: 781px) {
            & {
                padding-top: 30px !important;
            }
        }

        @media (min-width: 782px) and (max-width: 1280px) {
            & {
                padding-top: 60px !important;
            }
        }
    }

    &[style*="padding-bottom:var(--wp--preset--spacing--extra-large)"],
    &[style*="padding-bottom:var(--wp--preset--spacing--huge)"],
    &[style*="padding-bottom:var(--wp--preset--spacing--massive)"] {
        @media (max-width: 781px) {
            & {
                padding-bottom: 30px !important;
            }
        }

        @media (min-width: 782px) and (max-width: 1280px) {
            & {
                padding-bottom: 60px !important;
            }
        }
    }

    &[style*="padding-top:160px"] {
        @media (max-width: 781px) {
            & {
                padding-top: 60px !important;
            }
        }

        @media (min-width: 782px) and (max-width: 1280px) {
            & {
                padding-top: 60px !important;
            }
        }
    }

    &[style*="padding-bottom:160px"] {
        @media (max-width: 781px) {
            & {
                padding-bottom: 60px !important;
            }
        }

        @media (min-width: 782px) and (max-width: 1280px) {
            & {
                padding-bottom: 60px !important;
            }
        }
    }

    &[style*="margin-top:160px"] {
        @media (max-width: 781px) {
            & {
                margin-top: 50px !important;
            }
        }

        @media (min-width: 782px) and (max-width: 1280px) {
            & {
                margin-top: 60px !important;
            }
        }
    }

    &[style*="padding-top:150px"] {
        @media (max-width: 781px) {
            & {
                padding-top: 50px !important;
            }
        }

        @media (min-width: 782px) and (max-width: 1280px) {
            & {
                padding-top: 80px !important;
            }
        }
    }

    &[style*="padding-bottom:150px"] {
        @media (max-width: 781px) {
            & {
                padding-bottom: 50px !important;
            }
        }

        @media (min-width: 782px) and (max-width: 1280px) {
            & {
                padding-bottom: 50px !important;
            }
        }
    }

    &[style*="padding-top:140px"] {
        @media (max-width: 781px) {
            & {
                padding-top: 50px !important;
            }
        }

        @media (min-width: 782px) and (max-width: 1280px) {
            & {
                padding-top: 50px !important;
            }
        }
    }

    &[style*="padding-bottom:140px"] {
        @media (max-width: 781px) {
            & {
                padding-bottom: 50px !important;
            }
        }

        @media (min-width: 782px) and (max-width: 1280px) {
            & {
                padding-bottom: 50px !important;
            }
        }
    }

    &[style*="margin-top:140px"] {
        @media (max-width: 781px) {
            & {
                margin-top: 40px !important;
            }
        }

        @media (min-width: 782px) and (max-width: 1280px) {
            & {
                margin-top: 50px !important;
            }
        }
    }

    &[style*="padding-top:125px"] {
        @media (min-width: 782px) and (max-width: 1280px) {
            & {
                padding-top: 60px !important;
            }
        }

        @media (min-width: 782px) and (max-width: 1280px) {
            & {
                padding-top: 60px !important;
            }
        }
    }

    &[style*="margin-top:72px"] {
        @media (min-width: 782px) and (max-width: 1280px) {
            & {
                margin-top: 40px !important;
            }
        }

        @media (min-width: 782px) and (max-width: 1280px) {
            & {
                margin-top: 60px !important;
            }
        }
    }

    &.breadcrumb-wrapper {
        p {
            font-size: inherit;
        }
    }

    &.is-style-hover-reveal{
        display: none;

        @media (min-width: 782px) {
            display: grid;
            overflow: hidden;

            &:not(body.wp-admin .wp-block-group) {
                grid-template-rows: 0fr;
                transition: grid-template-rows 0.2s ease-in-out;

                > * {
                    min-height: 0;
                    transition: visibility 1s;
                    visibility: hidden;
                }

                &:is(.wp-block-cover:hover .wp-block-group) {
                    grid-template-rows: 1fr;

                    > * {
                        visibility: visible;
                    }
                }
            }
        }
    }
}




/* ==========================================
   INDIGO — AUTOMATIC FULL COVER LINKS
========================================== */

.wp-block-cover.indigo-full-card-link {
    cursor: pointer;
}



/* Stretch columns and grid items */
.wp-block-columns,
.wp-block-post-template.is-layout-grid,
.wp-block-group.is-layout-grid {
    align-items: stretch !important;
}

/* Allow grid items and columns to stretch their content */
.wp-block-columns > .wp-block-column,
.wp-block-post-template.is-layout-grid > .wp-block-post {
    display: flex;
    flex-direction: column;
    min-width: 0;
    align-self: stretch !important;
}

/* Stretch Cover cards to fill their available height */
.wp-block-column > .wp-block-cover,
.wp-block-post > .wp-block-cover {
    flex: 1 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Stretch Cover blocks that are direct grid children */
.wp-block-group.is-layout-grid > .wp-block-cover {
    align-self: stretch;
}

@media screen and (max-width: 1360px) {
    .wp-block-post-template.columns-4.is-style-masonry-layout.is-layout-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 30px !important;
    }
}

@media screen and (max-width: 767px) {
    .wp-block-post-template.columns-4.is-style-masonry-layout.is-layout-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 20px !important;
    }

    .wp-block-post-template.columns-4.is-style-masonry-layout > li {
        grid-column: span 1 !important;
    }
}