/* ==========================================================================
   PREMIUM STATS SECTION
   A calm, professional, wellness-oriented stats display
   ========================================================================== */

.premium-stats-section {
    padding: 60px 0;
    background: linear-gradient(180deg, #FDFCFB 0%, #F8F5F1 100%);
    position: relative;
    overflow: hidden;
}

/* Subtle gradient band at top */
.premium-stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #E8D5DC 0%, 
        #5D3A4D 25%, 
        #8B5A7C 50%, 
        #5D3A4D 75%, 
        #E8D5DC 100%);
    opacity: 0.6;
}

.premium-stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Stats Card Wrapper */
.premium-stats-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 
        0 4px 24px rgba(93, 58, 77, 0.06),
        0 1px 3px rgba(93, 58, 77, 0.04);
    border: 1px solid rgba(93, 58, 77, 0.06);
}

/* Stats Grid - 4 columns */
.premium-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
}

/* Individual Stat Item */
.premium-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 30px;
    position: relative;
    /* Animation initial state */
    opacity: 0;
    transform: translateY(30px);
}

/* Fade-up animation when visible */
.premium-stat-item.animate-in {
    animation: statFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.premium-stat-item:nth-child(1).animate-in { animation-delay: 0.1s; }
.premium-stat-item:nth-child(2).animate-in { animation-delay: 0.2s; }
.premium-stat-item:nth-child(3).animate-in { animation-delay: 0.3s; }
.premium-stat-item:nth-child(4).animate-in { animation-delay: 0.4s; }

@keyframes statFadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Vertical Dotted Dividers */
.premium-stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(93, 58, 77, 0.15) 10%,
        rgba(93, 58, 77, 0.15) 90%,
        transparent 100%
    );
    background-size: 1px 8px;
    background-repeat: repeat-y;
}

