/* Reset & Box-Sizing */
infographic-container *, infographic-container *::before, infographic-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Header */
.header {
    text-align: center;
    margin: 2rem 0 1rem;
}

.header__title {
    font-size: 2rem;
    font-weight: 200;
    color: #1f3b58;
}

/* Container: horizontale Abstaende links/rechts */
.infographic-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.infographic-container p {
    margin: 0;
    padding: 0;
}
/* Linien */
.infographic__line {
    width: 100%;
    height: 1.5rem;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.infographic__line--top {
    background-image: url('assets/linie-oben.svg');
    margin-bottom: 35px;
}

.infographic__line--bottom {
    background-image: url('assets/linie-unten.svg');
    margin-top: 30px;
}

/* Infografik-Grid */
.infographic {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 0;
    padding: 0;
    position: relative;
}

/* Desktop-Pfeile */
.infographic__arrow {
    position: absolute;
    top: 50%;
    width: 15rem;
    height: 15rem;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    animation: slideFade 4s ease-in-out infinite;
}

.infographic__arrow--grey {
    background-image: url('assets/pfeil-grau-icon.svg');
    left: 35%;
    animation-delay: 0s;
}

.infographic__arrow--red {
    background-image: url('assets/pfeil-rot-icon.svg');
    left: 65%;
    animation-delay: 2s;
}

@keyframes slideFade {
    0% {
        transform: translate(-50%, -50%) translateX(0);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) translateX(20px);
        opacity: 0;
    }
}

/* Spalten-Grundstruktur */
.infographic__col {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.infographic__col--left .infographic__box,
.infographic__col--right .infographic__box {
    padding: 1rem;
    text-align: center;
}

/* Logo in der Mitte */
.infographic__col--center .infographic__logo {

    margin: 0 auto 2rem auto;
}

.infographic__col--center .infographic__logo img {
    max-width: 150px;
    width: 100%;
    margin: 0 auto;
    display: block;
}

/* Feature-Grid (Icons + Texte) */
.infographic__col--center .infographic__features {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 1rem 3rem;
    margin-bottom: 2rem;
}

/* Kleine Icons neben Text – pixelgenau 28×28px */
.infographic__features .feature {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #d00;
    font-weight: 700;
}
.infographic__features .feature::before {
    content: none !important;
    left: auto;
}
.infographic__features .feature {
    padding-left: 0 !important;
}
.infographic__features .feature img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin: 0;
}

/* Titel & Text ohne Underline */
.infographic__title,
.infographic__title_alternative {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    text-align: left;
}

.infographic__title {
    color: #1f3b58;
}

.infographic__title_alternative {
    color: #1f3b58;
}

.infographic__text,
.infographic__text_alternative {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    text-align: left;
}

.infographic__text_alternative {
    color: #1f3b58;
}

/* Plus-Icon mit Hover & Puls */
.infographic__icon--plus, .infographic__icon--plus-red {
    position: relative;
    width: 1.5rem;
    height: 1.5rem;
    background: url('assets/plus-icon-2.svg') no-repeat center;
    background-size: contain;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    margin: 0.5rem auto;
}
.infographic__icon--plus-red {
    background: url('assets/plus-icon-rot.svg') no-repeat center;
}
.infographic__icon--plus::before, .infographic__icon--plus-red::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: none;
    transform: translate(-50%, -50%) scale(1);
    animation: pulse 4s linear infinite;
    pointer-events: none;
}

.infographic__icon--plus-red::before {
    animation: pulsered 4s linear infinite;
}

.popup-fadein {
    animation: fadeinpanel 0.5s ease-in-out;
}

@keyframes fadeinpanel {
    from {
        opacity: 0
    }
    to {
        opacity: 1
    }
}

.infographic__icon--plus:hover {
    transform: scale(1.2);

}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        box-shadow: 0 0 8px #1f3b58, inset 0 0 12px #1f3b58;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
        box-shadow: 0 0 20px #1f3b58, inset 0 0 8px #1f3b58;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        box-shadow: 0 0 8px #1f3b58, inset 0 0 12px #1f3b58;
    }
}

