.image-with-text {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: transparent;
    /* Fixed crop frame; change ratio in one place if needed */
    --iwt-media-aspect: 40 / 27;
}

.image-with-text__inner {
    box-sizing: border-box;
    width: 100%;
    max-width: min(1680px, 100%);
    margin-inline: auto;
    padding: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(2rem, 5vw, 3.5rem);
}

.image-with-text__grid {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
    box-sizing: border-box;
    justify-content: flex-start;
    background-color: transparent;
    width: 100%;
    min-width: 0;
}

/* Crop box: full width of card, static aspect ratio */
.image-with-text__media {
    width: 100%;
    max-width: 100%;
    aspect-ratio: var(--iwt-media-aspect);
    overflow: hidden;
    border-radius: 20px;
    border: 2px solid #a3b199;
    box-sizing: border-box;
    flex-shrink: 0;
}

.image-with-text__img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: center;
    border: none;
    border-radius: 0;
}

.image-with-text__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    gap: 20px;
    justify-content: flex-start;
    box-sizing: border-box;
    overflow: hidden;
}

.image-with-text__title {
    margin: 0;
    color: #a3b199;
    font-size: clamp(1.5rem, 1.15rem + 2.1vw, 2.625rem);
    font-family: Inter, system-ui, sans-serif;
    font-weight: 400;
    line-height: normal;
    align-items: center;
    text-align: center;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.image-with-text__description {
    align-items: center;
    font-family: Inter, system-ui, sans-serif;
    color: #fff;
    text-align: center;
    margin: 0;
    font-size: clamp(0.9375rem, 0.35vw + 0.82rem, 1.6875rem);
    line-height: 1.5;
    width: 80%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.image-with-text__button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    margin-top: auto;
    /* Match two-line labels so every column’s CTA is the same height */
    min-height: 3.65rem;
    min-height: calc(2lh + 20px);
    max-width: 100%;
    background-color: #a3b199;
    padding: 14px 20px;
    box-shadow: -3px -3px 10px 0 rgba(255, 255, 255, 0.20);
    border-radius: 40px;
    text-decoration: none;
    text-align: center;
    color: #1c1c1c;
    font-size: 16px;
    font-family: "WixMadeforText", "Raleway", system-ui, sans-serif;
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.image-with-text__button:hover {
    background: #79896D;
    box-shadow: 0 5px 6px 0 rgba(0, 0, 0, 0.42) inset, 3px 3px 10px 0 rgba(255, 255, 255, 0.20);
}   

@media (max-width: 1790px) {
    .image-with-text__title {
        font-size: 35px;
    }
}

@media (max-width: 1500px) {
    .image-with-text__title {
        font-size: 30px;
    }
}

/* Under 1280px: slightly smaller title than wide desktop */
@media (max-width: 1280px) {
    .image-with-text__title {
        font-size: clamp(1.35rem, 1.05rem + 1.25vw, 1.75rem);
    }
}

/* Tablet: spacing and fluid type */
@media (max-width: 1024px) and (min-width: 780px) {
    .image-with-text__grid {
        padding-inline: clamp(16px, 3vw, 40px);
        gap: clamp(14px, 2.5vw, 20px);
    }

    .image-with-text__button {
        font-size: clamp(0.9375rem, 0.5vw + 0.75rem, 1.125rem);
        padding: clamp(10px, 1.2vw, 14px) clamp(14px, 2vw, 20px);
    }
}

/* Mobile / narrow: single column under 780px */
@media (max-width: 779px) {
    .image-with-text__inner {
        padding: clamp(20px, 5vw, 40px) clamp(12px, 4vw, 24px);
    }

    .image-with-text__grid {
        flex-direction: column;
        align-items: stretch;
        padding-inline: clamp(0px, 2vw, 16px);
        gap: clamp(2rem, 6vw, 2.5rem);
    }

    .image-with-text__card {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }

    .image-with-text__title {
        line-height: 1.15;
    }

    .image-with-text__description {
        width: min(100%, 36rem);
    }

    .image-with-text__button {
        font-size: clamp(0.875rem, 2vw + 0.5rem, 1rem);
        padding: clamp(12px, 3vw, 14px) clamp(18px, 5vw, 22px);
    }
}
