.card-image-block {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
    align-items: center;
    justify-content: center; /* Center items */
    padding: 40px 20px; /* Adjust padding for responsiveness */
    margin: 0 auto; /* Center the block */
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    gap: 20px; /* Add spacing between items */
}

.card-content {
    background-color: #4a69a0;
    color: #ffffff;
    padding: 40px;
    border-radius: 15px;
    width: 100%; /* Default to full width */
    max-width: 600px; /* Limit maximum width for larger screens */
    transition: transform 0.3s;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.card-content:hover {
    transform: scale(1.05);
}

.card-content h2 {
    font-size: 2em; /* Adjust font size for better scaling */
    color: #ffffff;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.card-content p {
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 15px;
}

.card-features {
    list-style: none;
    padding-left: 0;
}

.card-features li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.card-features li:before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #ffffff;
    font-size: 1.2em;
}

.card-image {
    width: 100%; /* Make image responsive */
    max-width: 300px; /* Limit maximum width */
    border-radius: 15px;
    z-index: 0;
    position: relative;
    animation: takeoff 3s ease-in-out infinite;
}

.card-image img {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    border-radius: 15px;
    transition: transform 0.5s;
}

.card-image:hover img {
    transform: scale(1.05);
}

/* Animation keyframes remain unchanged */
@keyframes takeoff {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -20px) rotate(-5deg);
    }
    50% {
        transform: translate(0, -40px) rotate(5deg);
    }
    75% {
        transform: translate(-20px, -20px) rotate(-5deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* Floating animation remains unchanged */
@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-40px); }
    100% { transform: translateY(0); }
}

/* Responsive Design */

/* Medium Screens (Tablets) */
@media (max-width: 768px) {
    .card-image-block {
        flex-direction: column; /* Stack items vertically */
        align-items: center;
        gap: 20px; /* Add spacing */
    }

    .card-content {
        width: 90%; /* Adjust content width for tablets */
        padding: 30px;
        text-align: center; /* Center-align text */
    }

    .card-image {
        width: 70%; /* Scale down image */
        max-width: 250px; /* Limit max size */
    }
}

/* Small Screens (Mobile) */
@media (max-width: 480px) {
    .card-image-block {
        padding: 20px; /* Reduce padding */
        gap: 15px;
    }

    .card-content {
        padding: 20px; /* Reduce padding */
        text-align: center;
    }

    .card-content h2 {
        font-size: 1.5em; /* Adjust heading size */
    }

    .card-content p {
        font-size: 0.9em; /* Adjust paragraph size */
    }

    .card-image {
        width: 60%; /* Make image smaller */
        max-width: 200px; /* Limit max size */
        margin-top: 20px;
    }
}
