* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Services grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    width: 100%;
}

/* Service Item */
.service-item {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

}

.overlay h3 {
    color: white;
    font-size: 20px;
    text-transform: uppercase;
    text-align: center;
    font-weight: bold;
}

.overlay p{
    color: white;
    font-size: 20px;
    text-align: center;
    font-weight: bold;
}

/* Responsive Design */

/* For tablets and smaller devices */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-item {
        height: 180px;  /* Reduce height slightly for smaller devices */
    }
}

/* For mobile phones */
@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;  /* Single column layout for small screens */
    }

    .service-item {
        height: 160px;  /* Further reduce height for small screens */
    }

    .overlay h3 {
        font-size: 18px;  /* Slightly smaller font size for better readability on mobile */
    }
}
