/* Fonts */
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/Outfit-Variable.ttf') format('truetype');
    font-weight: 300 800;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-Variable.ttf') format('truetype');
    font-weight: 200 1000;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Variable.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --text-color: #1e293b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --container-width: 1100px;
    --transition-fast: 0.1s ease;
    /* Optimized speed */
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Tajawal', 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color) !important;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

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

ul {
    list-style: none;
}

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

/* Unified Header - Optimized (Light Theme) */
.site-header {
    background: #ffffff !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #1e293b !important;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.5rem;
}

.logo img {
    height: 50px !important;
    width: auto !important;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Nav Menu Desktop */
.nav-menu.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu.desktop-nav ul li a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--secondary-color);
    transition: var(--transition-fast);
}

.nav-menu.desktop-nav ul li a:hover,
.nav-menu.desktop-nav ul li a.active {
    color: var(--primary-color);
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Mobile Sidebar - Specialized & Fast */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #334155;
    cursor: pointer;
}

@media (max-width: 992px) {
    .hamburger-btn {
        display: block;
    }

    .desktop-nav,
    .auth-buttons.desktop-nav {
        display: none !important;
    }
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff !important;
    z-index: 2000;
    transition: right 0.2s cubic-bezier(0, 0, 0.2, 1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    flex: 1;
    /* Expand to fill available space */
    overflow-y: auto;
    /* Enable vertical scrolling */
    overscroll-behavior: contain;
    /* Prevent scroll chaining */
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 20px;
    color: #334155 !important;
    font-weight: 500;
    border-bottom: 1px solid #f8fafc;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background: #f8fafc;
    color: var(--primary-color) !important;
    padding-inline-start: 25px;
}

.sidebar-link i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #334155;
    cursor: pointer;
}

/* Sidebar Footer & Buttons */
.sidebar-footer {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.w-full {
    width: 100%;
}

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

.mb-2 {
    margin-bottom: 8px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline:hover {
    background-color: #f8fafc;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* ── Body no-scroll for sidebar ── */
body.no-scroll {
    overflow: hidden;
}

/* ── RTL Sidebar Support ── */
[dir="rtl"] .mobile-sidebar {
    right: auto;
    left: -100%;
}

[dir="rtl"] .mobile-sidebar.active {
    left: 0;
}

[dir="rtl"] .mobile-sidebar {
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.05);
}

/* ── Sidebar Language Switcher ── */
.sidebar-lang-switcher {
    padding: 15px 20px;
    border-top: 1px solid #f1f5f9;
}

.sidebar-lang-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.sidebar-lang-label i {
    color: var(--primary-color);
}

.sidebar-lang-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sidebar-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #475569;
    background: #f8fafc;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-lang-btn:hover {
    background: #e2e8f0;
    color: var(--primary-color);
}

.sidebar-lang-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

[dir="rtl"] .sidebar-lang-btn.active {
    background: var(--primary-color);
    color: #fff;
}

/* ═══════ Blog Breadcrumbs ═══════ */
.blog-breadcrumbs {
    padding: 20px 0 10px;
}

.blog-breadcrumbs ul {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--secondary-color);
    flex-wrap: wrap;
}

.blog-breadcrumbs ul li a {
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.blog-breadcrumbs ul li a:hover {
    color: var(--primary-hover);
}

.blog-breadcrumbs ul li a i {
    font-size: 12px;
}

.blog-breadcrumbs ul li:not(:last-child)::after {
    content: "/";
    margin-inline-start: 8px;
    color: var(--border-color);
}

.blog-breadcrumbs ul li.active {
    font-weight: 600;
    color: var(--text-color);
}

/* ═══════ Welcome + CTA Unified Section ═══════ */
.blog-welcome-cta {
    margin: 20px 0 30px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 40%, #f5f3ff 100%);
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.blog-welcome-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.welcome-cta-inner {
    padding: 40px 30px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.welcome-cta-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
}

.blog-welcome-cta:hover .welcome-cta-icon {
    transform: rotate(0deg) scale(1.05);
}

.blog-welcome-cta h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.welcome-desc {
    color: var(--secondary-color);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.cta-divider {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    margin: 24px auto;
    border-radius: 3px;
}

.cta-question {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.cta-answer {
    color: var(--secondary-color);
    font-size: 0.95rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, var(--primary-hover), #1e3a8a);
}

.cta-button i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.cta-button:hover i {
    transform: scale(1.2);
}

/* Section Title */
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Grid & Cards - Fast transitions only */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.post-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform var(--transition-fast);
}

.post-card:hover {
    transform: translateY(-3px);
}

.post-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 20px;
}

.post-content h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #0f172a;
}

.post-excerpt {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Single Post Page */
.post-single {
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    margin: 30px 0;
}

.post-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #0f172a;
    text-align: center;
}

.post-featured-image img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 30px;
}

.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155;
}

.post-body h2,
.post-body h3 {
    margin: 1.5rem 0 1rem;
    color: #0f172a;
}

.post-body p {
    margin-bottom: 1.25rem;
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary-color) !important;
    color: #fff !important;
}

.btn-primary:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-outline {
    background: transparent !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-color) !important;
}

.btn-outline:hover {
    background: #f8fafc !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.comments-section {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    margin-top: 40px;
}

.comment-item {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease;
}

.comment-item:hover {
    transform: translateX(5px);
}

[dir="rtl"] .comment-item:hover {
    transform: translateX(-5px);
}

