/*
 * أنماط الموقع الخاص بمنظمة الوردي
 * اخترنا ألوانًا داكنة مستوحاة من خلفية Discord لإضفاء طابع عصري ومريح للعين.
 */

/* إعدادات أساسية للجسم بالكامل */
body {
    background-color: #0d1117;
    color: #c9d1d9;
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    padding: 0;
    direction: rtl;
}

/* تخصيص لون الخلفية عند زيارة صفحة عالم منظمة الوردي لإضفاء طابع اجتماعي لطيف */
body.world-page {
    background-color: #dfe8ff;
    color: #222;
}

/* رأس الصفحة وشعار القناة */
/* رأس الصفحة: عرض الشعار والعنوان وأيقونات السوشيال معاً */
.header {
    background-color: #0d1117;
    border-bottom: 1px solid #30363d;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* الحاوية التي تتضمن الشعار والعنوان */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* مجموعة العنوان داخل رأس الصفحة يمكن أن تحتوي على عنوان الموقع ورسالة ترحيبية صغيرة */
.title-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* رسالة الترحيب الصغيرة تحت العنوان في رأس الصفحة */
.header-message {
    margin: 4px 0 0 0;
    /* حجم أكبر قليلاً للرسالة الترحيبية في رأس الصفحة */
    font-size: 1rem;
    color: #58a6ff;
    font-weight: 500;
}

.logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* عنوان الموقع بحجم كبير ولون أخضر مثل الأيقونة */
.site-title {
    font-size: 2.4rem;
    margin: 0;
    color: #00e676;
    font-weight: 700;
}

/* أيقونات الشبكات الاجتماعية في رأس الصفحة */
.social-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-icons a {
    font-size: 1.6rem;
    transition: transform 0.2s, opacity 0.2s;
}
.social-icons a.youtube { color: #FF0000; }
.social-icons a.facebook { color: #1877F2; }
.social-icons a.instagram { color: #E4405F; }
.social-icons a:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* الأقسام العامة */
.links-section,
.about-section,
.contact-section {
    margin: 40px auto;
    max-width: 600px;
    padding: 20px;
    background-color: #161b22;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.links-section h2,
.about-section h2,
.contact-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #58a6ff;
    font-size: 1.6rem;
}

/* أزرار الروابط الاجتماعية */
.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform 0.2s, opacity 0.2s;
}

.btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.btn.youtube {
    background-color: #FF0000;
}

.btn.facebook {
    background-color: #1877F2;
}

.btn.instagram {
    background-color: #E4405F;
}

.btn.submit {
    background-color: #2ea44f;
    align-self: flex-start;
}

/* قسم التعريف */
.about-section p {
    line-height: 1.6;
    font-size: 1rem;
}

/* قسم التواصل */
.contact-section form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* قسم الأقسام الإضافية */
.categories-section {
    margin: 40px auto;
    max-width: 800px;
    padding: 20px;
    background-color: #161b22;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.categories-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #58a6ff;
    font-size: 1.6rem;
}

/* أزرار الأقسام الجديدة */
.btn.program {
    background-color: #e67e22; /* لون برتقالي دافئ */
}

.btn.world {
    background-color: #8e44ad; /* لون بنفسجي هادئ */
}

/* أنماط صفحة عالم منظمة الوردي */
.world-container {
    margin: 40px auto;
    /* نزيد العرض الأقصى للحاوية ليتسع قسم المنشورات بشكل أفضل على الشاشات العريضة */
    max-width: 1000px;
    padding: 20px;
    background-color: #e7ebff; /* خلفية أفتح لتمييز عالم المنشورات */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* الحاوية المرنة داخل صفحة عالم منظمة الوردي التي تضع المنشورات في اليسار والنموذج في اليمين */
.world-flex {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    /* نحدد اتجاه LTR داخل هذه الحاوية لضمان ترتيب الأعمدة. سنعيد ترتيب الأقسام باستخدام خاصية order بدلاً من تغيير HTML */
    direction: ltr;
}

/* قسم الأصدقاء المتصلون */
.online-section {
    /* صندوق مخصص للأصدقاء المتصلين بخلفية فاتحة وظل بسيط */
    background-color: #f5f7ff;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.online-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1rem;
    color: #0d47a1;
    margin-bottom: 8px;
}

.online-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #00e676;
}

.online-friends {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    margin-top: 10px;
}

.online-friend {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #40c4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: bold;
}

.online-friend::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background-color: #00e676;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

/* تعديل قسم النموذج ليصبح أكثر أناقة */
.form-section {
    background-color: #f5f7ff !important;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: none !important;
    max-width: 300px;
    flex: 1;
}

.form-section textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    padding: 10px;
    resize: vertical;
    font-size: 0.9rem;
    color: #222;
    background-color: #ffffff;
}

.form-section button[type="submit"] {
    margin-top: 10px;
    background-color: #2ea44f;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-section button[type="submit"]:hover {
    background-color: #27853f;
}

/* زر أيقونة تحميل الصورة به شكل مخصص */
.image-upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: #ff7070;
    color: #fff;
    cursor: pointer;
    margin-top: 10px;
    margin-left: 0;
    font-size: 1.2rem;
}

.image-upload-label:hover {
    background-color: #e05a5a;
}

/* قسم المنشورات أكبر لعرض البطاقات */
.posts-section {
    flex: 3;
    padding-left: 20px;
}

/* تحويل المنشور إلى بطاقة بيضاء مع حواف مدورة */
.post {
    background-color: #ffffff;
    color: #222;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #222;
}

.post-content {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* صورة مرفقة مع المنشور بحجم مناسب داخل البطاقة */
.post-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* أزرار التفاعل: إعجاب وتعليق وحذف */
.post-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.like-btn, .comment-btn, .delete-btn {
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s;
}

.like-btn {
    background-color: #ffeef0;
    color: #e0245e;
}

.like-btn:hover {
    background-color: #ffd5dd;
}

.comment-btn {
    background-color: #eef3ff;
    color: #007bff;
}

.comment-btn:hover {
    background-color: #d6e4ff;
}

.delete-btn {
    background-color: #fff4e5;
    color: #f57c00;
}

.delete-btn:hover {
    background-color: #ffe2c5;
}

/* تعليقات داخل البطاقة */
.comment {
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
}

.comment:last-child {
    border-bottom: none;
}

.comment-form {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.comment-form input[type="text"] {
    flex: 1;
    padding: 6px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    font-size: 0.85rem;
}

.comment-form button {
    background-color: #2ea44f;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

.comment-form button:hover {
    background-color: #27853f;
}

/* قسم المنشورات يأخذ المساحة الأكبر في الصفحة بحيث تشغل معظم العرض */
/* نزيد من نسبة المساحة المخصصة للمنشورات حتى تبدو مشابهة لصفحة فيسبوك، خاصة على الشاشات العريضة */
/* قسم المنشورات يأخذ مساحة أكبر ويكون ذا تباعد داخلي بسيط */
.posts-section {
    flex: 3;
    display: flex;
    flex-direction: column;
    padding-left: 20px;
}

/* قسم النموذج أصغر حجماً ويوضع في اليمين */
/* قسم النموذج على اليمين يأخذ مساحة أصغر ويكون معزولاً بإطار خفيف */
/* قسم النموذج أصغر حجماً ويوضع في الجهة المقابلة لقسم المنشورات */
/* قسم النموذج صغير الحجم وبخلفية فاتحة وبدون حدود جانبية */
.form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #f5f7ff;
    padding: 15px;
    max-width: 300px;
    order: -1;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.form-section h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #58a6ff;
    text-align: right;
    /* حجم أصغر لعنوان النموذج ليبدو بسيطًا وغير بارز */
    font-size: 1.1rem;
}

.world-container h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #58a6ff;
    font-size: 1.6rem;
    text-align: center;
}

.post-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}


/* مدخلات النموذج ونصوصه داخل بطاقة النشر بخلفية بيضاء وحدود ناعمة */
.post-form input,
.post-form textarea {
    padding: 10px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background-color: #ffffff;
    color: #222;
    font-size: 0.9rem;
    font-family: inherit;
}

.post-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* حقل اختيار الصورة في نموذج المنشور */
.post-form input[type="file"] {
    padding: 8px;
    border: 1px solid #30363d;
    border-radius: 4px;
    background-color: #0d1117;
    color: #c9d1d9;
    font-size: 0.9rem;
    margin-top: 5px;
}

.post-form button {
    align-self: flex-start;
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    background-color: #2ea44f;
    color: #ffffff;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.post-form button:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* تسمية تحميل الصورة في نموذج المنشور 
   نُخفي حقل الإدخال ونستبدله بأيقونة تعرض رمز الصورة. 
   هذا يسمح للمستخدم بفهم أنه يمكنه تحميل صورة بالنقر على الأيقونة. */
.image-upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background-color: #ff7070;
    color: #ffffff;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.2s;
    margin-top: 10px;
}
.image-upload-label:hover {
    background-color: #e05a5a;
}

.posts-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* شكل بطاقة المنشور: خلفية أفتح قليلاً وحدود مدورة لتشبه بطاقات فيسبوك */
.post {
    /* تصميم المنشور كفقاعة محادثة يشبه رسائل واتساب */
    position: relative;
    background-color: #1c2129; /* لون أفتح قليلاً لتمييز الفقاعة عن الخلفية */
    border: 1px solid #30363d;
    border-radius: 16px;
    padding: 12px 16px;
    /* هامش صغير أسفل الفقاعة لترك مسافة بين المنشورات */
    margin-bottom: 10px;
}

/* ذيل الفقاعة: مثلث صغير في يمين المنشور ليبدو مثل رسالة دردشة */
.post::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -10px;
    border-width: 8px 0 8px 10px;
    border-style: solid;
    border-color: transparent transparent transparent #1c2129;
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #58a6ff;
}

