/* ==========================================================================
   1. ENGLISH HEADER (DESKTOP)
   ========================================================================== */
@media (min-width: 769px) {
    #eng-theme-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        max-width: 100% !important; 
        padding: 10px 40px 0px 40px !important; 
        margin-bottom: 20px !important;
        height: 85px !important;
        background: #000000 !important;
        position: relative;
        z-index: 1000;
        direction: ltr;
    }

    .eng-header-container-mobile { display: none !important; }
    #eng-theme-header .mobile-menu-toggle { display: none !important; }

    .eng-header-container-desktop {
        order: 1 !important;
        display: block !important;
        flex: 0 0 auto !important;
        margin-right: 60px !important; 
        margin-left: 0 !important;
    }
    .eng-header-container-desktop .logo-wrapper img { height: 80px !important; width: auto !important; display: block !important; }

    #eng-header-nav {
        order: 2 !important;
        display: flex !important;
        flex: 1 1 auto !important;
        justify-content: center !important; /* Centered Menu */
    }
    #eng-header-menu {
        display: flex !important;
        flex-direction: row !important;
        gap: 24px !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        background-color: transparent !important;
        align-items: center;
        justify-content: center !important; /* Centered Menu */
    }
    #eng-header-menu li { position: relative; margin: 0; }
    #eng-header-menu a {
        text-decoration: none; color: white; font-family: 'Roboto', 'Cairo', sans-serif !important;
        font-weight: 700 !important; font-size: 16px; padding: 10px 20px; display: inline-block;
        transition: color 0.3s ease, background-color 0.3s ease; text-align: center;
    }
    
    /* Orange Hover & Active State */
    #eng-header-menu li:hover > a,
    #eng-header-menu li.current-menu-item > a { 
        background-color: #ff9800 !important; 
        color: #ffffff !important; 
        border-radius: 4px 4px 0 0;
    }

    /* English Dropdown (Sub-menu) */
    #eng-header-menu > li > ul {
        position: absolute; top: 100%; left: 0; background-color: #ff9800 !important; padding: 10px 0;
        display: none !important; flex-direction: column !important; list-style: none; margin: 0; z-index: 1000; width: 200px; text-align: center;
        border: none !important; box-shadow: 0 8px 16px rgba(0,0,0,0.2) !important;
    }
    #eng-header-menu li:hover > ul { display: flex !important; }
    #eng-header-menu ul a { padding: 10px 15px !important; color: #ffffff !important; font-size: 14px; font-weight: 600; background: transparent !important; display: block; }
    #eng-header-menu ul a:hover { background-color: rgba(0, 0, 0, 0.15) !important; color: #ffffff !important; }
    
    /* Font Awesome Arrow for English Desktop */
    #eng-header-menu .menu-item-has-children > a::after { 
        content: "\f0d7"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; 
        font-size: 14px; margin-left: 8px; vertical-align: middle; cursor: pointer; 
    }

    /* Lang Switcher English Desktop */
    #eng-theme-header .lang-switcher {
        order: 3 !important;
        margin-left: auto !important; 
        margin-right: 0 !important;
        display: flex !important;
        align-items: center !important;
    }
    #eng-theme-header .lang-switcher .lang-link {
        display: flex; align-items: center; gap: 8px; color: #ffffff; text-decoration: none;
        font-weight: 700; font-size: 16px; font-family: 'Cairo', sans-serif; padding: 8px 12px;
        border-radius: 5px; transition: background-color 0.3s ease, color 0.3s ease;
    }
    #eng-theme-header .lang-switcher .lang-link:hover { background-color: #ff9800; color: #ffffff; }
    #eng-theme-header .lang-switcher img { width: 24px !important; height: auto !important; border-radius: 3px; display: block; }
    #eng-theme-header .lang-mobile-item { display: none !important; }
}

/* ==========================================================================
   2. ENGLISH HEADER (MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    #eng-theme-header {
        display: flex !important;
        flex-wrap: wrap !important; 
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 20px 0px 20px !important;
        margin-bottom: 0px !important; 
        height: auto !important;
        background: #000000 !important;
        position: relative;
        z-index: 1000;
        direction: ltr;
    }

    .eng-header-container-desktop { display: none !important; }
    #eng-theme-header .lang-switcher { display: none !important; }

    .eng-header-container-mobile { display: block !important; margin: 0 !important; padding-bottom: 0 !important; }
    .eng-header-container-mobile .logo-wrapper img { height: 70px !important; width: auto !important; margin-bottom: 0 !important; max-width: none !important; }

    #eng-theme-header .mobile-menu-toggle {
        position: relative !important; z-index: 9999 !important; display: block !important;
        background: none !important; border: none !important; font-size: 28px !important;
        cursor: pointer !important; color: #ffffff !important; padding: 5px 10px !important; margin: 0 !important; order: 3 !important;
    }

    #eng-header-nav { flex-basis: 100% !important; width: 100% !important; order: 3 !important; margin-top: 0px !important; }
    #eng-header-menu { display: none; flex-direction: column; background-color: #ff9800; width: 100%; gap: 2px; list-style: none; padding: 0; margin: 0; }
    #eng-header-menu.active { display: flex; }
    #eng-header-menu li { width: 100%; position: relative; }
    #eng-header-menu > li > ul { position: static !important; width: 100% !important; background-color: black !important; display: none !important; flex-direction: column !important; }
    #eng-header-menu li.menu-item-has-children.open > ul { display: flex !important; }
    
    #eng-header-menu a { 
        padding: 10px 5px; width: 100%; font-size: 17px; text-decoration: none; color: white; 
        display: flex !important; justify-content: center !important; align-items: center; gap: 8px;
    }
    #eng-header-menu ul a { font-size: 15px; }

    /* Font Awesome Arrow for English Mobile */
    #eng-header-menu .menu-item-has-children > a::after {
        content: "\f0d7"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; 
        font-size: 14px; transition: transform 0.3s ease;
    }
    #eng-header-menu li.menu-item-has-children.open > a::after { transform: rotate(180deg); }

    /* Lang Item in English Mobile Menu */
    #eng-header-menu .lang-mobile-item { display: block !important; width: 100% !important; margin-top: 5px !important; border-top: 1px solid rgba(0, 0, 0, 0.1); }
    #eng-header-menu .lang-mobile-item a {
        display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: center !important;
        gap: 12px !important; padding: 15px !important; background-color: rgba(0, 0, 0, 0.15) !important; text-align: center !important; width: 100% !important;
    }
    #eng-header-menu .lang-mobile-item a span.lang-text-mobile { flex: 0 0 auto !important; width: auto !important; margin: 0 !important; font-size: 16px !important; font-weight: 700 !important; font-family: 'Cairo', sans-serif !important; color: #ffffff !important; }
    #eng-header-menu .lang-mobile-item a img { flex: 0 0 auto !important; margin: 0 !important; width: 26px !important; height: auto !important; border-radius: 3px !important; display: block !important; }
}

