/* =========================================
   الإعدادات العامة والخطوط
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700;800&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: #f4f7f9; /* لون خلفية مريح للعين */
    color: #333333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    direction: rtl; /* دعم اللغة العربية من اليمين لليسار */
}

/* =========================================
   حاوية البطاقة (البادج)
========================================= */
.badge-container {
    background-color: #ffffff;
    width: 100%;
    max-width: 450px; /* قياس ممتاز للهواتف الذكية */
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    border-top: 5px solid #21a1d3; /* خط أزرق فاتح في الأعلى */
}

/* =========================================
   رأس الصفحة (الشعارات) - تصغير وضبط
========================================= */
.logos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

/* تحديد حجم الشعارات باش مايفوتوش القياس */
.logos-header .logo {
    max-height: 55px; /* ارتفاع أقصى محدد */
    width: auto;
    object-fit: contain;
}

/* نسبة العرض لكل شعار باش يبقاو متناسقين */
.school-logo {
    max-width: 55%;
}

.club-logo {
    max-width: 35%;
}

/* =========================================
   قسم المعلومات الشخصية
========================================= */
.profile-section {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
}

.profile-section h1 {
    color: #0f1c46; /* الأزرق الغامق ديال النادي */
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.role-badge {
    display: inline-block;
    background-color: #21a1d3; /* الأزرق الفاتح */
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(33, 161, 211, 0.2);
}

.profile-section h2 {
    color: #666666;
    font-size: 1.1rem;
    font-weight: 700;
}

/* =========================================
   الأقسام الداخلية (الفكرة والصور)
========================================= */
.info-section, .gallery-section {
    padding: 20px;
    border-top: 1px dashed #e0e0e0;
}

.section-title {
    color: #0f1c46;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-section p {
    line-height: 1.6;
    color: #555555;
    font-size: 0.95rem;
    text-align: justify;
}

/* =========================================
   شبكة الصور التوثيقية
========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.gallery-grid img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eeeeee;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.gallery-grid img:hover {
    transform: scale(1.05);
    border-color: #21a1d3;
}

/* =========================================
   تذييل البطاقة وزر التحميل
========================================= */
.badge-footer {
    text-align: center;
    padding: 20px;
    background-color: #0f1c46; /* الأزرق الغامق */
    color: #ffffff;
}

.badge-footer p {
    font-size: 0.8rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

.btn-download {
    background-color: #21a1d3;
    color: #ffffff;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-download:hover {
    background-color: #1a85ae;
    transform: translateY(-2px);
}

/* =========================================
   حركات خفيفة (Animations)
========================================= */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* =========================================
   تنسيق الصورة الشخصية (Avatar)
========================================= */
.profile-img-container {
    width: 110px;
    height: 110px;
    margin: 0 auto 15px auto; /* باش تجي فالوسط وتحتها مسافة */
    border-radius: 50%;
    padding: 4px; /* المسافة بين الإطار والصورة */
    background-color: #ffffff;
    box-shadow: 0 5px 15px rgba(33, 161, 211, 0.3); /* ظل خفيف باللون الأزرق الفاتح */
}

.profile-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* باش الصورة ماتعواجش */
    border-radius: 50%;
    border: 2px solid #0f1c46; /* إطار دائري باللون الأزرق الغامق ديال النادي */
}
/* =========================================
   نافذة عرض الصور (Lightbox Modal)
========================================= */
/* تغيير شكل الماوس ليدل على أن الصورة قابلة للضغط */
.gallery-grid img {
    cursor: pointer;
}

.modal {
    display: none; /* مخفية افتراضياً */
    position: fixed;
    z-index: 1000; /* باش تجي فوق كلشي */
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* خلفية داكنة شفافة */
    backdrop-filter: blur(5px); /* تأثير ضبابي احترافي للخلفية */
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease; /* حركة التكبير */
}

/* زر الإغلاق X */
.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: #21a1d3; /* يولي أزرق ملي نحطو عليه الماوس */
    text-decoration: none;
    cursor: pointer;
}

/* حركة التكبير (Animation) */
@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}
/* =========================================
   تنسيق أزرار تغيير اللغة والاتجاه
========================================= */
.lang-switcher {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.lang-switcher button {
    padding: 5px 15px;
    border: 1.5px solid #21a1d3;
    background-color: transparent;
    color: #0f1c46;
    border-radius: 20px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.lang-switcher button:hover,
.lang-switcher button.active {
    background-color: #21a1d3;
    color: #ffffff;
}

/* تنسيقات خاصة باللغات الأجنبية (من اليسار لليمين) */
body[dir="ltr"] {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: left;
}

body[dir="ltr"] .badge-container {
    direction: ltr;
}

body[dir="ltr"] .role-badge {
    /* تعديل بسيط للبادج ديال الدور باش يجي مقاد فاليسار */
    display: inline-block;
}

/* =========================================
   أزرار التنقل في نافذة الصور
========================================= */
.prev-btn, .next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 15px 20px;
    margin-top: -30px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border-radius: 50%;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1010;
    text-decoration: none;
}

/* موضع الأسهم */
.next-btn { left: 15px; } /* السهم التالي على اليسار */
.prev-btn { right: 15px; } /* السهم السابق على اليمين */

.prev-btn:hover, .next-btn:hover {
    background-color: #21a1d3; /* اللون الأزرق ديال النادي */
}

/* تصغير الأزرار في الهواتف */
@media screen and (max-width: 600px) {
    .prev-btn, .next-btn {
        font-size: 20px;
        padding: 10px 15px;
    }
    .next-btn { left: 5px; }
    .prev-btn { right: 5px; }
}