/* Statistics Section Styles - Split Layout */
#detail {
    padding: 100px 0;
    position: relative;
    background: #1e1e1e; /* Lighter gray to separate section */
    box-shadow: inset 0 0 100px rgba(0,0,0,0.5);
}

.stats-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

/* Right Side - Title */
.stats-header-side {
    flex: 1;
    min-width: 300px;
    text-align: right; /* Title on the right */
    padding-left: 40px;
    border-left: 1px solid rgba(22, 114, 75, 0.3); /* Green border separator */
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Force alignment to the right */
    justify-content: center;
}

.stats-subtitle {
    display: block;
    font-size: 1.2rem;
    color: #16724B;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
    font-weight: 600;
}

.stats-title-main {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.1;
    margin: 0;
}

.stats-desc {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    line-height: 1.6;
    max-width: 400px; /* Limit width for better readability */
}

/* Left Side - Data Grid */
.stats-data-grid {
    flex: 2;
    min-width: 300px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    background: rgba(15, 15, 15, 0.85); /* Dark background to prevent "red" bleed-through */
    border: 1px solid rgba(22, 114, 75, 0.3); /* Green border */
    border-radius: 15px;
    padding: 30px; /* Restored padding */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    min-height: 200px; /* Restored height */
    justify-content: space-between; /* Distribute content evenly */
}

.stat-item:hover {
    background: rgba(22, 114, 75, 0.15); /* Green tint on hover */
    transform: translateY(-5px);
    border-color: #16724B;
    box-shadow: 0 10px 25px rgba(22, 114, 75, 0.2);
}

.stat-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: #16724B;
    transition: width 0.3s ease;
}

.stat-item:hover::after {
    width: 100%;
}

.stat-icon-mini {
    font-size: 4rem; /* Restored to original large size */
    color: #16724B !important;
    margin-bottom: 20px;
    opacity: 1;
    display: inline-block; 
    width: auto; 
    height: auto; 
    line-height: 1;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Specific adjustment for Discord icon to match visual weight */
.stat-icon-mini.fa-discord {
    font-size: 4rem; /* Match others */
    line-height: 1;
}

.stat-item:hover .stat-icon-mini {
    transform: scale(1.1);
    transform-origin: left center; /* Scale from left to keep position */
    color: #ffffff !important; /* White on hover */
}

.stat-value {
    font-size: 2.5rem; /* Restored larger value */
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
    line-height: 1;
}

.stat-name {
    font-size: 1.1rem; /* Restored larger name */
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

@media (max-width: 991px) {
    .stats-wrapper {
        flex-direction: column-reverse;
        gap: 40px;
    }

    .stats-header-side {
        width: 100%;
        text-align: center;
        align-items: center;
        border-left: none;
        padding-left: 0;
        border-bottom: 1px solid rgba(22, 114, 75, 0.3);
        padding-bottom: 30px;
    }

    .stats-title-main {
        font-size: 3.5rem; /* Increased size back to near-desktop */
    }

    .stats-desc {
        font-size: 1.2rem;
        max-width: 100%;
    }
    
    .stats-data-grid {
        width: 100%;
        grid-template-columns: repeat(2, 1fr); /* Force 2 columns per row */
        gap: 12px;
    }

    .stat-item {
        padding: 18px; /* Slightly restored padding */
        min-height: auto;
    }

    /* Force icon size reduction on mobile with high specificity */
    .stat-icon-mini, 
    .stat-icon-mini.fa-discord,
    .stat-item .stat-icon-mini,
    .stat-item i,
    .stat-item svg.stat-icon-mini {
        font-size: 1.5rem !important; /* Significantly smaller */
        height: auto !important;
        line-height: 1 !important;
        margin-bottom: 8px;
        width: auto !important;
        max-width: 30px; /* Constraint width just in case */
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .stat-name {
        font-size: 0.8rem;
    }
}
