/* ==========================================================================
   SEO Arab Pro — الأنماط الرئيسية (RTL أولاً / داكن افتراضياً + وضع نهاري)
   ========================================================================== */

/* ---------- 1. المتغيرات ---------- */
:root {
        --font-head: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
        --font-body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;

        --bg: #0F172A;
        --bg-soft: #0B1220;
        --surface: #131F38;
        --surface-2: #1B2947;
        --card: #131F38;
        --border: rgba(148, 163, 184, 0.16);
        --border-strong: rgba(148, 163, 184, 0.28);
        --text: #E6EDF7;
        --text-strong: #F8FAFC;
        --muted: #94A3B8;
        --accent: #10B981;
        --accent-strong: #34D399;
        --accent-contrast: #05261B;
        --accent-soft: rgba(16, 185, 129, 0.12);
        --cyan: #22D3EE;
        --gradient: linear-gradient(135deg, #10B981 0%, #06B6D4 100%);
        --shadow: 0 14px 44px rgba(2, 6, 23, 0.5);
        --shadow-soft: 0 6px 24px rgba(2, 6, 23, 0.35);
        --radius: 16px;
        --radius-sm: 10px;
        --header-h: 72px;
        --container: 1200px;
}

html[data-theme="light"] {
        --bg: #F6F8FB;
        --bg-soft: #EEF2F8;
        --surface: #FFFFFF;
        --surface-2: #F1F5FA;
        --card: #FFFFFF;
        --border: #E2E8F0;
        --border-strong: #CBD5E1;
        --text: #0F172A;
        --text-strong: #020617;
        --muted: #5B6B82;
        --accent: #059669;
        --accent-strong: #047857;
        --accent-contrast: #FFFFFF;
        --accent-soft: rgba(5, 150, 105, 0.1);
        --gradient: linear-gradient(135deg, #059669 0%, #0891B2 100%);
        --shadow: 0 14px 44px rgba(15, 23, 42, 0.1);
        --shadow-soft: 0 6px 20px rgba(15, 23, 42, 0.07);
}

/* ---------- 2. تصفير وأساسيات ---------- */
*,
*::before,
*::after {
        box-sizing: border-box;
}

html {
        scroll-behavior: smooth;
        scroll-padding-top: calc(var(--header-h) + 24px);
        -webkit-text-size-adjust: 100%;
}

body {
        margin: 0;
        background: var(--bg);
        color: var(--text);
        font-family: var(--font-body);
        font-size: 16.5px;
        line-height: 1.9;
        -webkit-font-smoothing: antialiased;
        transition: background-color 0.3s ease, color 0.3s ease;
}

img {
        max-width: 100%;
        height: auto;
        display: block;
}

a {
        color: var(--accent-strong);
        text-decoration: none;
        transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
        color: var(--accent);
}

h1, h2, h3, h4, h5, h6 {
        font-family: var(--font-head);
        color: var(--text-strong);
        line-height: 1.45;
        font-weight: 800;
        margin: 0 0 0.5em;
        word-break: break-word;
}

p {
        margin: 0 0 1.2em;
}

::selection {
        background: var(--accent);
        color: var(--accent-contrast);
}

.container {
        max-width: var(--container);
        margin-inline: auto;
        padding-inline: 24px;
}

.narrow {
        max-width: 1080px;
}

.screen-reader-text {
        border: 0;
        clip: rect(1px, 1px, 1px, 1px);
        clip-path: inset(50%);
        height: 1px;
        width: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute !important;
        word-wrap: normal !important;
}

.skip-link:focus {
        clip: auto;
        clip-path: none;
        height: auto;
        width: auto;
        position: fixed !important;
        top: 12px;
        right: 12px;
        z-index: 100000;
        background: var(--accent);
        color: var(--accent-contrast);
        padding: 10px 20px;
        border-radius: 8px;
        font-weight: 700;
}

/* ---------- 3. الأزرار ---------- */
.btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-family: var(--font-head);
        font-weight: 700;
        font-size: 0.95rem;
        padding: 13px 28px;
        border-radius: 12px;
        border: 1px solid transparent;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
        transform: translateY(-2px);
}

.btn-primary {
        background: var(--gradient);
        color: #FFFFFF;
        box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
        color: #FFFFFF;
        box-shadow: 0 12px 30px rgba(16, 185, 129, 0.42);
}

.btn-ghost {
        background: transparent;
        color: var(--text);
        border-color: var(--border-strong);
}

.btn-ghost:hover {
        border-color: var(--accent);
        color: var(--accent-strong);
}

.btn-sm {
        padding: 9px 20px;
        font-size: 0.875rem;
}

.btn-block {
        width: 100%;
}

.icon-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: transparent;
        color: var(--text);
        cursor: pointer;
        transition: all 0.2s ease;
}

.icon-btn:hover {
        border-color: var(--accent);
        color: var(--accent-strong);
        background: var(--accent-soft);
}

/* ---------- 4. الهيدر ---------- */
.site-header {
        position: sticky;
        top: 0;
        z-index: 900;
        background: color-mix(in srgb, var(--bg) 82%, transparent);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        border-bottom: 1px solid transparent;
        transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.3s ease;
}

.site-header.is-scrolled {
        border-bottom-color: var(--border);
        box-shadow: 0 8px 30px rgba(2, 6, 23, 0.35);
}

.header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        height: var(--header-h);
}

.site-branding {
        flex-shrink: 0;
}

.custom-logo {
        max-height: 44px;
        width: auto;
}

.site-logo-text {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        font-family: var(--font-head);
        font-weight: 900;
        font-size: 1.22rem;
        color: var(--text-strong);
}

.site-logo-text:hover {
        color: var(--text-strong);
}

.site-logo-text.small {
        font-size: 1.05rem;
}

