/**
 * Mobile Fixes & Responsive Overrides (v1.9)
 *
 * يُحمَّل آخر شيء بعد style.css ليتغلب على أي تعارض.
 * أُعيد هيكلته كاملاً لإصلاح:
 *   1) قص الصفحة على الجوال (overflow أفقي في CSS Grid)
 *   2) الهيدر الثابت أثناء التمرير
 *   3) تخطيط بطاقات معلومات الوظيفة
 *
 * @package Ay_Wadhefa
 */

/* ============================================
   1) قواعد أساسية - تطبق على كل الشاشات
============================================ */

/* box-sizing شامل */
*, *::before, *::after {
    box-sizing: border-box;
}

/* منع overflow أفقي - بدون كسر sticky positioning */
html {
    -webkit-text-size-adjust: 100%;
    /* ملاحظة: لا نستخدم overflow-x: hidden على html لأنه يكسر position: sticky */
}

body {
    max-width: 100vw;
    width: 100%;
    position: relative;
    overflow-x: clip;
}

/* Fallback للمتصفحات القديمة التي لا تدعم overflow: clip */
@supports not (overflow: clip) {
    body {
        overflow-x: hidden;
    }
}

/* عناصر الوسائط لا تتجاوز عرض الحاوية */
img, iframe, video, embed, object, picture, svg {
    max-width: 100%;
    height: auto;
}

/* الجداول والكود قابلة للتمرير الأفقي داخلياً */
table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

