/* Ensure your container-lg or equivalent provides max-width and centering */
.services {
    /* padding-top: 5vh; */
    padding-bottom: 10vh;
}

.services-main-title {
    /* Updated class name for the main "OUR SERVICES:" title */
    text-transform: uppercase;
    font-size: 48px; /* Adjusted to match template's "OUR SERVICES:" size */
    font-weight: 500; /* Template text is bold */
    color: #333; /* Darker text color */
    margin-bottom: 8vh; /* Space below title */
}

.service-list {
    margin-top: 3vh;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px; /* Slightly increased gap between cards */
}

.service-item {
    background-color: #f0f0f0; /* Default gray background */
    padding: 30px 20px 60px 20px;
    border-radius: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        background-color 0.4s ease;
    z-index: 1;
}

/* --- TEXT & NUMBER DEFAULT STYLES (for gray cards) --- */
.service-item h1 {
    font-size: 22px;
    font-weight: 600;
    text-transform: uppercase;
    color: #333;
    line-height: 1.3;
    z-index: 1;
    transition: color 0.4s ease;
}

.service-item p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    flex-grow: 1;
    z-index: 1;
    transition: color 0.4s ease;
}

.service-number {
    position: absolute;
    bottom: -45px;
    left: 15px;
    font-size: 130px;
    font-weight: 400;
    color: #302217;
    line-height: 1;
    z-index: 0;
    user-select: none;
    transition: color 0.4s ease;
}

/* --- CLASS FOR THE VISUALLY ACTIVE STATE (Applied by JS) --- */
.service-item.is-visually-active {
    background-color: #ffa6fb;
    transform: translateY(-8px) rotate(-3deg) scale(1.05);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.18);
    z-index: 10;
}

.service-item.is-visually-active h1,
.service-item.is-visually-active p {
    color: #4a148c;
}

.service-item.is-visually-active .service-number {
    color: rgba(74, 20, 140, 0.2);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .service-item {
        min-height: 360px;
    }
    .service-number {
        font-size: 120px;
        bottom: -40px;
    }
}

@media only screen and (max-width: 800px) {
    .services-main-title {
        font-size: 32px;
    }

    .initially-active-service {
        transform: unset !important;
    }
}