.logo-mark {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 11px;
        background: var(--gradient);
        color: #FFFFFF;
        box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.main-navigation {
        display: none;
}

.main-navigation ul.menu,
.main-navigation > ul {
        display: flex;
        align-items: center;
        gap: 6px;
        margin: 0;
        padding: 0;
        list-style: none;
}

.main-navigation li {
        position: relative;
}

.main-navigation a {
        display: block;
        padding: 9px 15px;
        border-radius: 10px;
        font-family: var(--font-head);
        font-weight: 600;
        font-size: 0.95rem;
        color: var(--muted);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
        color: var(--text-strong);
        background: var(--accent-soft);
}

/* قائمة فرعية */
.main-navigation .sub-menu {
        position: absolute;
        top: calc(100% + 10px);
        inset-inline-start: 0;
        min-width: 210px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 14px;
        box-shadow: var(--shadow);
        padding: 8px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: all 0.2s ease;
        z-index: 50;
}

.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
}

.header-actions {
        display: flex;
        align-items: center;
        gap: 10px;
}

/* زر الوضع الليلي */
.theme-toggle .icon-sun {
        display: none;
}

html[data-theme="light"] .theme-toggle .icon-sun {
        display: inline-flex;
}

html[data-theme="light"] .theme-toggle .icon-moon {
        display: none;
}

/* همبرغر */
.menu-toggle {
        flex-direction: column;
        gap: 5px;
}

.menu-toggle .bar {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
        opacity: 0;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 900px) {
        .main-navigation {
                display: block;
        }

        .menu-toggle {
                display: none;
        }
}

/* ---------- 5. درج البحث ---------- */
.search-drawer {
        border-bottom: 1px solid var(--border);
        background: var(--surface);
        animation: slideDown 0.25s ease;
}

.search-drawer-inner {
        max-width: 720px;
        padding-block: 18px;
}

@keyframes slideDown {
        from {
                opacity: 0;
                transform: translateY(-8px);
        }

        to {
                opacity: 1;
                transform: translateY(0);
        }
}

/* ---------- 6. درج قائمة الجوال ---------- */
.mobile-drawer {
        position: fixed;
        inset: 0;
        z-index: 990;
}

.mobile-drawer-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(2, 6, 23, 0.6);
        -webkit-backdrop-filter: blur(3px);
        backdrop-filter: blur(3px);
}

.mobile-drawer-panel {
        position: absolute;
        inset-block: 0;
        inset-inline-end: 0;
        width: min(340px, 88vw);
        background: var(--surface);
        border-inline-start: 1px solid var(--border);
        padding: 22px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 20px;
        animation: drawerIn 0.3s ease;
}

@keyframes drawerIn {
        from {
                transform: translateX(-100%);
        }

        to {
                transform: translateX(0);
        }
}

[dir="rtl"] .mobile-drawer-panel {
        animation-name: drawerInRTL;
}

@keyframes drawerInRTL {
        from {
                transform: translateX(100%);
        }

        to {
                transform: translateX(0);
        }
}

.mobile-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
}

.mobile-menu,
.mobile-menu ul {
        list-style: none;
        margin: 0;
        padding: 0;
}

.mobile-menu li {
        border-bottom: 1px solid var(--border);
}

.mobile-menu li:last-child {
        border-bottom: 0;
}

.mobile-menu a {
        display: block;
        padding: 14px 4px;
        font-family: var(--font-head);
        font-weight: 700;
        font-size: 1.05rem;
        color: var(--text);
}

.mobile-menu .sub-menu a {
        padding-inline-start: 18px;
        font-size: 0.95rem;
        color: var(--muted);
}

.mobile-menu a:hover {
        color: var(--accent-strong);
}

.mobile-social .social-links {
        justify-content: flex-start;
}

/* ---------- 7. نموذج البحث ---------- */
.search-form {
        width: 100%;
}

.search-field-wrap {
        display: flex;
        align-items: center;
        gap: 6px;
        background: var(--surface-2);
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 5px 5px 5px 6px;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

[dir="rtl"] .search-field-wrap {
        padding: 5px 6px 5px 5px;
}

.search-field-wrap:focus-within {
        border-color: var(--accent);
        box-shadow: 0 0 0 4px var(--accent-soft);
}

.search-icon {
        display: inline-flex;
        padding-inline-start: 12px;
        color: var(--muted);
        flex-shrink: 0;
}

.search-input {
        flex: 1;
        min-width: 0;
        background: transparent;
        border: 0;
        outline: 0;
        color: var(--text);
        font-family: var(--font-body);
        font-size: 1rem;
        padding-block: 9px;
}

.search-input::placeholder {
        color: var(--muted);
}

/* ---------- 8. الواجهة Hero ---------- */
.hero {
        position: relative;
        padding: 84px 0 68px;
        overflow: hidden;
}

.hero-glow {
        position: absolute;
        top: -220px;
        inset-inline-end: -140px;
        width: 560px;
        height: 560px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, rgba(6, 182, 212, 0.07) 42%, transparent 70%);
        pointer-events: none;
}

.hero::after {
        content: "";
        position: absolute;
        bottom: -180px;
        inset-inline-start: -120px;
        width: 420px;
        height: 420px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(34, 211, 238, 0.08) 0%, transparent 70%);
        pointer-events: none;
}

.hero-inner {
        position: relative;
        z-index: 1;
        max-width: 820px;
}

.hero-badge {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        padding: 8px 18px;
        border-radius: 999px;
        border: 1px solid var(--border-strong);
        background: var(--accent-soft);
        color: var(--accent-strong);
        font-family: var(--font-head);
        font-weight: 700;
        font-size: 0.85rem;
        margin-bottom: 26px;
}

.pulse-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--accent);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
        animation: pulse 2.2s infinite;
}

@keyframes pulse {
        0% {
                box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
        }

        70% {
                box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
        }

        100% {
                box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        }
}

