.services {
    padding: 100px 0 50px; /* Match hero and other sections padding */
    width: 100%;
    direction: rtl;
    text-align: right;
}

.services .container {
    padding: 0;
}

.section-title {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    font-family: 'Tajawal', sans-serif;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 50px;
    width: 100%;
}

.service-card {
    height: 100%;
    min-height: 280px;
    width: 100%;
    background-color: #202f61;
    padding: 1rem;
    border-radius: 8px;
    transition: all 500ms ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.service-card:hover {
    background-color: transparent;
    border: 1px solid #1e88e5;
}

.service-icon {
    width: 60px;  /* reduced from 100px */
    height: 60px; /* reduced from 100px */
    margin: 1rem 0;
    filter: invert(53%) sepia(75%) saturate(638%) hue-rotate(182deg) brightness(95%) contrast(91%);
}

.service-card:hover .service-icon {
    /* Remove hover state filter changes */
    filter: invert(53%) sepia(75%) saturate(638%) hue-rotate(182deg) brightness(95%) contrast(91%);
}

.service-card h3 {
    color: white;
    font-weight: bold;
    margin: 1rem 0;
    font-family: 'Tajawal', sans-serif;
    text-align: center;
}

.service-card p {
    color: white;
    text-align: center;
    font-family: 'Tajawal', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 817px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 440px) {
    .services {
        padding: 100px 0 50px; /* Keep consistent padding on mobile */
    }
}
