/* ==========================================================================
   START: SECTION 1 - GLOBAL FONTS & TOP BAR STRIP
   ========================================================================== */

/* --- START: GLOBAL GOOGLE FONTS (استدعاء وتطبيق خط كايرو وتأمين الواجهة) --- */
@import url('https://googleapis.com');

body, button, input, select, textarea, h1, h2, h3, h4, h5, h6, a {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f4f6f9;
    overflow-x: hidden; /* حماية تامة للشاشات من أي تمدد أفقي مكسور */
}
/* --- END: GLOBAL GOOGLE FONTS --- */


/* --- START: top_bar.php (تنسيق الشريط العلوي الأزرق المدمج بأزرار فيسبوك) --- */
.top-bar-strip {
    background-color: #3498db;
    color: #ffffff;
    padding: 8px 0;
    font-size: 14px;
    direction: rtl;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.top-bar-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}
.top-bar-right-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.top-bar-right-info span {
    font-weight: 600;
}
.top-bar-left-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.auth-buttons-facebook-style {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.fb-login-btn {
    background-color: #1877f2;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 4px;
    transition: background-color 0.2s;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.fb-login-btn:hover {
    background-color: #166fe5;
}
.fb-register-btn {
    background-color: #42b72a;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 4px;
    transition: background-color 0.2s;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.fb-register-btn:hover {
    background-color: #36a420;
}
.fb-dashboard-btn {
    background-color: #0f1c3f;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 4px;
    white-space: nowrap;
}
.search-mini-form input {
    border: 1px solid #2980b9;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    width: 160px;
    background: #2980b9;
    color: #ffffff;
    outline: none;
    text-align: right;
    transition: width 0.3s ease;
}
.search-mini-form input:focus {
    width: 190px;
}
.search-mini-form input::placeholder {
    color: #e3f2fd;
}
/* --- END: top_bar.php --- */

/* ==========================================================================
   END: SECTION 1 - GLOBAL FONTS & TOP BAR STRIP
   ========================================================================== */








/* ==========================================================================
   START: SECTION 2 - MAIN HEADER & MEGA MENU PANEL
   ========================================================================== */

/* --- START: main_header BRANDING (تنسيق الهيدر ولوجو البوابة الرئيسي) --- */
.main-portal-header {
    background: #ffffff;
    padding: 15px 0;
    border-bottom: 3px solid #0f1c3f;
    direction: rtl;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 999;
}
.header-portal-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}
.portal-branding-box h1 {
    margin: 0;
    font-size: 25px;
    color: #2c3e50;
    font-weight: 800;
}
.portal-branding-box span {
    color: #3498db;
}
.portal-nav-bar-wrapper {
    display: flex;
    align-items: center;
}
.portal-menu-links {
    list-style: none;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    align-items: center;
    flex-wrap: wrap;
}
.portal-menu-links > li > a {
    color: #333333;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    padding: 8px 14px;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.portal-menu-links > li > a:hover, .active-link {
    color: #ffffff !important;
    background-color: #3498db;
}
/* --- END: main_header BRANDING --- */


/* --- START: MEGA MENU GRID (هندسة وتوزيع قوائم الـ Mega Menu والفرز) --- */
.mega-dropdown-item {
    position: static;
}
.mega-menu-panel {
    display: none;
    position: absolute;
    right: 0;
    left: 0;
    top: auto;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    padding: 30px 0;
    z-index: 999;
    border-top: 4px solid #3498db;
    border-bottom: 1px solid #e2e8f0;
}
.mega-dropdown-item:hover .mega-menu-panel {
    display: block;
}
.mega-menu-columns-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 25px;
}
.mega-column-box {
    direction: rtl;
    border-left: 1px dashed #e2e8f0;
    padding-left: 15px;
}
.mega-column-box:last-child {
    border-left: none;
}
.mega-column-box h4 {
    color: #0f1c3f;
    font-size: 18px;
    margin: 0 0 18px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    font-weight: 800;
}
.mega-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mega-links-list li {
    margin-bottom: 14px;
}
.mega-links-list li a {
    color: #4a5568 !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}
.mega-links-list li a:hover {
    background-color: #f7fafc;
    color: #3498db !important;
    padding-right: 12px;
}
.link-icon-arrow {
    font-size: 13px;
    color: #a0aec0;
}
/* --- END: MEGA MENU GRID --- */

/* ==========================================================================
   END: SECTION 2 - MAIN HEADER & MEGA MENU PANEL
   ========================================================================== */















/* ==========================================================================
   START: SECTION 3 - NEWS TICKER & MAIN FULL PORTAL SLIDER
   ========================================================================== */

/* --- START: news_ticker.php (تنسيق شريط الأخبار الرمادي وال badge الأزرق) --- */
.news-ticker-strip {
    display: flex;
    background-color: #f0f2f5;
    color: #333333;
    direction: rtl;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    max-width: 1200px;
    margin: 15px auto;
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}
.ticker-badge-title {
    background-color: #3498db;
    padding: 12px 25px;
    white-space: nowrap;
    border-left: 1px solid #2980b9;
    color: #ffffff;
}
.ticker-content-flow {
    flex-grow: 1;
    display: flex;
    align-items: center;
    padding: 0 20px;
    overflow: hidden;
}
.ticker-content-flow marquee {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
}
/* --- END: news_ticker.php --- */


/* --- START: main_slider.php (تنسيق وتدوير السلايدر العريض ومنع تراكم العناوين) --- */
.main-full-slider-wrapper {
    width: 100%;
    height: 480px;
    position: relative;
    overflow: hidden;
    background-color: #2c3e50;
}
.slider-image-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
    z-index: 1;
}
.slider-image-slide.active-slide {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}
.slider-image-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slider-caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(15, 28, 63, 0.9));
    color: #ffffff;
    padding: 60px 10% 30px 10%;
    text-align: center;
    direction: rtl;
    z-index: 3;
}
.slider-caption-overlay h2 {
    margin: 0 0 12px 0;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}