.hero-title {
        font-size: clamp(2.1rem, 5.2vw, 3.5rem);
        font-weight: 900;
        line-height: 1.35;
        margin-bottom: 20px;
        background: linear-gradient(120deg, var(--text-strong) 55%, var(--accent-strong));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
}

.hero-subtitle {
        font-size: clamp(1.02rem, 2vw, 1.18rem);
        color: var(--muted);
        line-height: 2;
        max-width: 640px;
        margin-bottom: 34px;
}

.hero-actions {
        display: flex;
        align-items: center;
        gap: 16px;
        flex-wrap: wrap;
        margin-bottom: 48px;
}

.hero-actions .search-form {
        max-width: 400px;
}

.hero-stats {
        display: flex;
        gap: clamp(24px, 5vw, 64px);
        flex-wrap: wrap;
}

.stat {
        display: flex;
        flex-direction: column;
        gap: 2px;
}

.stat-num {
        font-family: var(--font-head);
        font-weight: 900;
        font-size: 1.9rem;
        background: var(--gradient);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
}

.stat-label {
        color: var(--muted);
        font-size: 0.88rem;
}

/* ---------- 9. الأقسام والعناوين ---------- */
.section {
        padding-block: 56px;
}

.section-head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 18px;
        margin-bottom: 30px;
}

.section-head.center {
        flex-direction: column;
        text-align: center;
        align-items: center;
}

.section-title {
        font-size: clamp(1.4rem, 3vw, 1.85rem);
        font-weight: 800;
        margin: 0;
        position: relative;
        padding-inline-start: 16px;
}

.section-head.center .section-title {
        padding-inline-start: 0;
}

.section-title::before {
        content: "";
        position: absolute;
        inset-inline-start: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 5px;
        height: 70%;
        border-radius: 4px;
        background: var(--gradient);
}

.section-head.center .section-title::before {
        display: none;
}

.section-sub {
        color: var(--muted);
        margin: 6px 0 0;
}

.section-more {
        font-family: var(--font-head);
        font-weight: 700;
        font-size: 0.92rem;
        color: var(--accent-strong);
        white-space: nowrap;
}

/* ---------- 10. المقال المميز ---------- */
.latest-section {
        padding-top: 26px;
}

.featured-wrap {
        margin-bottom: 34px;
}

.featured-post {
        position: relative;
}

.featured-link {
        display: grid;
        grid-template-columns: 1.08fr 1fr;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 20px;
        overflow: hidden;
        box-shadow: var(--shadow-soft);
        transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.featured-link:hover {
        transform: translateY(-4px);
        border-color: rgba(16, 185, 129, 0.45);
        box-shadow: var(--shadow);
        color: inherit;
}

.featured-thumb {
        position: relative;
        min-height: 320px;
}

.featured-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        inset: 0;
}

.thumb-fallback {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(140deg, var(--surface-2), var(--bg-soft));
        color: var(--accent);
}

.thumb-fallback.large svg {
        width: 60px;
        height: 60px;
}

.featured-ribbon {
        position: absolute;
        top: 18px;
        inset-inline-start: 18px;
        z-index: 2;
        background: var(--gradient);
        color: #FFFFFF;
        font-family: var(--font-head);
        font-weight: 700;
        font-size: 0.78rem;
        padding: 6px 15px;
        border-radius: 999px;
        box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.featured-body {
        padding: clamp(26px, 3.4vw, 46px);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
}

.featured-title {
        font-size: clamp(1.35rem, 2.6vw, 1.9rem);
        margin: 0;
}

.featured-excerpt {
        color: var(--muted);
        margin: 0;
        font-size: 1.02rem;
}

.featured-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        color: var(--muted);
        font-size: 0.85rem;
}

.featured-body .btn {
        margin-top: auto;
}

/* ---------- 11. شبكة البطاقات ---------- */
.posts-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 26px;
}

.post-card {
        height: 100%;
}

.card-link {
        display: flex;
        flex-direction: column;
        height: 100%;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        overflow: hidden;
        transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
        color: inherit;
}

.card-link:hover {
        transform: translateY(-5px);
        border-color: rgba(16, 185, 129, 0.5);
        box-shadow: var(--shadow);
        color: inherit;
}

.card-thumb {
        position: relative;
        aspect-ratio: 16 / 10;
        overflow: hidden;
        background: var(--surface-2);
}

.card-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.45s ease;
}

.card-link:hover .card-thumb img {
        transform: scale(1.05);
}

.card-thumb .thumb-fallback svg {
        width: 44px;
        height: 44px;
}

.card-cat {
        position: absolute;
        top: 14px;
        inset-inline-start: 14px;
        z-index: 2;
        background: rgba(2, 6, 23, 0.72);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        color: #E6EDF7;
        border: 1px solid rgba(148, 163, 184, 0.25);
        font-family: var(--font-head);
        font-weight: 700;
        font-size: 0.74rem;
        padding: 4px 13px;
        border-radius: 999px;
}

.card-cat.solid {
        position: static;
        background: var(--accent-soft);
        border-color: transparent;
        color: var(--accent-strong);
}

.card-body {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 20px 22px 22px;
        flex: 1;
}

.card-title {
        font-size: 1.12rem;
        font-weight: 800;
        margin: 0;
        line-height: 1.6;
        color: var(--text-strong);
}

.card-link:hover .card-title {
        color: var(--accent-strong);
}

.card-excerpt {
        color: var(--muted);
        font-size: 0.92rem;
        line-height: 1.85;
        margin: 0;
}

.card-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: auto;
        padding-top: 8px;
        color: var(--muted);
        font-size: 0.8rem;
        border-top: 1px dashed var(--border);
}

.meta-dot {
        opacity: 0.6;
}

/* ---------- 12. القيم التحريرية ---------- */
.values-section {
        background: var(--bg-soft);
        border-block: 1px solid var(--border);
}

