/* ============================================================
   A Quality Scope — Blog Design System
   Version: 3.0 (Professional Rebuild)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Noto+Sans+Arabic:wght@400;600;700&display=swap');

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
    /* Brand Colors */
    --color-blue: #2F64C8;
    --color-blue-light: #4F84E8;
    --color-gold: #C8A663;

    /* Neutral Palette */
    --color-white: #ffffff;
    --color-bg: #F8FAFF;
    --color-surface: rgba(255, 255, 255, 0.38);
    --color-surface-solid: rgba(255, 255, 255, 0.55);
    --color-border: rgba(210, 220, 240, 0.6);
    --color-border-hover: rgba(47, 100, 200, 0.3);

    /* Text */
    --color-text: #0C1A30;
    --color-text-2: #4A5568;
    --color-text-3: #8898B0;

    /* Shadows */
    --shadow-card: 0 4px 24px rgba(15, 50, 130, 0.07);
    --shadow-hover: 0 16px 48px rgba(47, 100, 200, 0.14);
    --shadow-nav: 0 2px 16px rgba(15, 50, 130, 0.06);

    /* Dimensions */
    --nav-height: 68px;
    --radius-card: 20px;
    --radius-sm: 10px;
    --radius-pill: 50px;

    /* Typography */
    --font-en: 'Outfit', sans-serif;
    --font-ar: 'Noto Sans Arabic', sans-serif;

    /* Transitions */
    --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition: all 0.3s var(--ease);
}

/* ============================================================
   Reset
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-en);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   Animated Mesh Background
   ============================================================ */
.mesh-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 10% 25%, rgba(239, 246, 255, 0.95) 0%, transparent 50%),
        radial-gradient(ellipse at 88% 15%, rgba(255, 252, 235, 0.75) 0%, transparent 50%),
        radial-gradient(ellipse at 55% 85%, rgba(240, 253, 244, 0.65) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 55%, rgba(238, 244, 255, 0.55) 0%, transparent 45%);
    background-color: #f5f8ff;
    animation: meshFlow 28s ease-in-out infinite alternate;
}

@keyframes meshFlow {
    0% {
        transform: scale(1) translate(0, 0);
    }

    50% {
        transform: scale(1.08) translate(20px, -15px);
        /* More dramatic */
    }

    100% {
        transform: scale(1.12) translate(-12px, 15px);
        /* More dramatic */
    }
}

/* ============================================================
   Typography
   ============================================================ */
h1,
h2,
h3,
h4 {
    font-family: var(--font-en);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--color-text);
    line-height: 1.2;
}

/* Arabic text automatically gets Noto Arabic */
body.lang-ar-active h1,
body.lang-ar-active h2,
body.lang-ar-active h3,
body.lang-ar-active h4,
body.lang-ar-active p,
body.lang-ar-active a,
body.lang-ar-active span,
body.lang-ar-active button,
body.lang-ar-active input {
    font-family: var(--font-ar);
    letter-spacing: 0;
}

/* ============================================================
   Navigation
   ============================================================ */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px) saturate(150%);

    border-bottom: 1px solid rgba(210, 220, 240, 0.45);
    box-shadow: var(--shadow-nav);
    z-index: 1000;
    transition: var(--transition);
}

.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 4px 28px rgba(15, 50, 130, 0.1);
}

.nav-brand {
    font-family: var(--font-en);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
    flex-shrink: 0;
    direction: ltr;
}

.nav-brand span {
    color: var(--color-blue);
}

.nav-brand .ltd {
    color: #D93025;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-left: 4px;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    color: var(--color-text-2);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-blue);
    background: rgba(47, 100, 200, 0.07);
}

/* Language Toggle — styled entirely via CSS */
.lang-toggle-btn {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--color-blue);
    background: rgba(47, 100, 200, 0.08);
    border: 1px solid rgba(47, 100, 200, 0.18);
    border-radius: var(--radius-sm);
    padding: 7px 16px;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}

.lang-toggle-btn:hover {
    background: var(--color-blue);
    color: var(--color-white);
    border-color: var(--color-blue);
}

/* Hamburger — hidden on desktop */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid rgba(47, 100, 200, 0.15);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px 11px;
    flex-shrink: 0;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: rgba(47, 100, 200, 0.07);
    border-color: rgba(47, 100, 200, 0.25);
}

