/* Stile für den Container der Karten (fast unverändert) */
.container {    
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px; /* Etwas mehr Abstand */
    max-width: 1400px;
    margin: 80px auto 40px auto;
    padding: 0 15px; /* Sicherer Abstand an den Rändern für mobile Geräte */
}

/* Die Karte selbst - jetzt als Grid-Container für dynamische Höhe */
.card {
    /* Flexible Breite statt fester Werte */
    perspective: 1200px;
    flex: 1 1 320px;
    max-width: 380px;
    
    /* WICHTIG: Die Karte wird zum Grid, um die Höhe automatisch anzupassen */
    display: grid; 
    
    /* Die folgenden Eigenschaften bleiben für den 3D-Effekt */
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    cursor: pointer;
    will-change: transform;
    
    /* Eine Mindesthöhe, damit leere Karten nicht komisch aussehen */
    min-height: 500px;
}

.card:hover {
    transform: rotateY(180deg);
}


/* Vorder- und Rückseite */
.front, .back {
    /* VEREINFACHT: Items werden in die gleiche Grid-Zelle gelegt */
    grid-area: 1 / 1;

    border-radius: 10px;
    padding: 30px 25px;
    box-sizing: border-box;
    backface-visibility: hidden; /* Versteckt die Rückseite */

    display: flex;
    flex-direction: column;
    align-items: center;

    background: linear-gradient(#15171C, #2E3744);
    color: white;
}

/* Vorderseite */
.front {
    z-index: 2; /* Liegt standardmäßig vorne */
    justify-content: center; /* Zentriert den Inhalt vertikal */
    gap: 20px;
    font-size: 24px; /* Etwas kleiner für besseren Zeilenumbruch */
    text-align: center;
}

.front img {
    max-width: 90%;
    max-height: 200px; /* Verhindert, dass Logos zu groß werden */
    height: auto;
    object-fit: contain;
}


/* Rückseite */
.back {
    color: #B3B4B6;
    font-size: 16px;
    transform: rotateY(180deg);
    justify-content: space-between; /* Verteilt den Inhalt (Text oben, Icons unten) */
    text-align: center;
}

/* Semantische Anpassung für den Info-Text */
.back p {
    margin-bottom: 10px;
}
.back p span {
    font-weight: bold;
    color: white;
    display: block; /* Sorgt für Zeilenumbruch */
    margin-bottom: 5px;
}


/* Social Media Icons */
.social-media {
    display: flex;
    gap: 15px;
    justify-content: center;
    width: 100%;
    margin-top: 20px; /* Fester Abstand nach oben */
    padding-top: 15px; /* Abstand mit Trennlinie */
    border-top: 1px solid var(--light-secondary-color);
}

.social-icon {
    width: 35px;
    height: auto;
    transition: transform 0.2s ease;
}
.social-icon:hover {
    transform: scale(1.1);
}