/* ========================================
   Services Cards Section
   ======================================== */

.services-cards-section {
    padding: 80px 0;
    background: var(--light-bg, #f8f9fa);
}

.service-card {
    background: var(--white, #ffffff);
    border-radius: 4px;
    padding: 40px 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible; /* Allow icon to extend beyond card */
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark, #5b9bd5);
    /* margin: 0; */
    flex: 1;
    /* Space for icon */
    /* padding-right: 80px; */
    padding-bottom: 12px;
    position: relative;
    text-align: start;
}

/* Underline effect */
.service-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 150px;
    height: 3px;
    background: var(--secondary-blue, #0066cc);
}

.service-icon {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #0066cc, #00d9ff);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    animation: floatIcon 3s ease-in-out infinite;
    z-index: 10;
}

/* Desync floating animations for each card */
.row > div:nth-child(1) .service-card .service-icon { animation-duration: 3s; animation-delay: 0s; }
.row > div:nth-child(2) .service-card .service-icon { animation-duration: 3.3s; animation-delay: -0.8s; }
.row > div:nth-child(3) .service-card .service-icon { animation-duration: 2.7s; animation-delay: -1.5s; }
.row > div:nth-child(4) .service-card .service-icon { animation-duration: 3.1s; animation-delay: -0.4s; }
.row > div:nth-child(5) .service-card .service-icon { animation-duration: 2.9s; animation-delay: -2.0s; }
.row > div:nth-child(6) .service-card .service-icon { animation-duration: 3.2s; animation-delay: -1.1s; }
.row > div:nth-child(7) .service-card .service-icon { animation-duration: 2.8s; animation-delay: -0.6s; }
.row > div:nth-child(8) .service-card .service-icon { animation-duration: 3.4s; animation-delay: -1.8s; }

@keyframes floatIcon {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.service-card:hover .service-icon {
    animation-play-state: paused;
    transform: translateY(-5px) scale(1.1);
}

.service-icon svg,
.service-icon i {
    width: 35px;
    height: 35px;
    color: var(--white, #ffffff);
    font-size: 35px;
}

.service-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-light, #6c757d);
    margin: 0;
}

/* View All Button */
.btn-view-all {
    display: inline-block;
    padding: 14px 40px;
    background: var(--secondary-blue, #0066cc);
    color: var(--white, #ffffff);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(91, 155, 213, 0.3);
}

.btn-view-all:hover {
    background: var(--primary-blue, #0052a3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 155, 213, 0.4);
    color: var(--white, #ffffff);
}

/* Responsive Styles for Services Cards */
@media (max-width: 991px) {
    .services-cards-section {
        padding: 60px 0;
    }

    .service-card {
        padding: 30px 25px;
    }

    .service-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 767px) {
    .service-card-header {
        flex-direction: column;
        gap: 20px;
    }

    .service-title {
        padding-right: 0;
        text-align: center;
    }

    .service-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .service-icon {
        position: relative;
        top: 0;
        right: 0;
        margin: 0 auto 20px;
    }

    .service-description {
        text-align: center;
    }
}
