.columns-with-bg {
    background: var(--bg-color);
    position: relative;
    overflow: hidden;
}

.columns-with-bg:before {
    position: absolute;
    content: '';
    width: 110%;
    height: 100%;
    top: 0;
    left: -50%;
    z-index: 0;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.4) 0%, transparent 56%);
}

.columns-with-bg:after {
    position: absolute;
    content: '';
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    background: transparent var(--bg-image) no-repeat center / cover;
    mix-blend-mode: soft-light;
    opacity: var(--bg-img-opacity); /* Use the opacity variable */
}

/* Adjustments for specific styles */
.columns-with-bg.gradient_background:before,
.columns-with-bg.clear-style:before,
.columns-with-bg.clear-style:after {
    content: none;
}

.columns-with-bg.gradient_background:after {
    background: var(--bg-color) var(--bg-image) no-repeat center right / cover; /* Ensure var(--bg-color) is set correctly for gradient */
    mix-blend-mode: normal;
    opacity: var(--bg-img-opacity); /* Ensure opacity is applied if needed */
}

/* Container and General Typography */
.columns-with-bg .container {
    max-width: 1190px;
    margin: 0 auto;
    width: 90%;
    padding: 94px 0 80px;
    position: relative;
    z-index: 1;
}

.columns-with-bg .title {
    font: normal var(--f-bold) 3.88rem / 1.2 var(--font-sans);
    color: var(--title-color);
	letter-spacing: -0.62px;
    margin: 0;
}

.columns-with-bg .sub-title {
    font: normal var(--f-black) 2.63rem / 1.1 var(--font-sans);
    color: var(--title-color);
    margin: 24px 0 0;
}

.columns-with-bg .title+.grid-wrapper,
.columns-with-bg .sub-title+.grid-wrapper {
    margin-top: 70px;
}

/* Grid Layout */
.columns-with-bg .grid-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 57px;
}

.columns-with-bg .grid-wrapper .item {
    width: calc((100% / var(--grid-width)) - 46px); /* Check calculation if gap changes */
}

/* Item Styling */
.columns-with-bg .grid-wrapper .item .icon { /* Check if this class is still used or if it's .img-icon or direct svg */
    max-width: 60px;
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    margin-bottom: 20px;
}

.columns-with-bg .grid-wrapper .item .img-icon { /* Style for non-SVG icons if used */
     max-width: 60px;
     height: auto;
     margin-bottom: 20px;
     display: block;
}

.columns-with-bg .grid-wrapper .item > svg { /* Style for directly outputted SVG icons */
    height: 60px;
    width: auto; /* Maintain aspect ratio */
    max-width: 100%; /* Prevent overflow */
    margin-bottom: 20px;
    display: block;
    /* Icon color is handled by $icon_color variable in PHP/SVG output */
}

.columns-with-bg .grid-wrapper .item .divider {
    background: transparent var(--divider-bg) repeat-x left center / auto;
    width: 100%;
    height: 4px;
    margin: 10px 0 20px; /* Consistent margin */
}

.columns-with-bg .grid-wrapper .item .title {
    font: normal var(--f-bold) 1.75rem / 1.1 var(--font-sans);
    color: var(--item-title-color);
    margin: 0 0 15px 0; /* Adjusted margin */
}

.columns-with-bg .grid-wrapper .item .content {
    font: normal var(--f-medium) 1.13rem / 1.2 var(--font-sans);
    color: var(--item-text-color);
}

/* >>> Added/Modified Rules for Links within Content <<< */
.columns-with-bg .grid-wrapper .item .content a {
    color: var(--item-link-color); /* Use the custom property */
    font-weight: 600;    /* Example style */
    /* Inherit font */
}
.columns-with-bg .grid-wrapper .item .content a:hover {
    text-decoration: none;         /* Example hover style */
    opacity: 0.8;                  /* Example hover style */
}
/* >>> End Added/Modified Rules <<< */


.columns-with-bg .grid-wrapper .item .content p {
    margin-top: 0; /* Reset top margin for paragraphs */
    margin-bottom: 20px;
}
.columns-with-bg .grid-wrapper .item .content p:last-child {
    margin-bottom: 0; /* Remove bottom margin from last paragraph */
}


/* Item Button */
.columns-with-bg .grid-wrapper .item .btn {
    display: inline-flex; /* Use inline-flex for better alignment */
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    border: none;
    background: none; /* Buttons inside items seem to be text links with icons */
    padding: 0; /* Reset padding */
    font: normal var(--f-bold) 0.875rem / 1 var(--font-sans);
    color: var(--btn-text-color); /* Check if this should be item-link-color or item-text-color */
    width: max-content;
    text-decoration: none;
    box-shadow: none;
    margin-top: 15px; /* Add space above button if content exists */
}