.values-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 26px;
}

.value-card {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 32px 28px;
        transition: transform 0.25s ease, border-color 0.25s ease;
}

.value-card:hover {
        transform: translateY(-4px);
        border-color: rgba(16, 185, 129, 0.4);
}

.value-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 54px;
        height: 54px;
        border-radius: 15px;
        background: var(--accent-soft);
        color: var(--accent-strong);
        margin-bottom: 18px;
}

.value-card h3 {
        font-size: 1.12rem;
        margin-bottom: 10px;
}

.value-card p {
        color: var(--muted);
        font-size: 0.94rem;
        margin: 0;
}

/* ---------- 13. صندوق الدعوة ---------- */
.cta-section {
        padding-block: 56px 72px;
}

.cta-box {
        text-align: center;
        background:
                radial-gradient(circle at 18% 20%, rgba(16, 185, 129, 0.16), transparent 45%),
                radial-gradient(circle at 82% 85%, rgba(6, 182, 212, 0.12), transparent 45%),
                var(--surface);
        border: 1px solid var(--border);
        border-radius: 24px;
        padding: clamp(36px, 6vw, 64px);
}

.cta-box h2 {
        font-size: clamp(1.4rem, 3.4vw, 2rem);
        margin-bottom: 12px;
}

.cta-box > p {
        color: var(--muted);
        max-width: 520px;
        margin-inline: auto;
}

.cta-actions {
        display: flex;
        justify-content: center;
        gap: 14px;
        flex-wrap: wrap;
        margin-top: 26px;
}

/* ---------- 14. مسار التنقل ---------- */
.breadcrumbs {
        margin: 26px 0 6px;
        font-size: 0.82rem;
}

.breadcrumbs ol {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        list-style: none;
        margin: 0;
        padding: 0;
        color: var(--muted);
}

.breadcrumbs li:not(:last-child)::after {
        content: "‹";
        margin-inline-start: 8px;
        opacity: 0.55;
}

.breadcrumbs a {
        color: var(--muted);
}

.breadcrumbs a:hover {
        color: var(--accent-strong);
}

.breadcrumbs [aria-current="page"] {
        color: var(--accent-strong);
        font-weight: 600;
}

/* ---------- 15. ترويسات الصفحات ---------- */
.page-header {
        margin-bottom: 34px;
}

.page-title {
        font-size: clamp(1.5rem, 3.4vw, 2.1rem);
        margin: 6px 0 0;
}

.archive-header .archive-description {
        color: var(--muted);
        margin-top: 12px;
        max-width: 720px;
}

.search-term {
        color: var(--accent-strong);
}

.results-count {
        color: var(--muted);
        margin: 10px 0 18px;
}

.search-refine {
        max-width: 560px;
}

/* ---------- 16. المقال المفرد ---------- */
.reading-progress {
        position: fixed;
        top: 0;
        inset-inline: 0;
        height: 3px;
        z-index: 999;
        background: transparent;
        pointer-events: none;
}

.reading-progress span {
        display: block;
        height: 100%;
        width: 0;
        background: var(--gradient);
        transition: width 0.1s linear;
}

.single-main {
        padding-bottom: 40px;
}

.single-layout {
        display: grid;
        grid-template-columns: minmax(0, 800px);
        justify-content: center;
}

/* عمودان فقط على الشاشات الواسعة، مع تثبيت صريح لموقع كل عنصر
   (المقال = العمود الرئيسي دائماً، الفهرس = العمود الجانبي)
   لمنع انعكاس الأعمدة بسبب ترتيب DOM في اتجاه RTL */
@media (min-width: 1220px) {
        .single-layout.has-toc {
                grid-template-columns: minmax(0, 800px) 230px;
                gap: clamp(28px, 4vw, 64px);
        }

        .single-layout.has-toc .single-article {
                grid-column: 1;
                grid-row: 1;
        }

        .single-layout.has-toc .toc-sidebar {
                grid-column: 2;
                grid-row: 1;
        }
}

.single-article {
        max-width: 800px;
}

.entry-header {
        margin-bottom: 26px;
}

.entry-title {
        font-size: clamp(1.6rem, 4vw, 2.5rem);
        line-height: 1.5;
        margin: 14px 0 16px;
}

.entry-lead {
        font-size: 1.12rem;
        color: var(--muted);
        line-height: 2;
        border-inline-start: 3px solid var(--accent);
        padding-inline-start: 18px;
        margin-bottom: 22px;
}

.entry-meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        color: var(--muted);
        font-size: 0.88rem;
        margin-bottom: 22px;
}

.meta-author {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        color: var(--text);
        font-weight: 600;
}

.author-avatar,
.meta-author img {
        border-radius: 50%;
}

.entry-featured {
        margin: 0 0 30px;
        border-radius: var(--radius);
        overflow: hidden;
        border: 1px solid var(--border);
}

/* ---------- 17. المحتوى المنسق (prose) ---------- */
.prose {
        font-size: 1.05rem;
        line-height: 2.1;
        word-break: break-word;
}

.prose > *:first-child {
        margin-top: 0;
}

.prose h2 {
        font-size: 1.55rem;
        margin: 1.9em 0 0.7em;
        padding-bottom: 0.35em;
        border-bottom: 1px solid var(--border);
        position: relative;
}

.prose h2::before {
        content: "";
        position: absolute;
        bottom: -1px;
        inset-inline-start: 0;
        width: 64px;
        height: 3px;
        border-radius: 3px;
        background: var(--gradient);
}

.prose h3 {
        font-size: 1.28rem;
        margin: 1.6em 0 0.6em;
}

.prose h4 {
        font-size: 1.12rem;
        margin: 1.4em 0 0.5em;
}

.prose p {
        margin-bottom: 1.35em;
}

