/* ===================================
   SERVICES PAGE - SPECIFIC FIXES
   Add this CSS to fix the 3 issues
   =================================== */

/* 1. FIX: Page Title Center Alignment */
.page-header-content {
    position: relative;
    z-index: 3;
    text-align: center !important;
    color: white;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.page-title {
    text-align: center !important;
    margin: 0 auto;
    display: block;
    width: 100%;
}

.page-description {
    text-align: center !important;
    margin: 0 auto;
    display: block;
    width: 100%;
    max-width: 600px;
}

.breadcrumb {
    text-align: center !important;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

/* 2. FIX: Remove Blue Space Before Footer */
.main-services {
    background: white;
    width: 100%;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.service-section:last-child {
    border-bottom: none;
    margin-bottom: 0 !important;
    padding-bottom: 80px !important;
}

/* Remove any extra spacing that might cause blue space */
.main-services::after,
.service-section::after {
    display: none !important;
}

/* Ensure no background color bleeds */
.service-section {
    background: transparent !important;
}

/* Make sure support section connects properly */
.support-section {
    background: #f8f9fa;
    padding: 80px 0;
    width: 100%;
    margin-top: 0 !important;
}

/* 3. FIX: Restore Services Overview Animations */
.services-overview {
    padding: 80px 0;
    background: #f8f9fa;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Add back the animated background pattern */
.services-overview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="services-grid" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="5" cy="5" r="0.5" fill="%23e2e8f0" opacity="0.3"/></pattern></defs><rect width="100%" height="100%" fill="url(%23services-grid)"/></svg>');
    pointer-events: none;
    animation: float-pattern 20s ease-in-out infinite;
}

/* Ensure content is above the pattern */
.services-overview .container {
    position: relative;
    z-index: 2;
}

/* Restore section header animations */
.section-header {
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.section-header[data-aos="fade-up"] {
    opacity: 1;
    transform: translateY(0);
}

/* Restore services stats animations */
.services-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
    width: 100%;
}

.services-stats[data-aos="fade-up"] {
    opacity: 1;
    transform: translateY(0);
}

.services-stats .stat-item {
    background: white;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 102, 204, 0.1);
    transition: all 0.3s ease;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Stagger animation for stat items */
.services-stats .stat-item:nth-child(1) {
    animation-delay: 0.1s;
}

.services-stats .stat-item:nth-child(2) {
    animation-delay: 0.2s;
}

.services-stats .stat-item:nth-child(3) {
    animation-delay: 0.3s;
}

.services-stats .stat-item:nth-child(4) {
    animation-delay: 0.4s;
}

/* Restore hover animations for stat items */
.services-stats .stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Restore icon animations */
.services-stats .stat-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #0066cc, #00d4ff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.services-stats .stat-item:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Counter animation for numbers */
.services-stats .stat-number {
    font-size: 36px;
    font-weight: 800;
    color: #0066cc;
    display: block;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.services-stats .stat-item:hover .stat-number {
    color: #00d4ff;
    transform: scale(1.05);
}

/* Add pulse animation for icons */
@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.services-stats .stat-icon i {
    color: white;
    font-size: 30px;
    animation: iconPulse 3s ease-in-out infinite;
}

/* Restore AOS compatibility */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float-pattern {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(10px, -5px);
    }
    50% {
        transform: translate(-5px, 10px);
    }
    75% {
        transform: translate(-10px, -5px);
    }
}

/* Ensure service sections have proper spacing */
.service-section {
    padding: 80px 0;
    border-bottom: 1px solid #eee;
    width: 100%;
    background: white !important;
    margin: 0 !important;
}

.service-section:last-child {
    border-bottom: none;
    padding-bottom: 80px;
    margin-bottom: 0;
}

/* Fix any potential margin/padding conflicts */
.main-services .container {
    width: 100%;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Responsive fixes for the specific issues */
@media (max-width: 1024px) {
    .services-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .services-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .page-title {
        font-size: 36px !important;
        text-align: center !important;
    }
    
    .page-description {
        font-size: 16px !important;
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 28px !important;
        text-align: center !important;
    }
    
    .page-description {
        font-size: 14px !important;
        text-align: center !important;
    }
    
    .page-header-content {
        padding: 0 15px;
    }
}