/* ========================================
   🎨 FEATURES SECTION - LIGHT MODE
   ✨ طراحی خارق‌العاده با انیمیشن‌های پیشرفته
======================================== */

#features-section .features-section {
    position: relative;
    padding: 120px 0;
    background: linear-gradient(180deg, 
        #f8faff 0%, 
        #ffffff 50%, 
        #f5f7ff 100%);
    overflow: hidden;
}

/* ========================================
   🌟 Background Decorative Elements
======================================== */

#features-section .features-section::before,
#features-section .features-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

#features-section .features-section::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, 
        rgba(102, 126, 234, 0.08) 0%, 
        transparent 70%);
    top: -200px;
    left: -100px;
    animation: float-orb 20s ease-in-out infinite;
}

#features-section .features-section::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, 
        rgba(233, 30, 140, 0.06) 0%, 
        transparent 70%);
    bottom: -150px;
    right: -100px;
    animation: float-orb 25s ease-in-out infinite reverse;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(100px, 50px) scale(0.9); }
    75% { transform: translate(-50px, 100px) scale(1.05); }
}

/* ========================================
   📦 Container
======================================== */

#features-section .features-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ========================================
   🏷️ Header Section
======================================== */

#features-section .features-header {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInUp 1s ease-out;
    padding-top: 120px
}

#features-section .features-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.1) 0%, 
        rgba(102, 126, 234, 0.05) 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

#features-section .features-badge::before {
    content: '✨';
    font-size: 18px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

#features-section .features-title {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #1a1a2e 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1.2;
}

#features-section .features-subtitle {
    font-size: 18px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ========================================
   🎴 Grid Layout
======================================== */

#features-section .features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    position: relative;
}

/* ========================================
   💎 Feature Cards - اصلاح کامل
======================================== */

#features-section .feature-item {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    padding: 40px 30px 30px;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
    border: 2px solid transparent;
}

#features-section .feature-item:hover {
    transform: translateY(-12px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    border-color: var(--card-primary);
    overflow: hidden;
}

/* ========================================
   🔢 شماره‌گذاری کارت‌ها
======================================== */

#features-section .feature-number {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, 
        var(--card-primary) 0%, 
        var(--card-secondary) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transition: transform 0.3s ease;
}

#features-section .feature-item:hover .feature-number {
    transform: rotate(360deg) scale(1.1);
}

/* ========================================
   🎨 آیکون‌های کارت
======================================== */

#features-section .feature-icon {
    position: relative;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, 
        var(--card-primary) 0%, 
        var(--card-secondary) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    margin-bottom: 8px;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.15),
        inset 0 2px 8px rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
}

#features-section .icon-bg-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    filter: blur(20px);
    opacity: 0.3;
    z-index: -1;
}

#features-section .feature-item:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.2),
        inset 0 2px 12px rgba(255, 255, 255, 0.3);
}

/* ========================================
   📝 محتوای کارت
======================================== */

#features-section .feature-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 8px; 
}

#features-section .feature-item h3 {
    position: relative;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 16px;
    padding-bottom: 16px;
}

#features-section .feature-item h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--card-primary) 0%, 
        transparent 100%);
    border-radius: 2px;
    transition: width 0.4s ease;
}

#features-section .feature-item:hover h3::after {
    width: 100%;
}

#features-section .feature-item p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 16px;;
}

/* ========================================
   🔘 دکمه‌های کارت - فیکس کامل
======================================== */

#features-section .feature-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, 
        var(--card-primary) 0%, 
        var(--card-secondary) 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    align-self: stretch;
    text-align: center;
    margin-top: auto;
     z-index: 5;
}

#features-section .feature-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

#features-section .feature-link:active {
    transform: translateY(0);
}

#features-section .feature-link i {
    transition: transform 0.3s ease;
}

#features-section .feature-link:hover i {
    transform: translateX(-5px);
}

/* ========================================
   🎨 رنگ‌های اختصاصی هر کارت
======================================== */

#features-section .feature-item:nth-child(1) {
    --card-primary: #667eea;
    --card-secondary: #764ba2;
}

#features-section .feature-item:nth-child(2) {
    --card-primary: #f093fb;
    --card-secondary: #f5576c;
}

#features-section .feature-item:nth-child(3) {
    --card-primary: #4facfe;
    --card-secondary: #00f2fe;
}

#features-section .feature-item:nth-child(4) {
    --card-primary: #43e97b;
    --card-secondary: #38f9d7;
}

#features-section .feature-item:nth-child(5) {
    --card-primary: #fa709a;
    --card-secondary: #fee140;
}

#features-section .feature-item:nth-child(6) {
    --card-primary: #30cfd0;
    --card-secondary: #330867;
}

#features-section .feature-item:nth-child(7) {
    --card-primary: #a8edea;
    --card-secondary: #fed6e3;
}

#features-section .feature-item:nth-child(8) {
    --card-primary: #ff9a9e;
    --card-secondary: #fecfef;
}

/* ========================================
   📱 RESPONSIVE - Tablet
======================================== */

@media (max-width: 1200px) {
    #features-section .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
    
    #features-section .features-title {
        font-size: 40px;
    }
}

/* ========================================
   📱 RESPONSIVE - Mobile
======================================== */

@media (max-width: 768px) {
    #features-section .features-section {
        padding: 80px 0;
    }
    
    #features-section .features-header {
        margin-bottom: 60px;
    }
    
    #features-section .features-title {
        font-size: 32px;
    }
    
    #features-section .features-subtitle {
        font-size: 16px;
    }
    
    #features-section .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    #features-section .feature-item {
        padding: 36px 24px 24px;
         overflow: hidden;
    }
    
    
    #features-section .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }
    
    #features-section .feature-item h3 {
        font-size: 20px;
    }
    
    #features-section .feature-item p {
        font-size: 14px;
    }
    
    #features-section .feature-link {
        padding: 14px 24px;
        font-size: 14px;
    }
}

/* ========================================
   ✨ انیمیشن‌های اضافی
======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#features-section .feature-item {
    animation: fadeInUp 0.6s ease-out backwards;
}

#features-section .feature-item:nth-child(1) { animation-delay: 0.1s; }
#features-section .feature-item:nth-child(2) { animation-delay: 0.2s; }
#features-section .feature-item:nth-child(3) { animation-delay: 0.3s; }
#features-section .feature-item:nth-child(4) { animation-delay: 0.4s; }
#features-section .feature-item:nth-child(5) { animation-delay: 0.5s; }
#features-section .feature-item:nth-child(6) { animation-delay: 0.6s; }
#features-section .feature-item:nth-child(7) { animation-delay: 0.7s; }
#features-section .feature-item:nth-child(8) { animation-delay: 0.8s; }

/* ========================================
   🎯 Accessibility
======================================== */

#features-section .feature-link:focus {
    outline: 3px solid var(--card-primary);
    outline-offset: 3px;
}

#features-section .feature-item:focus-within {
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.12);
}

/* ========================================
   🌙 Smooth Scrolling
======================================== */

#features-section html {
    scroll-behavior: smooth;
}