.prose a {
        text-decoration: underline;
        text-decoration-color: var(--accent-soft);
        text-decoration-thickness: 2px;
        text-underline-offset: 5px;
        font-weight: 600;
}

.prose a:hover {
        text-decoration-color: var(--accent);
}

.prose ul,
.prose ol {
        padding-inline-start: 1.6em;
        margin-bottom: 1.35em;
}

.prose li {
        margin-bottom: 0.55em;
}

.prose li::marker {
        color: var(--accent);
        font-weight: 700;
}

.prose img {
        border-radius: var(--radius-sm);
        border: 1px solid var(--border);
        margin-block: 0.6em;
}

.prose figure {
        margin: 1.6em 0;
}

.prose figcaption {
        text-align: center;
        color: var(--muted);
        font-size: 0.85rem;
        margin-top: 10px;
}

.prose blockquote {
        margin: 1.8em 0;
        padding: 22px 26px;
        background: var(--accent-soft);
        border-inline-start: 4px solid var(--accent);
        border-radius: var(--radius-sm);
        font-size: 1.06rem;
        font-weight: 500;
        color: var(--text);
}

.prose blockquote p:last-child {
        margin-bottom: 0;
}

.prose blockquote cite {
        display: block;
        margin-top: 10px;
        color: var(--muted);
        font-size: 0.85rem;
        font-style: normal;
}

.prose code {
        font-family: 'SFMono-Regular', Consolas, 'Courier New', monospace;
        font-size: 0.88em;
        background: var(--surface-2);
        border: 1px solid var(--border);
        border-radius: 6px;
        padding: 2px 8px;
        color: var(--accent-strong);
        direction: ltr;
        unicode-bidi: embed;
}

.prose pre {
        background: var(--bg-soft);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 20px 24px;
        overflow-x: auto;
        direction: ltr;
        text-align: left;
        line-height: 1.75;
}

.prose pre code {
        background: none;
        border: 0;
        padding: 0;
        color: var(--text);
        font-size: 0.9rem;
}

.prose table {
        width: 100%;
        border-collapse: collapse;
        margin: 1.8em 0;
        font-size: 0.95rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        overflow: hidden;
}

.prose th,
.prose td {
        padding: 12px 16px;
        border-bottom: 1px solid var(--border);
        text-align: start;
}

.prose th {
        background: var(--surface-2);
        font-family: var(--font-head);
        font-weight: 700;
}

.prose tr:last-child td {
        border-bottom: 0;
}

.prose hr {
        border: 0;
        height: 1px;
        background: var(--border);
        margin: 2.4em auto;
        max-width: 320px;
}

.prose .wp-block-quote.is-style-large {
        font-size: 1.2rem;
}

/* تسميات توضيحية جداول المحتوى */
.prose .wp-block-table figcaption {
        text-align: center;
        color: var(--muted);
        padding-top: 10px;
}

/* ---------- 18. جدول المحتويات ---------- */
.toc-sidebar {
        display: none;
}

@media (min-width: 1220px) {
        .single-layout.has-toc .toc-sidebar {
                display: block;
                align-self: start;
                position: sticky;
                top: calc(var(--header-h) + 28px);
                max-height: calc(100vh - var(--header-h) - 56px);
                overflow-y: auto;
        }
}

.toc-nav {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 18px 16px;
}

.toc-title {
        font-family: var(--font-head);
        font-weight: 800;
        font-size: 0.92rem;
        color: var(--text-strong);
        margin: 0 0 12px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--border);
}

.toc-list {
        list-style: none;
        margin: 0;
        padding: 0;
        font-size: 0.84rem;
}

.toc-list li {
        margin: 0;
}

.toc-list a {
        display: block;
        padding: 6px 10px;
        border-inline-start: 2px solid transparent;
        border-radius: 6px;
        color: var(--muted);
        line-height: 1.7;
        transition: all 0.15s ease;
}

.toc-list a:hover {
        color: var(--accent-strong);
        background: var(--accent-soft);
}

.toc-list a.is-active {
        color: var(--accent-strong);
        border-inline-start-color: var(--accent);
        background: var(--accent-soft);
        font-weight: 600;
}

.toc-list .toc-h3 a {
        padding-inline-start: 24px;
        font-size: 0.8rem;
}

/* جدول محتويات مدمج للجوال */
.toc-inline {
        margin: 0 0 1.8em;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        overflow: hidden;
}

.toc-inline summary {
        cursor: pointer;
        padding: 15px 20px;
        font-family: var(--font-head);
        font-weight: 800;
        font-size: 0.95rem;
        list-style: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
}

.toc-inline summary::-webkit-details-marker {
        display: none;
}

.toc-inline summary::after {
        content: "▾";
        color: var(--accent);
        transition: transform 0.2s ease;
}

.toc-inline[open] summary::after {
        transform: rotate(180deg);
}

.toc-inline .toc-list {
        padding: 6px 14px 14px;
}

@media (min-width: 1220px) {
        .toc-inline {
                display: none;
        }
}

/* ---------- 19. أزرار المشاركة ---------- */
.share-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin: 20px 0 8px;
}

.share-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 16px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--muted);
        font-family: var(--font-head);
        font-weight: 600;
        font-size: 0.83rem;
        cursor: pointer;
        transition: all 0.2s ease;
}

.share-btn:hover {
        color: var(--accent-strong);
        border-color: var(--accent);
        background: var(--accent-soft);
        transform: translateY(-2px);
}

.share-btn.copy-link {
        background: transparent;
}

.copy-link.copied {
        color: var(--accent-strong);
        border-color: var(--accent);
}

/* ---------- 20. الأسئلة الشائعة ---------- */
.faq-section {
        margin-top: 44px;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: clamp(22px, 3vw, 34px);
}

.faq-title {
        font-size: 1.3rem;
        margin-bottom: 18px;
}

