/* ============================================
   SHARE - HOW IT WORKS
   قسم كيف يعمل - مع تحسينات الوضوح
   ============================================ */

.how-section {
    padding: 80px 0;
    background: var(--gray-50);
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* ===== البطاقة الرئيسية ===== */
.how-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--white); /* خلفية بيضاء للوضوح */
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    border: 2px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

/* تأثير عند التمرير */
.how-card:hover {
    transform: translateY(-8px);
    border-color: var(--charity-primary);
    box-shadow: var(--shadow-lg);
}

/* ===== الرقم (1, 2, 3) ===== */
.how-number {
    width: 60px;
    height: 60px;
    background: var(--charity-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    margin: 0 auto 16px;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
    transition: all 0.3s ease;
}

.how-card:hover .how-number {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(13, 148, 136, 0.4);
}

/* ===== الأيقونة ===== */
.how-icon {
    font-size: 52px;
    display: block;
    margin-bottom: 12px;
    line-height: 1;
}

/* ===== العنوان ===== */
.how-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--gray-800);
    transition: all 0.3s ease;
}

.how-card:hover h3 {
    color: var(--charity-primary);
}

/* ===== الوصف ===== */
.how-card p {
    color: var(--gray-600);
    font-size: 15px;
    line-height: 1.8;
    max-width: 280px;
    margin: 0 auto;
}

/* ============================================
   دعم RTL (العربية)
   ============================================ */
[dir="rtl"] .how-card {
    text-align: center;
}

[dir="rtl"] .how-card p {
    font-family: 'Tajawal', 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.9;
}

[dir="rtl"] .how-card h3 {
    font-family: 'Tajawal', 'Poppins', sans-serif;
    font-size: 24px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* ===== TABLET ===== */
@media (max-width: 992px) {
    .how-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .how-card {
        padding: 35px 25px;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .how-section {
        padding: 60px 0;
    }
    
    .how-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
        gap: 24px;
    }
    
    .how-card {
        padding: 30px 20px;
        border-width: 1px;
    }
    
    .how-number {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .how-icon {
        font-size: 44px;
    }
    
    .how-card h3 {
        font-size: 20px;
    }
    
    .how-card p {
        font-size: 14px;
        max-width: 100%;
    }
    
    /* ===== RTL في الموبايل ===== */
    [dir="rtl"] .how-card h3 {
        font-size: 22px;
    }
    
    [dir="rtl"] .how-card p {
        font-size: 15px;
    }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 480px) {
    .how-section {
        padding: 40px 0;
    }
    
    .how-grid {
        gap: 16px;
        max-width: 100%;
    }
    
    .how-card {
        padding: 24px 16px;
        border-radius: var(--radius-md);
    }
    
    .how-number {
        width: 44px;
        height: 44px;
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .how-icon {
        font-size: 36px;
        margin-bottom: 8px;
    }
    
    .how-card h3 {
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .how-card p {
        font-size: 13px;
        line-height: 1.7;
    }
    
    [dir="rtl"] .how-card h3 {
        font-size: 20px;
    }
    
    [dir="rtl"] .how-card p {
        font-size: 14px;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
@media (prefers-color-scheme: dark) {
    .how-card {
        background: var(--gray-800);
        border-color: rgba(255,255,255,0.08);
    }
    
    .how-card:hover {
        border-color: var(--charity-primary-light);
    }
    
    .how-card h3 {
        color: var(--white);
    }
    
    .how-card p {
        color: var(--gray-400);
    }
    
    .how-number {
        box-shadow: 0 4px 15px rgba(13, 148, 136, 0.2);
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .how-card {
        transition: none !important;
    }
    
    .how-card:hover {
        transform: none !important;
    }
    
    .how-number {
        transition: none !important;
    }
    
    .how-card:hover .how-number {
        transform: none !important;
    }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
    .how-section {
        padding: 40px 0;
        background: transparent;
    }
    
    .how-card {
        border: 1px solid #ddd;
        box-shadow: none !important;
        break-inside: avoid;
    }
    
    .how-card:hover {
        transform: none !important;
    }
}