/* ==========================================================================
   3. ARABIC HEADER (DESKTOP)
   ========================================================================== */
@media (min-width: 769px) {
    #theme-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        max-width: 100% !important; 
        padding: 10px 40px 0px 40px !important; 
        margin-bottom: 20px !important;
        height: 85px !important;
        background: #000000 !important;
        position: relative;
        z-index: 1000;
        direction: rtl;
    }

    #theme-header3 { background: linear-gradient(to right, #FFD700, #ff9800) !important; padding: 20px 0; width: 100%; position: relative; z-index: 1000; }

    .header-container-mobile { display: none !important; }
    #theme-header .mobile-menu-toggle { display: none !important; }

    /* Logo 3al yameen */
    .header-container-desktop {
        order: 1 !important;
        display: block !important;
        flex: 0 0 auto !important;
        margin-left: 60px !important; 
        margin-right: 0 !important;
    }
    .header-container-desktop .logo-wrapper img { height: 75px !important; width: auto !important; display: block !important; max-height: none !important; }

    /* Menu Arabic Desktop */
    #header-nav {
        order: 2 !important;
        display: flex !important;
        flex: 1 1 auto !important;
        justify-content: center !important; /* Centered Menu */
    }
    #header-menu {
        display: flex !important;
        flex-direction: row !important;
        gap: 24px !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        background-color: transparent !important;
        align-items: center;
        justify-content: center !important; /* Centered Menu */
    }
    #header-menu li { position: relative; margin: 0; }
    #header-menu a {
        text-decoration: none; color: white; font-family: 'Cairo', sans-serif;
        font-weight: 700 !important; font-size: 16px; padding: 10px 20px; display: inline-block;
        transition: color 0.3s ease, background-color 0.3s ease; text-align: center;
    }
    
    /* Orange Hover & Active State */
    #header-menu li:hover > a,
    #header-menu li.current-menu-item > a { 
        background-color: #ff9800 !important; 
        color: #ffffff !important; 
        border-radius: 4px 4px 0 0;
    }

    /* Arabic Dropdown (Sub-menu) */
    #header-menu > li > ul {
        position: absolute; top: 100%; right: 0; background-color: #ff9800 !important; padding: 10px 0;
        display: none !important; flex-direction: column !important; list-style: none; margin: 0; z-index: 1000; width: 200px; text-align: center;
        border: none !important; box-shadow: 0 8px 16px rgba(0,0,0,0.2) !important;
    }
    #header-menu li:hover > ul { display: flex !important; }
    #header-menu ul a { padding: 10px 15px !important; color: #ffffff !important; font-size: 14px; font-weight: 600; background: transparent !important; display: block; }
    #header-menu ul a:hover { background-color: rgba(0, 0, 0, 0.15) !important; color: #ffffff !important; }
    
    /* Font Awesome Arrow for Arabic Desktop */
    #header-menu .menu-item-has-children > a::after { 
        content: "\f0d7"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; 
        font-size: 14px; margin-right: 8px; vertical-align: middle; cursor: pointer; 
    }

    /* Lang Switcher Arabic Desktop -> Pushed to Left */
    #theme-header .lang-switcher {
        order: 3 !important;
        margin-right: auto !important; 
        margin-left: 0 !important;
        display: flex !important;
        align-items: center !important;
    }
    #theme-header .lang-switcher .lang-link {
        display: flex; align-items: center; gap: 8px; color: #ffffff; text-decoration: none;
        font-weight: 700; font-size: 16px; font-family: 'Cairo', sans-serif; padding: 8px 12px;
        border-radius: 5px; transition: background-color 0.3s ease, color 0.3s ease;
    }
    #theme-header .lang-switcher .lang-link:hover { background-color: #ff9800; color: #ffffff; }
    #theme-header .lang-switcher img { width: 24px !important; height: auto !important; border-radius: 3px; display: block; }
    #theme-header .lang-mobile-item { display: none !important; }
}