.columns-with-bg .grid-wrapper .item .btn svg {
    color: var(--btn-text-color); /* Or maybe use currentColor? Check SVG output */
    transition: var(--transition);
    width: 1em; /* Size relative to font */
    height: 1em;
}

.columns-with-bg .grid-wrapper .item .btn:hover svg {
    transform: rotate(90deg); /* Or other hover effect */
}
/* .columns-with-bg .grid-wrapper .item .btn:hover span {
     text-decoration: underline;
} */


/* Main Bottom Button */
.columns-with-bg .grid-wrapper+.divider { /* Divider above main button */
    background: transparent var(--divider-bg) repeat-x left center / auto;
    width: 100%;
    height: 4px;
    margin: 70px 0 10px;
}

.columns-with-bg .btn-wrapper {
    display: flex;
    align-items: center; /* Use center */
    justify-content: flex-end;
    margin-top: 20px; /* Add margin after divider */
}

.columns-with-bg .btn.no-icon { /* Main button at the bottom */
    display: inline-block;
    font: normal var(--f-bold) 0.875rem / 1 var(--font-sans);
    background: var(--btn-bgd-color);
    color: var(--btn-text-color);
    border-radius: 25px;
    padding: 10px 26px;
    box-shadow: none;
    text-decoration: none;
    border: 1px solid transparent; /* Add border for hover effect */
    transition: var(--transition);
}

.columns-with-bg .btn.no-icon:hover {
    color: var(--btn-bgd-color);
    background: var(--btn-text-color);
    border-color: var(--btn-bgd-color); /* Example border on hover */
}

/* Adjustments for specific styles on main button */
.columns-with-bg.clear-style .btn.no-icon {
    background: var(--btn-bgd-color); /* Re-apply as needed */
    color: var(--btn-text-color);
}

.columns-with-bg.clear-style .btn.no-icon:hover {
    color: var(--btn-bgd-color);
    background: var(--btn-text-color);
    border-color: var(--btn-bgd-color); /* Example */
}

/* Responsive Styles */
@media screen and (max-width: 1024px) {
    .columns-with-bg:before {
        content: none; /* Removed overlay */
    }

    .columns-with-bg .container {
        padding: 70px 0;
    }

    .columns-with-bg .title {
        font: normal var(--f-bold) 3.25rem / 1.1 var(--font-sans);
    }

     .columns-with-bg .sub-title {
        font: normal var(--f-black) 2.25rem / 1.1 var(--font-sans); /* Slightly smaller */
    }

    .columns-with-bg .grid-wrapper {
        gap: 40px;
    }

    .columns-with-bg .grid-wrapper .item {
        width: calc((100% / 2) - 20px); /* 2 columns */
    }
}

@media screen and (max-width: 991px) {
    .columns-with-bg.gradient_background:after {
        content: none; /* Remove gradient overlay on smaller screens */
    }
     .columns-with-bg .grid-wrapper {
        gap: 30px; /* Adjust gap */
    }
     .columns-with-bg .grid-wrapper .item {
        width: calc((100% / 2) - 15px); /* Adjust width based on new gap */
    }
}

@media screen and (max-width: 767px) {
    .columns-with-bg .container {
        padding: 40px 0;
        width: 95%; /* More width on mobile */
    }

    .columns-with-bg .title {
        font: normal var(--f-bold) 2.63rem / 1.1 var(--font-sans);
    }
     .columns-with-bg .sub-title {
        font: normal var(--f-black) 2rem / 1.1 var(--font-sans);
    }

    .columns-with-bg .grid-wrapper {
        gap: 30px; /* Adjust gap */
        flex-direction: column; /* Stack items */
    }

    .columns-with-bg .grid-wrapper .item {
        width: 100%; /* Full width */
    }

    .columns-with-bg .grid-wrapper .item .content {
        font: normal var(--f-medium) 1.13rem / 1.3 var(--font-sans); /* Adjusted size back */
    }

    .columns-with-bg .grid-wrapper+.divider {
        margin: 40px 0 10px; /* Adjusted spacing */
    }

    .columns-with-bg .btn-wrapper {
        justify-content: center; /* Center button on mobile */
    }

    .columns-with-bg .title+.grid-wrapper,
    .columns-with-bg .sub-title+.grid-wrapper {
        margin-top: 40px; /* Reduced top margin */
    }
}