.card-container {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 10px;
    max-width: 100%; /* Ensures it doesn't overflow horizontally */
    margin-bottom: 20px; /* Add spacing between cards */
}

.card-container::before {
    content: "";
    z-index: -1;
    position: absolute;
    inset: 0;
    transform: translate3d(0, 0, 0) scale(0.95);
    filter: blur(20px);
}

.card {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    overflow: hidden;
}

.card .img-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #D6892F, #FFC349);
    transition: scale 0.6s, rotate 0.6s, filter 1s;
}

.card .img-content i {
    width: 50px;
    height: 50px;
    fill: #e8e8e8;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.card .content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    color: #e8e8e8;
    padding: 20px; /* Default padding */
    line-height: 1.5;
    border-radius: 5px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(50px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.card .content .heading {
    font-size: 2rem; /* Use relative font size for responsiveness */
    font-weight: 700;
}

.card:hover .content {
    opacity: 1;
    transform: translateY(0);
}

.card:hover .img-content {
    scale: 2.5;
    rotate: 30deg;
    filter: blur(9px);
}

.card:hover .img-content i {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .card-container {
        width: 100%;
        height: auto;
        margin-bottom: 20px; /* Add spacing between cards on tablet */
    }

    .card .img-content {
        height: auto;
    }

    .card .content {
        padding: 15px; /* Reduced padding for medium screens */
    }

    .card .content .heading {
        font-size: 1.8rem; /* Adjust heading size for smaller screens */
    }
}

@media (max-width: 768px) {
    .card-container {
        margin-bottom: 15px; /* Add more spacing between cards on mobile */
    }

    .card .img-content {
        height: 300px; /* Set a fixed height for smaller screens */
    }

    .card .content {
        padding: 12px; /* Further reduce padding for smaller screens */
    }

    .card .content .heading {
        font-size: 1.6rem; /* Further reduce heading size */
    }
}

@media (max-width: 480px) {
    .card-container {
        margin-bottom: 10px; /* Ensure enough spacing between cards */
    }

    .card {
        height: auto;
    }

    .card .img-content {
        height: 200px; /* Further reduce height for mobile devices */
    }

    .card .content {
        padding: 10px; /* Minimum padding for mobile devices */
    }

    .card .content .heading {
        font-size: 1.4rem; /* Adjust font size for mobile */
    }
}