pre, code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* النصوص الطويلة تلتف ولا تطفح */
h1, h2, h3, h4, h5, h6,
p, li, span, a, div {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* الـ container لا يتجاوز viewport */
.container {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

/* ============================================
   2) إصلاح CSS Grid - السبب الرئيسي للقص
   ============================================
   عناصر CSS Grid لها min-width: auto افتراضياً.
   هذا يمنعها من الانكماش أصغر من محتواها،
   مما يجعلها تطفح أفقياً وتقص الصفحة.
*/
.content-area,
.jobs-grid,
.related-jobs-grid,
.footer-widgets {
    min-width: 0;
}

.content-area > *,
.jobs-grid > *,
.related-jobs-grid > *,
.footer-widgets > * {
    min-width: 0;
    max-width: 100%;
}

/* المحتوى الرئيسي والشريط الجانبي */
.site-main,
.widget-area {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* غلاف الوظيفة لا يتجاوز الشاشة */
.single-job-wrapper,
article.post,
article.job {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

/* محتوى the_content() قد يحوي عناصر عريضة (صور، جداول، iframes) */
.entry-content,
.job-content {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.entry-content *,
.job-content * {
    max-width: 100%;
}

.entry-content iframe,
.job-content iframe {
    width: 100%;
}

/* ============================================
   3) الهيدر الثابت - يعمل على كل الشاشات
============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    /* تحسين الأداء أثناء التمرير */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

/* ضمان عدم تعطّل التمرير العمودي
   نستخدم visible وليس auto، لأن auto يجعل html/body
   scrolling containers ويكسر position:sticky للهيدر */
html, body {
    height: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

body.single-job,
body.single-post,
body.single {
    overflow-y: visible;
    height: auto;
    position: relative;
}

/* المحتوى دائماً مرئي */
.site-content,
.content-area,
.single-job-wrapper,
main {
    overflow: visible;
    height: auto;
}

/* إخفاء أي طبقة قد تحجب الصفحة بالخطأ */
.modal-overlay:not(.is-active),
.popup:not(.is-active),
.loading-overlay:not(.is-active) {
    display: none;
}

/* ============================================
   4) تجاوب الجوال (≤ 768px)
============================================ */
@media (max-width: 768px) {

    /* ---- الحاوية ---- */
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* ---- شريط المعلومات العلوي ---- */
    .site-topbar {
        font-size: 11px;
        padding: 4px 0;
    }
    .site-topbar .container {
        flex-wrap: wrap;
        gap: 6px;
    }
    .site-topbar .topbar-item span {
        display: none;
    }

    /* ---- الهيدر الرئيسي ---- */
    .header-top {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 10px 0;
        min-height: auto;
        height: auto;
    }

    .site-branding {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        align-items: center;
        max-width: calc(100% - 60px);
    }

    .site-title {
        font-size: 1.1rem;
        line-height: 1.3;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .site-title a {
        font-size: inherit;
    }

    .site-description {
        display: none;
    }

    .site-logo img {
        height: 56px;
        max-height: 60px;
        width: auto;
        object-fit: contain;
    }

    /* توسيع الهيدر قليلاً ليتسع للشعار الأكبر */
    .header-top {
        min-height: 76px;
        padding: 10px 0;
    }

    /* زر القائمة (☰) */
    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        order: 2;
        flex-shrink: 0;
        background: rgba(255,255,255,0.15);
        border: 1px solid rgba(255,255,255,0.2);
        color: #fff;
        font-size: 1.2rem;
        padding: 8px 12px;
        border-radius: 6px;
        cursor: pointer;
        width: 44px;
        height: 40px;
    }

    /* شريط البحث في الهيدر */
    .header-search {
        order: 3;
        flex-basis: 100%;
        width: 100%;
        max-width: 100%;
        margin: 8px 0 0;
    }

    .header-search form {
        width: 100%;
        display: flex;
    }

    .header-search input[type="search"] {
        flex: 1 1 auto;
        min-width: 0;
        padding: 10px 14px;
        font-size: 13px;
    }

    .header-search button {
        flex-shrink: 0;
        padding: 0 16px;
    }

    .header-search button span {
        display: none;
    }

    /* ---- قائمة التنقل ---- */
    .main-navigation {
        position: relative;
    }

    .main-navigation .container {
        padding: 0;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
        max-height: 70vh;
        overflow-y: auto;
        background: var(--nav-bg, #1e293b);
    }

    .nav-menu.active,
    .nav-menu.is-open {
        display: flex;
    }

    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .nav-menu > li:last-child {
        border-bottom: none;
    }

    .nav-menu > li > a {
        padding: 14px 18px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        color: #fff;
    }

    .nav-menu > li > a::before {
        display: none;
    }

    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0,0,0,0.25);
        box-shadow: none;
        padding: 0;
        border-radius: 0;
        width: 100%;
    }

    .nav-menu .sub-menu a {
        color: rgba(255,255,255,0.8);
        padding: 12px 35px;
    }

    /* ---- العناوين ---- */
    h1 { font-size: 1.4rem; line-height: 1.4; }
    h2 { font-size: 1.2rem; line-height: 1.4; }
    h3 { font-size: 1.05rem; line-height: 1.5; }

    .page-title {
        font-size: 1.3rem;
    }

    /* ---- المحتوى الرئيسي ---- */
    .content-area {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .site-content {
        padding: 16px 0;
    }

    /* ---- صفحة الوظيفة المفردة ---- */
    .single-job-wrapper {
        padding: 16px 14px;
        border-radius: 10px;
    }

    .single-job-header {
        text-align: center;
        padding: 0 0 18px 0;
        margin-bottom: 18px;
    }

    .single-job-logo {
        width: 130px;
        height: 130px;
        margin: 0 auto 14px;
    }

    .single-job-title,
    .entry-title {
        font-size: 1.15rem;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        max-width: 100%;
    }

    .single-job-date {
        display: inline-flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        font-size: 0.78rem;
        padding: 6px 12px;
        gap: 4px;
    }

    .single-job-date .single-job-views {
        margin-inline-start: 8px !important;
    }

    /* ---- صندوق معلومات الوظيفة (الجهة/نوع الوظيفة/آخر موعد...) ---- */
    .job-meta-box {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px;
        margin: 18px 0;
    }

    .job-meta-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        background: #fff;
        border-radius: 8px;
        text-align: right;
        width: 100%;
        min-width: 0;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }

    .job-meta-item i {
        width: 38px;
        height: 38px;
        font-size: 14px;
        flex-shrink: 0;
    }

    .job-meta-item > div {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
        overflow: hidden;
    }

    .job-meta-item .label {
        font-size: 0.75rem;
        display: block;
    }

    .job-meta-item .value {
        font-size: 0.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        line-height: 1.5;
    }

    .job-meta-item .value small {
        display: inline-block;
        font-size: 0.78rem;
        margin-top: 2px;
    }

    /* ---- محتوى الوظيفة ---- */
    .entry-content,
    .job-content {
        font-size: 0.95rem;
        line-height: 1.85;
        padding: 0;
    }

    .entry-content p,
    .entry-content li,
    .job-content p,
    .job-content li {
        font-size: 0.95rem;
        line-height: 1.85;
    }

    .entry-content ul,
    .entry-content ol,
    .job-content ul,
    .job-content ol {
        padding-inline-start: 22px;
        margin-block: 12px;
    }

    .entry-content h2,
    .job-content h2 {
        font-size: 1.15rem;
        margin-top: 1.5em;
        line-height: 1.5;
    }

    .entry-content h3,
    .job-content h3 {
        font-size: 1.05rem;
        margin-top: 1.3em;
        line-height: 1.5;
    }

    /* ---- العدّاد التنازلي ---- */
    .job-countdown {
        padding: 14px 10px;
        margin: 16px 0;
    }

    .countdown-boxes {
        gap: 6px;
    }

    .countdown-box {
        min-width: 60px;
        padding: 10px 8px;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

    .countdown-label {
        font-size: 0.7rem;
    }

    .countdown-dates {
        gap: 8px;
        flex-direction: column;
        align-items: stretch;
    }

    .countdown-date-item {
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 6px;
    }

    /* ---- زر التقديم ---- */
    .job-apply-button,
    .apply-button,
    .job-apply-btn,
    a.button {
        width: 100%;
        max-width: 100%;
        text-align: center;
        font-size: 1rem;
        padding: 14px 16px;
    }

    /* ---- بطاقات الوظائف ---- */
    .jobs-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .job-card {
        padding: 14px;
        gap: 12px;
        align-items: flex-start;
    }

    .job-card-content {
        flex: 1 1 auto;
        min-width: 0;
    }

    .job-card-title {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .job-card-meta {
        font-size: 0.75rem;
        gap: 8px;
        flex-wrap: wrap;
    }

    .job-card-logo,
    .job-card-thumb-link,
    .job-card > a {
        width: 55px;
        height: 55px;
        flex-shrink: 0;
    }

    /* ---- وسوم المدن ---- */
    .job-location-tags {
        gap: 5px;
        margin-top: 8px;
    }

    .job-location-tags .location-tag {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    /* ---- التصنيفات في صفحة الوظيفة ---- */
    .job-taxonomies-block {
        padding: 14px;
        margin: 16px 0;
    }

    .job-taxonomies-block .taxonomy-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    /* ---- أزرار المشاركة ---- */
    .share-buttons-list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .share-buttons-list .share-btn {
        flex: 1 1 calc(33.333% - 6px);
        min-width: 0;
        font-size: 0.8rem;
        padding: 8px 6px;
        justify-content: center;
    }

    /* ---- الوظائف المرتبطة ---- */
    .related-jobs-grid {
        grid-template-columns: 1fr;
    }

    /* ---- Breadcrumbs ---- */
    .shughl-breadcrumbs {
        padding: 0 12px;
        font-size: 0.8rem;
    }

    .shughl-breadcrumbs .breadcrumbs-list {
        flex-wrap: wrap;
        gap: 4px;
    }

    /* ---- الإعلانات ---- */
    .ad-banner {
        margin: 12px 0;
        max-width: 100%;
        overflow: hidden;
    }

    /* ---- الفوتر ---- */
    .site-footer {
        padding: 24px 0 16px;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================
   5) جوال صغير (≤ 480px)
============================================ */
@media (max-width: 480px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .site-title {
        font-size: 1rem;
    }

    .single-job-wrapper {
        padding: 14px 12px;
    }

    .single-job-title {
        font-size: 1.05rem;
        line-height: 1.5;
    }

    .single-job-logo {
        width: 115px;
        height: 115px;
    }

    .entry-content,
    .job-content {
        font-size: 0.9rem;
    }

    .entry-content p,
    .entry-content li,
    .job-content p,
    .job-content li {
        font-size: 0.9rem;
    }

    /* صندوق معلومات الوظيفة - شاشات صغيرة جداً */
    .job-meta-box {
        padding: 12px;
        gap: 8px;
    }

    .job-meta-item {
        padding: 8px 10px;
        gap: 10px;
    }

    .job-meta-item i {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }

    .job-meta-item .label {
        font-size: 0.7rem;
    }

    .job-meta-item .value {
        font-size: 0.85rem;
    }

    /* بطاقات الوظائف */
    .job-card {
        padding: 12px;
    }

    .job-card-title {
        font-size: 0.9rem;
    }

    .job-card-logo,
    .job-card > a {
        width: 48px;
        height: 48px;
    }

    /* أزرار المشاركة على شاشات صغيرة جداً */
    .share-buttons-list .share-btn {
        flex: 1 1 calc(50% - 6px);
        font-size: 0.75rem;
    }

    /* عدّاد تنازلي */
    .countdown-box {
        min-width: 56px;
        padding: 8px 6px;
    }

    .countdown-number {
        font-size: 1.35rem;
    }

    h1 { font-size: 1.25rem; }
    h2 { font-size: 1.1rem; }
    h3 { font-size: 1rem; }

    .page-title { font-size: 1.2rem; }
}

/* ============================================
   6) أنماط وسائل التواصل (المواضع الجديدة)
============================================ */

/* وسائل التواصل داخل الهيدر بجانب الشعار */
.header-social-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    order: 2;
    margin: 0 12px;
}

.header-social-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 50%;
    font-size: 0.85rem;
    transition: all 0.2s;
    text-decoration: none;
}

.header-social-icon:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
    transform: translateY(-2px);
}

/* شريط وسائل التواصل أسفل الهيدر مباشرة */
.below-header-social {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 0;
}

.below-header-social .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.below-header-social-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.below-header-social-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color, #2C5AA0);
    color: #fff;
    border-radius: 50%;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-decoration: none;
}

.below-header-social-icon:hover {
    background: var(--primary-hover, #1e4480);
    color: #fff;
    transform: translateY(-2px);
}

/* topbar-social-list (شريط علوي) */
.topbar-social-list {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ============================================
   7) إخفاء وسائل التواصل على الجوال (اختياري)
   يفعّله المستخدم من لوحة التحكم
============================================ */
@media (max-width: 768px) {
    body.hide-social-mobile .site-topbar .topbar-right,
    body.hide-social-mobile .header-social-icons,
    body.hide-social-mobile .below-header-social {
        display: none !important;
    }

    /* على الجوال، شريط topbar يخفي وسائل التواصل تلقائياً لتوفير المساحة
       لو موضعها 'topbar'، يبقى الإيميل/الهاتف فقط */
    .site-topbar .topbar-right {
        display: none;
    }

    /* لكن لو المستخدم اختار 'header' أو 'below_header' فالأيقونات تظهر طبيعياً */

    /* وسائل التواصل داخل الهيدر تأخذ سطراً كاملاً على الجوال */
    .header-social-icons {
        order: 4;
        flex-basis: 100%;
        justify-content: center;
        margin: 6px 0 0;
    }

    .below-header-social {
        padding: 6px 0;
    }

    .below-header-social-icon {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

/* ============================================
   8) إصلاحات صارمة للتمرير الأفقي في صفحات المقالات/الوظائف
   مشكلة: عناصر في the_content() قد تتجاوز viewport
============================================ */

/* قاعدة عامة قوية - أي شيء داخل المحتوى لا يطفح */
.entry-content,
.job-content,
.single-job-wrapper {
    contain: layout;
}

.entry-content > *,
.job-content > *,
.single-job-wrapper > * {
    max-width: 100%;
}

/* عناصر معروفة بالتسبب في overflow */
.entry-content table,
.job-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
}

.entry-content pre,
.entry-content code,
.job-content pre,
.job-content code {
    max-width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.entry-content blockquote,
.job-content blockquote {
    max-width: 100%;
    overflow-wrap: break-word;
}

.entry-content iframe,
.job-content iframe,
.entry-content embed,
.job-content embed,
.entry-content object,
.job-content object,
.entry-content video,
.job-content video {
    max-width: 100%;
    width: 100%;
    height: auto;
}

/* الروابط الطويلة تنكسر */
.entry-content a,
.job-content a,
.single-job-wrapper a {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* قاعدة وقائية: إذا كان هناك أي عنصر يحاول تجاوز عرض الـ wrapper */
.single-job-wrapper *:not(iframe):not(embed):not(object) {
    max-width: 100%;
}

/* breadcrumbs قد تطفح إذا كان مسار طويل */
.shughl-breadcrumbs {
    max-width: 100%;
    overflow: hidden;
}

.shughl-breadcrumbs .breadcrumbs-list {
    flex-wrap: wrap;
    max-width: 100%;
}

.shughl-breadcrumbs .breadcrumbs-item span,
.shughl-breadcrumbs .breadcrumbs-item a {
    word-break: break-word;
}

/* أزرار المشاركة - لا تطفح */
.share-buttons,
.share-buttons-list {
    max-width: 100%;
    overflow: hidden;
}

/* الوظائف المرتبطة - شبكة لا تطفح */
.related-jobs-section,
.related-jobs-grid {
    max-width: 100%;
    overflow: hidden;
}

.related-job-card {
    min-width: 0;
    max-width: 100%;
}

/* التصنيفات/الوسوم */
.job-taxonomies-block {
    max-width: 100%;
    overflow: hidden;
}

.job-taxonomies-block .taxonomy-tags {
    flex-wrap: wrap;
    max-width: 100%;
}

.job-taxonomies-block .taxonomy-tag {
    max-width: 100%;
    word-break: break-word;
}

/* الـ countdown - لا يطفح */
.job-countdown,
.countdown-boxes,
.countdown-dates {
    max-width: 100%;
}

.countdown-boxes {
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================
   9) صندوق "تابعنا" (Follow Box)
============================================ */
.shughl-follow-box {
    margin: 25px 0;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #2C5AA0 0%, #4a7bc8 100%);
    box-shadow: 0 4px 16px rgba(44, 90, 160, 0.2);
}

.shughl-follow-box-inner {
    padding: 24px 20px;
    text-align: center;
    color: #fff;
}

.shughl-follow-box-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.shughl-follow-box-header i {
    font-size: 1.5rem;
    color: #fbbf24;
    animation: bell-shake 2s infinite;
}

@keyframes bell-shake {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-15deg); }
    20%, 40% { transform: rotate(15deg); }
    50% { transform: rotate(0deg); }
}

.shughl-follow-box-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    color: #fff;
    line-height: 1.4;
}

.shughl-follow-box-icons {
    display: flex;
    justify-content: center;
}

.follow-box-social-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 700px;
    margin: 0 auto;
}

.follow-box-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.follow-box-social-btn:hover {
    background: #fff;
    color: #2C5AA0;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    border-color: #fff;
}

.follow-box-social-btn i {
    font-size: 1.1rem;
}

/* صندوق تابعنا في الفوتر: لون أفتح ليتباين مع الفوتر الداكن */
.site-footer .shughl-follow-box,
[data-position="footer"].shughl-follow-box {
    margin: 30px auto 20px;
    max-width: 900px;
}

/* صندوق تابعنا أعلى المحتوى: مساحة أصغر */
[data-position="above_content"].shughl-follow-box {
    margin-top: 0;
    margin-bottom: 20px;
}

/* صندوق تابعنا في الهيدر: تصميم مدمج */
[data-position="header"].shughl-follow-box {
    border-radius: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.15);
}

[data-position="header"] .shughl-follow-box-inner {
    padding: 12px 20px;
}

[data-position="header"] .shughl-follow-box-header {
    margin-bottom: 8px;
}

[data-position="header"] .shughl-follow-box-title {
    font-size: 1rem;
}

[data-position="header"] .follow-box-social-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* جوال */
@media (max-width: 600px) {
    .shughl-follow-box {
        margin: 18px 0;
        border-radius: 12px;
    }

    .shughl-follow-box-inner {
        padding: 18px 14px;
    }

    .shughl-follow-box-title {
        font-size: 1rem;
    }

    .shughl-follow-box-header i {
        font-size: 1.2rem;
    }

    .follow-box-social-btn {
        padding: 8px 14px;
        font-size: 0.82rem;
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        justify-content: center;
    }

    .follow-box-social-btn i {
        font-size: 0.95rem;
    }
}

@media (max-width: 380px) {
    .follow-box-social-btn {
        flex: 1 1 100%;
    }
}

/* ============================================
   10) Pagination محسّن
============================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0 20px;
    padding: 0;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    color: #2C5AA0;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.pagination .page-numbers:hover {
    background: #f0f7ff;
    border-color: #2C5AA0;
    transform: translateY(-2px);
}

.pagination .page-numbers.current {
    background: #2C5AA0;
    color: #fff;
    border-color: #2C5AA0;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
    padding: 0 14px;
    gap: 6px;
}

.pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: #6b7280;
}

@media (max-width: 600px) {
    .pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 0.88rem;
    }

    .pagination .page-numbers.prev,
    .pagination .page-numbers.next {
        padding: 0 12px;
    }
}