/* اسم المستخدم إذا كان موثقاً أو أدمن يظهر باللون الأصفر */
.highlight-name {
    color: #FFD700 !important;
}

/* صورة المستخدم داخل رأس المنشور */
.post-header .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-content {
    margin: 0 0 10px 0;
    line-height: 1.4;
}

/* صورة مرفقة مع المنشور */
.post-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 6px;
    margin: 10px 0;
}

/* ترتيب أزرار التفاعل داخل المنشور جنبًا إلى جنب مع مسافة بسيطة */
.post-actions {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* زر الإعجاب: حجم أصغر ولون خافت، يُعرض كمجموعة من أيقونة ❤️ مع الرقم */
.like-btn {
    background-color: #444c56;
    border: none;
    color: #c9d1d9;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s;
}

.like-btn:hover {
    background-color: #30363d;
}

/* زر التعليق: يشبه زر الإعجاب في التصميم */
/* زر التعليق: مشابه لزر الإعجاب في الحجم والشكل */
.comment-btn {
    background-color: #444c56;
    border: none;
    color: #c9d1d9;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s;
}

.comment-btn:hover {
    background-color: #30363d;
}

.comments {
    margin-top: 10px;
}

.comments h4 {
    margin: 10px 0 5px 0;
    font-size: 1.1rem;
    color: #58a6ff;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.comment {
    font-size: 0.9rem;
    background-color: #161b22;
    padding: 8px;
    border-radius: 4px;
}

.comment-form {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.comment-form input {
    flex: 1 1 40%;
    padding: 6px;
    border: 1px solid #30363d;
    border-radius: 4px;
    background-color: #0d1117;
    color: #c9d1d9;
    font-size: 0.9rem;
}

.comment-form button {
    background-color: #2ea44f;
    border: none;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.comment-form button:hover {
    opacity: 0.85;
}

/* زر العودة إلى الصفحة الرئيسية */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #58a6ff;
    margin-bottom: 15px;
    text-decoration: none;
    /* تكبير حجم الأيقونة كي تكون واضحة عند عدم وجود نص */
    font-size: 1.4rem;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.back-btn:hover {
    text-decoration: none;
    background-color: #30363d;
}

/* زر حذف المنشور */
.delete-btn {
    background-color: #c62828;
    border: none;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 5px;
    transition: opacity 0.2s;
}

.delete-btn:hover {
    opacity: 0.85;
}

/* أيقونة التوثيق بجانب اسم المستخدم */
.verified-icon {
    color: #4CAF50;
    margin-right: 5px;
    font-size: 1rem;
}

.contact-section input,
.contact-section textarea {
    padding: 10px;
    border: 1px solid #30363d;
    border-radius: 4px;
    background-color: #0d1117;
    color: #c9d1d9;
    font-size: 1rem;
    font-family: inherit;
}

.contact-section input:focus,
.contact-section textarea:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 4px #58a6ff;
}

.contact-section textarea {
    resize: vertical;
    min-height: 100px;
}

.status {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #58a6ff;
}

/* تذييل الصفحة */
footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #30363d;
    color: #8b949e;
    font-size: 0.9rem;
}

/* رسالة ترحيبية في صفحة عالم منظمة الوردي */
.welcome-message {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #58a6ff;
}

/* استجابة للشاشات الصغيرة (الأجهزة المحمولة) */
@media (max-width: 768px) {
    /* نجعل الحاوية المرنة عمودية بدلاً من صفية */
    .world-flex {
        flex-direction: column;
    }
    /* اجعل كل قسم يأخذ عرض الصفحة بالكامل */
    .posts-section,
    .form-section {
        flex: 1 1 100%;
    }
    /* في الوضع العمودي نستبدل الخط الفاصل بواحد أسفل النموذج، ويختفي خط الجانب */
    .form-section {
        order: 0;
        border-right: none;
        border-bottom: 1px solid #cfd8e3;
        margin-bottom: 20px;
        background-color: #f5f7ff;
    }
}

/* ------------------------------ */
/* أنماط صفحة التسجيل وإنشاء الحساب */
/* الحاوية التي تحتوي على نموذج التسجيل */
.register-container {
    margin: 40px auto;
    max-width: 500px;
    padding: 20px;
    background-color: #161b22;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.register-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.register-container input[type="text"] {
    padding: 10px;
    border: 1px solid #30363d;
    border-radius: 4px;
    background-color: #0d1117;
    color: #c9d1d9;
    font-size: 1rem;
    font-family: inherit;
}

.avatar-selection p {
    margin: 0 0 10px 0;
    color: #58a6ff;
    font-weight: bold;
}

.avatars-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.avatar-option {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 4px;
    transition: border-color 0.2s;
}

.avatar-option.selected {
    border-color: #58a6ff;
}

.avatar-option img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
    border-radius: 50%;
}