/* ============================================================
   Hero (Premium — Phase 10)
   ============================================================ */
.blog-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    padding: calc(var(--nav-height) + 60px) 5% 50px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-blue);
    background: rgba(47, 100, 200, 0.09);
    border: 1px solid rgba(47, 100, 200, 0.2);
    border-radius: 999px;
    padding: 6px 18px;
    margin-bottom: 1.4rem;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.04em;
    margin-bottom: 1.2rem;
    color: var(--color-text);
}

.hero-highlight {
    position: relative;
    color: var(--color-blue);
    display: inline-block;
}

.hero-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-blue), #64a8ff);
    border-radius: 4px;
    opacity: 0.5;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--color-text-2);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto 1.8rem;
    line-height: 1.9;
}

.hero-cta-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 999px;
    background: var(--color-blue);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 4px 20px rgba(47, 100, 200, 0.3);
}

.hero-cta-btn:hover {
    background: #1E4AA8;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(47, 100, 200, 0.4);
}

.hero-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 28px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-card);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-blue);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--color-text-2);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================
   Search & Category Filter (Phase 10)
   ============================================================ */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 2rem;
}

.search-wrapper {
    position: relative;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--color-blue);
    opacity: 0.6;
    font-size: 0.95rem;
    pointer-events: none;
}

.lang-ar-active .search-icon {
    left: auto;
    right: 16px;
}

.search-input {
    width: 100%;
    padding: 13px 20px 13px 44px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
    box-sizing: border-box;
    transition: border-color 0.25s, box-shadow 0.25s;
    outline: none;
}

.search-input:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(47, 100, 200, 0.12);
    background: rgba(255, 255, 255, 0.85);
}

.lang-ar-active .search-input {
    padding-left: 20px;
    padding-right: 44px;
    text-align: right;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.cat-btn {
    padding: 8px 20px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    color: var(--color-text-2);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cat-btn:hover {
    border-color: var(--color-blue);
    color: var(--color-blue);
    background: rgba(47, 100, 200, 0.08);
}

.cat-btn.active {
    background: var(--color-blue);
    color: white;
    border-color: var(--color-blue);
    box-shadow: 0 4px 12px rgba(47, 100, 200, 0.25);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-2);
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
    color: var(--color-blue);
    opacity: 0.4;
}

@media (max-width: 768px) {
    .blog-hero {
        padding-top: calc(var(--nav-height) + 30px);
        gap: 2rem;
    }

    .hero-stats {
        gap: 12px;
    }

    .hero-stat {
        padding: 12px 18px;
    }
}

/* ============================================================
   Blog Grid & Cards
   ============================================================ */
.blog-container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 2rem 5% 8rem;
}

.section-heading {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--color-text);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.6rem;
}

.glass-card {
    contain: layout style;
    background: var(--color-surface);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
}

.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-border-hover);
    background: var(--color-surface-solid);
    box-shadow: var(--shadow-hover);
}

/* Card Image */
.card-img-wrapper {
    width: 100%;
    height: 210px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2eaf5;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease);
}

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

/* ---- Dynamic card image (public-blog.js output) ---- */
.card-image-link {
    display: block;
    position: relative;
    width: 100%;
    height: 210px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(47, 100, 200, 0.08) 0%, rgba(200, 166, 99, 0.08) 100%);
    text-decoration: none;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease);
}

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

.card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(47, 100, 200, 0.08) 0%, rgba(200, 166, 99, 0.12) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(47, 100, 200, 0.35);
    font-size: 3rem;
}

.hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(47, 100, 200, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.card-image-link:hover .hover-overlay {
    opacity: 1;
}

.read-more-btn {
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.04em;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--color-blue);
    text-decoration: none;
    transition: gap 0.25s var(--ease);
}

.read-more-link:hover {
    gap: 10px;
}

.category-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--color-blue);
    background: rgba(47, 100, 200, 0.07);
    border: 1px solid rgba(47, 100, 200, 0.12);
    border-radius: var(--radius-pill);
    padding: 3px 10px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.date {
    font-size: 0.78rem;
    color: var(--color-text-3);
    font-weight: 500;
    margin-left: auto;
}

