/* ملف الأنماط الإضافية */

/* تحسينات للأداء */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    will-change: auto;
}

/* تحسين التمرير */
html {
    scroll-behavior: smooth;
}

/* تحسين الأداء للأنيميشن */
.card, .card-image, .card-action-btn, .whatsapp-float, .logo {
    will-change: transform;
}

/* --- تصميم كروت عصري وجذاب --- */
.card {
    background: rgba(255,255,255,0.25);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18), 0 1.5px 8px 0 rgba(102,126,234,0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255,255,255,0.18);
    position: relative;
    overflow: hidden;
    padding: 32px 24px 24px 24px;
    transition: all 0.2s ease-out;
    cursor: pointer;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

.card::before, .card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
    animation: floatCircle 4s ease-in-out infinite alternate;
}

.card::before {
    width: 100px;
    height: 100px;
    left: -30px;
    top: -30px;
    background: radial-gradient(circle at 30% 30%, #667eea 0%, #764ba2 100%);
    animation-delay: 0s;
}

.card::after {
    width: 70px;
    height: 70px;
    right: -25px;
    bottom: -25px;
    background: radial-gradient(circle at 70% 70%, #764ba2 0%, #667eea 100%);
    animation-delay: 1s;
}

@keyframes floatCircle {
    0% { 
        transform: translateY(0) scale(1); 
        opacity: 0.15;
    }
    100% { 
        transform: translateY(-8px) scale(1.05); 
        opacity: 0.25;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    box-shadow: 0 16px 48px 0 rgba(31, 38, 135, 0.25), 0 4px 16px 0 rgba(102,126,234,0.18);
    transform: translateY(-6px) scale(1.02);
}

.card-image {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 18px;
    border: 4px solid;
    border-image: linear-gradient(135deg, #667eea, #764ba2, #ffb347) 1;
    box-shadow: 0 4px 16px rgba(102,126,234,0.10);
    background: #fff;
    z-index: 2;
    transition: transform 0.2s ease-out;
}

.card:hover .card-image {
    transform: scale(1.05) rotate(2deg);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    z-index: 2;
    text-align: center;
    letter-spacing: 0.5px;
}

.card-description {
    color: #5f5f5f;
    line-height: 1.7;
    font-size: 1.02rem;
    margin-bottom: 18px;
    z-index: 2;
    text-align: center;
    opacity: 0.92;
    transition: opacity 0.2s ease-out;
}

.card:hover .card-description {
    opacity: 1;
}

.card-action {
    margin-top: auto;
    z-index: 2;
    display: flex;
    justify-content: center;
    width: 100%;
}

.card-action-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102,126,234,0.10);
    cursor: pointer;
    transition: all 0.2s ease-out;
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

.card-action-btn i {
    font-size: 1.1em;
    transition: transform 0.2s ease-out;
}

.card-action-btn:hover, .card-action-btn:focus {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(102,126,234,0.20);
}

.card-action-btn:hover i {
    transform: translateX(-3px);
}

/* --- تصميم الكروت المعطلة --- */
.card.disabled {
    opacity: 0.6;
    filter: grayscale(0.3);
    cursor: not-allowed;
    position: relative;
}

.card.disabled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    z-index: 3;
    pointer-events: none;
}

.card.disabled:hover {
    transform: none;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18), 0 1.5px 8px 0 rgba(102,126,234,0.10);
}

.card.disabled .card-image {
    filter: grayscale(0.4);
    opacity: 0.8;
}

.card.disabled .card-title {
    color: #6c757d;
}

.card.disabled .card-description {
    color: #8a8a8a;
    opacity: 0.7;
}

.card-disabled {
    margin-top: auto;
    z-index: 4;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 15px;
    background: rgba(108, 117, 125, 0.1);
    border-radius: 15px;
    border: 2px dashed rgba(108, 117, 125, 0.3);
    position: relative;
}

.disabled-text {
    color: #6c757d;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
    position: relative;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.disabled-text::before {
    content: '⏳';
    margin-left: 8px;
    font-size: 1.2em;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.1);
    }
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 480px) {
    .card {
        min-height: 260px;
        padding: 22px 10px 18px 10px;
    }
    .card-image {
        width: 65px;
        height: 65px;
        border-width: 3px;
    }
    .disabled-text {
        font-size: 1rem;
        padding: 6px 12px;
    }
}

/* تحسين أيقونة الواتساب */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    color: white;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: all 0.2s ease-out;
    animation: whatsappPulse 2s ease-in-out infinite;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes whatsappPulse {
    0%, 100% { 
        box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
        transform: scale(1.05);
    }
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.4);
    color: white;
    text-decoration: none;
}

/* تحسين الشعار */
.logo {
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    transition: transform 0.2s ease-out;
}

.logo:hover {
    transform: scale(1.03);
}

/* تحسين العناوين */
.section-title {
    position: relative;
    overflow: hidden;
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.4s ease-out;
}

.section-title:hover::before {
    left: 100%;
}

/* تحسينات للتابلت */
@media (min-width: 769px) and (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* تحسينات للشاشات الكبيرة */
@media (min-width: 1025px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .container {
        padding: 30px;
    }
}

/* تأثيرات التحميل */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease-out;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* تحسين إمكانية الوصول */
.card:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.whatsapp-float:focus {
    outline: 2px solid #25d366;
    outline-offset: 2px;
}

/* تحسين الطباعة */
@media print {
    .whatsapp-float {
        display: none;
    }
    
    .animated-bg {
        display: none;
    }
    
    .site-frame {
        border: none;
        box-shadow: none;
    }
}

/* تحسين الأداء للشاشات البطيئة */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .card:hover {
        transform: none !important;
    }
    
    .card-image:hover {
        transform: none !important;
    }
    
    .whatsapp-float {
        animation: none !important;
    }
    
    .disabled-text::before {
        animation: none !important;
    }
}

/* تحسين الأداء للشاشات الضعيفة */
@media (max-width: 480px) {
    .card::before, .card::after {
        display: none;
    }
    
    .card {
        transition: transform 0.15s ease-out;
    }
    
    .card:hover {
        transform: translateY(-3px) scale(1.01);
    }
} 