@keyframes pulsered {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        box-shadow: 0 0 8px #dd333d, inset 0 0 12px #dd333d;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
        box-shadow: 0 0 20px #dd333d, inset 0 0 8px #dd333d;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        box-shadow: 0 0 8px #dd333d, inset 0 0 12px #dd333d;
    }
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 1);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}

.modal-content {
    background: #fff;
    padding: 3rem;
    border-radius: 0.5rem;
    max-width: 90%;
    color: white;
    position: relative;
}

.close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Vertikale Pfeil-Animation (Mobile) */
@keyframes slideFadeVertical {
    0% {
        transform: translate(-50%, -50%) rotate(90deg) translateY(0);
        opacity: 0;
    }
    10%, 90% {
        transform: translate(-50%, -50%) rotate(90deg) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotate(90deg) translateY(20px);
        opacity: 0;
    }
}

/* Mobile-Anpassungen (≤650px) */
@media screen and (max-width: 1024px) {
    .infographic-container {
        padding: 0 1.5rem;
    }

    .infographic {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .infographic__col {
        align-items: center;
        text-align: center;
    }

    .infographic__arrow {
        position: absolute;
        left: 50%;
        width: 8rem;
        height: 8rem;
        transform-origin: center center;
        animation: slideFadeVertical 4s ease-in-out infinite;
    }

    .infographic__arrow--grey {
        top: 20%;
        animation-delay: 0s;
    }

    .infographic__arrow--red {
        top: 65%;
        animation-delay: 2s;
    }

    .infographic__logo {
        display: flex;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .infographic__features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
        padding-inline-start: 0 !important;
        justify-items: center;
        margin-bottom: 1.5rem;
    }

    .feature {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .infographic__box--stacked {
        align-items: center;
    }
}

/* === Plus-Buttons mittig zwischen Titel & Text === */
/* Linke Spalte (KMU): Icon links, zentriert zwischen Titel & Text */
.infographic__col--left .infographic__box {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 1rem;
}

.infographic__col--left .infographic__icon--plus {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
}

.infographic__col--left .infographic__title_alternative {
    grid-column: 2;
    grid-row: 1;
}

.infographic__col--left .infographic__text {
    grid-column: 2;
    grid-row: 2;
}

/* Rechte Spalte (Mitarbeitende & Behörden): Icon rechts, zentriert zwischen Titel & Text */
.infographic__col--right .infographic__box--stacked > div {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 1rem;
}

.infographic__col--right .infographic__box--stacked > div .infographic__icon--plus {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
}

.infographic__col--right .infographic__box--stacked > div .infographic__title {
    grid-column: 1;
    grid-row: 1;
}

.infographic__col--right .infographic__box--stacked > div .infographic__text_alternative {
    grid-column: 1;
    grid-row: 2;
}

/* Unterstreichung unterhalb des Textes */
.infographic__col--left .infographic__text,
.infographic__col--right .infographic__text_alternative {
    display: inline-block;
    position: relative;
    padding-bottom: 0.75rem;
}

.infographic__col--left .infographic__text::after,
.infographic__col--right .infographic__text_alternative::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0.5rem;
    background: url('assets/underline-text.svg') no-repeat bottom left;
    background-size: 100% 100%;
    z-index: -1;
}


/* — Mobile: Vertikale Pfeil-Animation von oben nach unten — */

/* Neues Keyframe: Pfeil droppt von −20px über 0 auf +20px */
@keyframes slideFadeVertical {
    0% {
        transform: translate(-50%, -20px);
        opacity: 0;
    }
    10%, 90% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, +20px);
        opacity: 0;
    }
}

/* — Mobile: Vertikale Pfeil-Animation + 90° Rotation — */

