.services-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.services-wrapper .service-button {
    display: none;
}

@media (max-width: 768px) {

    .services-wrapper .services-description,
    .services-wrapper .services-detail,
    .services-wrapper .service-button {
        display: none;
    }

    .services-wrapper .services-category {
        --is-phone: 1
    }




}

.services-category {
    flex: 1 1 calc(30% - 1rem);
    max-width: 30%;
    text-align: center;
    border: 1px solid white;
    padding: 0.5rem;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.4);
    transition: background-color 0.3s ease;
    /* Smooth transition effect */
}

@media (max-width: 768px) {
    .services-category {
        --is-phone: 1;
        /* display: none; */
        /* Hidden by default */
        position: relative;
    }

    .services-category.active {
        display: flex;
        /* Shown only when active */
        flex-direction: column;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: #fffbea;
        /* Soft cream background */
        color: #000;
        padding: 1.5rem;
        border-radius: 16px;
        /* Rounded corners */
        z-index: 1000;
        width: 90%;
        height: 70%;
        overflow-y: auto;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        animation: popupFadeIn 0.3s ease-in-out;
        justify-content: center;
    }

    /* Add close button */
    .services-category.active::after {
        content: '×';
        position: absolute;
        left: 1rem;
        top: 1rem;
        font-size: 1.5rem;
        color: #000;
        cursor: pointer;
        z-index: 1006;
        color: white;
    }

    .services-category.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(20, 20, 25, 0.85);
        /* Softer black overlay */
        z-index: 999;
        animation: fadeIn 0.3s ease-in-out;
    }

    .services-category.active .services-description,
    .services-category.active .services-detail,
    .services-category.active .service-button,
    .services-category.active .services-title {
        display: block;
        position: relative;
        margin-bottom: 1rem;
        z-index: 1005;
    }

    .services-category.active .service-button {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: center;
        padding: 8px 0;
    }

    .services-category.active .service-button .contact-button {
        margin: 0;
        width: 80%;
        justify-content: center;
    }


    @keyframes popupFadeIn {
        from {
            opacity: 0;
            transform: translate(-50%, -60%);
        }

        to {
            opacity: 1;
            transform: translate(-50%, -50%);
        }
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }
}



.services-category:hover {
    background-color: rgba(0, 0, 0, 0.6);
    /* Lighter background on hover */
}

@media (max-width: 768px) {
    .services-category {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

.services-title {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    /* Reduced margin */
}

.services-description {
    margin-bottom: 0.5rem;
    /* Reduced space between description and details */
}

.services-detail {
    margin: 0;
}

.services-button-wrapper {
    text-align: center;
    margin-top: 2rem;
}

.service-category h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.slide-content p {
    color: white;
}