body {
    font-family: sans-serif;
    background: #f9f9f9;
    border-top: 20px solid #cd1719;
    margin: 0;
}
.container {
    margin: 40px auto;
    max-width: 960px;
    padding: 0 20px;
    box-sizing: content-box;
}
h1 {
    font-size: 1.8em;
    margin-bottom: 20px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
    gap: 20px;
}
.group {
    background: #0093c425;
    padding: 15px 20px;
    border-radius: 4px;
    position: relative; /* wichtig für Pseudoelemente */
    overflow: hidden;
}

/* Basis für die Linien (Startzustand in keyframes definiert) */
.group.highlight::before,
.group.highlight::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 5px;
    background: #0093c4;         /* Farbe der Linie */
    transform-origin: left center;
    will-change: transform, opacity;
}
.group.highlight::before {
    border-radius: 4px 4px 0 0;
}
.group.highlight::after {
    border-radius: 0 0 4px 4px;
}

/* Keyframes: von skaliert (unsichtbar) zu skaliert (sichtbar) */
@keyframes highlightExpand {
    from {
        transform: scaleX(0);
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* oben: sofort einblenden */
.group.highlight::before {
    top: 0;
    animation: highlightExpand 1200ms cubic-bezier(0.15, 0.1, 0.15, 1) forwards;
}

/* unten: leicht verzögert, damit es nacheinander wirkt */
.group.highlight::after {
    bottom: 0;
    animation: highlightExpand 1200ms cubic-bezier(0.15, 0.1, 0.15, 1) forwards;
    animation-delay: 200ms;
}

/* Nutzer mit reduziertem Bewegungspensum schützen */
@media (prefers-reduced-motion: reduce) {
    .group.highlight::before,
    .group.highlight::after {
        animation: none;
        transform: scaleX(1);
        opacity: 1;
    }
}




.group h2 {
    margin-top: 0;
    font-size: 1.3em;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #0093c4;
}
.group a {
    display: block;
    text-decoration: none;
    color: #000;
    padding: 5px 0;
    border-bottom: 1px solid #fff;
}
.group a:last-child {
    border-bottom: none;
}
.group a:hover {
    text-decoration: underline;
    color: #cd1719;
}