body.lang-ar-active .date {
    margin-left: 0;
    margin-right: auto;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}


/* Card Content */
.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0;
}

.card-category {
    display: inline-block;
    width: fit-content;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-blue);
    background: rgba(47, 100, 200, 0.07);
    border: 1px solid rgba(47, 100, 200, 0.12);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.card-excerpt {
    font-size: 0.92rem;
    color: var(--color-text-2);
    line-height: 1.75;
    flex-grow: 1;
    margin-bottom: 1.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 1rem;
    margin-top: auto;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--color-blue);
    transition: gap 0.25s var(--ease);
}

.glass-card:hover .read-more {
    gap: 10px;
}

.card-date {
    font-size: 0.78rem;
    color: var(--color-text-3);
    font-weight: 500;
}

/* ============================================================
   Article Pages
   ============================================================ */
.article-hero {
    padding-top: calc(var(--nav-height) + 50px);
    padding-bottom: 40px;
    padding-left: 5%;
    padding-right: 5%;
    text-align: center;
    max-width: 860px;
    margin: 0 auto;
}

.article-content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 40px) 5% 8rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--color-blue);
    text-decoration: none;
    margin-bottom: 2.5rem;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(47, 100, 200, 0.15);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.back-btn:hover {
    background: var(--color-blue);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.glass-article {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    animation: fadeInSlideUp 0.6s var(--ease) both;
}

.article-header {
    margin-bottom: 0;
}

.article-hero-image {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--color-border);
}

.article-body {
    padding: 3.5rem;
    font-size: 1.12rem;
    line-height: 1.85;
    color: var(--color-text-2);
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.article-body h2 {
    font-size: 1.6rem;
    color: var(--color-text);
    margin: 2.2rem 0 0.9rem;
}

.article-body h3 {
    font-size: 1.28rem;
    color: var(--color-text);
    margin: 1.8rem 0 0.75rem;
}

.article-body p {
    margin-bottom: 1.1rem;
}

.article-body strong,
.article-body b {
    color: var(--color-text);
    font-weight: 700;
}

.article-body ul,
.article-body ol {
    padding-inline-start: 1.6rem;
    margin-bottom: 1.1rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body a {
    color: var(--color-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============================================================
   Footer
   ============================================================ */
.glass-footer {
    padding: 2.5rem 5%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(210, 220, 240, 0.5);
    text-align: center;
    margin-top: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--color-text-2);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-blue);
}

.footer-sep {
    color: var(--color-text-3);
    font-size: 0.6rem;
}

.footer-text {
    color: var(--color-text-3);
    font-size: 0.82rem;
    font-weight: 500;
}

/* ============================================================
   WhatsApp Float
   ============================================================ */
.whatsapp_float {
    position: fixed;
    width: 56px;
    height: 56px;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: var(--color-white);
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
    z-index: 900;
    transition: var(--transition);
}

.whatsapp_float:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 32px rgba(37, 211, 102, 0.55);
}

/* ============================================================
   Mcnuun Chat Widget
   ============================================================ */
.mcnuun-fab {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--color-blue), #5b35e8);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(47, 100, 200, 0.45);
    z-index: 900;
    transition: var(--transition);
    color: var(--color-white);
    font-size: 22px;
}

.mcnuun-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 32px rgba(47, 100, 200, 0.55);
}

.mcnuun-chat-window {
    position: fixed;
    bottom: 170px;
    right: 30px;
    width: 340px;
    height: 440px;
    background: var(--color-white);
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(15, 50, 130, 0.18);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 900;
    border: 1px solid var(--color-border);
}

.mcnuun-chat-window.open {
    display: flex;
}

.mcnuun-header {
    background: linear-gradient(135deg, var(--color-blue), #5b35e8);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

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

.mcnuun-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--color-white);
    flex-shrink: 0;
}

.mcnuun-title {
    color: var(--color-white);
    font-weight: 700;
    font-size: 0.95rem;
}

.mcnuun-status {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
}

.mcnuun-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    display: inline-block;
}

.mcnuun-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: var(--color-white);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.mcnuun-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.mcnuun-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mcnuun-msg-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.mcnuun-msg-wrapper.user {
    flex-direction: row-reverse;
}

