#cardmain {

    margin: 0;
    font-family: 'Roboto', Arial, sans-serif;
    background: linear-gradient(135deg, #e0f7fa, #80deea);
    color: #333;
}

#cardbody {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

#service-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1200px;
    padding: 30px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    gap: 20px;
}

.service-item {
    text-align: center;
    flex: 1 1 250px;
    /* Ensures flex items grow and shrink properly */
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    overflow: hidden;
    position: relative;
}

.service-item::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 15px;
    z-index: 0;
}

.service-item:hover::after {
    opacity: 1;
}

.service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.service-item h3 {
    margin: 15px 0 10px;
    font-size: 1.4em;
    font-weight: 700;
    transition: color 0.3s;
    position: relative;
    z-index: 1;
}

.service-item:hover h3 {
    color: #007bff;
}

.service-item p {
    font-size: 16px;
    color: #555;
    margin: 0;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.service-icon {
    display: block;
    margin: 0 auto 15px;
    font-size: 60px;
    color: #007bff;
    transition: color 0.3s;
}

.service-item:hover .service-icon {
    color: #004bb5;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .service-item h3 {
        font-size: 1.2em;
    }

    .service-item p {
        font-size: 14px;
    }

    .service-icon {
        font-size: 50px;
    }
}

@media (max-width: 480px) {
    .service-item {
        flex: 1 1 100%;
        /* Full width on small screens */
    }

    .service-item h3 {
        font-size: 1.1em;
    }

    .service-item p {
        font-size: 13px;
    }

    .service-icon {
        font-size: 40px;
    }
}