/* 1. استيراد خط Cairo الاحترافي */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;700;900&display=swap');

/* 2. الإعدادات العامة للمنظومة */
body, .mla-grid, .mla-modal, .mla-admin-grid, .mla-search-box-wrapper {
    font-family: 'Cairo', sans-serif !important;
    direction: rtl;
    box-sizing: border-box;
}

/* 3. تنسيق صندوق البحث */
.mla-search-box-wrapper {
    text-align: center;
    margin: 40px auto;
    width: 100%;
}

#mla-search-input {
    width: 90%;
    max-width: 550px;
    padding: 14px 25px;
    border-radius: 50px;
    border: 1px solid #ddd;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

#mla-search-input:focus {
    border-color: #ff4d6d;
    box-shadow: 0 0 15px rgba(255, 77, 109, 0.1);
}

/* 4. شبكة العرض (Grid) */
.mla-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 30px;
    padding: 20px;
}

/* 5. تصميم كروت المكرمين */
.card {
    background: #fff;
    border-radius: 25px;
    padding: 25px 15px;
    text-align: center;
    border: 1px solid #f2f2f2;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.07);
    border-color: #ff4d6d;
}

/* تثبيت الصور الدائرية للمكرمات */
.card img {
    width: 135px !important;
    height: 135px !important;
    border-radius: 50% !important;
    object-fit: cover;
    margin: 0 auto 15px;
    border: 4px solid #fff;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    transition: 0.3s ease;
}

.card:hover img {
    border-color: #ff4d6d;
}

.card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 10px 0 5px;
}

.card p {
    font-size: 13px;
    color: #666;
    margin: 0;
    font-weight: 300;
}

/* 6. تصميم كروت السنوات */
.year-card {
    border: 2px solid #ff4d6d;
    background: #fffafa;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.year-card i {
    font-size: 45px;
    color: #ff4d6d;
    margin-bottom: 15px;
}

.year-card:hover {
    background: #ff4d6d;
}

.year-card:hover h3, 
.year-card:hover i {
    color: #fff !important;
}

/* 7. النافذة المنبثقة (Modal) */
.mla-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.mla-modal-body {
    background: #fff;
    width: 95%;
    max-width: 420px;
    padding: 40px 25px;
    border-radius: 35px;
    position: relative;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.mla-profile-img {
    width: 160px !important;
    height: 160px !important;
    border-radius: 50% !important;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 5px solid #f8f8f8;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* أيقونات التواصل الاجتماعي */
.mla-social-icons {
    margin-top: 30px;
}

.mla-social-icons a {
    font-size: 26px;
    color: #333 !important;
    margin: 0 10px;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.mla-social-icons a:hover {
    color: #ff4d6d !important;
    transform: translateY(-5px) scale(1.1);
}

/* أزرار الإغلاق والعودة */
.mla-x-btn {
    position: absolute;
    top: 20px;
    left: 25px;
    font-size: 32px;
    color: #ff4d6d;
    cursor: pointer;
    line-height: 1;
}

.mla-back-btn {
    background: #222;
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
    margin-bottom: 20px;
}

.mla-back-btn:hover {
    background: #ff4d6d;
    transform: translateX(5px);
}

/* 8. التجاوب مع الجوال */
@media (max-width: 768px) {
    .mla-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
        padding: 10px;
    }
    
    .card { padding: 15px 10px; }
    
    .card img {
        width: 100px !important;
        height: 100px !important;
    }
    
    .card h3 { font-size: 14px; }
}

@media (max-width: 480px) {
    #mla-search-input { width: 85%; }
}