.mcnuun-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-blue), #5b35e8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--color-white);
    flex-shrink: 0;
}

.mcnuun-msg-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px 14px 14px 4px;
    background: #f1f5f9;
    font-size: 0.88rem;
    color: var(--color-text);
    line-height: 1.6;
}

.mcnuun-msg-wrapper.user .mcnuun-msg-bubble {
    background: var(--color-blue);
    color: var(--color-white);
    border-radius: 14px 14px 4px 14px;
}

.mcnuun-input-area {
    padding: 12px;
    border-top: 1px solid #e8edf5;
    flex-shrink: 0;
}

.mcnuun-input-box {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mcnuun-input {
    flex-grow: 1;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #f8faff;
    color: var(--color-text);
}

.mcnuun-input:focus {
    border-color: var(--color-blue);
    background: var(--color-white);
}

.mcnuun-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-blue);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    color: var(--color-white);
    flex-shrink: 0;
    transition: var(--transition);
}

.mcnuun-send:hover {
    background: var(--color-blue-light);
    transform: scale(1.05);
}

/* ============================================================
   Language & RTL
   ============================================================ */
body.lang-en-active .lang-ar {
    display: none !important;
}

body.lang-ar-active .lang-en {
    display: none !important;
}

body.lang-ar-active {
    direction: rtl;
}

body.lang-ar-active .card-content {
    text-align: right;
}

body.lang-ar-active .read-more {
    flex-direction: row-reverse;
}

body.lang-ar-active .article-body {
    text-align: right;
}

body.lang-ar-active .footer-links {
    direction: rtl;
}

/* RTL menu flip */
body.lang-ar-active .glass-nav .nav-links {
    direction: rtl;
}

/* ============================================================
   Accessibility
   ============================================================ */
*:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ============================================================
   Responsive — Tablet (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.3rem;
    }
}

/* ============================================================
   Responsive — Mobile (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
    :root {
        --nav-height: 62px;
    }

    /* Show hamburger, hide desktop nav */
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(10px) saturate(160%);
        -webkit-backdrop-filter: blur(10px) saturate(160%);
        padding: 1rem 5%;
        border-bottom: 1px solid rgba(210, 220, 240, 0.5);
        box-shadow: 0 16px 48px rgba(15, 50, 130, 0.12);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a,
    .nav-links .lang-toggle-btn {
        width: 100%;
        padding: 12px 14px;
        border-radius: var(--radius-sm);
        font-size: 0.95rem;
    }

    /* Hero */
    .hero-section {
        padding-top: calc(var(--nav-height) + 40px);
        padding-bottom: 40px;
    }

    .hero-title {
        font-size: clamp(1.85rem, 7vw, 2.5rem);
        letter-spacing: -0.02em;
    }

    /* Grid */
    .blog-container {
        padding: 1.5rem 4% 6rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }

    /* Cards */
    .card-img-wrapper {
        height: 195px;
    }

    .card-title {
        font-size: 1.08rem;
    }

    /* Article */
    .article-image {
        height: 220px;
    }

    .article-body {
        padding: 1.6rem;
        font-size: 1rem;
    }

    /* Widgets */
    .whatsapp_float {
        bottom: 20px;
        right: 18px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .mcnuun-fab {
        bottom: 82px;
        right: 18px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .mcnuun-chat-window {
        bottom: 145px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}

/* ============================================================
   Sci-Fi Animated Background (Blog Index Only)
   Light-themed, glassmorphism, vibrant but clean.
   ============================================================ */


.scifi-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}


.orb {
    position: absolute;
    will-change: transform;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat ease-in-out infinite alternate;
}

.orb-1 {
    width: 700px;
    height: 700px;
    top: -200px;
    left: -150px;
    background: radial-gradient(ellipse, rgba(100, 160, 255, 0.55) 0%, rgba(150, 200, 255, 0.15) 65%, transparent 100%);
    animation-duration: 22s;
    animation-delay: 0s;
}

.orb-2 {
    width: 550px;
    height: 550px;
    top: 25%;
    right: -120px;
    background: radial-gradient(ellipse, rgba(190, 150, 255, 0.45) 0%, rgba(210, 180, 255, 0.12) 65%, transparent 100%);
    animation-duration: 30s;
    animation-delay: -8s;
}

.orb-3 {
    width: 480px;
    height: 480px;
    bottom: -80px;
    left: 15%;
    background: radial-gradient(ellipse, rgba(100, 220, 180, 0.38) 0%, rgba(150, 240, 200, 0.10) 65%, transparent 100%);
    animation-duration: 35s;
    animation-delay: -15s;
}

.orb-4 {
    width: 320px;
    height: 320px;
    top: 50%;
    left: 48%;
    background: radial-gradient(ellipse, rgba(255, 210, 100, 0.32) 0%, rgba(255, 230, 150, 0.08) 65%, transparent 100%);
    animation-duration: 40s;
    animation-delay: -20s;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(40px, -55px) scale(1.07);
    }

    66% {
        transform: translate(-30px, 35px) scale(0.95);
    }

    100% {
        transform: translate(25px, -20px) scale(1.03);
    }
}