.comment-author {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.comment-date {
    font-size: 12px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.comment-text {
    color: #334155;
    line-height: 1.6;
}

/* Comment Form */
.comment-form {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 25px 0 40px;
}

.comment-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-form input,
.comment-form textarea {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary-color);
}

.comment-form button {
    align-self: flex-start;
}

.site-footer {
    padding: 40px 0;
    text-align: center;
    color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    background: #fff;
}

/* Footer Grid Override for Blog */
.site-footer .footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.site-footer .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.site-footer .footer-brand .logo {
    display: flex;
    justify-content: center;
}

.site-footer .footer-brand .logo img {
    margin: 0 auto;
}

.site-footer .footer-brand p {
    max-width: 400px;
    margin: 10px auto 0;
    text-align: center;
}

.site-footer .footer-links,
.site-footer .footer-legal {
    text-align: center;
}

.site-footer .footer-links ul,
.site-footer .footer-legal ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.site-footer .footer-links h3,
.site-footer .footer-legal h3 {
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.site-footer .footer-links a,
.site-footer .footer-legal a {
    color: var(--secondary-color);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.site-footer .footer-links a:hover,
.site-footer .footer-legal a:hover {
    color: var(--primary-color);
}

.site-footer .footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.footer-badge:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-badge i {
    color: var(--primary-color);
    font-size: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}


@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .blog-welcome-cta h1 {
        font-size: 1.35rem;
    }

    .welcome-cta-inner {
        padding: 28px 20px;
    }

    .welcome-desc {
        font-size: 0.92rem;
    }

    .cta-question {
        font-size: 1.05rem;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 1rem;
    }

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

    .post-single {
        padding: 20px;
    }

    .post-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-welcome-cta h1 {
        font-size: 1.5rem;
    }
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1001;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-menu {
    margin-right: auto;
    margin-left: initial;
}

[dir="rtl"] .auth-buttons {
    margin-left: 0;
    margin-right: 20px;
}

[dir="rtl"] .post-meta {
    justify-content: flex-start;
    gap: 15px;
}

[dir="rtl"] .read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

[dir="rtl"] .breadcrumbs {
    justify-content: flex-start;
}

[dir="rtl"] .sidebar-link {
    justify-content: flex-start;
}

/* Blog Post Specific RTL */
[dir="rtl"] .post-title {
    text-align: right;
}

[dir="rtl"] .post-meta {
    text-align: right;
}

[dir="rtl"] .post-body {
    text-align: right;
}

[dir="rtl"] .back-btn {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
}

[dir="rtl"] .related-posts h3,
[dir="rtl"] .comments-section h3,
[dir="rtl"] .comment-form h3 {
    text-align: right;
    margin-bottom: 20px;
}

[dir="rtl"] .comment-author,
[dir="rtl"] .comment-date,
[dir="rtl"] .comment-text {
    text-align: right;
}

[dir="rtl"] .related-card-content h4 {
    text-align: right;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 40px 0;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.page-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    pointer-events: none;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
    pointer-events: none;
    /* Prevent clicks */
}

.dots {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 10px;
    gap: 4px;
    color: var(--secondary-color);
    font-weight: bold;
    letter-spacing: 2px;
}


/* ═══════════════════════════════════════════════════════════════
   Language Switcher — Desktop Dropdown
   ═══════════════════════════════════════════════════════════════ */
.lang-switcher {
    position: relative;
    z-index: 1100;
}

.lang-switcher-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    white-space: nowrap;
}

.lang-switcher-toggle:hover {
    background: #f1f5f9;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lang-switcher-toggle i.fa-globe {
    font-size: 1rem;
    color: var(--primary-color);
}

.lang-switcher-arrow {
    font-size: 0.65rem;
    transition: transform 0.25s ease;
    color: var(--secondary-color);
}

.lang-switcher-toggle[aria-expanded="true"] .lang-switcher-arrow {
    transform: rotate(180deg);
}

.lang-switcher-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 1200;
}

.lang-switcher-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-switcher-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease;
    position: relative;
}

.lang-switcher-item:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

.lang-switcher-item.active {
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary-color);
    font-weight: 600;
}

.lang-flag {
    font-size: 1.15rem;
    line-height: 1;
}

.lang-check {
    margin-inline-start: auto;
    font-size: 0.8rem;
    color: var(--primary-color);
}

/* RTL Fix */
[dir="rtl"] .lang-switcher-menu {
    right: auto;
    left: 0;
}

/* ═══════════════════════════════════════════════════════════════
   Language Switcher — Mobile Sidebar
   ═══════════════════════════════════════════════════════════════ */
.sidebar-lang-switcher {
    padding: 16px 20px;
    border-top: 1px solid #f1f5f9;
    margin-top: 8px;
}

.sidebar-lang-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.sidebar-lang-label i {
    color: var(--primary-color);
}

.sidebar-lang-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-lang-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-lang-btn:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.sidebar-lang-btn.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
    font-weight: 700;
    border-left: 3px solid var(--primary-color);
}

[dir="rtl"] .sidebar-lang-btn.active {
    border-left: none;
    border-right: 3px solid var(--primary-color);
}

/* ═══════════════════════════════════════════════════════════════
   Responsive Adjustments
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    .lang-switcher {
        display: none;
        /* Hidden on mobile, shown in sidebar instead */
    }
}

@media (min-width: 993px) {
    .sidebar-lang-switcher {
        display: none;
        /* Hidden on desktop, shown in header instead */
    }
}

/* ================================================
   📢 Google AdSense Compliant Wrapper
   ================================================ */
.adsense-wrapper {
    display: block;
    margin: 2rem auto;
    text-align: center;
    padding: 1rem;
    background: var(--bg-color, #fff);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    min-height: 100px;
    z-index: 10;
}

.adsense-wrapper::before {
    content: "Advertisement / إعلان";
    display: block;
    font-size: 0.75rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.adsense-wrapper ins.adsbygoogle {
    margin: 0 auto !important;
    display: block !important;
}

/* Ensure no overlays block ads */
.adsense-wrapper * {
    z-index: 1 !important;
}