/**
 * Services Block Styles
 */

.services-section {
    background-image: url('/wp-content/uploads/2026/02/Frame-1000002222.png');
    background-image: image-set(
        url('/wp-content/uploads/2026/02/Frame-1000002222.png.webp') type('image/webp'),
        url('/wp-content/uploads/2026/02/Frame-1000002222.png') type('image/png')
    );
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 80px 0 300px 0;
}

/* Title with banner background */
.services-title-wrapper {
    text-align: center;
    margin-bottom: 50px;
}

.services-title {
    font-family: var(--font-heading);
    font-size: 56px;
    font-weight: 400;
    color: var(--color-white);
    margin: 0;
    line-height: normal;
    padding: 10px 60px 25px 60px;
    background-image: url('/wp-content/uploads/2026/02/Frame-1000002166.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    min-width: 558px;
}

/* Services Grid */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    row-gap: 60px;
    margin-bottom: 50px;
}

/* Individual Service Item */
.service-item {
    flex: 0 0 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Top Image - Hidden by default, shown on hover */
.service-top-image {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    max-width: 100%;
    height: auto;
}

.service-item:hover .service-top-image {
    opacity: 1;
    visibility: visible;
}

/* Service Link */
.service-link {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 400;
    color: var(--color-white);
    text-decoration: none;
    text-align: center;
    padding: 30px 0;
    transition: color 0.3s ease;
    display: block;
}

.service-item:hover .service-link {
    color: var(--color-white);
}

/* Bottom Images */
.service-bottom-image {
    max-width: 100%;
    height: auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.service-bottom-default {
    opacity: 1;
    visibility: visible;
}

.service-bottom-hover {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
}

.service-item:hover .service-bottom-default {
    opacity: 0;
    visibility: hidden;
}

.service-item:hover .service-bottom-hover {
    opacity: 1;
    visibility: visible;
}

/* CTAs */
.services-ctas {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

/* Responsive */
@media (max-width: 991px) {
    .service-item {
        flex: 0 0 calc(50% - 15px);
        max-width: calc(50% - 15px);
    }

    .services-title {
        font-size: 42px;
        padding: 15px 40px;
    }

    .service-link {
        font-size: 32px;
    }

    /* Disable hover effects and animations on mobile */
    .service-item,
    .service-top-image,
    .service-bottom-image,
    .service-link {
        transition: none;
    }

    /* Always show default state, never hover state */
    .service-item:hover .service-top-image,
    .service-item:active .service-top-image,
    .service-item:focus .service-top-image {
        opacity: 0;
        visibility: hidden;
    }

    .service-item:hover .service-bottom-default,
    .service-item:active .service-bottom-default,
    .service-item:focus .service-bottom-default {
        opacity: 1;
        visibility: visible;
    }

    .service-item:hover .service-bottom-hover,
    .service-item:active .service-bottom-hover,
    .service-item:focus .service-bottom-hover {
        opacity: 0;
        visibility: hidden;
    }
}

@media (max-width: 768px) {
    .services-section {
        padding: 60px 0 300px 0;
    }

    .service-item {
        flex: 0 0 100%;
        max-width: 100%;
        height: 280px;
    }

    .services-title {
        font-size: 36px;
        padding: 12px 30px;
    }

    .service-link {
        font-size: 28px;
        padding: 20px 0;
    }

    .services-ctas {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .services-title {
        font-size: 28px;
        min-width: auto;
    }

    .service-link {
        font-size: 40px;
    }

    .service-item {
        height: 250px;
    }
}