.grid-layer {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(47, 100, 200, 0.28) 1.5px, transparent 1.5px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 20%, transparent 100%);
    mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 20%, transparent 100%);
    animation: gridDrift 45s linear infinite;
    opacity: 0.8;
}

@keyframes gridDrift {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 80px 80px;
    }
}


.scan-line {
    position: absolute;
    top: -5%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(47, 100, 200, 0.0) 15%,
            rgba(100, 170, 255, 0.35) 40%,
            rgba(160, 210, 255, 0.55) 50%,
            rgba(100, 170, 255, 0.35) 60%,
            rgba(47, 100, 200, 0.0) 85%,
            transparent 100%);
    animation: scanDown 18s linear infinite;
    pointer-events: none;
}

.scan-line:nth-child(2) {
    animation-delay: -3.5s;
    animation-duration: 15s;
    height: 2px;
}

.scan-line:nth-child(3) {
    animation-delay: -7s;
    animation-duration: 20s;
    height: 1.5px;
}

@keyframes scanDown {
    0% {
        top: -5%;
        opacity: 0;
    }

    8% {
        opacity: 1;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        top: 108%;
        opacity: 0;
    }
}


.particle {
    position: absolute;
    will-change: transform;
    border-radius: 50%;
    animation: particleDrift linear infinite;
}

.particle:nth-child(1) {
    width: 5px;
    height: 5px;
    top: 15%;
    left: 10%;
    background: rgba(47, 100, 200, 0.65);
    animation-duration: 18s;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 7px;
    height: 7px;
    top: 35%;
    left: 78%;
    background: rgba(120, 170, 255, 0.55);
    animation-duration: 22s;
    animation-delay: -5s;
}

.particle:nth-child(3) {
    width: 4px;
    height: 4px;
    top: 60%;
    left: 25%;
    background: rgba(80, 200, 150, 0.65);
    animation-duration: 30s;
    animation-delay: -10s;
}

.particle:nth-child(4) {
    width: 8px;
    height: 8px;
    top: 75%;
    left: 60%;
    background: rgba(180, 130, 255, 0.55);
    animation-duration: 26s;
    animation-delay: -3s;
}

.particle:nth-child(5) {
    width: 5px;
    height: 5px;
    top: 20%;
    left: 45%;
    background: rgba(47, 100, 200, 0.50);
    animation-duration: 20s;
    animation-delay: -15s;
}

.particle:nth-child(6) {
    width: 6px;
    height: 6px;
    top: 88%;
    left: 12%;
    background: rgba(60, 180, 200, 0.60);
    animation-duration: 35s;
    animation-delay: -8s;
}

.particle:nth-child(7) {
    width: 4px;
    height: 4px;
    top: 47%;
    left: 90%;
    background: rgba(47, 100, 200, 0.50);
    animation-duration: 28s;
    animation-delay: -18s;
}

.particle:nth-child(8) {
    width: 5px;
    height: 5px;
    top: 5%;
    left: 65%;
    background: rgba(190, 190, 255, 0.65);
    animation-duration: 16s;
    animation-delay: -2s;
}

.particle:nth-child(9) {
    width: 9px;
    height: 9px;
    top: 55%;
    left: 38%;
    background: rgba(47, 120, 200, 0.45);
    animation-duration: 40s;
    animation-delay: -22s;
}

