<style>
/* Services Grid Styles */
#services-grid {
    display: grid;
    gap: 1.5rem;
    animation: grid-fade-in 0.8s ease-out;
}

@keyframes grid-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service Card */
.service-card {
    position: relative;
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.service-card:hover::after {
    opacity: 1;
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    from {
        transform: scale(0.5);
    }
    to {
        transform: scale(1);
    }
}

/* Service Icon Container */
.service-card .icon-container {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover .icon-container {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.4);
}

.service-card .icon-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
}

.service-card:hover .icon-container::before {
    animation: shine 0.5s ease-in-out;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Service Title */
.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.service-card:hover h3 {
    color: #3b82f6;
}

/* Service Description */
.service-card p {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Service Price */
.service-price {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Service Link */
.service-card a {
    display: inline-flex;
    align-items: center;
    color: #3b82f6;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.service-card a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s ease;
}

.service-card:hover a::after {
    width: 100%;
}

.service-card a svg {
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

.service-card:hover a svg {
    transform: translateX(4px);
}

/* Loading State */
.services-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    grid-column: 1 / -1;
}

.services-loading .loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Grid */
@media (min-width: 768px) {
    #services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    #services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Accessibility Mode */
body.accessibility-mode .service-card {
    animation: none;
    transition: none;
}

body.accessibility-mode .service-card::before,
body.accessibility-mode .service-card::after,
body.accessibility-mode .service-card .icon-container::before {
    display: none;
}

body.accessibility-mode .service-card:hover {
    transform: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body.high-contrast .service-card {
    background: #000;
    border: 2px solid #fff;
}

body.high-contrast .service-card h3,
body.high-contrast .service-card p,
body.high-contrast .service-card a {
    color: #fff !important;
}

body.high-contrast .icon-container {
    background: #fff !important;
}

body.high-contrast .icon-container span {
    filter: invert(1);
}
</style>