/* ==========================================================================
   Legacy WPBakery Content Compatibility — Walltopia v2
   Loaded conditionally — only on pages with [vc_*] in post_content.
   !important is permitted here to override WPBakery inline styles.
   ========================================================================== */

/* --- Row / Column layout --- */

.legacy-vc-row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin: 0 0 30px 0;
}

.legacy-vc-row-inner {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.legacy-vc-column {
    flex: 1 1 0%;
    min-width: 250px;
    padding: 0 15px;
}

.legacy-vc-column-inner {
    width: 100%;
}

/* --- Text blocks --- */

.legacy-vc-text {
    margin: 0 0 20px 0;
}

.legacy-vc-text p:last-child {
    margin-bottom: 0;
}

/* --- Gallery --- */

.legacy-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.legacy-gallery img {
    max-width: calc(50% - 5px);
    height: auto;
}

/* --- WPBakery class overrides (from old theme JS Composer section) --- */

.vc_col-has-fill > .vc_column-inner,
.vc_row-has-fill + .vc_row-full-width + .vc_row > .vc_column_container > .vc_column-inner,
.vc_row-has-fill + .vc_row > .vc_column_container > .vc_column-inner,
.vc_row-has-fill > .vc_column_container > .vc_column-inner {
    padding-top: 0 !important;
}

.wpb_row,
.wpb_content_element,
ul.wpb_thumbnails-fluid > li,
.last_toggle_el_margin,
.wpb_button {
    margin-bottom: 0 !important;
}

.wpb_text_column p:last-child {
    margin-bottom: 0 !important;
}

.wpb_text_column ul {
    padding: 0 0 0 14px;
}

.wpb_text_column ul li::before {
    left: -10px;
    height: 4px;
    width: 4px;
}

.wpb_text_column ol {
    list-style: decimal-leading-zero;
}

.wpb_text_column ol li::before {
    content: none;
    display: none;
}

.wpb_single_image .vc_figure,
.wpb_single_image .vc_single_image-wrapper,
.wpb_single_image img {
    max-width: unset !important;
    width: 100%;
}

/* --- Image carousel overrides --- */

.vc_row .vc_images_carousel {
    width: 100% !important;
}

.vc_row .vc_images_carousel img {
    width: 100%;
    height: auto;
}

/* --- Responsive --- */

@media (max-width: 1023px) {
    .vc_row .vc_col-sm-4,
    .vc_row .vc_col-sm-8 {
        width: 100% !important;
    }
}

@media (max-width: 767px) {
    .legacy-vc-column {
        flex: 1 1 100%;
    }

    .legacy-gallery img {
        max-width: 100%;
    }
}
