.card-container {
    position: relative;
    width: 336px;
    height: 400px;
    perspective: 1000px;
}
.card {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 10% 0 0 0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.5s ease, opacity 0.5s ease;
    transform-origin: center center;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden; /* Impedisce al testo di uscire */
}
.card-content{
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: space-between;
}
.card-icon {
    width: 90%;
    height: 50%;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center top;
}
.card-text {
    color: var(--awb-color1);
    word-wrap: break-word;
    width: 80%;
    height: 40%;
}
.card-text h5 {
    color: var(--awb-color1);
    width: 100%;
    text-align: center;
}

.card-1 { background: var(--awb-color8); z-index: 5; opacity: 1; }
.card-2 { background: var(--awb-color7); z-index: 4; opacity: 1; }
.card-3 { background: var(--awb-color6); z-index: 3; opacity: 1; }
.card-4 { background: var(--awb-color5); z-index: 2; opacity: 1; }

.card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.card.flyup {
    animation: flyUp 1s ease-out forwards;
}

@keyframes flyUp {
    to {
        transform: translate(-50%, -250%) scale(0.8);
        opacity: 0;
    }
}

.card.flydown {
    animation: flyDown 1s ease-out forwards;
}

@keyframes flyDown {
    from {
        transform: translate(-50%, -250%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}