.avatar-option input {
    display: none;
}

/* إصلاح ظهور النص داخل المنشورات */
.post {
    color: #000 !important;
}

/* تحسين مظهر الأصدقاء المتصلين */
.friend-avatar, .online-friends .friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #58a6ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin: 3px;
    overflow: hidden;
    text-transform: uppercase;
}


/* تغيير خلفية الموقع بالكامل إلى الأبيض */
body.world-page {
    background-color: #ffffff;
    color: #222;
}

/* تعديل مظهر المنشورات */
.post, .posts-section .post {
    background-color: #1faa5e !important;  /* أخضر */
    color: #ffffff !important;             /* كتابة بيضاء */
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 10px;
}

/* تحسين مظهر أسماء الأصدقاء المتصلين */
.online-friends {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 5px;
}

.friend-avatar, .online-friends .friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #58a6ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin: 3px;
    overflow: hidden;
    text-transform: uppercase;
    box-shadow: 0 0 2px #0003;
}


/* جعل الخلفية داكنة تشبه ديسكورد */
body.world-page {
    background-color: #0d1117;
    color: #c9d1d9;
}

/* تعديل شكل المنشورات لتكون خضراء بوضوح داخل الخلفية الداكنة */
.post, .posts-section .post {
    background-color: #1faa5e !important;
    color: #ffffff !important;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 10px;
}

