/* Homepage v91: shared horizontal rhythm for the hero, platform rail and service bridge. */
html body.ip-home-page .ip-platform-services > .container,
html[data-theme] body.ip-home-page .ip-platform-services > .container,
html[data-ip-theme] body.ip-home-page .ip-platform-services > .container {
    width: min(calc(100% - 44px), 1340px) !important;
    max-width: 1340px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
    box-sizing: border-box !important;
}

html body.ip-home-page .ip-platform-services :is(.ip-platform-shell, .ip-platform-grid, .ip-service-bridge, .ip-service-bridge-grid),
html[data-theme] body.ip-home-page .ip-platform-services :is(.ip-platform-shell, .ip-platform-grid, .ip-service-bridge, .ip-service-bridge-grid),
html[data-ip-theme] body.ip-home-page .ip-platform-services :is(.ip-platform-shell, .ip-platform-grid, .ip-service-bridge, .ip-service-bridge-grid) {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
    box-sizing: border-box !important;
}

html body.ip-home-page .ip-platform-services .ip-platform-grid,
html[data-theme] body.ip-home-page .ip-platform-services .ip-platform-grid,
html[data-ip-theme] body.ip-home-page .ip-platform-services .ip-platform-grid {
    grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
    gap: clamp(10px, .9vw, 14px) !important;
}

html body.ip-home-page .ip-platform-services .ip-service-bridge.ip-service-bridge-platform.ip-service-bridge-premium,
html[data-theme] body.ip-home-page .ip-platform-services .ip-service-bridge.ip-service-bridge-platform.ip-service-bridge-premium,
html[data-ip-theme] body.ip-home-page .ip-platform-services .ip-service-bridge.ip-service-bridge-platform.ip-service-bridge-premium {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: clamp(18px, 2vw, 24px) 0 0 !important;
    box-sizing: border-box !important;
}

html body.ip-home-page .ip-platform-services .ip-service-bridge.ip-service-bridge-platform.ip-service-bridge-premium .ip-service-bridge-grid,
html[data-theme] body.ip-home-page .ip-platform-services .ip-service-bridge.ip-service-bridge-platform.ip-service-bridge-premium .ip-service-bridge-grid,
html[data-ip-theme] body.ip-home-page .ip-platform-services .ip-service-bridge.ip-service-bridge-platform.ip-service-bridge-premium .ip-service-bridge-grid {
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: clamp(12px, 1.25vw, 18px) !important;
}