.slider-caption-overlay p {
    margin: 0;
    font-size: 18px;
    color: #f1c40f;
    font-weight: 600;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}
/* --- END: main_slider.php --- */

/* ==========================================================================
   END: SECTION 3 - NEWS TICKER & MAIN FULL PORTAL SLIDER
   ========================================================================== */
















/* ==========================================================================
   START: SECTION 4 - POST BOX & INPUT MODAL
   ========================================================================== */

/* --- START: post_box.php (تنسيق صندوق النشر الفيس بوكي "بم تفكر؟") --- */
.fb-post-box-container {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 15px;
    max-width: 1200px;
    margin: 20px auto;
    direction: rtl;
    width: 100%;
    box-sizing: border-box;
}
.post-box-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-avatar-circle img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}
.trigger-input-area {
    background-color: #f0f2f5;
    flex-grow: 1;
    padding: 11px 20px;
    border-radius: 25px;
    cursor: pointer;
    color: #65676b;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s;
    text-align: right;
}
.trigger-input-area:hover {
    background-color: #e4e6eb;
}
.post-box-divider {
    height: 1px;
    background-color: #e4e6eb;
    margin: 12px 0;
}
.post-box-actions-strip {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.action-item-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.action-item-btn:hover {
    background-color: #f2f2f2;
}
.action-icon { font-size: 18px; }
.action-text { font-size: 14px; font-weight: bold; color: #65676b; }
.text-red { color: #f02849; }
.text-green { color: #45bd62; }
.text-pink { color: #f3425f; }
.text-orange { color: #e67e22; }
.text-blue { color: #1877f2; }
/* --- END: post_box.php --- */


/* --- START: POST MODAL SCREEN (تنسيق النافذة المنبثقة التفاعلية الكبرى للنشر) --- */
.fb-modal-wrapper {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-content-card {
    background: #ffffff;
    width: 100%;
    max-width: 550px;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.15);
    overflow: hidden;
    animation: fadeInModal 0.3s ease-out;
}
.modal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e4e6eb;
}
.modal-card-header h3 { margin: 0; font-size: 18px; color: #0f1c3f; }
.close-modal-btn { font-size: 24px; cursor: pointer; color: #65676b; }
.modal-card-body { padding: 20px; }
.modal-textarea-holder {
    width: 100%;
    border: none;
    resize: none;
    font-size: 16px;
    outline: none;
    font-family: inherit;
    text-align: right;
}
.modal-upload-zone {
    margin-top: 15px;
    background: #f7fafc;
    border: 1px dashed #cbd5e0;
    padding: 15px;
    border-radius: 6px;
    direction: rtl;
}
.modal-upload-zone label { display: block; font-weight: bold; margin-bottom: 8px; font-size: 13px; color: #4a5568; text-align: right; }
.modal-file-input, .modal-text-input { width: 100%; box-sizing: border-box; }
.modal-text-input { padding: 8px; border: 1px solid #cbd5e0; border-radius: 4px; outline: none; text-align: right; }
.modal-card-footer { padding: 15px 20px; border-top: 1px solid #e4e6eb; }
.btn-fb-submit-post {
    background: #1877f2; color: white; border: none; width: 100%;
    padding: 12px; font-size: 16px; font-weight: bold; border-radius: 6px;
    cursor: pointer; transition: background 0.2s;
}
.btn-fb-submit-post:hover { background: #166fe5; }
@keyframes fadeInModal { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
/* --- END: POST MODAL SCREEN --- */

/* ==========================================================================
   END: SECTION 4 - POST BOX & INPUT MODAL
   ========================================================================== */













/* ==========================================================================
   START: SECTION 5 - POST CARD TIMELINE & OPTIONS DROPDOWN
   ========================================================================== */

/* --- START: MODERN FB_POST_CARD (تنسيق بطاقات البوستات بالعرض الجديد 750px) --- */
.fb-single-post-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e4e6eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 20px;
    max-width: 750px;
    margin: 25px auto;
    direction: rtl;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}
.card-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}
.header-right-side {
    display: flex;
    align-items: center;
    gap: 12px;
}
.publisher-avatar {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 1px solid #e4e6eb;
}
.publisher-info-meta h4 {
    margin: 0 0 3px 0;
    font-size: 16px;
    color: #050505;
    font-weight: 700;
}
.publisher-info-meta span {
    font-size: 12px;
    color: #65676b;
    display: block;
}

/* تثبيت لوحة خيارات الـ 3 نقاط أعلى اليسار وقائمة فيسبوك المنسدلة */
.post-options-dropdown {
    position: absolute;
    left: 20px;
    top: 20px;
    z-index: 10;
}
.three-dots-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #65676b;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    outline: none;
}
.three-dots-btn:hover {
    background-color: #f2f2f2;
    color: #050505;
}
.dropdown-options-panel {
    display: none;
    position: absolute;
    left: 0;
    top: 110%;
    background: #ffffff;
    min-width: 250px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 6px 0;
    z-index: 9999;
    border: 1px solid #e4e6eb;
    text-align: right;
}
.dropdown-options-panel button {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 10px 16px;
    text-align: right;
    color: #050505;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    outline: none;
}
.dropdown-options-panel button:hover {
    background-color: #f2f2f2;
}
.dropdown-divider-line {
    height: 1px;
    background-color: #e4e6eb;
    margin: 6px 0;
}
.dropdown-section-title {
    font-size: 12px;
    color: #65676b;
    padding: 6px 16px 4px 16px;
    font-weight: bold;
    background-color: #f7fafc;
    margin-bottom: 4px;
}

/* ==========================================================================
   END: SECTION 5 - POST CARD TIMELINE & OPTIONS DROPDOWN
   ========================================================================== */



















/* ==========================================================================
   START: SECTION 5 - POST CARD TIMELINE & OPTIONS DROPDOWN
   ========================================================================== */

/* --- START: MODERN FB_POST_CARD (تنسيق بطاقات البوستات بالعرض الجديد 750px) --- */
.fb-single-post-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e4e6eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 20px;
    max-width: 750px;
    margin: 25px auto;
    direction: rtl;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}
.card-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}
.header-right-side {
    display: flex;
    align-items: center;
    gap: 12px;
}
.publisher-avatar {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 1px solid #e4e6eb;
}
.publisher-info-meta h4 {
    margin: 0 0 3px 0;
    font-size: 16px;
    color: #050505;
    font-weight: 700;
}
.publisher-info-meta span {
    font-size: 12px;
    color: #65676b;
    display: block;
}

/* تثبيت لوحة خيارات الـ 3 نقاط أعلى اليسار وقائمة فيسبوك المنسدلة */
.post-options-dropdown {
    position: absolute;
    left: 20px;
    top: 20px;
    z-index: 10;
}
.three-dots-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #65676b;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    outline: none;
}
.three-dots-btn:hover {
    background-color: #f2f2f2;
    color: #050505;
}
.dropdown-options-panel {
    display: none;
    position: absolute;
    left: 0;
    top: 110%;
    background: #ffffff;
    min-width: 250px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 6px 0;
    z-index: 9999;
    border: 1px solid #e4e6eb;
    text-align: right;
}
.dropdown-options-panel button {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 10px 16px;
    text-align: right;
    color: #050505;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    outline: none;
}
.dropdown-options-panel button:hover {
    background-color: #f2f2f2;
}
.dropdown-divider-line {
    height: 1px;
    background-color: #e4e6eb;
    margin: 6px 0;
}
.dropdown-section-title {
    font-size: 12px;
    color: #65676b;
    padding: 6px 16px 4px 16px;
    font-weight: bold;
    background-color: #f7fafc;
    margin-bottom: 4px;
}

/* ==========================================================================
   END: SECTION 5 - POST CARD TIMELINE & OPTIONS DROPDOWN
   ========================================================================== */


















/* ==========================================================================
   START: SECTION 6 - POST CARD BODY, ACTIONS & COMMENTS ROW
   ========================================================================== */

.card-post-body-text {
    font-size: 16px;
    color: #050505;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: right;
}
.card-post-media-attachment {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f2f5;
    margin-bottom: 12px;
    border: 1px solid #f0f2f5;
}
.card-post-media-attachment img, .card-post-media-attachment video {
    width: 100%;
    max-height: 450px;
    display: block;
    object-fit: contain;
}
.card-post-stats-counter {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #65676b;
    padding: 8px 5px;
    border-bottom: 1px solid #e4e6eb;
}
.card-post-interactions-actions {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}
.interaction-action-btn {
    background: none;
    border: none;
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
    color: #65676b;
}
.interaction-action-btn:hover {
    background-color: #f2f2f2;
}
.interaction-action-btn .action-label {
    font-size: 14px;
    font-weight: 600;
}
.interaction-action-btn:hover .action-label { color: #050505; }

.card-post-comments-area-wrapper {
    margin-top: 12px;
    background-color: #f0f2f5;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.single-comment-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    direction: rtl;
}
.commenter-mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}
.comment-bubble-box {
    background-color: #ffffff;
    padding: 10px 15px;
    border-radius: 14px;
    max-width: 85%;
    position: relative;
    text-align: right;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.comment-bubble-box h5 {
    margin: 0 0 4px 0;
    font-size: 13px;
    color: #0f1c3f;
    font-weight: bold;
}
.comment-bubble-box p {
    margin: 0;
    font-size: 13px;
    color: #1c1e21;
    line-height: 1.4;
}
.comment-time-stamp {
    font-size: 10px;
    color: #90a4ae;
    display: block;
    margin-top: 4px;
    text-align: left;
}
.add-new-comment-form-holder {
    display: flex;
    align-items: center;
    margin-top: 5px;
    width: 100%;
}

/* ==========================================================================
   END: SECTION 6 - POST CARD BODY, ACTIONS & COMMENTS ROW
   ========================================================================== */













/* ==========================================================================
   START: SECTION 7 - COMMENT FIELDS & PORTAL FOOTER STYLING
   ========================================================================== */

.input-comment-text-field {
    flex-grow: 1;
    border: 1px solid #cbd5e0;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    text-align: right;
    background: #ffffff;
    box-sizing: border-box;
}
.input-comment-text-field:focus {
    border-color: #1877f2;
}
.btn-submit-comment-send {
    background-color: #1877f2;
    color: #ffffff;
    border: none;
    padding: 7px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.btn-submit-comment-send:hover {
    background-color: #166fe5;
}
.comment-login-prompt-msg {
    text-align: center;
    font-size: 12px;
    color: #7f8c8d;
    padding: 5px 0;
}
/* --- END: MODERN FB_POST_CARD --- */


/* --- START: footer.php (تنسيق الفوتر القياسي العام المدمج بالخريطة) --- */
.site-portal-footer {
    background-color: #0f1c3f;
    color: #ffffff;
    padding: 40px 0 20px 0;
    margin-top: 50px;
    direction: rtl;
    width: 100%;
    box-sizing: border-box;
}
.footer-portal-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}
.footer-info-brand-box {
    flex: 1;
    min-width: 280px;
}
.footer-info-brand-box h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #3498db;
}
.footer-info-brand-box p {
    margin: 0 0 15px 0;
    color: #ecf0f1;
    font-size: 14px;
    line-height: 1.6;
}
.footer-info-brand-box small {
    color: #bdc3c7;
    font-size: 12px;
}
.footer-map-embed-box {
    flex: 1;
    min-width: 280px;
    max-width: 500px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.footer-map-embed-box iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.footer-bottom-copyright-strip {
    text-align: center;
    border-top: 1px solid #1a2d5a;
    margin-top: 30px;
    padding-top: 20px;
    font-size: 13px;
    color: #bdc3c7;
}
/* --- END: footer.php --- */

/* ==========================================================================
   END: SECTION 7 - COMMENT FIELDS & PORTAL FOOTER STYLING
   ========================================================================== */


















/* ==========================================================================
   START: SECTION 8 - THREE-COLUMN LAYOUT & RIGHT SIDEBAR
   ========================================================================== */

/* --- START: MAIN GRID CONTAINER (تحديث الحاوية بالتثبيت الذكي والقائمة اليسرى المقلصة) --- */
.portal-main-layout-grid {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    margin: 10px 0 40px 0;
    padding: 0 30px;
    gap: 25px;
    direction: rtl;
    box-sizing: border-box;
    align-items: flex-start; /* تمكين ميزة الـ Sticky بنجاح للقوائم الجانبية */
}

/* عمود المنتصف يحافظ على عرضه لراحة العين وتوسيط البوستات */
.portal-center-content-column {
    flex: 1;
    max-width: 750px;
    min-width: 0;
}

/* [تعديل التثبيت الاحترافي]: جعل القائمة اليمنى تلتصق تماماً تحت الهيدر العلوي بكامل الشاشة */
.portal-right-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: -webkit-sticky;
    position: sticky;
    top: 20px; /* المسافة الثابتة المريحة تحت الهيدر مع التمرير لأسفل */
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* [تم التعديل والتصغير بنسبة 20%]: جعل القائمة اليسرى تلتصق تماماً وعرضها مقلص هندسياً */
.portal-left-sidebar {
    width: 240px; /* خفض العرض الكلي من 300px إلى 240px لتوسعة الحائط */
    flex-shrink: 0;
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* تجميل شكل الأشرطة الجانبية الملتصقة */
.sidebar-sticky-wrapper {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e4e6eb;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    width: 100%;
}

/* إخفاء شريط التمرير الافتراضي للقوائم الجانبية الثابتة لإعطاء مظهر نظيف */
.portal-right-sidebar::-webkit-scrollbar,
.portal-left-sidebar::-webkit-scrollbar {
    width: 4px;
}
.portal-right-sidebar::-webkit-scrollbar-thumb,
.portal-left-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}
/* --- END: MAIN GRID CONTAINER --- */


/* --- START: RIGHT SIDEBAR USER & LINKS (تنسيق تفاصيل قائمة الأفراد اليمنى) --- */
.sidebar-user-card-meta {
    background: #f0f2f5;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-right: 4px solid #1877f2;
}
.user-meta-name {
    margin: 0 0 2px 0;
    font-size: 15px;
    color: #050505;
    font-weight: 700;
}
.user-meta-role {
    font-size: 11px;
    color: #65676b;
    display: block;
}
.sidebar-modern-ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-link-row {
    display: block;
    color: #050505;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 6px;
    transition: background 0.2s;
    margin-bottom: 4px;
}

/* ==========================================================================
   END: SECTION 8 - THREE-COLUMN LAYOUT & RIGHT SIDEBAR
   ========================================================================== */

















/* ==========================================================================
   START: SECTION 9 - SIDEBAR MENUS, LOGOUT & ONLINE USERS
   ========================================================================== */

.sidebar-link-row:hover, .active-sidebar-row {
    background-color: #f2f2f2;
    color: #1877f2 !important;
}
.sidebar-menu-divider {
    height: 1px;
    background-color: #e4e6eb;
    margin: 12px 0;
}
.sidebar-logout-footer-wrapper {
    margin-top: 20px;
    border-top: 1px solid #e4e6eb;
    padding-top: 12px;
}
.sidebar-logout-btn-modern {
    display: block;
    width: 100%;
    background-color: #f8d7da;
    color: #b71c1c !important;
    text-decoration: none;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s;
}
.sidebar-logout-btn-modern:hover {
    background-color: #f5c2c7;
}
/* --- END: RIGHT SIDEBAR USER & LINKS --- */


/* --- START: LEFT SIDEBAR ONLINE USERS (تنسيق قائمة الأعضاء النشطين يساراً) --- */
.sidebar-section-title {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: #65676b;
    font-weight: 700;
}
.sidebar-active-users-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.active-user-row-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    cursor: pointer;
    margin-bottom: 5px;
}
.active-user-row-item:hover {
    background-color: #f2f2f2;
}
.avatar-status-container {
    position: relative;
    display: inline-block;
}

/* ==========================================================================
   END: SECTION 9 - SIDEBAR MENUS, LOGOUT & ONLINE USERS
   ========================================================================== */
















/* ==========================================================================
   START: SECTION 10 - SOCIAL EVENTS & RESPONSIVE LAYOUT
   ========================================================================== */

.active-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
/* النقطة الخضراء المتوهجة المتطابقة مع مظهر المتصلين في فيسبوك */
.online-dot-badge {
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    background-color: #31a24c;
    border: 2px solid #ffffff;
    border-radius: 50%;
}
.active-user-meta-data h5 {
    margin: 0 0 1px 0;
    font-size: 13px;
    color: #050505;
    font-weight: 600;
}
.active-user-meta-data span {
    font-size: 11px;
    color: #65676b;
    display: block;
}

/* تنسيق ويدجيت المناسبات الاجتماعية والفعاليات للقرية */
.event-mini-card-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f7fafc;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e4e6eb;
}
.event-date-badge {
    background: #ffffff;
    border: 1px solid #e4e6eb;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 55px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.event-month {
    background: #e74c3c;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    width: 100%;
    text-align: center;
    padding: 2px 0;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
.event-day {
    font-size: 18px;
    font-weight: 800;
    color: #2c3e50;
    padding: 2px 0;
}
.event-details-text h5 {
    margin: 0 0 2px 0;
    font-size: 13px;
    color: #050505;
    font-weight: 700;
}
.event-details-text p {
    margin: 0;
    font-size: 11px;
    color: #65676b;
}
/* --- END: LEFT SIDEBAR ONLINE USERS --- */


/* ==========================================================================
   🚨 قواعد التجاوب الشاملة للموبايل والأجهزة اللوحية (Responsive Grid)
   ========================================================================== */

/* أ. عند تصفح البوابة من شاشات التابلت والأجهزة اللوحية (أقل من 1100px) */
@media (max-width: 1100px) {
    .portal-main-layout-grid {
        padding: 0 15px;
        gap: 15px;
    }
    /* إخفاء القائمة اليسرى المقلصة تلقائياً لتوفير المساحة للحائط والأعضاء */
    .portal-left-sidebar {
        display: none !important;
    }
}

/* ب. عند تصفح البوابة من شاشات الموبايل والهواتف الذكية (أقل من 768px) */
@media (max-width: 768px) {
    /* شريط التوب بار الهيدر العلوي للموبايل */
    .top-bar-container {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .top-bar-right-info, .top-bar-left-actions, .auth-buttons-facebook-style {
        justify-content: center;
        width: 100%;
    }
    .search-mini-form input {
        width: 100%;
        min-width: 200px;
    }

    /* هيدر اللوجو والقوائم للموبايل */
    .header-portal-container {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .portal-menu-links {
        justify-content: center;
        gap: 5px;
    }
    .portal-menu-links > li > a {
        font-size: 14px;
        padding: 6px 10px;
    }
    /* إخفاء الميجا منيو المعقدة في شاشات الموبايل لمنع تداخل الشاشة */
    .mega-menu-panel {
        display: none !important;
    }

    /* تحويل تخطيط الموقع كاملاً إلى عمود رأسي منظم ومتسق */
    .portal-main-layout-grid {
        flex-direction: column;
        margin-top: 10px;
        padding: 0 10px;
    }

    /* إلغاء ثبات القائمة اليمنى وجعلها مرنة بكامل العرض أعلى الحائط */
    .portal-right-sidebar {
        width: 100% !important;
        position: static !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .portal-center-content-column {
        width: 100%;
        max-width: 100%;
    }

    /* سلايدر الأخبار العريض وشريط الأخبار */
    .news-ticker-strip {
        flex-direction: column;
        border-radius: 4px;
        margin: 10px auto;
    }
    .ticker-badge-title {
        text-align: center;
        padding: 8px;
        border-left: none;
        border-bottom: 1px solid #2980b9;
    }
    .main-full-slider-wrapper {
        height: 250px; /* تقليص ارتفاع السلايدر لراحة العين في الموبايل */
    }
    .slider-caption-overlay h2 {
        font-size: 20px;
    }
    .slider-caption-overlay p {
        font-size: 14px;
    }

    /* بطاقات البوستات وصندوق النشر في الموبايل */
    .fb-single-post-card, .fb-post-box-container {
        padding: 12px;
        margin: 15px auto;
        border-radius: 6px;
    }
    .card-post-body-text {
        font-size: 15px;
    }
    .interaction-action-btn .action-label {
        font-size: 12px;
    }
    .comment-bubble-box {
        max-width: 90%;
    }
    .fb-modal-wrapper {
        padding: 10px;
    }
}

/* ==========================================================================
   END: SECTION 10 - SOCIAL EVENTS & RESPONSIVE LAYOUT
   ========================================================================== */
