/**
 * Stats Section Styles
 *
 * @package Avraham_Theme
 */

/* ==========================================================================
   Stats Section Base
   ========================================================================== */

   .stats-section {
    position: relative;
    padding: var(--space-16) 0;
    padding-top: calc(var(--space-16) + 8px);
    padding-bottom: calc(var(--space-16) + 8px);
    background-color: #153C6D;
}

/* Top and Bottom Lines */
.stats-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 8px;
    background-color: #F6B38D;
}

.stats-line-top {
    top: 0;
}

.stats-line-bottom {
    bottom: 0;
}

/* Container */
.stats-container {
    width: 100%;
    max-width: var(--container-3xl);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-10);
}

/* ==========================================================================
   Stats Header
   ========================================================================== */

.stats-header {
    text-align: center;
    max-width: 900px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stats-header.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.stats-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-white);
    margin: 0 0 var(--space-4) 0;
    line-height: var(--leading-tight);
}

.stats-description {
    font-size: var(--text-base);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    line-height: var(--leading-relaxed);
}

.stats-description p {
    margin: 0;
}

/* ==========================================================================
   Stats Grid - 4 columns on desktop
   ========================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
    width: 100%;
}

/* ==========================================================================
   Stat Item
   ========================================================================== */

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-2);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stat-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stat Number */
.stat-number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #F6B38D;
    line-height: 1;
    margin-bottom: var(--space-1);
}

/* Stat Label */
.stat-label {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-white);
    line-height: var(--leading-tight);
}

/* Stat Description */
.stat-description {
    font-size: var(--text-sm);
    font-weight: 400;
    color: white;
    line-height: var(--leading-relaxed);
    margin: 0;
    margin-top: var(--space-2);
}

/* ==========================================================================
   CTA Button
   ========================================================================== */

.stats-cta {
    margin-top: var(--space-4);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stats-cta.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.stats-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-8);
    background-color: var(--color-white);
    color: #153C6D;
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    min-width: 160px;
}

.stats-cta-button:hover {
    background-color: #F6B38D;
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet Landscape */
@media (max-width: 1200px) {
    .stats-section {
        padding: var(--space-12) 0;
        padding-top: calc(var(--space-12) + 8px);
        padding-bottom: calc(var(--space-12) + 8px);
    }
    
    .stats-grid {
        gap: var(--space-6);
    }
    
    .stats-title {
        font-size: var(--text-2xl);
    }
    
    .stat-number {
        font-size: clamp(2rem, 4vw, 3rem);
    }
}

/* Tablet Portrait - 2x2 grid */
@media (max-width: 992px) {
    .stats-section {
        padding: var(--space-10) 0;
        padding-top: calc(var(--space-10) + 8px);
        padding-bottom: calc(var(--space-10) + 8px);
    }
    
    .stats-container {
        gap: var(--space-8);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8) var(--space-6);
    }
    
    .stats-title {
        font-size: var(--text-2xl);
    }
    
    .stats-description {
        font-size: var(--text-sm);
    }
    
    /* Right align text on mobile */
    .stat-item {
        text-align: right;
        align-items: flex-start;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .stats-section {
        padding: var(--space-10) 0;
        padding-top: calc(var(--space-10) + 6px);
        padding-bottom: calc(var(--space-10) + 6px);
    }
    
    .stats-line {
        height: 6px;
    }
    
    .stats-container {
        padding: 0 var(--space-4);
        gap: var(--space-6);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6) var(--space-4);
    }
    
    /* Bigger title on mobile */
    .stats-title {
        font-size: var(--text-2xl);
    }
    
    .stats-description {
        font-size: var(--text-sm);
    }
    
    .stat-number {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
    
    .stat-label {
        font-size: var(--text-sm);
    }
    
    .stat-description {
        font-size: var(--text-xs);
    }
    
    .stats-cta-button {
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-sm);
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .stats-section {
        padding: var(--space-8) 0;
        padding-top: calc(var(--space-8) + 5px);
        padding-bottom: calc(var(--space-8) + 5px);
    }
    
    .stats-line {
        height: 5px;
    }
    
    .stats-container {
        padding: 0 var(--space-3);
    }
    
    .stats-grid {
        gap: var(--space-5) var(--space-3);
    }
    
    /* Keep title bigger on small mobile */
    .stats-title {
        font-size: var(--text-xl);
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: var(--text-xs);
    }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .stat-item,
    .stats-header,
    .stats-cta {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .stats-cta-button:hover {
        transform: none;
    }
}