@media (max-width: 768px) {
    html body.ip-home-page .ip-platform-services > .container,
    html[data-theme] body.ip-home-page .ip-platform-services > .container,
    html[data-ip-theme] body.ip-home-page .ip-platform-services > .container {
        width: 100% !important;
        max-width: none !important;
        padding-inline: var(--ip-mobile-safe, 16px) !important;
    }

    html body.ip-home-page .ip-platform-services .ip-platform-grid,
    html[data-theme] body.ip-home-page .ip-platform-services .ip-platform-grid,
    html[data-ip-theme] body.ip-home-page .ip-platform-services .ip-platform-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: clamp(7px, 2vw, 10px) !important;
    }

    html body.ip-home-page .ip-platform-services .ip-platform-card,
    html[data-theme] body.ip-home-page .ip-platform-services .ip-platform-card,
    html[data-ip-theme] body.ip-home-page .ip-platform-services .ip-platform-card {
        width: auto !important;
        min-width: 0 !important;
        min-height: clamp(86px, 25vw, 106px) !important;
        padding: 10px 4px 9px !important;
    }

    html body.ip-home-page .ip-platform-services .ip-service-bridge.ip-service-bridge-platform.ip-service-bridge-premium,
    html[data-theme] body.ip-home-page .ip-platform-services .ip-service-bridge.ip-service-bridge-platform.ip-service-bridge-premium,
    html[data-ip-theme] body.ip-home-page .ip-platform-services .ip-service-bridge.ip-service-bridge-platform.ip-service-bridge-premium {
        width: 100% !important;
        max-width: none !important;
        margin: clamp(14px, 4vw, 18px) 0 0 !important;
    }

    html body.ip-home-page .ip-platform-services .ip-service-bridge.ip-service-bridge-platform.ip-service-bridge-premium .ip-service-bridge-grid,
    html[data-theme] body.ip-home-page .ip-platform-services .ip-service-bridge.ip-service-bridge-platform.ip-service-bridge-premium .ip-service-bridge-grid,
    html[data-ip-theme] body.ip-home-page .ip-platform-services .ip-service-bridge.ip-service-bridge-platform.ip-service-bridge-premium .ip-service-bridge-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: clamp(8px, 2vw, 10px) !important;
    }

    html body.ip-home-page .ip-platform-services .ip-service-bridge.ip-service-bridge-platform.ip-service-bridge-premium .ip-service-bridge-card,
    html:is([data-theme], [data-ip-theme]) body.ip-home-page .ip-platform-services .ip-service-bridge.ip-service-bridge-platform.ip-service-bridge-premium .ip-service-bridge-card {
        width: auto !important;
        min-width: 0 !important;
        height: clamp(104px, 30vw, 124px) !important;
        min-height: clamp(104px, 30vw, 124px) !important;
        padding: 10px 8px !important;
    }

    /* Keep each editorial image in the mobile reading flow instead of an implicit off-screen column. */
    html body.ip-home-page section.ip-growth-benefits-reference .ip-growth-benefits-layout,
    html body.ip-home-page section#ip-instagram-guide.ip-growth-benefits-reference .ip-growth-benefits-layout,
    html body.ip-home-page section#ip-instagram-guide-secondary.ip-growth-benefits-reference .ip-growth-benefits-layout {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 18px !important;
    }

    html body.ip-home-page section.ip-growth-benefits-reference .ip-growth-benefits-copy,
    html body.ip-home-page section.ip-growth-benefits-reference .ip-growth-benefits-visual,
    html body.ip-home-page section#ip-instagram-guide.ip-growth-benefits-reference .ip-growth-benefits-copy,
    html body.ip-home-page section#ip-instagram-guide.ip-growth-benefits-reference .ip-growth-benefits-visual,
    html body.ip-home-page section#ip-instagram-guide-secondary.ip-growth-benefits-reference .ip-growth-benefits-copy,
    html body.ip-home-page section#ip-instagram-guide-secondary.ip-growth-benefits-reference .ip-growth-benefits-visual {
        grid-column: 1 !important;
        grid-row: auto !important;
        width: 100% !important;
        max-width: none !important;
    }

    html body.ip-home-page section.ip-growth-benefits-reference .ip-growth-benefits-copy,
    html body.ip-home-page section#ip-instagram-guide.ip-growth-benefits-reference .ip-growth-benefits-copy,
    html body.ip-home-page section#ip-instagram-guide-secondary.ip-growth-benefits-reference .ip-growth-benefits-copy {
        order: 1 !important;
    }

    html body.ip-home-page section.ip-growth-benefits-reference .ip-growth-benefits-visual,
    html body.ip-home-page section#ip-instagram-guide.ip-growth-benefits-reference .ip-growth-benefits-visual,
    html body.ip-home-page section#ip-instagram-guide-secondary.ip-growth-benefits-reference .ip-growth-benefits-visual {
        order: 2 !important;
        aspect-ratio: 1 / 1 !important;
    }

    /* Keep the primary safe-growth visual out of the collapsed implicit second column. */
    html body.ip-home-page
    section.ip-growth-benefits-reference[aria-labelledby="ip-growth-benefits-title"]
    .ip-growth-benefits-layout {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
        gap: 20px !important;
    }

    html body.ip-home-page
    section.ip-growth-benefits-reference[aria-labelledby="ip-growth-benefits-title"]
    .ip-growth-benefits-copy {
        grid-column: 1 !important;
        grid-row: auto !important;
        order: 1 !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    html body.ip-home-page
    section.ip-growth-benefits-reference[aria-labelledby="ip-growth-benefits-title"]
    .ip-growth-benefits-visual {
        grid-column: 1 !important;
        grid-row: auto !important;
        order: 2 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: min(100%, 420px) !important;
        max-width: 420px !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 1 / 1 !important;
        justify-self: center !important;
        margin: 0 auto !important;
    }

    html body.ip-home-page
    section.ip-growth-benefits-reference[aria-labelledby="ip-growth-benefits-title"]
    .ip-growth-benefits-photo-main,
    html body.ip-home-page
    section.ip-growth-benefits-reference[aria-labelledby="ip-growth-benefits-title"]
    .ip-growth-benefits-photo-main img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    html body.ip-home-page
    section.ip-growth-benefits-reference[aria-labelledby="ip-growth-benefits-title"]
    .ip-growth-benefits-photo-main img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: 50% 43% !important;
    }
}
