/**
 * Property Statistics Component
 * 
 * Styles for the property statistics section displayed on the homepage.
 * Features responsive design with theme support and elegant animations.
 */

.property-statistics {
    background-color: var(--color-background);
    padding: 3.5rem 0;
    margin: 2rem 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
    transition: background-color var(--transition), box-shadow var(--transition);
}

/* Subtle pattern overlay */
.property-statistics::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Ultra-black dark mode */
[data-theme="dark"] .property-statistics {
    background-color: #000000 !important;
    border-color: #2a2a2a !important;
}

[data-theme="dark"] .property-statistics::before {
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="dark"] .statistic-card {
    background-color: #0a0a0a !important;
    border-color: #2a2a2a !important;
    color: #ffffff !important;
}

/* Section heading */
.statistics-heading {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.statistics-heading .section-title {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
}

.statistics-heading .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--accent-color-light) 100%);
    border-radius: 2px;
    animation: gradient-shift 8s ease infinite;
    background-size: 300% 300%;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.statistics-heading .section-subtitle {
    font-size: var(--font-size-md);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 1.25rem auto 0;
    line-height: 1.5;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    position: relative;
    z-index: 1;
}

.statistic-card {
    display: flex;
    align-items: center;
    background-color: var(--color-background-secondary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.statistic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
    z-index: 5;
}

.statistic-icon {
    font-size: 1.5rem;
    width: 55px;
    height: 55px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    margin-right: 1rem;
    flex-shrink: 0;
    animation: morphing 10s ease-in-out infinite;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

@keyframes morphing {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.statistic-card:nth-child(1) .statistic-icon {
    background: linear-gradient(135deg, #4CAF50 0%, #3d8b40 100%);
}

.statistic-card:nth-child(2) .statistic-icon {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-color-dark) 100%);
}

.statistic-card:nth-child(3) .statistic-icon {
    background: linear-gradient(135deg, #2196F3 0%, #0d47a1 100%);
}

.statistic-card:nth-child(4) .statistic-icon {
    background: linear-gradient(135deg, #9C27B0 0%, #6a1b9a 100%);
}

.statistic-content {
    flex: 1;
}

.statistic-value {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    line-height: 1.2;
    white-space: nowrap;
}

.statistic-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
}

.statistic-progress {
    height: 3px;
    background-color: rgba(var(--accent-color-rgb), 0.1);
    border-radius: 1.5px;
    margin-top: 0.5rem;
    overflow: hidden;
    width: 100%;
}

.statistic-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--accent-color-light) 100%);
    width: 0;
    transition: width 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.value-suffix {
    font-size: 0.8em;
    margin-left: 3px;
    opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .statistics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .property-statistics {
        padding: 2.5rem 0;
    }
    
    .statistics-heading .section-title {
        font-size: var(--font-size-3xl);
    }
    
    .statistic-card {
        padding: 1rem;
    }
    
    .statistic-icon {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .statistics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .property-statistics {
        padding: 2rem 0;
    }
    
    .statistic-card {
        padding: 1rem;
    }
    
    .statistic-value {
        font-size: 1.35rem;
    }
} 