/* ==========================================================================
   4. ARABIC HEADER (MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    #theme-header {
        display: flex !important;
        flex-wrap: wrap !important; 
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 20px 0px 20px !important;
        margin-bottom: 0px !important; 
        height: auto !important;
        background: #000000 !important;
        position: relative;
        z-index: 1000;
        direction: rtl;
    }

    .header-container-desktop { display: none !important; }
    #theme-header .lang-switcher { display: none !important; }

    .header-container-mobile { display: block !important; margin: 0 !important; padding-bottom: 0 !important; }
    .header-container-mobile .logo-wrapper img { height: 55px !important; width: auto !important; margin-bottom: 0 !important; max-width: none !important; }

    #theme-header .mobile-menu-toggle {
        position: relative !important; z-index: 9999 !important; display: block !important;
        background: none !important; border: none !important; font-size: 28px !important;
        cursor: pointer !important; color: #ffffff !important; padding: 5px 10px !important; margin: 0 !important; order: 3 !important;
    }

    #header-nav { flex-basis: 100% !important; width: 100% !important; order: 3 !important; margin-top: 0px !important; }
    #header-menu { display: none; flex-direction: column; background-color: #ff9800; width: 100%; gap: 2px; list-style: none; padding: 0; margin: 0; }
    #header-menu.active { display: flex; }
    #header-menu li { width: 100%; position: relative; }
    #header-menu > li > ul { position: static !important; width: 100% !important; background-color: black !important; display: none !important; flex-direction: column !important; }
    #header-menu li.menu-item-has-children.open > ul { display: flex !important; }
    
    #header-menu a { 
        padding: 10px 5px; width: 100%; font-size: 17px; text-decoration: none; color: white; 
        display: flex !important; justify-content: center !important; align-items: center; gap: 8px;
    }
    #header-menu ul a { font-size: 15px; }

    /* Font Awesome Arrow for Arabic Mobile */
    #header-menu .menu-item-has-children > a::after {
        content: "\f0d7"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; 
        font-size: 14px; transition: transform 0.3s ease;
    }
    #header-menu li.menu-item-has-children.open > a::after { transform: rotate(180deg); }

    /* Lang Item in Arabic Mobile Menu */
    #header-menu .lang-mobile-item { display: block !important; width: 100% !important; margin-top: 5px !important; border-top: 1px solid rgba(0, 0, 0, 0.1); }
    #header-menu .lang-mobile-item a {
        display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: center !important;
        gap: 12px !important; padding: 15px !important; background-color: rgba(0, 0, 0, 0.15) !important; text-align: center !important; width: 100% !important;
    }
    #header-menu .lang-mobile-item a span.lang-text-mobile { flex: 0 0 auto !important; width: auto !important; margin: 0 !important; font-size: 16px !important; font-weight: 700 !important; font-family: 'Cairo', sans-serif !important; color: #ffffff !important; }
    #header-menu .lang-mobile-item a img { flex: 0 0 auto !important; margin: 0 !important; width: 26px !important; height: auto !important; border-radius: 3px !important; display: block !important; }
}

