/* ===================================
   MODERN SERVICES SECTION (S5)
   =================================== */

.modern-services-section {
    background: #f9fafb;
    padding: 80px 0 !important;
}

.modern-services-section .common-heading {
    margin-bottom: 0px;
}

.modern-services-section .common-heading h2 {
    color: #1f2937;
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 15px;
}

.modern-services-section .common-heading h2 span {
    color: #008060;
}

.modern-services-section .common-heading p {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
    padding-top: 0;
    margin-top: 0;
}

/* Services Grid - Proper Flex Layout */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.services-grid>[class*="col-"] {
    padding: 0 15px;
    margin-bottom: 30px;
}

/* Service Card - Fixed Height & Alignment */
.service-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #008060 0%, #00a078 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 128, 96, 0.15);
    border-color: #008060;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Service Icon Wrapper */
.service-icon-wrapper {
    margin-bottom: 25px;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e6f7f3 0%, #d1f0e8 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, #008060 0%, #00a078 100%);
    transform: scale(1.1) rotate(5deg);
}

.service-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: filter 0.3s ease-in-out;
}

.service-card:hover .service-icon img {
    filter: brightness(0) invert(1);
}

/* Service Content */
.service-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-content h4 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 15px 0;
    line-height: 1.3;
    transition: color 0.3s ease-in-out;
}

.service-card:hover .service-content h4 {
    color: #008060;
}

.service-content p {
    font-size: 15px;
    line-height: 1.7;
    color: #6b7280;
    margin: 0 0 20px 0;
    flex: 1;
}

/* Service Link */
.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #008060;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    margin-top: auto;
}

.service-link svg {
    transition: transform 0.3s ease-in-out;
}

.service-link:hover {
    color: #00a078;
    gap: 12px;
}

.service-link:hover svg {
    transform: translateX(4px);
}

/* Service Number */
.service-number {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 80px;
    font-weight: 900;
    color: rgba(0, 128, 96, 0.05);
    line-height: 1;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.service-card:hover .service-number {
    color: rgba(0, 128, 96, 0.1);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 991px) {
    .modern-services-section {
        padding: 60px 0 !important;
    }

    .modern-services-section .common-heading {
        margin-bottom: 50px;
    }

    .service-card {
        padding: 35px 25px;
        min-height: auto;
    }

    .service-content h4 {
        font-size: 20px;
    }

    .service-content p {
        font-size: 14px;
    }

    .service-number {
        font-size: 70px;
    }
}

@media (max-width: 767px) {
    .modern-services-section {
        padding: 50px 0 !important;
    }

    .modern-services-section .common-heading {
        margin-bottom: 40px;
    }

    .services-grid {
        margin: 0;
    }

    .services-grid>[class*="col-"] {
        padding: 0;
        margin-bottom: 20px;
    }

    .service-card {
        padding: 30px 25px;
    }

    .service-icon {
        width: 70px;
        height: 70px;
    }

    .service-icon img {
        width: 40px;
        height: 40px;
    }

    .service-content h4 {
        font-size: 19px;
    }

    .service-content p {
        font-size: 14px;
    }

    .service-number {
        font-size: 60px;
        bottom: 15px;
        right: 15px;
    }
}