/* Services Cards Section */
.services-section {
    position: relative;
    padding: 100px 0;
    background: url('../images/services-bg.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    /* Optional for parallax effect */
}

/* Light overlay to match image background */
.services-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    /* Light gray/white wash */
    z-index: 1;
}

.services-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
    z-index: 2;
}

/* Service Card */
.service-card {
    position: relative;
    height: 350px;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

/* Card Background & Overlay */
.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.85) 0%, rgba(30, 136, 229, 0.7) 100%);
    z-index: 2;
    transition: opacity 0.4s ease;
}

.service-card:hover .card-overlay {
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.95) 0%, rgba(30, 136, 229, 0.85) 100%);
}

/* Card Content */
.card-content {
    position: relative;
    z-index: 3;
    padding: 0px;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card-icon i {
    font-size: 24px;
    color: #1e88e5;
}

.card-content h3 {
    font-size: 26px;
    /* Matching sub-heading request */
    font-weight: 700;
    line-height: 1.2;
    max-width: 230px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .services-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .services-container {
        grid-template-columns: 1fr;
    }

    .service-card {
        height: 300px;
    }
}

.card-hover-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    margin-top: 0;
}

.card-hover-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.5;
    padding:10px;
    margin: 15px 0;
}

.card-hover-content a {
    color: white;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s;
}

.card-hover-content a:hover {
    color: #90caf9;
}

.service-card:hover .card-hover-content {
    max-height: 200px; /* enough to contain the content */
    opacity: 1;
    margin-top: 5px;
}

.card-content {
    transition: transform 0.4s ease;
    transform: translateY(30px);
}

.service-card:hover .card-content {
    transform: translateY(0);
}