.faq-item {
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        margin-bottom: 12px;
        background: var(--surface-2);
        transition: border-color 0.2s ease;
}

.faq-item[open] {
        border-color: rgba(16, 185, 129, 0.45);
}

.faq-item summary {
        cursor: pointer;
        list-style: none;
        padding: 15px 20px;
        font-family: var(--font-head);
        font-weight: 700;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
}

.faq-item summary::-webkit-details-marker {
        display: none;
}

.faq-item summary::after {
        content: "+";
        font-size: 1.3rem;
        color: var(--accent);
        flex-shrink: 0;
        transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
        content: "−";
}

.faq-answer {
        padding: 0 20px 16px;
        color: var(--muted);
}

.faq-answer p {
        margin: 0;
}

/* ---------- 21. الوسوم وصندوق الكاتب ---------- */
.entry-tags {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        margin-top: 32px;
}

.tags-label {
        font-family: var(--font-head);
        font-weight: 700;
        color: var(--muted);
        font-size: 0.9rem;
}

.tag-list {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 8px;
}

.tag-list a {
        display: inline-block;
        padding: 5px 14px;
        border-radius: 999px;
        background: var(--surface-2);
        border: 1px solid var(--border);
        color: var(--muted);
        font-size: 0.8rem;
}

.tag-list a:hover {
        color: var(--accent-strong);
        border-color: var(--accent);
}

.author-box {
        margin-top: 38px;
        background:
                radial-gradient(circle at 90% 10%, rgba(16, 185, 129, 0.1), transparent 40%),
                var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 26px;
}

.author-head {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-bottom: 14px;
}

.author-head img {
        width: 72px;
        height: 72px;
        border-radius: 50%;
        border: 2px solid var(--accent);
}

.author-role {
        font-size: 0.78rem;
        color: var(--accent-strong);
        font-weight: 600;
}

.author-name-lg {
        margin: 2px 0 0;
        font-size: 1.15rem;
}

.author-bio {
        color: var(--muted);
        font-size: 0.95rem;
        margin-bottom: 16px;
}

/* ---------- 22. ذات صلة + تنقل مقال ---------- */
.related-section {
        margin-top: 48px;
}

.related-section .section-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
}

.post-navigation {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-top: 44px;
}

.post-nav-link {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 18px 22px;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        color: inherit;
        transition: border-color 0.2s ease, transform 0.2s ease;
}

.post-nav-link:hover {
        border-color: var(--accent);
        transform: translateY(-2px);
        color: inherit;
}

.post-nav-link.next {
        text-align: end;
}

.nav-dir {
        font-size: 0.76rem;
        color: var(--accent-strong);
        font-weight: 700;
}

.nav-title {
        font-family: var(--font-head);
        font-weight: 700;
        font-size: 0.94rem;
        line-height: 1.7;
        color: var(--text-strong);
}

/* ---------- 23. التعليقات ---------- */
.comments-area {
        margin-top: 48px;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: clamp(20px, 3vw, 32px);
}

.comments-title {
        font-size: 1.25rem;
}

.comment-list {
        list-style: none;
        padding: 0;
        margin: 0;
}

.comment-list .comment {
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 18px 20px;
        margin-bottom: 16px;
        background: var(--surface-2);
}

.comment-list .children {
        list-style: none;
        margin-top: 16px;
        padding-inline-start: 26px;
}

.comment-meta {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
}

.comment-meta img {
        border-radius: 50%;
}

.comment-author {
        font-family: var(--font-head);
        font-weight: 700;
        font-size: 0.95rem;
        color: var(--text-strong);
}

.comment-metadata {
        font-size: 0.76rem;
        color: var(--muted);
}

.comment-metadata a {
        color: var(--muted);
}

.comment-body p {
        margin: 0;
        color: var(--muted);
        font-size: 0.95rem;
}

.reply {
        margin-top: 10px;
}

.reply a {
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--accent-strong);
}

.comment-reply-title,
.comment-notes {
        font-size: 0.95rem;
}

.comment-form label {
        display: block;
        font-family: var(--font-head);
        font-weight: 600;
        font-size: 0.88rem;
        margin-bottom: 6px;
        color: var(--muted);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.contact-form input,
.contact-form textarea {
        width: 100%;
        background: var(--surface-2);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        color: var(--text);
        padding: 12px 16px;
        font-family: var(--font-body);
        font-size: 0.95rem;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus,
.contact-form input:focus,
.contact-form textarea:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 4px var(--accent-soft);
}

.comment-form .submit,
.contact-form button[type="submit"] {
        font-family: var(--font-head);
        background: var(--gradient);
        border: 0;
        color: #FFF;
        font-weight: 700;
        font-size: 0.95rem;
        padding: 12px 30px;
        border-radius: 12px;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-form .submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 26px rgba(16, 185, 129, 0.35);
}

/* ---------- 24. ترقيم الصفحات ---------- */
.pagination,
.wp-block-query-pagination {
        margin-top: 44px;
}

.pagination .nav-links {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
}

.pagination .page-numbers {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 42px;
        height: 42px;
        padding-inline: 12px;
        border-radius: 11px;
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--muted);
        font-family: var(--font-head);
        font-weight: 700;
        font-size: 0.9rem;
        transition: all 0.2s ease;
}

.pagination .page-numbers:hover {
        border-color: var(--accent);
        color: var(--accent-strong);
}

