/* Blog Visual Section Styles */
.blog-visual-section {
    padding: 0 120px;
    width: 100%;
    box-sizing: border-box;
}

.blog-visual-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 32px;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #ed6a59;
    padding: 48px 56px;
    border-radius: 40px;
    box-sizing: border-box;
}

.blog-visual-content {
    flex: 1 1 58%;
}

/* allow flex children to shrink properly on small viewports */
.blog-visual-content {
    min-width: 0;
}

.blog-visual-title {
    font-family: 'IvyOra Display', serif;
    font-weight: 700;
    font-size: 32px;
    color: #403936;
    margin: 0 0 16px 0;
}

.blog-visual-lead,
.blog-visual-support {
    font-family: 'IBM Plex Sans', sans-serif;
    color: #403936;
    font-size: 16px;
    line-height: normal;
    margin: 0 0 12px 0;
}

.blog-visual-buttons {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.blog-visual-secondary {
    display: flex;
    gap: 32px;
    align-items: center;
}

.blog-visual-text-link {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #ed6a59;
    text-decoration: none;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.blog-visual-text-link:hover {
    opacity: 0.7;
}

/* Blog visual buttons now use centralized component (orange-primary type) */

.blog-visual-image-wrap {
    flex: 0 0 345px;
    border-radius: 32px 32px 300px 32px;
    overflow: hidden;
}

.blog-visual-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 1200px) {
    .blog-visual-section {
        padding: 0 60px;
    }

    .blog-visual-container {
        padding: 32px 28px;
        gap: 20px;
    }

    .blog-visual-image-wrap {
        flex: 0 0 320px;
    }
}

/* Improved mobile layout for widths <= 900px (Figma mobile node behavior)
   - stack content earlier to avoid overflow
   - reduce heading and paragraph sizes
   - constrain and crop image to match mobile composition
   - ensure buttons wrap and do not force overflow
*/
@media (max-width: 900px) {
    .blog-visual-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 12px;
        border-radius: 20px;
    }

    .blog-visual-content {
        order: 1;
        width: 100%;
    }

    .blog-visual-title {
        font-size: 24px;
        line-height: 1.08;
        margin-bottom: 12px;
        word-break: break-word;
        hyphens: auto;
    }

    .blog-visual-lead,
    .blog-visual-support {
        font-size: 15px;
        line-height: normal;
        margin-bottom: 12px;
    }

    .blog-visual-buttons {
        margin-top: 10px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .btn {
        padding: 10px 16px;
    }

    /* Place primary on its own row but not full width; secondary buttons sit side-by-side below */
    .blog-visual-buttons {
        display: flex;
        flex-direction: column-reverse;
        width: 100%;
        gap: 12px;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .blog-visual-buttons .btn {
        order: 1;
        width: auto;
        max-width: 420px;
        box-sizing: border-box;
    }

    .blog-visual-secondary {
        display: flex;
        gap: 10px;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .blog-visual-secondary .btn-outline,
    .blog-visual-secondary .btn-text {
        flex: 0 0 calc(50% - 8px);
        width: calc(50% - 8px);
        box-sizing: border-box;
        text-align: center;
    }

    /* Make the image a smaller cropped element and place after content */
    .blog-visual-image-wrap {
        order: 2;
        /* width: 160px;
        height: 160px; */
        align-self: center;
        border-radius: 32px 32px 300px 32px;
        flex: none;
        /* border-radius: 28px 28px 80px 28px; */
        overflow: hidden;
        margin-top: 8px;
    }

    .blog-visual-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: right center;
        display: block;
    }

    /* Ensure long words / nonbreaking content wrap instead of overflowing */
    .blog-visual-content,
    .blog-visual-lead,
    .blog-visual-support {
        overflow-wrap: break-word;
        word-break: break-word;
        -webkit-font-smoothing: antialiased;
    }
}

@media (max-width: 768px) {
    .blog-visual-section {
        padding: 0 24px;
    }

    .blog-visual-container {
        flex-direction: column;
        padding: 24px;
    }

    .blog-visual-content {
        order: 1;
    }

    .blog-visual-image-wrap {
        order: 2;
        width: 100%;
        flex: none;
        border-radius: 24px;
    }
}
