/* خط Noto Sans Arabic المطابق للمدونة */
@font-face {
  font-family: 'Noto Sans Arabic';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  src: url(https://fonts.gstatic.com/s/notosansarabic/v33/nwpCtLGrOAZMl5nJ_wfgRg3DrWFZWsnVBJ_sS6tlqHHFlj4wv4rqwTLJljGnAQ.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans Arabic', Tahoma, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.65;
    background-color: #ffffff;
    background-image: url("https://file.mexat.org/uploads/176440416130461.png");
    color: #222222;
    margin: 0;
    padding: 5px;
}

a {
    color: #111111;
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: #c65202;
}

/* حاوية الصفحة الرئيسية المطابقة لتخطيط المدونة (#page) */
#page {
    max-width: 1200px;
    margin: 5px auto;
    border: 1px solid #E6E9ED;
    border-radius: 7px;
    padding: 12px;
    background: #ffffff;
}

/* الهيدر وشريط القائمة */
.site-header {
    background: #282828;
    border-radius: 7px;
    margin-bottom: 10px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.custom-logo {
    max-width: 260px;
    max-height: 85px;
    height: auto;
    display: block;
}

/* مربع البحث في الهيدر */
.search-form {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #444444;
}

.search-form input[type="text"] {
    border: none;
    padding: 7px 12px;
    font-family: inherit;
    font-size: 13px;
    width: 230px;
    outline: none;
}

.search-form button {
    background: #c65202;
    color: #ffffff;
    border: none;
    padding: 7px 15px;
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-form button:hover {
    background: #a34200;
}

#site-navigation {
    background: #c65202;
    padding: 5px 10px;
    border-bottom-right-radius: 7px;
    border-bottom-left-radius: 7px;
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

#site-navigation a {
    color: #ffffff !important;
    font-weight: bold;
    font-size: 14px;
    padding: 3px 6px;
    border-radius: 4px;
}

#site-navigation a:hover {
    background-color: rgba(0, 0, 0, 0.18);
}

#site-navigation a.admin-link {
    background-color: #282828;
    padding: 3px 10px;
}

.badge {
    background-color: #282828;
    color: #ffffff;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    margin-right: 4px;
}

/* الشريط الأصفر المقوس للعضوية والدخول السريع */
.user-yellow-bar {
    background-color: #fef9c3;
    border: 1px solid #facc15;
    border-radius: 7px;
    padding: 9px 15px;
    margin-bottom: 16px;
    font-size: 13px;
}

.user-bar-logged,
.user-bar-guest {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.user-bar-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-bar-links a {
    font-weight: bold;
    color: #1e293b;
}

.user-bar-links a:hover {
    color: #c65202;
}

.quick-login-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-login-form input {
    padding: 4px 9px;
    border: 1px solid #d97706;
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
    background: #ffffff;
    width: 145px;
}

.quick-login-form input:focus {
    outline: none;
    border-color: #c65202;
}

/* الصناديق والجداول الكلاسيكية بلمسة المدونة */
.box {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 7px;
    margin-bottom: 16px;
    overflow: hidden;
}

.box-header {
    background-color: #282828;
    color: #ffffff;
    padding: 9px 15px;
    font-weight: bold;
    font-size: 15px;
    border-bottom: 3px solid #c65202;
}

.box-body {
    padding: 16px;
}

.forum-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.forum-table th {
    background-color: #f8f9fa;
    color: #282828;
    padding: 9px 12px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
    font-weight: bold;
}

.forum-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #eeeeee;
    vertical-align: middle;
}

.forum-table tr:last-child td {
    border-bottom: none;
}

.forum-table tr:hover td {
    background-color: #fafafa;
}

/* توحيد شكل بطاقة العضو والرتب */
.user-rank {
    font-weight: bold;
    font-size: 12px;
    display: inline-block;
    margin-top: 2px;
}

.post-row {
    display: flex;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 7px;
    margin-bottom: 14px;
    overflow: hidden;
}

.post-author-card {
    width: 195px;
    min-width: 195px;
    background-color: #f9f9f9;
    border-left: 1px solid #eeeeee;
    padding: 14px 10px;
    text-align: center;
}

.author-name {
    font-size: 15px;
    font-weight: bold;
    display: block;
    margin-bottom: 3px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: #ffffff;
    margin: 8px auto;
    display: block;
}

.author-meta {
    font-size: 12px;
    color: #555555;
    margin-top: 8px;
    text-align: right;
    border-top: 1px dashed #dddddd;
    padding-top: 8px;
}

.post-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-topbar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eeeeee;
    padding: 6px 14px;
    font-size: 12px;
    color: #777777;
    display: flex;
    justify-content: space-between;
}

.post-content {
    padding: 16px;
    font-size: 14px;
    line-height: 1.8;
    color: #222222;
    word-wrap: break-word;
    font-weight: bold;
}

.post-actions {
    border-top: 1px solid #eeeeee;
    padding: 7px 14px;
    background-color: #fcfcfc;
    text-align: left;
}

