.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Mobile services grid adjustments */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    .services-grid {
        gap: 1.25rem;
        margin-top: 1.5rem;
    }
}

.service-card {
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)), var(--glass);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Noto Sans', Arial, sans-serif;
    backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 0 0 1px rgba(255,255,255,.06) inset,
        0 10px 40px rgba(10,12,22,.4),
        0 0 80px 10px rgba(124,92,255,.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Mobile service card adjustments */
@media (max-width: 768px) {
    .service-card {
        padding: 1.75rem 1.5rem;
        border-radius: 16px;
        box-shadow:
            0 0 0 1px rgba(255,255,255,.06) inset,
            0 8px 30px rgba(10,12,22,.4),
            0 0 60px 8px rgba(124,92,255,.08);
        backdrop-filter: blur(8px);
    }
}

@media (max-width: 480px) {
    .service-card {
        padding: 1.5rem 1.25rem;
        border-radius: 14px;
        box-shadow:
            0 0 0 1px rgba(255,255,255,.06) inset,
            0 6px 25px rgba(10,12,22,.4),
            0 0 50px 6px rgba(124,92,255,.08);
    }
}

/* Enhanced glassmorphism effect for cards */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
    opacity: 0.8;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 0 0 1px rgba(255,255,255,.08) inset,
        0 20px 60px rgba(10,12,22,.5),
        0 0 120px 15px rgba(124,92,255,.15);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Reduce hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover {
        transform: none;
        box-shadow:
            0 0 0 1px rgba(255,255,255,.06) inset,
            0 8px 30px rgba(10,12,22,.4),
            0 0 60px 8px rgba(124,92,255,.08);
    }

    .service-card:active {
        transform: translateY(2px);
    }
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--glow2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

/* Mobile heading adjustments */
@media (max-width: 768px) {
    .service-card h3 {
        font-size: 1.35rem;
        gap: 0.6rem;
        margin-bottom: 0.875rem;
    }
}

@media (max-width: 480px) {
    .service-card h3 {
        font-size: 1.25rem;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        flex-wrap: wrap;
    }
}

/* Service card icons */
.service-card h3 .icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.4));
}

@media (max-width: 768px) {
    .service-card h3 .icon {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    .service-card h3 .icon {
        width: 20px;
        height: 20px;
    }
}

/* Service card paragraphs */
.service-card p {
    color: var(--sub);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .service-card p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 480px) {
    .service-card p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

.service-card ul {
    list-style: none;
    margin-top: 1rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .service-card ul {
        margin-top: 0.75rem;
    }
}

.service-card li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}

/* Mobile list item adjustments */
@media (max-width: 768px) {
    .service-card li {
        padding: 0.35rem 0;
        padding-left: 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .service-card li {
        padding: 0.3rem 0;
        padding-left: 1rem;
        font-size: 0.85rem;
    }
}

.service-card li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.1em;
    transition: transform 0.2s ease;
}

.service-card li:hover {
    color: var(--text);
}

.service-card li:hover:before {
    transform: translateX(3px);
    color: var(--glow1);
}

/* Disable hover effects on touch devices for list items */
@media (hover: none) and (pointer: coarse) {
    .service-card li:hover {
        color: var(--muted);
    }

    .service-card li:hover:before {
        transform: none;
        color: var(--accent);
    }
}

/* Enhanced mobile list styling */
@media (max-width: 480px) {
    .service-card li:before {
        font-size: 1em;
    }
}

/* Services section specific adjustments */
.services-section {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    .services-section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .services-section {
        padding: 2rem 0;
    }
}

/* CTA section mobile adjustments */
.services-cta {
    text-align: center;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .services-cta {
        margin-top: 2.5rem;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .services-cta {
        margin-top: 2rem;
    }
}

/* Improved focus states for accessibility */
.service-card:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Grid improvements for edge cases */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }
}

/* Very large screens */
@media (min-width: 1400px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Handle very small screens */
@media (max-width: 320px) {
    .service-card {
        padding: 1.25rem 1rem;
        border-radius: 12px;
    }

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

    .service-card h3 .icon {
        width: 18px;
        height: 18px;
    }

    .service-card p {
        font-size: 0.85rem;
    }

    .service-card li {
        font-size: 0.8rem;
        padding-left: 0.875rem;
    }
}

/* Print styles */
@media print {
    .service-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .service-card:hover {
        transform: none;
        box-shadow: none;
    }
}
