/* =========================================
   Statistics & Services Component Styles
   Theme: Dark, Premium, AI-Native
========================================= */

.services-section {
    background-color: #000; /* Seamless continuation from Hero */
    color: #fff;
    padding: 20px 0 120px 0; /* Reduced top padding to pull it closer to the hero */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}

.services-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   Stats Grid
========================================= */
.stats-grid {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 80px;
    flex-wrap: wrap; /* Changed to wrap for better safety */
}

@media (min-width: 1200px) {
    .stats-grid {
        flex-wrap: nowrap; /* Keep single row on large desktops */
    }
}

.stat-card {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.03); /* Subtle glass background */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Perfect vertical center */
    align-items: center;
    min-height: 200px; /* Consistent height for all cards */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform, opacity;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: #fff;
    letter-spacing: -0.5px;
}

.stat-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-weight: 500;
}

/* Responsive Stats */
@media (max-width: 992px) {
    .stats-grid {
        flex-wrap: wrap;
    }
    .stat-card {
        flex: 0 0 calc(50% - 10px);
    }
}
@media (max-width: 576px) {
    .stat-card {
        flex: 0 0 100%;
    }
}

/* =========================================
   Services Header
========================================= */
.services-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    will-change: transform, opacity; /* GPU Hardware acceleration */
}

.services-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.services-title strong {
    font-weight: 800;
    /* Optional: subtle gradient for "Digital Future" if needed, keeping it white for now */
}

.services-desc {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
}

/* =========================================
   Services Grid (Inner Borders Only)
========================================= */
.services-icons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px; /* The thickness of the inner borders */
    background-color: rgba(255, 255, 255, 0.15); /* The color of the inner borders */
    border: none;
    margin: 0 auto;
}

.service-icon-box {
    background-color: #000; /* Must exactly match the section background */
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    will-change: transform, opacity; /* GPU Hardware acceleration */
    transition: background-color 0.3s ease;
}

.service-icon-box:hover {
    background-color: rgba(20, 20, 25, 0.8); /* Slight highlight on hover */
}

.service-icon-box .icon-wrapper {
    width: 100px;
    aspect-ratio: 1 / 1;
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.8), rgba(15, 15, 20, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}

.service-icon-box .icon-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.service-icon-box:hover .icon-wrapper {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 255, 255, 0.05);
}

.service-icon-box .icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px; /* Inner radius */
    filter: brightness(0.9) contrast(1.1);
    transition: filter 0.3s ease, transform 0.5s ease;
}

.service-icon-box:hover .icon-wrapper img {
    filter: brightness(1.1) contrast(1.2);
    transform: scale(1.05);
}

.service-icon-box h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.service-icon-box:hover h4 {
    color: #e2e8f0; /* Slight brighten */
}

/* Responsive Icons Grid */
@media (max-width: 1200px) {
    .services-icons-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

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