/* الاقتباس */
.post-quote {
    background-color: #f9f9f9;
    border-right: 3px solid #c65202;
    border-top: 1px solid #eeeeee;
    border-bottom: 1px solid #eeeeee;
    border-left: 1px solid #eeeeee;
    border-radius: 4px;
    padding: 9px 12px;
    margin: 10px 0;
    font-size: 13px;
}

.quote-author {
    color: #555555;
    margin-bottom: 4px;
    border-bottom: 1px dotted #dddddd;
    padding-bottom: 3px;
}

/* النماذج والأزرار */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333333;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
    background-color: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: #c65202;
    box-shadow: 0 0 4px rgba(198, 82, 2, 0.2);
}

.btn {
    display: inline-block;
    background-color: #c65202;
    color: #ffffff !important;
    border: none;
    border-radius: 5px;
    padding: 8px 18px;
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: #a34200;
}

.btn-green {
    background-color: #00A100;
}

.btn-green:hover {
    background-color: #008200;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-secondary {
    background-color: #eeeeee;
    color: #333333 !important;
}

.btn-secondary:hover {
    background-color: #dddddd;
}

.alert {
    padding: 10px 14px;
    margin-bottom: 14px;
    border-radius: 5px;
    font-weight: bold;
}

.alert-error {
    background-color: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
}

.alert-success {
    background-color: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #276749;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

/* التذييل */
.custom-footer-info {
    text-align: center;
    padding: 16px 0 6px 0;
    margin-top: 25px;
    border-top: 1px solid #eeeeee;
    color: #000000;
    font-size: 13px;
}

.custom-footer-info a {
    color: #000000 !important;
    font-weight: bold;
}

.custom-footer-info a:hover {
    text-decoration: underline;
}

/* تجاوب الجوال */
@media (max-width: 768px) {
    #page {
        padding: 8px;
    }
    .header-top {
        justify-content: center;
        text-align: center;
    }
    .search-form input[type="text"] {
        width: 180px;
    }
    .quick-login-form input {
        width: 120px;
    }
    .post-row {
        flex-direction: column;
    }
    .post-author-card {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid #eeeeee;
        text-align: right;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .author-avatar {
        width: 48px;
        height: 48px;
        margin: 0;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* تنسيق الفوتر وأيقونات التواصل */
.mexat-forum-footer {
    text-align: center;
    padding: 0 15px 15px;
    margin-top: 0;
}

.mexat-forum-footer .social-icons-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 0 8px;
    margin: 0;
    flex-wrap: wrap;
}

.mexat-forum-footer .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff !important;
    background-color: #333333;
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.25s, transform 0.25s;
}

.mexat-forum-footer .social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.mexat-forum-footer .social-icon.facebook:hover { background-color: #3b5998; }
.mexat-forum-footer .social-icon.twitter:hover,
.mexat-forum-footer .social-icon.threads:hover { background-color: #000000; }
.mexat-forum-footer .social-icon.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.mexat-forum-footer .social-icon.pinterest:hover { background-color: #bd081c; }
.mexat-forum-footer .social-icon.tumblr:hover { background-color: #35465c; }
.mexat-forum-footer .social-icon.bsky:hover { background-color: #2785ff; }
.mexat-forum-footer .social-icon.rss:hover { background-color: #f26522; }

.mexat-forum-footer .custom-footer-info p {
    margin: 0;
    line-height: 1.8;
    font-size: 13.5px;
    color: #333333;
}

.mexat-forum-footer .custom-footer-info a {
    color: #222222;
    font-weight: bold;
    text-decoration: none;
}

.mexat-forum-footer .custom-footer-info a:hover {
    color: #d95300;
}
/* إلغاء أي حدود أو مسافات موروثة من القالب على الفوتر والحقوق */
footer.mexat-forum-footer,
.mexat-forum-footer .site-info,
.mexat-forum-footer .custom-footer-info {
    border: none !important;
    border-top: none !important;
    box-shadow: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    background: transparent !important;
}

.mexat-forum-footer {
    padding: 5px 5px 5px !important;
}

.mexat-forum-footer .social-icons-footer {
    padding: 0 0 5px 0 !important;
    margin: 0 !important;
}

.mexat-forum-footer .custom-footer-info p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.75 !important;
}
/* تنسيق أيقونة القسم وإطارها */
.forum-info-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.forum-icon-box {
    width: 55px;
    height: 55px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.forum-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.forum-icon-box i {
    font-size: 18px;
    color: #c65202;
}
/* شريط أيقونات الرسائل الخاصة والأوسمة تحت الصورة الرمزية */
.author-quick-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 8px 0 4px;
    position: relative;
}

.author-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #c65202;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    transition: background 0.15s;
}

.author-icon-btn:hover {
    background: #ffedd5;
    color: #9a3412;
}

.author-icon-btn .medal-badge-count {
    position: absolute;
    top: -5px;
    left: -5px;
    background: #c65202;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 0 4px;
    border-radius: 8px;
    line-height: 14px;
}

.medals-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.medals-dropdown-menu {
    display: none;
    position: absolute;
    top: 34px;
    right: 50%;
    transform: translateX(50%);
    width: 215px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    padding: 8px;
    z-index: 99;
    text-align: right;
}

.medals-dropdown-menu.open {
    display: block;
}

.medal-mini-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border-bottom: 1px dashed #eeeeee;
    font-size: 12px;
}

.medal-mini-item:last-of-type {
    border-bottom: none;
}

.medal-mini-item img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

.medals-dropdown-footer {
    display: block;
    text-align: center;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #e5e7eb;
    font-size: 11px;
    font-weight: bold;
    color: #c65202;
    text-decoration: none;
}
/* القوائم الفرعية المنسدلة في النافبار */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-toggle {
    background: none;
    border: 0;
    color: #ffffff;
    font-family: inherit;
    font-weight: bold;
    font-size: 14px;
    padding: 3px 6px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.15s ease;
}

.nav-dropdown-toggle:hover {
    background-color: rgba(0, 0, 0, 0.18);
}

.nav-dropdown.open .nav-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 175px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    padding: 5px 0;
    z-index: 999;
    flex-direction: column;
}

.nav-dropdown.open .nav-dropdown-menu {
    display: flex;
}

#site-navigation .nav-dropdown-menu a {
    color: #222222 !important;
    font-weight: normal;
    font-size: 13px;
    padding: 7px 14px;
    border-radius: 0;
    white-space: nowrap;
}

#site-navigation .nav-dropdown-menu a:hover {
    background-color: #fff7ed;
    color: #c65202 !important;
}

/* صورة رمزية صغيرة بجانب اسم العضو في الشريط العلوي */
.user-mini-identity {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.user-mini-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #d97706;
    background: #ffffff;
    flex-shrink: 0;
}

/* زر القائمة وتجاوب النافبار على الجوال */
.nav-mobile-toggle {
    display: none;
}

@media (max-width: 768px) {
    .nav-mobile-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin: 6px 10px;
        padding: 5px 10px;
        background: #c65202;
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 5px;
        font-family: inherit;
        font-size: 13px;
        font-weight: bold;
        cursor: pointer;
    }

    #site-navigation {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 8px 10px;
    }

    #site-navigation.mobile-open {
        display: flex;
    }

    #site-navigation .nav-dropdown,
    #site-navigation .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }

    #site-navigation .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: 0;
        border-radius: 5px;
        background: rgba(0, 0, 0, 0.16);
        padding: 2px 10px;
        margin-top: 2px;
    }

    #site-navigation .nav-dropdown-menu a {
        color: #ffffff !important;
        padding: 6px 10px;
        border-radius: 4px;
    }

    #site-navigation .nav-dropdown-menu a:hover {
        background: rgba(0, 0, 0, 0.22);
        color: #ffffff !important;
    }
}

