/**
 * Hero met zwevende bollen (blok tcc/hero-bollen, Figma TCC: Hero Home;
 * beweging in blocks/hero-bollen/view.js, zie daar de briefing).
 *
 * Opbouw: de laag met bollen (.tcc-bollen-laag) en daarboven de inhoud
 * (.tcc-hero-bollen__inhoud): kop (Display D-1), een korte regel en de
 * knoppen, gecentreerd. Het vlak is TCC Grijs, afronding 24, 16px van de
 * rand, en ligt bovenaan de pagina onder de header (header.css).
 */

.tcc-hero-bollen {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-bottom: var(--section-gap) !important;
    border-radius: var(--carmel-radius-lg);
    background: var(--tcc-grijs) !important;

    > .tcc-hero-bollen__inhoud {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 820px;
        padding: 160px 16px 120px;
        text-align: center;
    }

    /* breedte van de tekst zelf: het vrije vlak (script) ligt om de tekst */
    .tcc-hero-bollen__inhoud > * {
        width: fit-content;
        max-width: 100%;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    h1 {
        max-width: 760px;
        margin: 0 auto 16px !important;
        font-size: var(--carmel-font-size-display1) !important;
        line-height: var(--carmel-line-height-display1) !important;
        letter-spacing: var(--carmel-letter-spacing-display1) !important;
        color: var(--tcc-blauw) !important;
    }

    p {
        margin: 0 auto 40px !important;
        font-size: var(--carmel-font-size-body-medium) !important;
        font-weight: 700;
        color: var(--tcc-blauw) !important;
    }

    :is(.kb-buttons-wrap, .kb-btns-outer-wrap) {
        justify-content: center !important;
    }
}

/* Volle breedte, maar 16px van de rand */
.entry-content > .tcc-hero-bollen.alignfull {
    --tcc-uitbreken: calc((100% - (100vw - var(--carmel-scrollbar-width, 15px))) / 2 + 16px);
    width: auto !important;
    max-width: none !important;
    margin-left: var(--tcc-uitbreken) !important;
    margin-right: var(--tcc-uitbreken) !important;
}

/* De laag met bollen achter de inhoud */
.tcc-bollen-laag {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.tcc-bol {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 999px;
    transform-origin: center;
    will-change: transform;

    > :is(img, video) {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    > svg,
    > img.tcc-bol__icoon {
        width: 46%;
        height: 46%;
        object-fit: contain;
    }
}

.tcc-bol--pil > :is(svg, img.tcc-bol__icoon) {
    width: auto;
    height: 50%;
}

/* Tot het script de bollen geplaatst heeft niets tonen (geen flits) */
.tcc-bollen-laag:not(.tcc-bollen-laag--klaar) {
    opacity: 0;
}

@media (max-width: 1024px) {
    .tcc-hero-bollen > .tcc-hero-bollen__inhoud {
        min-height: 640px;
        padding: 140px 16px 80px;
    }

    .tcc-hero-bollen h1 {
        font-size: var(--carmel-font-size-display1-mobile) !important;
        letter-spacing: var(--carmel-letter-spacing-display1-mobile) !important;
    }
}

/* Editor: het vlak niet tegen de header aan trekken, en de knop om een
   blok toe te voegen niet meetellen in de breedte */
.editor-styles-wrapper .tcc-hero-bollen {
    margin-top: 0 !important;
}

.editor-styles-wrapper .tcc-hero-bollen__inhoud > .block-list-appender {
    position: relative;
}