@keyframes slideFadeVertical {
    0% {
        transform: translate(-50%, -20px) rotate(90deg);
        opacity: 0;
    }
    10%, 90% {
        transform: translate(-50%, 0) rotate(90deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, 20px) rotate(90deg);
        opacity: 0;
    }
}

/* — Mobile: Vertikale Pfeil-Animation + 90° Rotation — */

@keyframes slideFadeVertical {
    0% {
        transform: translate(-50%, -20px) rotate(90deg);
        opacity: 0;
    }
    10%, 90% {
        transform: translate(-50%, 0) rotate(90deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, 20px) rotate(90deg);
        opacity: 0;
    }
}

@media screen and (max-width: 1024px) {
    .infographic__arrow {
        /* Ausgangszustand: horizontal zentriert, keine Y-Verschiebung */
        transform: translate(-50%, 0) rotate(90deg);
        transform-origin: center center;
        animation: slideFadeVertical 4s ease-in-out infinite;
    }

    .infographic__arrow--grey {
        top: 10%;
        animation-delay: 0s;
    }

    .infographic__arrow--red {
        top: 55%;
        animation-delay: 2s;
    }
}


/* 1. Mehr Abstand zwischen den gestapelten Boxen in der rechten Spalte */
.infographic__box--stacked {
    display: flex;
    flex-direction: column;
    gap: 2rem; /* Abstand nach Bedarf anpassen */
}

/* 2. Infobox (Modal) auf max-width 400px begrenzen und Titel stylen */
.modal-content {
    max-width: 400px;
    width: 100%;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f3b58;
}


/* === Info-Popup neben dem Icon === */
.info-popup {
    position: absolute;
    background: rgba(29, 51, 63, 0.85); /* schwarzer, halbtransparenter Hintergrund */
    color: #fff; /* weißer Text mit 85% Deckkraft */
    backdrop-filter: blur(5px); /* Unschärfe-Effekt */
    -webkit-backdrop-filter: blur(5px);
    padding: 1rem;
    border-radius: 0.5rem;
    pointer-events: none;
    user-select: none;
    max-width: 220px;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.info-popup h2 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.info-popup p {
    margin: 0;
    font-size: 0.875rem;
}

/* === Mobile: Einspaltig & zentriert === */
@media screen and (max-width: 1024px) {
    .infographic {
        display: flex;
        flex-direction: column;
        align-items: center; /* alle Spalten zentriert */
        gap: 2rem;
    }

    .infographic__col {
        width: 100%;
        text-align: center; /* Titel/Text zentriert */
    }

    .infographic__title,
    .infographic__title_alternative,
    .infographic__text,
    .infographic__text_alternative {
        text-align: center !important;
    }

    /* Reihenfolge der Icons im DOM beibehalten (KMU, PayrollPlus, Mitarbeitende, Behörden),
       aber sicherstellen, dass sie mittig angeordnet sind */
    .infographic__icon--plus {
        margin: 0.5rem auto; /* automatisch horizontal zentrieren */
        display: block;
    }
}


@media screen and (max-width: 1024px) {
    /* Flex-Container für alle Infoboxen mobil */
    .infographic__col .infographic__box,
    .infographic__col .infographic__box--stacked > div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Icon immer zentriert */
    .infographic__icon--plus {
        margin: 0.5rem auto;
    }

    /* KMU und PayrollPlus: Icon vor Titel/Text */
    #kmu-btn,
    #central-btn {
        order: -1; /* Icon ganz oben im Flex-Container */
    }

    /* Mitarbeitende und Behörden: Icon nach Titel/Text */
    #mitarbeiter-btn,
    #behoerden-btn {
        order: 1; /* Icon ganz unten im Flex-Container */
    }
}

@media screen and (max-width: 1024px) {
    #kmu-btn,
    #central-btn {
        margin: 1.5rem auto; /* jeweils oben und unten 1.5rem, horizontal zentriert */
    }
}

.infographic-container p {
    display: none;
}