/* Keyframe Pulsing Dot */
#menu-item-205298 > a { position: relative; padding-right: 18px; }
#menu-item-205298 > a::after { content: ""; position: absolute; top: 50%; right: 0; width: 8px; height: 8px; border-radius: 50%; background: red; transform: translateY(-50%); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); animation: c961-menu-pulse 1.7s infinite ease-out; }
@media (max-width: 782px) { #menu-item-205298 > a::after { right: 80px; } }
@keyframes c961-menu-pulse { 0% { transform: translateY(-50%) scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); } 70% { transform: translateY(-50%) scale(2); opacity: 0; box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); } 100% { transform: translateY(-50%) scale(1); opacity: 0; box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.wp-block-list { padding-left: 20px; }
.wp-block-list li { padding-left: 0; margin-left: 0; }

/* ==========================================================================
   5. BODY & FOOTER (DESKTOP & BASE)
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body { background-color: #000000; font-family: 'Almarai', sans-serif; font-weight: 400; font-size: 18px; line-height: 2.2; text-align: start; }
html { margin-top: 0 !important; padding-top: 0 !important; }
#wpadminbar { z-index: 99999 !important; position: fixed !important; top: 0; width: 100%; }
.small-break { display: block; height: 15px; }

@font-face { font-family: 'Almarai'; src: url('../fonts/Almarai-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Almarai'; src: url('../fonts/Almarai-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Almarai'; src: url('../fonts/Almarai-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Almarai'; src: url('../fonts/Almarai-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cairo'; src: url('../fonts/Cairo-ExtraLight.woff2') format('woff2'); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cairo'; src: url('../fonts/Cairo-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cairo'; src: url('../fonts/Cairo-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cairo'; src: url('../fonts/Cairo-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cairo'; src: url('../fonts/Cairo-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cairo'; src: url('../fonts/Cairo-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cairo'; src: url('../fonts/Cairo-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cairo'; src: url('../fonts/Cairo-Black.woff2') format('woff2'); font-weight: 900; font-style: normal; font-display: swap; }

/* CENTERING ALL TITLES */
h1, h2, h3, h4, h5, h6, .the-subtitle, .main-title, .archive-title, .eng-archive-title, .post-title, .widget-title, .mag-box-title h2, .mag-box-title h3, .price-title, .app-dl-title { text-align: center !important; }
h1 .the-subtitle, h1, h2, h3, h4, h5, h6, .the-subtitle { line-height: 1.5; font-weight: 600; margin-top: 24px; margin-bottom: 16px; }
h1 { font-size: 30px; font-weight: 700; } h2 { font-size: 25px; } h3 { font-size: 21px; } h4, .the-subtitle { font-size: 17px; } h5 { font-size: 13px; } h6 { font-size: 12px; }

/* CENTERING ALL IMAGES & TABLES */
img, figure, .wp-block-image { display: block; margin-left: auto !important; margin-right: auto !important; text-align: center; }
table, .wp-block-table, .c961-international-table { margin-left: auto !important; margin-right: auto !important; text-align: center; width: 100%; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
th, td { text-align: center; }

/* Unified paragraph styling (removed duplicate text-align conflicts) */
p { display: block; margin-block-start: 2em; margin-block-end: 2em; margin-inline-start: 2px; margin-inline-end: 2px; unicode-bidi: isolate; }

.wrap { overflow: hidden; background: black; }
.container { max-width: 1200px; width: 100% !important; margin: 0 auto; display: flex; flex-wrap: nowrap; justify-content: center; box-sizing: border-box; overflow: hidden; }
.content-area { width: 90%; padding: 80px; background-color: #fff; border-radius: 0px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); min-height: 300px; flex: 1; min-width: 0; }
.content-full-width, .w-100 { width: 100%; }

.ad-wrapper { width: 100%; display: block; margin: 0 auto; text-align: center; }
.top-content-wrapper { display: flex; flex-wrap: wrap; gap: 30px; width: 100%; }
.fw-hr-wrapper { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.hr-spacer { border: none; background-color: transparent; height: 30px; }
.custom-divider { border: none; height: 1px; background: linear-gradient(to right, rgba(192,192,192,0), rgba(192,192,192,0.4), rgba(192,192,192,0)); margin: 35px 0; }

.prices-grid { display: flex; flex-wrap: wrap; gap: 70px; justify-content: center; align-items: center; margin: 0 auto 25px auto; max-width: 800px; }
.price-col { flex: 1; min-width: 280px; text-align: center; }
.chart-container { width: 100%; direction: ltr; }

.tools-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; align-items: flex-start; margin: 30px auto; max-width: 900px; direction: rtl; }
.tools-grid-ltr { direction: ltr !important; }
.tool-col { flex: 1; max-width: 420px; min-width: 280px; display: flex; flex-direction: column; }
.tool-card { flex: 1; display: flex; flex-direction: column; justify-content: center; background: #ffffff; border-radius: 16px; }

.lira-grid { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; margin: 0 auto 25px auto; max-width: 680px; gap: 8px; }
.lira-col { flex: 1; text-align: center; }
.lira-figure { margin: 0; }
.table-wrapper { margin: 20px auto 30px auto; width: 100%; }

.home-container { display: flex; gap: 20px; padding: 20px; max-width: 1200px; margin: 0 auto; flex-wrap: wrap; justify-content: space-between; width: 100%; min-height: 400px; }
#home-related-posts-widget { background-color: #fff; padding: 30px; margin-top: 0; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); width: 100%; box-sizing: border-box; margin-bottom: 30px; }
.home-related-posts-list { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 10px; margin-top: 15px; margin-bottom: 15px; }
.home-related-item { background-color: #f5f5f5; border: 1px solid #e0e0e0; border-radius: 8px; text-align: center; transition: all 0.3s ease; margin-top: 15px; margin-bottom: 15px; }
.home-related-item:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.1); transform: translateY(-5px); }
.home-related-item .home-post-thumb img { height: 150px; width: 100%; object-fit: cover; border-radius: 5px; margin-bottom: 10px; }
.home-related-item .home-post-title a { text-decoration: none; color: #000; transition: color 0.2s ease; font-size: 15px; font-weight: 800; margin: 0 5px; line-height: 2; display: inline-block; }
.home-related-item .home-post-title a:hover { color: #d32f2f; }
.home-related-item .post-meta { display: none; }

.mag-box-title { background: linear-gradient(to left, #FFA500, #FFD700); color: #fff; padding: 0 15px; display: flex; justify-content: space-between; align-items: center; border-radius: 5px; }
.mag-box-title h2 { margin: 0; font-size: 22px; font-weight: bold; }
.mag-box-title h3 { font-size: 20px; font-weight: bold; margin-bottom: 20px; color: #0f172a; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; position: relative; }
.mag-box-title h3 a { color: white; text-decoration: none !important; }
.mag-box-title h3 span { border-bottom: 3px solid #f59e0b; padding-bottom: 10px; }

.block-more-button { color: white; font-size: 14px; background-color: black; padding: 5px 12px; border-radius: 3px; text-decoration: none; }
.block-more-button:hover { background-color: white; color: red; }

#latest-posts-widget { max-width: 80%; margin: 0 auto; position: relative; overflow: hidden; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); background: white; padding: 10px; bottom: 15px; }
#main-post { position: relative; width: 100%; border-radius: 12px; overflow: hidden; }
#main-thumbnail { width: 100%; height: 350px; object-fit: cover; display: block; border-radius: 12px; }
#main-title { position: absolute; bottom: 10px; left: 0; width: 100%; background: rgba(0,0,0,0.7); color: white; padding: 10px; font-size: 16px; text-align: center; border-radius: 0 0 12px 12px; }
.read-more { color: red; font-weight: bold; margin-left: 10px; }

#thumbnails1 { height: 100px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; padding: 10px 0; justify-items: center; }
.thumbnail-link { display: block; width: 100%; border-radius: 8px; overflow: hidden; cursor: pointer; }
.thumbnail { width: 100%; height: 100px; object-fit: cover; transition: transform 0.2s ease; border-radius: 8px; }
.thumbnail:hover { transform: scale(1.1); }

.archive-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 25px; }
.archive-item { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.15); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.archive-item:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.25); }
.archive-thumb img { width: 100%; height: 200px; object-fit: cover; }
.archive-post-title { font-size: 18px; font-weight: bold; color: #000; line-height: 1.4; text-decoration: none; display: block; margin-bottom: 10px; padding: 10px 20px 0px 20px; transition: color 0.3s; }
.archive-post-title:hover { color: #b60000; }
.archive-date { font-size: 14px; color: #666; }

.archive-title { font-size: 40px; font-weight: bold; color: #b60000; margin-bottom: 30px; }
.eng-archive-title { font-size: 40px; font-weight: bold; color: #000000; margin-bottom: 30px; direction: ltr; }

.pagination { text-align: center; margin-top: 40px; }
.pagination a { display: inline-block; margin: 0 5px; padding: 8px 14px; background: #b60000; color: #fff; border-radius: 6px; text-decoration: none; }
.pagination a:hover { background: #8a0000; }

.load-more-container { text-align: center; margin: 40px 0; }
.load-more-btn { background: none; border: 2px solid #000; border-radius: 10px; font-size: 22px; font-weight: bold; color: #ffa500; padding: 10px 40px; cursor: pointer; transition: all 0.3s ease; }
.load-more-btn span { color: #ffa500; font-size: 26px; margin-right: 8px; }
.load-more-btn:hover { background: linear-gradient(to right, #ffd700, #ffa500); color: #fff; }
.load-more-btn:hover span { color: #fff; }

.post-thumbnail { width: 100%; }
.post-thumbnail img { width: 100%; height: auto; object-fit: contain; border-radius: 10px; display: block; margin-left: auto; margin-right: auto; }
.post-details { padding: 10px; }
.post-date { font-size: 0.9rem; color: #777; margin-bottom: 10px; }
.post-title a { font-size: 1.2rem; font-weight: bold; color: black; text-decoration: none; line-height: 1.4; }
.post-title a:hover { color: #e8230d; }

.article-full { background: #ffffff; padding: 15px 0; }
.article-full a { color: #007bff; transition: color 0.3s ease; word-wrap: break-word; }
.article-full a:hover { color: #0056b3; }
.article-header { line-height: 1.5; text-align: center; }

.post-content { line-height: 1.85; font-size: 16.5px; color: #2d3748; margin: 20px 20px; }
.post-content p { margin-bottom: 18px; }

#related-posts { background-color: #fff; padding: 30px; margin-top: 40px; border-top: 2px solid #f1f5f9; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); width: 100%; box-sizing: border-box; margin-bottom: 15px; }
.related-posts-list { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 20px; margin-top: 20px; align-items: center; }
.related-item { background-color: #f5f5f5; border: 1px solid #e0e0e0; border-radius: 8px; transition: all 0.3s ease; display: flex; flex-direction: column; }
.related-item:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.1); transform: translateY(-5px); }
.related-item .post-thumb { display: block; border-radius: 8px; overflow: hidden; margin-bottom: 10px; aspect-ratio: 16 / 10; background: #e2e8f0; }
.related-item .post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; border-radius: 5px; }
.related-item .post-thumb:hover img { transform: scale(1.05); }
.related-item .post-title { margin-top: 5px; font-size: 15px; line-height: 1.4; font-weight: 600; text-align: center; }
.related-item .post-title a { text-decoration: none; color: #1e293b; transition: color 0.2s ease; margin: 0 5px; display: inline-block; }
.related-item .post-title a:hover { color: #f59e0b; }

.wp-block-embed-twitter, .wp-block-embed-facebook { max-width: 100% !important; overflow: hidden; display: flex; justify-content: center; }
.wp-block-embed-twitter .wp-block-embed__wrapper, .wp-block-embed-facebook .wp-block-embed__wrapper { max-width: 100%; }
.wp-block-embed-twitter iframe, .wp-block-embed-facebook iframe { max-width: 100% !important; height: auto !important; min-height: 600px !important; display: block; flex-grow: 1; }
.wp-block-embed-youtube { max-width: 100% !important; overflow: hidden; justify-content: center; }
.wp-block-embed-youtube .wp-block-embed__wrapper { max-width: 100%; position: relative; padding-bottom: 56.25%; height: 0; }
.wp-block-embed-youtube iframe { max-width: 100% !important; height: 100% !important; position: absolute; top: 0; left: 0; width: 100%; }

.gold-page-wrapper figure.wp-block-image, .content-area figure.wp-block-image { display: flex; justify-content: center; align-items: center; margin: 15px auto; width: 100%; }
article .wp-image, .page .wp-image, article img, .page img { max-width: 100%; display: block; margin: 0 auto; }
.content-area img { width: 70%; height: auto; margin-bottom: 20px; }

.silver-img { height: auto; border-radius: 6px; }
.img-header-gold, img.gold-img[src*="enu-50-g"], .img-silver, img[src*="silver.png"], .img-finance-stock { max-width: 40% !important; width: 40% !important; height: auto !important; display: block !important; margin: 0 auto !important; }
.img-swiss-gold, img[src*="swissounce"] { max-width: 25% !important; width: 25% !important; height: auto !important; display: block !important; margin: 0 auto !important; }
.img-local-gold, img[src*="localounce"] { max-width: 15% !important; width: 15% !important; height: auto !important; display: block !important; margin: 0 auto !important; }
.img-crypto-banner { max-width: 50% !important; width: 50% !important; height: auto !important; display: block !important; margin: 0 auto !important; border-radius: 12px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
.crypto-figure-box { margin: 25px auto !important; }
.img-lira-en, img[src*="main/images.jpeg"], .img-lira-ot, img[src*="354164_5_1667040878"] { max-width: 15% !important; height: auto !important; object-fit: contain; }
.img-app-preview { width: 100% !important; max-width: 320px !important; border-radius: 8px; display: block; margin: 0 auto; }

.main-title { font-size: 28px; font-weight: 800; line-height: 1.3; }
.gold-gradient, .silver-gradient, .finance-gradient, .crypto-gradient, .commodities-gradient { text-align: center; display: block; width: fit-content; margin: 20px auto 15px auto; padding: 5px 16px; border-radius: 6px; font-size: 19px; font-weight: bold; }
.gold-gradient { color: #ffb800; background: #434343; }
.silver-gradient { color: #e2e8f0 !important; background: #334155; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
.finance-gradient { color: #ffffff !important; background: linear-gradient(135deg, #0f172a, #1e3a8a); }
.crypto-gradient { color: #ffffff !important; background: linear-gradient(135deg, #065f46, #10b981); }
.commodities-gradient { color: #ffffff !important; background: linear-gradient(135deg, #1c1917, #78350f); }

.hr-gradient, .hr-silver-gradient { height: 20px; border: none; width: 100%; margin: 0; }
.hr-gradient { background: linear-gradient(to right, #FFD700, #FFA500) !important; }
.hr-silver-gradient { background: linear-gradient(to right, #c0c0c0, #e0e0e0) !important; }
.hr-finance-gradient, .hr-crypto-gradient, .hr-commodities-gradient { height: 16px; border: none; width: 100%; margin: 30px 0; }
.hr-finance-gradient { background: linear-gradient(to right, #0284c7, #1e3a8a) !important; }
.hr-crypto-gradient { background: linear-gradient(to right, #10b981, #047857) !important; }
.hr-commodities-gradient { background: linear-gradient(to right, #d97706, #78350f) !important; }

.custom-gold-quote, .custom-silver-quote, .custom-finance-quote, .custom-crypto-quote, .custom-commodities-quote { margin: 20px auto; max-width: 800px; border-radius: 4px; }
.custom-gold-quote { border-left: 4px solid #FFD700; padding: 15px; background: #f9f9f9; text-align: center; }
.custom-silver-quote { border-left: 4px solid #94a3b8; padding: 15px; background: #f1f5f9; text-align: center; }
.custom-finance-quote { border-left: 4px solid #0284c7; padding: 12px 16px; background: #f8fafc; }
.custom-crypto-quote { border-left: 4px solid #10b981; padding: 12px 16px; background: #ecfdf5; }
.custom-commodities-quote { border-left: 4px solid #b45309; padding: 12px 16px; background: #fffbeb; }

.seo-lead-text, .seo-inter-text, .lead-finance-text, .seo-text-block { line-height: 2.2; color: #475569; margin: 15px auto 25px auto; max-width: 850px; font-size: 16px; padding: 0 0px; }
.seo-inter-text h3, .seo-text-block h3 { margin-top: 25px; margin-bottom: 12px; color: #222; font-size: 19px; font-weight: bold; }
.seo-text-block p { margin-bottom: 12px; }
.note-subtext { margin-top: 10px; color: #64748b; font-size: 14px; }

/* Unified Justify Text logic */
p, .post-content p, .article-full p, .seocontent p, .en-content p, .eng-text p, .eng-archive-content {
    text-align: justify !important;
}

.seocontent { direction: rtl; line-height: 2.1; color: #333333; margin: 30px auto 0 auto; max-width: 900px; padding: 0 15px; }
.seocontent-ltr { direction: ltr !important; line-height: 2.1; color: #333333; margin: 30px auto 0 auto; max-width: 900px; padding: 0 15px; }
.seocontent h2 { font-size: 22px; margin-top: 30px; margin-bottom: 15px; color: #0f172a; font-weight: bold; }
.seocontent h3 { font-size: 18px; margin-top: 25px; margin-bottom: 10px; color: #1e293b; font-weight: bold; }
.seocontent p { margin-bottom: 18px; }

.seocontent ul, .seocontent ol, .seo-list-disc, .seo-ordered-list, .seo-ordered-list-ar, .nested-finance-list { list-style: none !important; padding: 0 !important; margin: 15px auto 25px auto !important; max-width: 800px; }
.seocontent ul li, .seo-list-disc li { margin-bottom: 10px; line-height: 1.8; }
.seocontent ul li::before, .seo-list-disc li::before { content: "• "; color: #f59e0b; font-weight: bold; display: inline-block; margin: 0 5px; }
.seocontent ol, .seo-ordered-list, .seo-ordered-list-ar { list-style-position: inside !important; }
.seocontent ol li, .seo-ordered-list li, .seo-ordered-list-ar li { margin-bottom: 10px; line-height: 1.9; }
.nested-finance-list ul { margin-top: 8px; margin-bottom: 8px; }
.seo-tags-block { font-size: 14px; opacity: 0.8; margin-top: 25px; }

.prediction-btn-wrap, .app-dl-wrap { text-align: center; margin: 25px auto; max-width: 420px; }
.prediction-btn { display: block; width: 100%; background-color: #f59e0b; color: #ffffff !important; padding: 14px 20px; border-radius: 12px; font-weight: bold; font-size: 16px; text-decoration: none; text-align: center; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); transition: background 0.2s; }
.prediction-btn:hover { background-color: #d97706; }
.app-dl-card { display: block; width: 100%; background-color: #0f172a; border-radius: 16px; padding: 22px; text-align: center; text-decoration: none; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); transition: transform 0.2s; }
.app-dl-card:hover { transform: translateY(-3px); }
.app-dl-title { color: #ffffff; font-size: 18px; font-weight: bold; margin: 0 0 15px 0; }

.preferred-source-slot { display: flex !important; justify-content: center !important; width: 100% !important; margin-top: 10px !important; margin-bottom: 15px !important; direction: rtl !important; }
.preferred-source-btn { display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 10px !important; padding: 8px 16px !important; min-height: 45px !important; border-radius: 10px !important; border: 1px solid #cce4f7 !important; background-color: #e8f4fd !important; color: #111111 !important; font-family: inherit, sans-serif !important; font-size: 16px !important; font-weight: 700 !important; line-height: 1.3 !important; text-align: center !important; text-decoration: none !important; cursor: pointer !important; transition: all 0.25s ease !important; }
.preferred-source-btn:hover { background-color: #d8ecfa !important; color: #000000 !important; text-decoration: none !important; }
.preferred-source-btn-icon { flex: 0 0 auto !important; width: 22px !important; height: 22px !important; }

@media (min-width: 576px) { .preferred-source-btn { font-size: 18px !important; } }

/* FOOTER & SOCIALS */
footer { padding: 20px 0; line-height: 20px; text-align: center; font-size: 13px; color: white; }
.footer-content { display: flex; justify-content: space-between; align-items: center; gap: 2px; width: 100%; max-width: 1200px; margin: 0 auto; flex-direction: column; text-align: center; }
.footer-bottom { font-size: 14px; margin-bottom: 10px; text-align: center; }
.footer-nav, .eng-footer-nav { text-align: center; margin: 20px 0; }
.footer-nav-list, .eng-footer-nav-list { list-style: none; padding: 0; margin: 0; }
.footer-nav-list li, .eng-footer-nav-list li { display: inline-block; margin: 0 10px; }
.footer-nav-list li a, .eng-footer-nav-list li a { color: white !important; text-decoration: none !important; font-weight: 500; }
.footer-nav-list li a:hover, .eng-footer-nav-list li a:hover { opacity: 0.8; }

.article-footer { margin-top: 30px; font-size: 16px; background-color: #ffa500; line-height: 2; }
body.layout-ar .article-footer { direction: rtl; }
.white-text { color: white; }
.white-text .label { color: black; }
.white-text .prev-title { color: white; margin-right: 10px; }
.article-footer a { color: white; text-decoration: none; transition: color 0.3s ease; }
.article-footer a:hover { color: black; }

.social-share { margin-bottom: 20px; display: flex; align-items: center; margin-right: 0; justify-content: center; }
.social-share.has-text-align-center { justify-content: center !important; }
.social-share-bottom { margin-top: 25px; margin-bottom: 25px; padding-top: 15px; border-top: 1px solid #e2e8f0; }
.social-share-title { font-weight: bold; margin: 0 8px; }
.social-share a { margin: 0 5px; text-decoration: none; font-size: 18px; transition: transform 0.3s ease; }
.social-share span { font-size: 20px; margin-right: 5px; color: #333; }
.social-share a:hover { transform: scale(1.1); }
.social-share .fab { font-size: 30px; color: #333; }
.social-share .fab.fa-whatsapp { color: #25d366; }
.social-share .fab.fa-telegram { color: #0088cc; }
.social-share .fab.fa-facebook { color: #1877f2; }
.social-share .fab.fa-twitter { color: #1da1f2; }

.read-also-block { background: #f8fafc; border-left: 4px solid #f59e0b; padding: 12px 18px; margin: 25px 0; font-size: 15.5px; border-radius: 0 8px 8px 0; }
.read-also-block .label { font-weight: bold; color: #0f172a; margin-right: 6px; }
.read-also-block .prev-title { color: #d97706; text-decoration: none; font-weight: 600; }
.read-also-block .prev-title:hover { text-decoration: underline; }

.c961-ar-links, .c961-en-links { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px 14px; 
    justify-content: center; 
    align-items: center; 
    line-height: 1.5; 
}
.c961-ar-links a, .c961-en-links a { 
    color: #94a3b8; text-decoration: none; font-size: 11px; transition: color 0.15s ease; white-space: nowrap; 
}
.c961-ar-links a:hover, .c961-en-links a:hover { color: #ffffff; text-decoration: underline; }
.c961-ar-links a::after { content: "•"; color: #334155; margin-right: 14px; }
.c961-ar-links a:last-child::after { content: ""; margin-right: 0; }
.c961-en-links a::after { content: "•"; color: #334155; margin-left: 14px; }
.c961-en-links a:last-child::after { content: ""; margin-left: 0; }

.move-to-top { position: fixed; bottom: 50px; left: 10px; background: linear-gradient(to right, rgb(255, 215, 0), rgb(255, 165, 0)) !important; display: block !important; color: white; border: none; padding: 12px; width: 50px; height: 50px; font-size: 20px; cursor: pointer; border-radius: 50%; text-align: center; z-index: 1000; transition: opacity 0.3s ease, transform 0.2s ease, background-color 0.3s ease; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); direction: rtl !important; text-decoration: none; }
.move-to-top:hover { background-color: #000000; transform: translateY(-3px); }
.move-to-top::before { content: '>'; font-size: 45px; display: inline-block; color: white; transform: rotate(90deg); line-height: 0; text-align: center; width: 100%; direction: rtl !important; }
.move-to-top-finance { background: linear-gradient(to right, #0284c7, #1e3a8a) !important; }
.move-to-top-crypto { background: linear-gradient(to right, #10b981, #047857) !important; }
.move-to-top-commodities { background: linear-gradient(to right, #d97706, #78350f) !important; }
.social-icons { display: flex; justify-content: center; gap: 25px; }
.social-icons a { color: white; font-size: 20px; text-decoration: none; transition: color 0.3s ease; }
.social-icons a:hover { color: #ffcc00; }

/* ==========================================================================
   6. BODY & FOOTER (MOBILE)
   ========================================================================== */
@media screen and (max-width: 768px) {
    .container { flex-direction: column; gap: 20px; align-items: center; width: 100% !important; }
    .content-area, .primary-sidebar { width: 100%; margin: 10px 0; padding: 35px; }
    .primary-sidebar, .wrap { overflow: hidden; }
    
    .home-container { display: block; gap: 0; justify-content: unset; flex-wrap: unset; }
    .home-related-posts-list { grid-template-columns: repeat(2, 1fr); grid-gap: 10px; margin-top: 15px; margin-bottom: 15px; }
    #home-related-posts-widget { padding: 20px; }
    .widget-title { font-size: 20px; }
    #latest-posts-widget { max-width: 100%; }
    #thumbnails1 a:nth-child(n+7) { display: none; }
    #thumbnails1 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, auto); height: 200px; width: 100%; object-fit: cover; }
    .related-posts-list { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    #related-posts { padding: 0; }
    
    .lira-grid { flex-wrap: wrap; }
    /* Mobile Table Fix */
    .table-wrapper, .currencies-table-wrapper, .commodities-table-wrapper, .crypto-table-wrapper {
        width: 100%;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
    }
    .c961-international-table { 
        display: table !important; 
        width: 100% !important; 
        min-width: 500px !important; 
    }
    
    /* Khalli l ar2am ma yenzalo sater, bas l esem masmou7lo yenzal sater */
    .curr-price, .curr-change, .curr-pct,
    .stock-price, .stock-change, .stock-pct,
    .bond-price, .bond-change, .bond-pct,
    .index-price, .index-change, .index-pct {
        white-space: nowrap !important;
    }

    /* W zid 3al esem khasyet l wrap la yekhod ra7to */
    .c961-international-table td:first-child span {
        white-space: normal !important;
        word-break: break-word; /* Bye2tosh l kelme l kbeere eza mazzn2a */
        line-height: 1.6 !important;
    }

    article img, .page img, .content-area img { width: 70%; margin-bottom: 15px; }
    .post-thumbnail img { width: 100%; border-radius: 10px; margin: 0 auto; }
    .post-details { padding: 10px 0; }
    .post-title a { font-size: 1rem; line-height: 1.5; }
    .read-more-btn a { font-size: 0.8rem; }
    .gold-img, .img-header-gold, img.gold-img[src*="enu-50-g"], .img-silver, img[src*="silver.png"], .img-finance-stock { max-width: 70% !important; width: 70% !important; }
    .responsive-swiss-img, .img-swiss-gold, img[src*="swissounce"] { max-width: 50% !important; width: 50% !important; }
    .responsive-local-img, .img-local-gold, img[src*="localounce"] { max-width: 35% !important; width: 35% !important; }
    .img-crypto-banner { max-width: 80% !important; width: 80% !important; }

    .move-to-top { bottom: 10px; }
    .footer-bottom { margin-bottom: 50px; }
    .social-icons { display: flex; justify-content: center; gap: 25px; }
    .social-icons a { color: white; font-size: 20px; text-decoration: none; transition: color 0.3s ease; }
    .social-icons a:hover { color: #ffcc00; }
}

@media screen and (max-width: 480px) {
    .home-related-posts-list { grid-template-columns: 1fr; }
    #home-related-posts-widget { padding: 15px; }
    .widget-title { font-size: 18px; }
    .see-more-btn { font-size: 14px; padding: 8px 16px; }
    .related-posts-list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   7. FIX ENGLISH LTR & ARABIC RTL Explicitly (Cleaned)
   ========================================================================== */

/* Default Arabic setup (RTL) */
body, .text-ar, body.lang-ar, html[lang="ar"],
.seocontent, .archive-content {
    direction: rtl;
}

/* Explicit English LTR setup (Targets English pages auto) */
html[dir="ltr"] body,
html[lang^="en"] body,
body.lang-en,
body.translate-en,
.text-en, .en-text, .eng-text, body[dir="ltr"],
.en-content, .seocontent-ltr, .eng-archive-content {
    direction: ltr !important;
}

/* Align text according to language direction, while keeping Justify */
html[dir="ltr"] p,
html[lang^="en"] p,
body.lang-en p,
body.translate-en p,
.en-content p, 
.eng-text p, 
.seocontent-ltr p, 
.eng-archive-content p,
.en-content ul li,
.en-content ol li {
    direction: ltr !important;
}

/* ==========================================================================
   8. STICKY HEADER & ADMIN BAR FIX (DESKTOP & MOBILE)
   ========================================================================== */

/* 1. تثبيت الهيدر الإنجليزي والعربي */
#eng-theme-header,
#theme-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
    margin-top: 0 !important;
    transition: background 0.3s ease;
}

/* 2. إزاحة محتوى الصفحة لتحت كرمال ما يتخبى ورا الهيدر (للزوار العاديين) */
body {
    padding-top: 85px !important;
}

@media (max-width: 768px) {
    body {
        padding-top: 80px !important;
    }
}

/* 3. لما تكون فاتح Admin Panel عالديسكتوب */
body.admin-bar #eng-theme-header,
body.admin-bar #theme-header {
    top: 32px !important; /* ينزل تحت شريط الأدمن */
}

body.admin-bar {
    padding-top: 117px !important; /* 85px الهيدر + 32px شريط الأدمن */
}

/* 4. لما تكون فاتح Admin Panel عالموبايل */
@media (max-width: 782px) {
    body.admin-bar #eng-theme-header,
    body.admin-bar #theme-header {
        top: 46px !important; /* شريط الأدمن عالموبايل 46px */
    }

    body.admin-bar {
        padding-top: 126px !important; /* 80px الهيدر + 46px شريط الأدمن */
    }
}