/* ============================================
   FEATURES SECTION STYLES - ULTRA PERFORMANCE OPTIMIZED
   ============================================ */

.features-section {
    padding: 100px 0;
    background: var(--bg-secondary);
    /* Force hardware acceleration */
    transform: translateZ(0);
    will-change: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--secondary-color);
    font-weight: 800;
    position: relative;
    /* Optimize text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
    /* Hardware acceleration for transform */
    transform: translateX(-50%) translateZ(0);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
    /* Optimize grid rendering */
    contain: layout style;
}

.feature-card {
    background: var(--bg-primary);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid rgba(107, 142, 35, 0.08);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    /* Hardware acceleration and containment */
    transform: translateZ(0);
    will-change: transform;
    contain: layout style paint;
    /* Optimize for compositing */
    backface-visibility: hidden;
}

.feature-card:hover {
    transform: translateY(-8px) translateZ(0);
    box-shadow: 0 15px 35px rgba(107, 142, 35, 0.15);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    display: inline-block;
    transition: transform 0.2s ease, color 0.2s ease;
    /* Hardware acceleration */
    transform: translateZ(0);
    will-change: transform;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) translateZ(0);
    color: var(--primary-dark);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    font-weight: 700;
    transition: color 0.2s ease;
    line-height: 1.3;
    /* Optimize text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.feature-card:hover h3 {
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
    /* Optimize text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Feature card accent borders - using pseudo-elements for better performance */
.feature-card:nth-child(1)::before,
.feature-card:nth-child(2)::before,
.feature-card:nth-child(3)::before,
.feature-card:nth-child(4)::before,
.feature-card:nth-child(5)::before,
.feature-card:nth-child(6)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 20px 20px 0 0;
}

.feature-card:nth-child(1)::before {
    background: var(--primary-color);
}

.feature-card:nth-child(2)::before {
    background: var(--primary-light);
}

.feature-card:nth-child(3)::before {
    background: var(--accent-color);
}

.feature-card:nth-child(4)::before {
    background: var(--secondary-color);
}

.feature-card:nth-child(5)::before {
    background: var(--primary-dark);
}

.feature-card:nth-child(6)::before {
    background: var(--accent-light);
}

/* Responsive Design - Optimized */
@media (max-width: 768px) {
    .features-section {
        padding: 80px 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 3rem;
    }
    
    .feature-card {
        padding: 2.5rem 2rem;
        min-height: 280px;
    }
    
    .feature-icon {
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.4rem;
        margin-bottom: 1.2rem;
    }
}

@media (max-width: 480px) {
    .features-section {
        padding: 60px 0;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
        border-radius: 15px;
        min-height: 250px;
    }
    
    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 1.2rem;
    }
    
    .feature-card h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .feature-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

/* Dark mode adjustments - Optimized */
body.dark-mode .features-section {
    background: var(--bg-secondary);
}

body.dark-mode .feature-card {
    background: var(--bg-secondary);
    border-color: var(--border-light);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

body.dark-mode .feature-card:hover {
    box-shadow: 0 15px 35px rgba(107, 142, 35, 0.25);
    border-color: var(--primary-color);
}

body.dark-mode .feature-card p {
    color: var(--text-secondary);
}

/* Performance optimizations for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .feature-card,
    .feature-icon,
    .feature-card h3 {
        transition: none;
    }
    
    .feature-card:hover {
        transform: none;
    }
    
    .feature-card:hover .feature-icon {
        transform: none;
    }
}

/* Optimize for high DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .feature-card {
        /* Ensure crisp rendering on high DPI displays */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
} 