/* إخفاء خانة الأصدقاء المتصلين */
.online-section {
    display: none !important;
}


/* تحسين التوافق مع الهاتف */
@media (max-width: 768px) {
    .world-flex {
        flex-direction: column;
    }

    .form-section, .posts-section {
        width: 100% !important;
        margin: 0 auto;
    }

    .post {
        font-size: 1rem;
    }

    .post-form textarea {
        width: 100%;
        min-height: 100px;
    }

    .header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .logo-container {
        justify-content: center;
    }

    .social-icons {
        justify-content: center;
    }
}


/* تغيير لون اسم المستخدم والتاريخ للون داكن */
.post .author-name,
.post .timestamp {
    color: #1a1a1a !important;
    font-weight: 600;
}

/* تحريك نموذج النشر إلى يسار الصفحة */
.world-flex {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    gap: 20px;
}

/* اجعل منطقة النموذج أضيق */
.form-section {
    width: 25%;
    background-color: #161b22;
    padding: 15px;
    border-radius: 12px;
    color: white;
}

/* اجعل منطقة المنشورات أوسع */
.posts-section {
    width: 70%;
}


/* ترتيب الحاويتين: المنشورات على اليسار، خانة النشر على اليمين */
.world-flex {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-top: 20px;
}

/* خانة النشر (يمين الصفحة) */
.form-section {
    width: 28%;
    background-color: #161b22;
    padding: 15px;
    border-radius: 12px;
    color: white;
    order: 2;
}