.pagination .page-numbers.current {
        background: var(--gradient);
        border-color: transparent;
        color: #FFF;
        box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.pagination .page-numbers.dots {
        border: 0;
        background: none;
}

/* ---------- 25. صفحة 404 ---------- */
.error-404-page {
        padding-block: 40px 70px;
}

.error-404 {
        text-align: center;
}

.error-code {
        font-family: var(--font-head);
        font-size: clamp(5rem, 16vw, 9rem);
        font-weight: 900;
        line-height: 1;
        letter-spacing: 0.04em;
        background: linear-gradient(160deg, var(--text-strong) 30%, var(--accent));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 10px;
}

.zero-glow {
        text-shadow: 0 0 60px rgba(16, 185, 129, 0.45);
}

.error-404 .page-title {
        font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.error-text {
        color: var(--muted);
        max-width: 560px;
        margin: 14px auto 28px;
}

.error-actions {
        display: flex;
        flex-direction: column;
        gap: 18px;
        align-items: center;
        margin-bottom: 48px;
}

.error-actions .search-form {
        max-width: 460px;
}

/* ---------- 26. صفحة من نحن ---------- */
.about-hero {
        background:
                radial-gradient(circle at 80% 0%, rgba(16, 185, 129, 0.13), transparent 45%),
                var(--bg-soft);
        border-bottom: 1px solid var(--border);
        padding: 46px 0 40px;
}

.about-title {
        font-size: clamp(1.8rem, 4.4vw, 2.6rem);
        margin: 8px 0 0;
}

.about-lead {
        color: var(--muted);
        font-size: 1.1rem;
        max-width: 640px;
        margin: 12px 0 0;
}

.about-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 36px;
        padding-block: 44px 64px;
        align-items: start;
}

.about-cover {
        border-radius: var(--radius);
        overflow: hidden;
        border: 1px solid var(--border);
        margin: 0 0 26px;
}

.about-aside {
        display: flex;
        flex-direction: column;
        gap: 20px;
        position: sticky;
        top: calc(var(--header-h) + 24px);
}

.about-card {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 22px 24px;
}

.about-card h3 {
        font-size: 1.02rem;
        margin-bottom: 12px;
}

.about-card p {
        color: var(--muted);
        font-size: 0.9rem;
        margin: 0 0 14px;
}

.about-list {
        list-style: none;
        margin: 0;
        padding: 0;
}

.about-list li {
        position: relative;
        padding-inline-start: 26px;
        color: var(--muted);
        font-size: 0.92rem;
        margin-bottom: 10px;
}

.about-list li::before {
        content: "✓";
        position: absolute;
        inset-inline-start: 0;
        top: 0;
        width: 18px;
        height: 18px;
        border-radius: 6px;
        background: var(--accent-soft);
        color: var(--accent-strong);
        font-size: 0.72rem;
        font-weight: 800;
        display: inline-flex;
        align-items: center;
        justify-content: center;
}

.about-card.cta {
        background:
                radial-gradient(circle at 90% 20%, rgba(16, 185, 129, 0.14), transparent 50%),
                var(--card);
        border-color: rgba(16, 185, 129, 0.35);
}

/* ---------- 27. صفحة اتصل بنا ---------- */
.contact-main {
        padding-block: 10px 64px;
}

.contact-note {
        color: var(--muted);
        margin: 12px 0 0;
        max-width: 640px;
}

.contact-layout {
        display: grid;
        grid-template-columns: 300px minmax(0, 1fr);
        gap: 32px;
        margin-top: 34px;
        align-items: start;
}

.contact-info {
        display: flex;
        flex-direction: column;
        gap: 16px;
}

.contact-card {
        display: flex;
        gap: 14px;
        align-items: flex-start;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 18px 20px;
}

.contact-icon {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: var(--accent-soft);
        color: var(--accent-strong);
}

.contact-card h3 {
        font-size: 0.95rem;
        margin: 0 0 4px;
}

.contact-card a,
.contact-card p {
        font-size: 0.92rem;
        margin: 0;
        word-break: break-all;
}

.contact-card p {
        color: var(--muted);
}

.contact-form-wrap {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: clamp(22px, 3.4vw, 36px);
}

.form-notice {
        border-radius: var(--radius-sm);
        padding: 15px 20px;
        margin-bottom: 22px;
        font-size: 0.92rem;
        border: 1px solid;
}

.form-notice.success {
        background: var(--accent-soft);
        border-color: rgba(16, 185, 129, 0.4);
        color: var(--accent-strong);
}

.form-notice.error {
        background: rgba(239, 68, 68, 0.1);
        border-color: rgba(239, 68, 68, 0.35);
        color: #F87171;
}

.form-row.two {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
}

.form-field {
        margin: 0 0 18px;
}

.form-field label {
        display: block;
        font-family: var(--font-head);
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 7px;
        color: var(--muted);
}

.hp-field {
        position: absolute !important;
        inset-inline-start: -9999px !important;
        opacity: 0;
        height: 0;
        overflow: hidden;
}

/* ---------- 28. التذييل ---------- */
.site-footer {
        background: var(--bg-soft);
        border-top: 1px solid var(--border);
        margin-top: 30px;
        padding-top: 56px;
}

.footer-grid {
        display: grid;
        grid-template-columns: 1.4fr 1fr 1fr;
        gap: 40px;
        padding-bottom: 44px;
}

.footer-brand .footer-tagline {
        color: var(--muted);
        font-size: 0.92rem;
        margin: 14px 0 18px;
        max-width: 340px;
}

.footer-col .widget-title {
        font-size: 1rem;
        margin-bottom: 16px;
        color: var(--text-strong);
}

.footer-menu,
.footer-cats {
        list-style: none;
        margin: 0;
        padding: 0;
}

.footer-menu li,
.footer-cats li {
        margin-bottom: 4px;
}

.footer-menu a,
.footer-cats a {
        display: inline-block;
        padding: 5px 0;
        color: var(--muted);
        font-size: 0.92rem;
}

.footer-menu a:hover,
.footer-cats a:hover {
        color: var(--accent-strong);
}

.footer-bottom {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        flex-wrap: wrap;
        border-top: 1px solid var(--border);
        padding-block: 20px;
}

.footer-copy {
        margin: 0;
        color: var(--muted);
        font-size: 0.84rem;
}

.footer-top-btn {
        font-family: var(--font-head);
        font-size: 0.82rem;
        font-weight: 700;
        color: var(--muted);
        padding: 8px 16px;
        border: 1px solid var(--border);
        border-radius: 999px;
}

.footer-top-btn:hover {
        color: var(--accent-strong);
        border-color: var(--accent);
}

/* ودجات */
.widget {
        margin-bottom: 0;
}

.widget ul {
        list-style: none;
        margin: 0;
        padding: 0;
}

.widget ul li {
        margin-bottom: 6px;
}

.widget ul li a {
        color: var(--muted);
        font-size: 0.92rem;
}

.widget ul li a:hover {
        color: var(--accent-strong);
}

/* ---------- 29. روابط اجتماعية ---------- */
.social-links {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
}

.social-links a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--muted);
        transition: all 0.2s ease;
}

