#amoebe {
    margin: 120px 0;
    min-height: 775px;
    background: url('/wp-content/plugins/imc-rheform-amoebe/assets/amoebe.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    .core_container {
        width: 195px;
        height: 195px;
        display: flex;
        justify-content: center;
        align-items: center;
        background:#FCC020;
        border-radius: 50%;
        text-align: center;
        margin-top: 44px;

        p {
            font-size: 18px !important;

        }
        .big {
            line-height: 1em;
            font-size: 34px;
            font-weight: 800;
        }
    }

    .sub_container {
        position: absolute;
        width: 800px;
        height: 100%;

        .sub_heading {
            font-size: 17px;
            text-transform: none;
            text-align: center;
            position: absolute;
            width: 150px;
            line-height: 1.2em;

            &.sub_heading_1 {
                top: 260px;
                left: 230px;
            }

            &.sub_heading_2 {
                top: 260px;
                right: 230px;
            }

            &.sub_heading_3 {
                bottom: 200px;
                width: 200px;
                left: calc(50% - 100px);
            }
        }
    }


    .title_box {

        &:hover, &:focus {
            p {
                opacity: 1;
            }
        }
        h3, .title_text {
            font-size: 18px !important;
            letter-spacing: 1px !important;
            font-weight: 700 !important;
            text-transform: none !important;

            text-align: center;
            position: absolute;
        }

        p {
            position: absolute;
            max-width: 500px;
            min-width: 500px;
            opacity: 0;
            transition: 0.2s ease-in-out;

            &:hover, &:focus {
                opacity: 1;
            }
        }
    }

    .icon_container {
        position: absolute;
        height: 100%;
        width: 800px;

        .icon {
            height: 194px;
            width: 194px;
            border-radius: 50%;
            background: #c6c6c6;
            position: absolute;
            display:flex;
            justify-content: center;
            align-items: center;

            img {
                height:110px;

            }
        }
    }

    .item_container {

        &.item_1 {
            .icon {
                left: calc(50% - 97px);
                top: 40px;
            }

            .title_box {
                h3, .title_text {
                    width: 200px;
                    top: -80px;
                    left: calc(50% - 100px);
                }

                p {
                    top: -80px;
                    left: 520px
                }
            }
        }

        &.item_2 {
            .icon {
                left: 40px;
                top: 232px;
            }

            .title_box {
                h3, .title_text {
                    text-align: right;
                    width: 300px;
                    top: 160px;
                    right: 820px;
                }

                p {
                    top: 230px;
                    right: 820px;
                    text-align: left;
                }
            }
        }

        &.item_3 {
            .icon {
                right: 40px;
                top: 232px;
            }

            .title_box {
                h3, .title_text {
                    text-align: left;
                    width: 300px;
                    top: 160px;
                    left: 820px;
                }

                p {
                    top: 230px;
                    left: 820px;
                    text-align: left;
                }
            }
        }

        &.item_4 {
            .icon {
                left: 141px;
                bottom: 40px;
            }

            .title_box {
                h3, .title_text {
                    text-align: right;
                    width: 300px;
                    bottom: 110px;
                    right: 740px;
                }

                p {
                    top: 680px;
                    right: 740px;
                    text-align: left;
                }
            }
        }

        &.item_5 {
            .icon {
                right: 141px;
                bottom: 40px;
            }

            .title_box {
                h3, .title_text {
                    text-align: left;
                    width: 300px;
                    bottom: 110px;
                    left: 740px;
                }

                p {
                    top: 680px;
                    left: 740px;
                    text-align: left;
                }
            }
        }

        &:hover, &:focus  {
            .title_box p {
                opacity: 1;
            }
        }
    }
}

/* Slider-Punkte werden von amoebe-slider.js erzeugt; auf dem Desktop unsichtbar */
#amoebe .amoebe-dots {
    display: none;
}

/* ------------------------------------------------------------------
   Mobil / Tablet: Headline oben, Sub-Headings als Pills,
   Icons als Swipe-Slider mit Punkten
   ------------------------------------------------------------------ */
@media (max-width: 1400px) {
    #amoebe {
        display: block;
        min-height: 0;
        margin: 80px 0;
        background: none;

        .core_container {
            display: block;
            width: auto;
            height: auto;
            margin: 0 auto 28px;
            padding: 0 24px;
            background: none;
            border-radius: 0;

            p {
                margin: 0;
            }

            .big {
                display: inline-block;
                margin: 6px 0;
                padding: 2px 12px;
                font-size: 36px;
                /* Textmarker-Effekt als mobiles Echo des gelben Kreises */
                background: linear-gradient(to top, #FCC020 42%, transparent 42%);
            }
        }

        .sub_container {
            position: static;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            width: auto;
            height: auto;
            margin: 0 auto 44px;
            padding: 0 24px;

            .sub_heading {
                position: static;
                width: auto;
                margin: 0;
                padding: 10px 18px;
                border: 1px solid #d6d6d6;
                border-radius: 999px;
                font-size: 14px;
                line-height: 1;

                &.sub_heading_1, &.sub_heading_2, &.sub_heading_3 {
                    position: static;
                    width: auto;
                }

                /* "Daten-<br>Management" wird einzeilig zu "Daten-Management" */
                br {
                    display: none;
                }
            }
        }

        .icon_container {
            position: relative;
            display: flex;
            gap: 16px;
            width: auto;
            height: auto;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            /* Seitenabstand so, dass erste/letzte Karte mittig einrasten kann */
            padding: 8px max(7.5%, calc(50% - 200px)) 28px;
            overscroll-behavior-x: contain;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;

            &::-webkit-scrollbar {
                display: none;
            }

            a.item_container {
                display: flex;
                flex-direction: column;
                align-items: center;
                flex: 0 0 85%;
                max-width: 400px;
                scroll-snap-align: center;
                scroll-snap-stop: always;
                padding: 32px 24px;
                background: #fff;
                border: 1px solid rgba(0, 0, 0, 0.07);
                border-radius: 24px;
                box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
                color: inherit;
                text-decoration: none;

                &:focus-visible {
                    outline: 2px solid #FCC020;
                    outline-offset: 4px;
                }

                .icon {
                    position: static;
                    flex: 0 0 auto;
                    width: 120px;
                    height: 120px;
                    margin-bottom: 20px;

                    img {
                        height: 64px;
                    }
                }

                .title_box {
                    display: flex;
                    flex-direction: column;
                    align-items: center;

                    h3, .title_text {
                        position: static;
                        width: auto;
                        margin: 0 0 12px;
                        text-align: center;
                    }

                    p {
                        position: static;
                        min-width: 0;
                        max-width: none;
                        margin: 0;
                        opacity: 1;
                        font-size: 15px;
                        line-height: 1.6;
                        text-align: left;
                        hyphens: auto;
                    }
                }
            }
        }

        .amoebe-dots {
            display: flex;
            justify-content: center;
            gap: 8px;

            button {
                width: 9px;
                height: 9px;
                padding: 0;
                border: none;
                border-radius: 999px;
                background: #d5d5d5;
                cursor: pointer;
                transition: all 0.25s ease;

                &.active {
                    width: 26px;
                    background: #FCC020;
                }
            }
        }
    }
}