.article-body {
    font-size: 14px;
    line-height: 1.8;
    color: #222222;
    word-wrap: break-word;
    overflow-wrap: break-word;
     font-weight: bold !important;
}
.article-body img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 5px;
}
.article-body table {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-collapse: collapse;
    margin: 16px 0;
}
.article-body th,
.article-body td {
    padding: 8px;
    border: 1px solid #e2e8f0;
    height: auto !important;
}
.article-body iframe,
.article-body .twitter-tweet,
.article-body .reddit-embed-bq,
.article-body .bluesky-embed {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.article-body td img,
.article-body th img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}
.article-body table {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-collapse: collapse;
    margin: 16px 0;
}
.article-body table td,
.article-body table th {
    height: auto !important;
    vertical-align: middle;
}
.article-body table img {
    display: block;
    width: 100% !important;
    max-width: 260px !important;
    height: auto !important;
    margin: 4px auto !important;
    border-radius: 4px;
}
.article-body img {
    max-width: 100% !important;
    height: auto !important;
}
.article-body ul,
.article-body ol {
    list-style-type: disc;
    list-style-position: outside;
    margin: 12px 24px 16px 0;
    padding: 0;
    line-height: 1.9;
}

.article-body ol {
    list-style-type: decimal;
}

.article-body li {
    margin-bottom: 6px;
}
.article-body blockquote {
    margin: 16px 0;
    padding: 12px 16px;
    background: #f8fafc;
    border-right: 4px solid #c65202;
    border-radius: 4px;
    color: #334155;
    line-height: 1.85;
}
.article-body .video-embed-box {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-bottom: 56.25% !important;
    height: 0 !important;
    margin: 18px 0 !important;
    background: #000 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

.article-body .video-embed-box iframe {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    border: 0 !important;
}
.header-notice {
    margin: 8px 0;
    padding: 9px 14px;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.7;
    border: 1px solid transparent;
}

.header-notice-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8a;
}

.header-notice-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #78350f;
}

.header-notice-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #14532d;
}

.header-notice-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.user-yellow-bar + ins.adsbygoogle {
    display: block !important;
    min-height: 90px;
    margin: 8px auto;
}

@media (max-width: 768px) {
    .user-yellow-bar + ins.adsbygoogle {
        min-height: 60px;
    }
}
