/**
 * Stats Counter Widget Styles - Professional & Modern
 *
 * @package PWZ_Theme
 * @since 1.0.0
 */

/* ============================================
   ELEMENTOR COMPATIBILITY & OVERFLOW FIX
   ============================================ */

.elementor-widget-pwz-stats-counter {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.elementor-widget-pwz-stats-counter .elementor-widget-container {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100%;
    overflow: hidden;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.pwz-stats-counter {
    padding: 70px 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.pwz-stats-counter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.pwz-stats-counter .pwz-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

/* ============================================
   GRID LAYOUT
   ============================================ */

.pwz-stats-grid {
    display: grid;
    gap: 25px;
    max-width: 100%;
}

.pwz-stats-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.pwz-stats-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.pwz-stats-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   STAT ITEM
   ============================================ */

.pwz-stat-item {
    animation: fadeInUp 0.6s ease-out both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   STAT CARD
   ============================================ */

.pwz-stat-card {
    position: relative;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.5) 0%, rgba(0, 0, 0, 0.7) 100%);
    padding: 40px 25px;
    border-radius: 16px;
    border: 1px solid rgba(0, 255, 136, 0.15);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.pwz-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--pwz-accent) 50%, transparent 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.pwz-stat-item:hover .pwz-stat-card {
    transform: translateY(-8px);
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 0 15px 50px rgba(0, 255, 136, 0.2);
}

.pwz-stat-item:hover .pwz-stat-card::before {
    transform: scaleX(1);
}

/* ============================================
   ICON
   ============================================ */

.pwz-stat-icon-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
}

.pwz-stat-icon {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #00FF88 !important;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 136, 0.3);
    transition: all 0.4s ease;
    z-index: 2;
}

.pwz-stat-icon i,
.pwz-stat-icon svg {
    transition: transform 0.4s ease;
    color: inherit !important;
    fill: currentColor !important;
    width: 1em;
    height: 1em;
}

/* Ensure Font Awesome icons display */
.pwz-stat-icon i::before {
    color: inherit !important;
}

.pwz-stat-item:hover .pwz-stat-icon {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.5);
    transform: scale(1.1) rotate(10deg);
}

.pwz-stat-item:hover .pwz-stat-icon i,
.pwz-stat-item:hover .pwz-stat-icon svg {
    transform: scale(1.1);
}

/* Icon Glow */
.pwz-stat-icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.4s ease;
    z-index: 1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.pwz-stat-item:hover .pwz-stat-icon-glow {
    transform: translate(-50%, -50%) scale(2);
}

/* ============================================
   NUMBER
   ============================================ */

.pwz-stat-number {
    font-family: var(--pwz-font-heading);
    font-size: 52px;
    font-weight: 700;
    color: var(--pwz-primary-text);
    line-height: 1;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.pwz-stat-item:hover .pwz-stat-number {
    color: var(--pwz-accent);
}

.pwz-stat-prefix,
.pwz-stat-suffix {
    font-size: 0.7em;
    font-weight: 600;
}

.pwz-counter-value {
    display: inline-block;
}

/* ============================================
   TITLE
   ============================================ */

.pwz-stat-title {
    font-family: var(--pwz-font-body);
    font-size: 16px;
    font-weight: 500;
    color: var(--pwz-secondary-text);
    margin: 0;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.pwz-stat-item:hover .pwz-stat-title {
    color: var(--pwz-primary-text);
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */

/* Line */
.pwz-stat-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--pwz-accent) 50%, transparent 100%);
    transform: translateX(-50%);
    transition: width 0.4s ease;
}

.pwz-stat-item:hover .pwz-stat-line {
    width: 80%;
}

/* Background Circle */
.pwz-stat-bg-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.pwz-stat-item:hover .pwz-stat-bg-circle {
    transform: translate(-50%, -50%) scale(1.5);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .pwz-stats-counter .pwz-container {
        padding: 0 18px;
    }

    .pwz-stats-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .pwz-stats-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .pwz-stats-grid {
        gap: 22px;
    }

    .pwz-stat-card {
        padding: 38px 22px;
    }

    .pwz-stat-number {
        font-size: 44px;
    }
}

@media (max-width: 768px) {
    .pwz-stats-counter {
        padding: 50px 16px;
    }

    .pwz-stats-counter .pwz-container {
        padding: 0 16px;
    }

    .pwz-stats-cols-2,
    .pwz-stats-cols-3,
    .pwz-stats-cols-4 {
        grid-template-columns: 1fr !important;
    }

    .pwz-stats-grid {
        gap: 18px;
        max-width: 100%;
    }

    .pwz-stat-card {
        padding: 35px 18px;
        max-width: 100%;
    }

    .pwz-stat-icon-wrapper {
        width: 70px;
        height: 70px;
        margin-bottom: 18px;
    }

    .pwz-stat-icon {
        width: 70px;
        height: 70px;
        font-size: 34px;
    }

    .pwz-stat-number {
        font-size: 38px;
        margin-bottom: 12px;
    }

    .pwz-stat-title {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pwz-stats-counter {
        padding: 35px 12px;
    }

    .pwz-stats-counter .pwz-container {
        padding: 0 12px;
    }

    .pwz-stats-grid {
        gap: 16px;
        max-width: 100%;
    }

    .pwz-stat-card {
        padding: 30px 16px;
        max-width: 100%;
    }

    .pwz-stat-icon-wrapper {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }

    .pwz-stat-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .pwz-stat-number {
        font-size: 32px;
        margin-bottom: 10px;
    }

    .pwz-stat-title {
        font-size: 13px;
    }
}