.social-links a:hover {
        color: var(--accent-strong);
        border-color: var(--accent);
        background: var(--accent-soft);
        transform: translateY(-3px);
}

.mobile-social .social-links {
        margin-top: 4px;
}

/* ---------- 30. حركات دخول ---------- */
@keyframes fadeUp {
        from {
                opacity: 0;
                transform: translateY(18px);
        }

        to {
                opacity: 1;
                transform: translateY(0);
        }
}

.hero-inner,
.section,
.featured-wrap {
        animation: fadeUp 0.6s ease both;
}

/* ---------- 31. التجاوب ---------- */
@media (max-width: 1100px) {
        .about-layout {
                grid-template-columns: 1fr;
        }

        .about-aside {
                position: static;
        }

        .contact-layout {
                grid-template-columns: 1fr;
        }
}

@media (max-width: 900px) {
        .featured-link {
                grid-template-columns: 1fr;
        }

        .featured-thumb {
                min-height: 240px;
                aspect-ratio: 16 / 9;
        }

        .footer-grid {
                grid-template-columns: 1fr 1fr;
        }

        .footer-brand {
                grid-column: 1 / -1;
        }
}

@media (max-width: 640px) {
        body {
                font-size: 15.5px;
        }

        .container {
                padding-inline: 18px;
        }

        .hero {
                padding-block: 56px 48px;
        }

        .hero-actions .search-form {
                max-width: 100%;
                flex: 1 1 100%;
        }

        .posts-grid {
                grid-template-columns: 1fr;
        }

        .post-navigation {
                grid-template-columns: 1fr;
        }

        .form-row.two {
                grid-template-columns: 1fr;
                gap: 0;
        }

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

        .share-btn span {
                display: none;
        }

        .share-btn {
                padding: 10px;
        }

        .prose {
                font-size: 1rem;
        }

        .comments-area .children {
                padding-inline-start: 14px;
        }
}

/* ---------- 32. الطباعة ---------- */
@media print {
        .site-header,
        .site-footer,
        .share-buttons,
        .reading-progress,
        .toc-sidebar,
        .comments-area,
        .related-section,
        .post-navigation,
        .hero-actions,
        .cta-section {
                display: none !important;
        }

        body {
                background: #FFF;
                color: #000;
        }

        .single-article {
                max-width: 100%;
        }
}

/* ---------- 33. إمكانية وصول ---------- */
:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 3px;
        border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
        }
}

/* ---------- 34. زر واتساب العائم ---------- */
.wa-float {
	position: fixed;
	bottom: 22px;
	right: 22px;
	z-index: 999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
}

.wa-btn {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #25D366;
	color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 10px 26px rgba(37, 211, 102, 0.45);
	position: relative;
	transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.2s ease;
}

.wa-btn::before {
	content: "";
	position: absolute;
	inset: -7px;
	border-radius: 50%;
	border: 2px solid rgba(37, 211, 102, 0.55);
	animation: wa-pulse 2.4s ease-out infinite;
	pointer-events: none;
}

.wa-btn:hover,
.wa-btn:focus-visible {
	transform: translateY(-3px) scale(1.06);
	box-shadow: 0 14px 32px rgba(37, 211, 102, 0.6);
	color: #FFFFFF;
}

@keyframes wa-pulse {
	0% {
		transform: scale(0.82);
		opacity: 0.9;
	}
	70% {
		transform: scale(1.22);
		opacity: 0;
	}
	100% {
		opacity: 0;
	}
}

.wa-bubble {
	position: relative;
	background: var(--card);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 14px 14px 4px 14px;
	padding: 11px 36px 11px 14px;
	font-size: 0.875rem;
	font-weight: 600;
	box-shadow: var(--shadow);
	max-width: 250px;
	animation: wa-bubble-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.wa-bubble-link {
	color: var(--text);
	text-decoration: none;
	display: block;
	line-height: 1.7;
}

.wa-bubble-link:hover {
	color: var(--accent-strong);
}

.wa-bubble-close {
	position: absolute;
	top: 4px;
	left: 6px;
	background: none;
	border: 0;
	color: var(--muted);
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	padding: 4px;
}

.wa-bubble-close:hover {
	color: var(--text);
}

@keyframes wa-bubble-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.92);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@media (max-width: 480px) {
	.wa-float {
		bottom: 16px;
		right: 16px;
	}
	.wa-btn {
		width: 52px;
		height: 52px;
	}
	.wa-bubble {
		max-width: 205px;
	}
}

/* ---------- 35. ضمان اتجاه RTL للنصوص ----------
   حزام أمان إضافي: حتى لو كان تثبيت ووردبريس بلغة إنجليزية
   يبقى النص العربي متجهاً يميناً ولا تتشتت الجمل المختلطة. */
html,
body {
	direction: rtl;
	text-align: start;
}

.entry-content,
.entry-summary,
.page-content,
.comment-content,
.card-excerpt,
.prose {
	direction: rtl;
}
