#services{
    width: 100%;
    height: fit-content;

    background-color: #efeae1;
}
.services-container{
    width: 100%;

    padding: 20px;
    
}

.services-title{
    font-size: 3.5rem;
    font-weight: 800;
    color: #2e2d29;
    margin-bottom: 25px;
    line-height: 1.2;
    letter-spacing: -1.5px;
}
.services-title span {
    background: linear-gradient(135deg, #3176ba, #c03435);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.services-cards-container{
    display: grid;
    /* grid-template-columns: repeat(3,1fr); */
    /* grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); */

    /* flexible responsive columns */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));

    /* optional: center items on last row */
    justify-items: center;
    justify-content: center;

    align-items: stretch;

    /* grid-template-rows:max-content; */
    grid-auto-rows:1fr;

    gap: 40px;

    /* padding: 20px; */
}

/* this class is for having a modular border around the cards with the original gradient , to have the correct border radius follow the formula : 

    ! wrapper border radius = inner card border radius + wrapper padding 
    ?dont forget -_-

*/
.service-card-wrapper{
    box-sizing: border-box;
    transition:0.2s;

    width: 100%;
    height: 100%;

    background: linear-gradient(135deg, #3176ba, #3176ba);
    border-radius: 15px;

    padding: 5px;
}
.service-card-wrapper:hover{
    transform: translateY(-10px);
    background: linear-gradient(135deg, #3176ba, #c03435);

    /* box-shadow: 0 10px 20px rgba(0,0,0,0.6); */
    box-shadow: 0 4px 16px rgba(49, 118, 186, 0.18);

}

.service-card-wrapper * {
    cursor: pointer;
}

.service-card {
    height: 100%;
    min-width: 170px;
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 24px;
    background-color: #efeae1;
    border-radius: 10px;
    gap: 20px; /* Consistent spacing between elements */
}

.service-icon {
    height: 40px;
    width :auto;
    object-fit: contain;
    /* flex: 0 0 auto; Don't allow icon to grow/shrink */
    margin-bottom: 10px;
}

.service-card h3 {
    flex: 0 0 auto; /* Don't allow heading to grow/shrink */
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.service-card p {
    flex: 1; /* Allow paragraph to take remaining space */
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .services-container {
        padding: 60px 15px;
    }
    
    .services-title {
        font-size: 3rem;
        margin-bottom: 20px;
    }
    
    .services-cards-container {
        gap: 30px;
    }

    .service-card {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .services-container {
        padding: 40px 15px;
    }

    .services-title {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .services-cards-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .service-card {
        padding: 18px;
    }
    
    .service-icon {
        height: 30px;
        margin-bottom: 8px;
    }

    .service-card h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .services-container {
        padding: 30px 10px;
    }
    
    .services-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .services-cards-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .service-card {
        padding: 15px;
    }
    
    .service-icon {
        height: 25px;
    }
    
    .service-card p {
        font-size: 0.9rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .service-card-wrapper {
        transition: none;
    }
    
    .service-card-wrapper:hover {
        transform: none;
    }
}
