/* Homepage Services Section - Enhanced Layout */
.services-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.services-section .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.services-section .section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.services-section .section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 20px auto 0;
}

/* Enhanced layout for service cards */
.services-row {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 20px;
}

.service-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: var(--shadow-subtle);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 2px solid var(--border-medium);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px rgba(92, 219, 211, 0.3), var(--shadow-subtle);
    margin-bottom: 0;
    flex: 1;
    min-width: 250px;
    max-width: 280px;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 0 2px var(--accent-blue), var(--shadow-medium);
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    border: 2px solid transparent;
}

/* Service header with icon and title in same line */
.service-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.service-icon {
    font-size: 28px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card h3 {
    font-size: 1.3rem;
    margin: 0;
    font-weight: 600;
}

/* Service description limited to 2 lines */
.service-description {
    color: var(--text-light);
    margin-bottom: 25px;
    flex-grow: 1;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

.service-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent-blue);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s var(--ease-smooth);
    font-size: 0.9rem;
}

.service-link:hover {
    color: var(--accent-pink);
    transform: translateX(5px);
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .services-row {
        max-width: 1100px;
        gap: 25px;
    }
    
    .service-card {
        max-width: 260px;
        min-width: 230px;
    }
    
    .service-icon {
        font-size: 26px;
    }
    
    .service-card h3 {
        font-size: 1.25rem;
    }
}

/* iPad specific styles to ensure 4 cards in one row */
@media (max-width: 992px) {
    .services-section {
        padding: 70px 0;
    }
    
    .services-row {
        max-width: 100%;
        gap: 12px;
        padding: 0 8px;
        justify-content: space-between;
    }
    
    .service-card {
        max-width: calc(25% - 9px);
        min-width: auto;
        width: calc(25% - 9px);
    }
    
    .service-header {
        gap: 6px;
    }
    
    .service-icon {
        font-size: 20px;
    }
    
    .service-card h3 {
        font-size: 1rem;
    }
    
    .service-description {
        font-size: 0.8rem;
    }
}

/* Additional fine-tuning for iPad Air/Pro portrait orientation */
@media (min-width: 769px) and (max-width: 834px) {
    .services-row {
        gap: 10px;
    }
    
    .service-card {
        max-width: calc(25% - 8px);
        width: calc(25% - 8px);
    }
    
    .service-header {
        gap: 5px;
    }
    
    .service-icon {
        font-size: 18px;
    }
    
    .service-card h3 {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .services-section {
        padding: 60px 0;
    }
    
    .services-row {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
        gap: 20px;
    }
    
    .service-card {
        min-width: 280px;
        max-width: calc(50% - 10px);
        width: auto;
    }
    
    .services-section .section-header h2 {
        font-size: 2rem;
    }
    
    .services-section .section-header p {
        font-size: 1.1rem;
    }
}

@media (max-width: 640px) {
    .services-row {
        flex-direction: column;
        align-items: center;
    }
    
    .service-card {
        min-width: 280px;
        max-width: 100%;
        width: 90%;
    }
}

@media (max-width: 480px) {
    .services-section {
        padding: 50px 0;
    }
    
    .service-card {
        min-width: 240px;
        width: 95%;
        padding: 25px 20px;
    }
    
    .service-header {
        gap: 6px;
    }
    
    .service-icon {
        font-size: 22px;
    }
    
    .service-card h3 {
        font-size: 1.15rem;
    }
    
    .service-description {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }
}