/* Das übergeordnete Raster-Element */
.parent {
    display: grid;
    /* Erstellt automatisch gleich breite Spalten (min. 250px, max. gleichmäßig verteilt) */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;            /* Abstand zwischen den Karten */
    width: 100%;
    padding: 40px;
    box-sizing: border-box;
    //border: 1px solid red;
}

/* Jede Grid-Zelle wird zum Anker für die Animation */
.grid-item {
    position: relative;   /* WICHTIG: Das absolute Child orientiert sich jetzt hierran! */
    height: 150px;        /* Die feste Höhe des Anzeigebereichs */
    overflow: hidden;     /* Verhindert das Herausschauen vor der Animation */
    /*max-width: 300px;*/
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); /* Schicker Schatten */
}

/* Die eigentliche Counter-Card */
.child {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -100%); /* Startet unsichtbar über der Grid-Zelle */
    top: 0;
    opacity: 0;
    transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1), opacity 1s ease-out;

    /* Karten-Design */
    width: 100%;          /* Nutzt die volle Breite der Grid-Spalte */
    height: 100%;         /* Nutzt die volle Höhe der Grid-Spalte */
    background-color: #106a9a;
    color: white;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 8px;
    //border: 2px solid #106a9a;


    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Wenn sichtbar, gleitet die Karte an den Boden der Grid-Zelle */
.child.visible {
    top: 100%;
    transform: translate(-50%, -100%);
    opacity: 1;
}

/* --- Layout innerhalb der Karte (unverändert) --- */
.icon-container {
    display: flex;
    justify-content: flex-end;
}

.icon-container img, .icon-container svg {
    max-width: 40px;
    height: auto;
}

.text-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.counter-wrapper {
    font-size: 3.5rem; /* Etwas verkleinert, damit es in Spalten passt */
    font-weight: 900;
    line-height: 1;
    margin-bottom: 5px;
}

.child .label {
    font-size: 1rem;
    font-weight: normal;
    //color: #106a9a;
    color: white;
    margin: 0;
}