/* Circular Badge / Icon Container */
.stat-badge {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #F8F0F4 0%, #EDE4E8 100%);
    border: 2px solid rgba(93, 58, 77, 0.1);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-badge::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px dashed rgba(93, 58, 77, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-stat-item:hover .stat-badge {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(93, 58, 77, 0.12);
}

.premium-stat-item:hover .stat-badge::before {
    opacity: 1;
}

/* Badge Number */
.stat-badge-number {
    font-family: 'Sora', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #5D3A4D;
    line-height: 1;
}

/* Badge Icon - Solar Icons */
.stat-badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5D3A4D;
}

.stat-badge-icon iconify-icon {
    font-size: 32px;
    color: #5D3A4D;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.premium-stat-item:hover .stat-badge-icon iconify-icon {
    opacity: 1;
    transform: scale(1.1);
}

.stat-badge-icon svg {
    width: 32px;
    height: 32px;
}

/* Stat Value (Bold Title) */
.stat-value {
    font-family: 'Sora', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #3D3D3D;
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

/* Stat Label (Muted Description) */
.stat-label {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #7A7A7A;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

/* Hover effect on whole item */
.premium-stat-item:hover .stat-value {
    color: #5D3A4D;
}

/* ==========================================================================
   RESPONSIVE - Tablet (2x2 grid)
   ========================================================================== */
@media (max-width: 968px) {
    .premium-stats-section {
        padding: 50px 0;
    }
    
    .premium-stats-container {
        padding: 0 24px;
    }
    
    .premium-stats-card {
        padding: 40px 30px;
        border-radius: 16px;
    }
    
    .premium-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 0;
    }
    
    /* Remove right dividers on 2nd and 4th items */
    .premium-stat-item:nth-child(2)::after,
    .premium-stat-item:nth-child(4)::after {
        display: none;
    }
    
    /* Add horizontal divider after first row */
    .premium-stat-item:nth-child(1),
    .premium-stat-item:nth-child(2) {
        padding-bottom: 30px;
        border-bottom: 1px dashed rgba(93, 58, 77, 0.12);
    }
    
    .stat-badge {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }
    
    .stat-badge-number {
        font-size: 1.3rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
}

/* ==========================================================================
   RESPONSIVE - Mobile
   ========================================================================== */
@media (max-width: 600px) {
    .premium-stats-section {
        padding: 40px 0;
    }
    
    .premium-stats-container {
        padding: 0 16px;
    }
    
    .premium-stats-card {
        padding: 30px 20px;
        border-radius: 14px;
    }
    
    .premium-stats-grid {
        gap: 24px 0;
    }
    
    .premium-stat-item {
        padding: 16px 12px;
    }
    
    .stat-badge {
        width: 56px;
        height: 56px;
        margin-bottom: 14px;
    }
    
    .stat-badge-number {
        font-size: 1.2rem;
    }
    
    .stat-badge-icon {
        width: 26px;
        height: 26px;
    }
    
    .stat-value {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }
    
    .stat-label {
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   ANIMATION - Intersection Observer Trigger
   ========================================================================== */
.premium-stats-section.in-view .premium-stat-item {
    animation: statFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.premium-stats-section.in-view .premium-stat-item:nth-child(1) { animation-delay: 0.1s; }
.premium-stats-section.in-view .premium-stat-item:nth-child(2) { animation-delay: 0.2s; }
.premium-stats-section.in-view .premium-stat-item:nth-child(3) { animation-delay: 0.3s; }
.premium-stats-section.in-view .premium-stat-item:nth-child(4) { animation-delay: 0.4s; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .premium-stat-item,
    .premium-stats-section.in-view .premium-stat-item {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

/* ==========================================================================
   BLOCK PATTERN SUPPORT
   Additional styles for WordPress block editor version
   ========================================================================== */

/* Block pattern wrapper */
.wp-block-group.premium-stats-section {
    padding: 60px 20px;
    background: linear-gradient(180deg, #FDFCFB 0%, #F8F5F1 100%);
    position: relative;
    margin-top: 0;
    margin-bottom: 0;
}

.wp-block-group.premium-stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #E8D5DC 0%, 
        #5D3A4D 25%, 
        #8B5A7C 50%, 
        #5D3A4D 75%, 
        #E8D5DC 100%);
    opacity: 0.6;
}

/* Block pattern card */
.wp-block-group.premium-stats-card {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 24px rgba(93, 58, 77, 0.06),
        0 1px 3px rgba(93, 58, 77, 0.04) !important;
    border: 1px solid rgba(93, 58, 77, 0.06) !important;
    max-width: 1200px;
    margin: 0 auto;
}

/* Block columns as stats grid */
.wp-block-columns.premium-stats-grid {
    gap: 0 !important;
    margin-bottom: 0 !important;
}

/* Block column as stat item */
.wp-block-column.premium-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 30px;
    position: relative;
}

/* Dividers for block version */
.wp-block-columns.premium-stats-grid > .wp-block-column.premium-stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(93, 58, 77, 0.15) 10%,
        rgba(93, 58, 77, 0.15) 90%,
        transparent 100%
    );
    background-size: 1px 8px;
    background-repeat: repeat-y;
}

/* Badge in block pattern */
.premium-stat-item .wp-block-group.stat-badge {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #F8F0F4 0%, #EDE4E8 100%) !important;
    border: 2px solid rgba(93, 58, 77, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-stat-item .stat-badge p.stat-badge-icon {
    font-size: 1.8rem;
    line-height: 1;
    margin: 0;
}

/* Stat value styling in block */
.premium-stat-item h3.stat-value {
    font-family: 'Sora', sans-serif !important;
    color: #3D3D3D !important;
    margin-bottom: 8px !important;
    margin-top: 0 !important;
}

/* Stat label styling in block */
.premium-stat-item p.stat-label {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    color: #7A7A7A !important;
    margin: 0 !important;
    letter-spacing: 0.02em;
}

/* Hover effects for block version */
.premium-stat-item:hover .wp-block-group.stat-badge {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(93, 58, 77, 0.12);
}

.premium-stat-item:hover h3.stat-value {
    color: #5D3A4D !important;
}

/* Block pattern responsive - tablet */
@media (max-width: 968px) {
    .wp-block-group.premium-stats-section {
        padding: 50px 16px;
    }
    
    .wp-block-columns.premium-stats-grid {
        flex-wrap: wrap !important;
    }
    
    .wp-block-columns.premium-stats-grid > .wp-block-column.premium-stat-item {
        flex-basis: 50% !important;
        max-width: 50% !important;
    }
    
    .wp-block-columns.premium-stats-grid > .wp-block-column.premium-stat-item:nth-child(2)::after,
    .wp-block-columns.premium-stats-grid > .wp-block-column.premium-stat-item:nth-child(4)::after {
        display: none;
    }
    
    .wp-block-columns.premium-stats-grid > .wp-block-column.premium-stat-item:nth-child(1),
    .wp-block-columns.premium-stats-grid > .wp-block-column.premium-stat-item:nth-child(2) {
        padding-bottom: 30px;
        margin-bottom: 20px;
        border-bottom: 1px dashed rgba(93, 58, 77, 0.12);
    }
}

/* Block pattern responsive - mobile */
@media (max-width: 600px) {
    .wp-block-group.premium-stats-section {
        padding: 40px 12px;
    }
    
    .wp-block-group.premium-stats-card {
        padding: 30px 20px !important;
        border-radius: 14px !important;
    }
    
    .premium-stat-item .wp-block-group.stat-badge {
        width: 56px;
        height: 56px;
        margin-bottom: 14px;
    }
    
    .premium-stat-item .stat-badge p.stat-badge-icon {
        font-size: 1.5rem;
    }
    
    .premium-stat-item h3.stat-value {
        font-size: 1.5rem !important;
    }
    
    .premium-stat-item p.stat-label {
        font-size: 0.95rem !important;
    }
}
