/* === CRITICAL ABOVE-THE-FOLD CSS === */
/* CLS Prevention: Pre-define all dimensions */

.hey-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #e55a2b;
    width: 100%;
    min-height: 200px;
}

.hey-btn {
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    contain: layout style;
    min-height: 44px;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.hey-btn-green {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
    padding: 16px 32px;
    font-size: 1.1rem;
    min-height: 52px;
}

.hey-gradient-text {
    background: linear-gradient(135deg, #e55a2b 0%, #ff6b42 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hey-urgency-base {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.1) 0%, rgba(249, 115, 22, 0.05) 100%);
    border: 1px solid rgba(251, 146, 60, 0.2);
    color: #ea580c;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.1);
    position: relative;
    overflow: hidden;
    contain: layout style;
    min-height: 40px;
    padding: 12px 18px;
}

/* === MOBILE-FIRST CRITICAL STYLES === */
@media (max-width: 768px) {
    .hey-card { 
        margin: 20px 0; 
        min-height: 160px;
    }
    .hey-btn { 
        padding: 12px 20px; 
        font-size: 0.9rem; 
        min-height: 44px;
        width: 100%;
    }
    .hey-btn-green {
        min-height: 48px;
        font-size: 1rem;
    }
    .hey-mobile-stack { flex-direction: column; }
    .hey-mobile-full { width: 100%; }
    
    /* Disable all animations on mobile for performance */
    *, *::before, *::after {
        animation-duration: 0s !important;
        animation-delay: 0s !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
}

/* === PERFORMANCE OPTIMIZATIONS === */
/* GPU acceleration for smooth interactions (desktop only) */
@media (min-width: 769px) {
    .hey-card:hover, .hey-btn:hover {
        transform: translateZ(0);
        will-change: transform;
    }
}

/* Prevent layout thrashing */
.hey-card, .hey-btn, .hey-urgency-base {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* === CLS PREVENTION SYSTEM === */
.hey-trust-badges {
    min-height: 140px;
    width: 100%;
}

.hey-metrics-widget {
    min-height: 200px;
    width: 100%;
}

.hey-reviews-widget {
    min-height: 400px;
    width: 100%;
}

.hey-value-tiles {
    min-height: 320px;
    width: 100%;
}

.hey-related-products {
    min-height: 500px;
    width: 100%;
}

/* === MOBILE DIMENSIONAL ADJUSTMENTS === */
@media (max-width: 768px) {
    .hey-trust-badges {
        min-height: 200px;
    }
    
    .hey-metrics-widget {
        min-height: 300px;
    }
    
    .hey-reviews-widget {
        min-height: 350px;
    }
    
    .hey-value-tiles {
        min-height: 240px;
    }
    
    .hey-related-products {
        min-height: 600px;
    }
}

/* === CSS CONTAINMENT FOR ALL DYNAMIC ELEMENTS === */
.hey-trust-item,
.hey-metric-item,
.hey-review-item,
.hey-value-tile,
.hey-related-card {
    contain: layout style paint;
    will-change: auto;
}

/* Only enable will-change on hover for desktop */
@media (min-width: 769px) {
    .hey-trust-item:hover,
    .hey-metric-item:hover,
    .hey-review-item:hover,
    .hey-value-tile:hover,
    .hey-related-card:hover {
        will-change: transform;
    }
}