.particle:nth-child(10) {
    width: 4px;
    height: 4px;
    top: 30%;
    left: 30%;
    background: rgba(120, 190, 255, 0.70);
    animation-duration: 24s;
    animation-delay: -6s;
}

.particle:nth-child(11) {
    width: 6px;
    height: 6px;
    top: 70%;
    left: 80%;
    background: rgba(47, 100, 200, 0.55);
    animation-duration: 32s;
    animation-delay: -11s;
}

.particle:nth-child(12) {
    width: 5px;
    height: 5px;
    top: 92%;
    left: 50%;
    background: rgba(160, 220, 255, 0.65);
    animation-duration: 21s;
    animation-delay: -9s;
}

@keyframes particleDrift {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }

    12% {
        opacity: 1;
    }

    55% {
        transform: translate(-35px, -70px) scale(1.5);
        opacity: 0.9;
    }

    88% {
        opacity: 0.5;
    }

    100% {
        transform: translate(25px, -130px) scale(0.5);
        opacity: 0;
    }
}


.glass-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(47, 100, 200, 0.35);
    animation: ringExpand ease-out infinite;
    pointer-events: none;
}

.glass-ring-1 {
    width: 320px;
    height: 320px;
    top: 8%;
    right: 7%;
    animation-duration: 7s;
    animation-delay: 0s;
    border-color: rgba(100, 160, 255, 0.40);
}

.glass-ring-2 {
    width: 220px;
    height: 220px;
    bottom: 15%;
    left: 4%;
    animation-duration: 9s;
    animation-delay: -3s;
    border-color: rgba(180, 130, 255, 0.38);
}

.glass-ring-3 {
    width: 170px;
    height: 170px;
    top: 52%;
    left: 46%;
    animation-duration: 11s;
    animation-delay: -5s;
    border-color: rgba(80, 200, 160, 0.38);
}

@keyframes ringExpand {
    0% {
        transform: scale(0.7);
        opacity: 0.7;
    }

    60% {
        transform: scale(1.25);
        opacity: 0.2;
    }

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


.holo-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg,
            transparent 0%,
            transparent 35%,
            rgba(180, 210, 255, 0.10) 46%,
            rgba(210, 235, 255, 0.18) 50%,
            rgba(180, 210, 255, 0.10) 54%,
            transparent 65%,
            transparent 100%);
    background-size: 300% 300%;
    animation: holoShimmer 24s ease-in-out infinite;
}

@keyframes holoShimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ============================================================
   Skeleton Loading UX
   ============================================================ */
.skeleton-card {
    height: 420px;
    background: var(--color-surface);
    border-radius: var(--radius-card);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--color-border);
}

.skeleton-img {
    height: 200px;
    background: rgba(210, 220, 240, 0.4);
}

.skeleton-content {
    padding: 24px;
}

.skeleton-text {
    height: 14px;
    background: rgba(210, 220, 240, 0.4);
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-text.title {
    height: 24px;
    width: 80%;
    margin-bottom: 20px;
}

.skeleton-text.meta {
    height: 12px;
    width: 40%;
    margin-bottom: 24px;
}

.skeleton-text.excerpt {
    width: 90%;
}

.skeleton-text.excerpt-2 {
    width: 70%;
}

.skeleton-btn {
    height: 36px;
    width: 120px;
    background: rgba(210, 220, 240, 0.4);
    margin-top: 24px;
    border-radius: var(--radius-pill);
}

.skeleton-pulse {
    position: relative;
    overflow: hidden;
}

.skeleton-pulse::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.2) 20%,
            rgba(255, 255, 255, 0.3) 60%,
            rgba(255, 255, 255, 0));
    animation: skeleton-shimmer 2s infinite linear;
}

@keyframes skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}
/* ============================================================
   Social Sharing Refinement (Phase 10)
   ============================================================ */
.share-section {
    margin-top: 3.5rem;
    padding: 2.5rem;
    background: rgba(47, 100, 200, 0.05);
    border: 1px solid rgba(47, 100, 200, 0.1);
    border-radius: var(--radius-card);
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.share-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-blue);
    letter-spacing: -0.01em;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.share-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 1.35rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.share-btn.whatsapp { background: #25D366; }
.share-btn.x-twitter { background: #000000; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.copy { background: #4b6cb7; }

.share-btn i {
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