/* المنشورات (يسار الصفحة) */
.posts-section {
    width: 70%;
    order: 1;
}

/* تنسيق إضافي لخانة النشر */
.post-form textarea {
    width: 100%;
    background-color: #fff;
    color: #000;
    border-radius: 8px;
    padding: 10px;
    font-size: 1rem;
}

/* تصغير مساحة النموذج في الهاتف */
@media (max-width: 768px) {
    .world-flex {
        flex-direction: column;
    }
    .form-section, .posts-section {
        width: 100%;
        order: unset;
    }
}


/* إصلاح تجاوز النص خارج الإطار */
.post-form textarea {
    width: 100%;
    background-color: #fff;
    color: #000;
    border-radius: 8px;
    padding: 10px;
    font-size: 1rem;
    box-sizing: border-box;
    border: 1px solid #ccc;
    resize: vertical;
    overflow: auto;
}

/* ترتيب خانة رفع الصورة وزر النشر بجانب بعضهم */
.post-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-form .image-upload-label,
.post-form .submit {
    display: inline-block;
}

/* جعل زر النشر بجانب زر الصورة */
.post-form .image-upload-label + .submit {
    margin-inline-start: auto; /* يدفع زر النشر لليمين */
    display: inline-block;
    width: fit-content;
    align-self: flex-end;
}



/* ترتيب زر إضافة منشور والصورة في صف واحد */
.post-form-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

/* تحسين مظهر أيقونة الصورة */
.image-upload-label {
    background-color: #ffdddd;
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f99;
    width: 40px;
    height: 40px;
}

.image-upload-label i {
    font-size: 18px;
    color: #d33;
}

/* زر الإرسال بجانبها */
.post-form .submit {
    padding: 8px 16px;
    font-size: 1rem;
    height: 40px;
    margin: 0;
}


/* تحسين عرض المنشورات على الهاتف في النسخة المرسلة */
@media (max-width: 768px) {
    .posts-section {
        width: 100% !important;
        margin: 0 auto !important;
    }

    .form-section {
        width: 100% !important;
        margin: 10px auto !important;
    }

    .world-flex, .page-layout {
        padding: 0 10px;
    }
}
