:root {
    --bg-color-rgb: 3, 3, 3;
    --bg-color: #030303;
    --card-bg: rgba(20, 20, 20, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary-green: #00e676;
    --accent-glow: rgba(0, 230, 118, 0.15);
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --text-dim: #666;
    --header-height: 70px;
}

[data-theme="light"] {
    --bg-color-rgb: 248, 249, 250;
    --bg-color: #f8f9fa;
    --card-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.08);
    --text-white: #1a1a1a;
    --text-gray: #4a4a4a;
    --text-dim: #888;
    --accent-glow: rgba(0, 230, 118, 0.05);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #333;
}

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.55;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* Ambient Effects */
.ambient-glow {
    position: fixed;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.12;
}

.glow-1 {
    top: -20vw;
    right: -10vw;
    background: radial-gradient(circle, var(--primary-green) 0%, transparent 70%);
}

.glow-2 {
    bottom: -20vw;
    left: -10vw;
    background: radial-gradient(circle, #00bfa5 0%, transparent 70%);
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    z-index: 3000;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, #00e676, #00bfa5);
    width: 0%;
    box-shadow: 0 0 10px var(--primary-green);
    transition: 0.1s;
}

/* World Class Header */
.mindlytx-header {
    background: rgba(var(--bg-color-rgb), 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 2000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.logo-name {
    font-weight: 900;
    font-size: 24px;
    letter-spacing: -1px;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    direction: ltr;
}

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

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
}

.nav-item {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    letter-spacing: -0.2px;
}

.nav-item:hover {
    color: var(--primary-green);
    background: rgba(0, 230, 118, 0.05);
    border-color: rgba(0, 230, 118, 0.1);
}

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    padding: 8px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.1);
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

[data-theme="light"] .sun-icon {
    display: block;
}

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

/* Layout Container */
.container {
    max-width: 1000px;
    margin: 12px auto;
    padding: 0 16px;
    min-height: 80vh;
}

/* ============================================ */
/* ACADEMY SYSTEM ARCHITECTURE */
/* ============================================ */

/* System Header */
.academy-system-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 16px;
    flex-wrap: wrap;
}

[data-theme="light"] .academy-system-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.system-title h1 {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.6px;
    line-height: 1.1;
}

.system-subtitle {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin: 4px 0 0 0;
    letter-spacing: 0.5px;
    direction: ltr;
    text-align: right;
}

[data-theme="light"] .system-subtitle {
    color: rgba(0, 0, 0, 0.5);
}

.system-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.system-methodology {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Tajawal', sans-serif;
}

.system-methodology:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-white);
}

[data-theme="light"] .system-methodology {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .system-methodology:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.15);
    color: rgba(0, 0, 0, 0.9);
}

.system-methodology svg {
    flex-shrink: 0;
}

.system-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.progress-count {
    font-size: 14px;
    font-weight: 800;
    color: rgba(0, 230, 118, 0.9);
    letter-spacing: -0.2px;
    direction: rtl;
    unicode-bidi: plaintext;
}

.progress-label {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="light"] .progress-label {
    color: rgba(0, 0, 0, 0.4);
}

/* Tier System */
.path-tier {
    margin-bottom: 36px;
}

.tier-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .tier-label {
    color: rgba(0, 0, 0, 0.5);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.tier-number {
    font-size: 18px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1);
    font-variant-numeric: tabular-nums;
}

[data-theme="light"] .tier-number {
    color: rgba(0, 0, 0, 0.1);
}

.path-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* Methodology Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 48px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 24px;
    left: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.methodology-modal h2 {
    font-size: 28px;
    font-weight: 900;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.modal-intro {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 32px 0;
    line-height: 1.6;
}

[data-theme="light"] .modal-intro {
    color: rgba(0, 0, 0, 0.7);
}

.methodology-stage {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .methodology-stage {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.stage-number {
    font-size: 32px;
    font-weight: 900;
    color: rgba(0, 230, 118, 0.3);
    line-height: 1;
    flex-shrink: 0;
}

.stage-content h3 {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: var(--text-white);
}

.stage-content p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

[data-theme="light"] .stage-content p {
    color: rgba(0, 0, 0, 0.7);
}

.methodology-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 14px;
    font-weight: 600;
    color: rgba(0, 230, 118, 0.8);
    text-align: center;
}

[data-theme="light"] .methodology-footer {
    border-top-color: rgba(0, 0, 0, 0.08);
}

/* ============================================ */
/* END ACADEMY SYSTEM */
/* ============================================ */

/* Hub Page - Home View */
#hubPage {
    display: block;
    padding-top: 40px;
    padding-bottom: 40px;
}

/* Breadcrumbs */
.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-gray);
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.breadcrumb span {
    cursor: pointer;
    transition: 0.2s;
}

.breadcrumb span:hover {
    color: var(--primary-green);
}

/* Academy Header */
.academy-header {
    text-align: center;
    margin-bottom: 30px;
}

.academy-header h1 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.academy-header p {
    font-size: 16px;
    color: var(--text-gray);
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================ */
/* PATH CARD SYSTEM - INSTITUTIONAL DESIGN */
/* ============================================ */

.path-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    min-height: 200px;
}

/* Tier-based visual hierarchy */
.path-card[data-tier="foundation"] {
    min-height: 220px;
    border-width: 2px;
    border-color: rgba(255, 255, 255, 0.12);
}

.path-card[data-tier="foundation"]::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3px;
    background: rgba(0, 230, 118, 0.4);
    border-radius: 0 16px 16px 0;
}

.path-card[data-tier="intelligence"]::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3px;
    background: rgba(66, 165, 245, 0.4);
    border-radius: 0 16px 16px 0;
}

.path-card[data-tier="mastery"]::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3px;
    background: rgba(156, 39, 176, 0.4);
    border-radius: 0 16px 16px 0;
}

/* Card States */
.path-card[data-state="completed"] {
    border-color: rgba(0, 230, 118, 0.2);
}

.path-card[data-state="in-progress"]:hover,
.path-card[data-state="available"]:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .path-card:hover {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.12);
}

/* Path Header */
.path-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.path-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 50px;
    width: fit-content;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .path-badge {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.6);
}

.path-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
    color: var(--text-white);
}

.path-subtitle {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
    direction: ltr;
    text-align: right;
}

[data-theme="light"] .path-subtitle {
    color: rgba(0, 0, 0, 0.4);
}

/* Path Body */
.path-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.path-desc {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

[data-theme="light"] .path-desc {
    color: rgba(0, 0, 0, 0.7);
}

.path-prerequisites {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    line-height: 1.4;
}

[data-theme="light"] .path-prerequisites {
    color: rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

.path-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .path-meta {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.meta-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .meta-label {
    color: rgba(0, 0, 0, 0.5);
}

.meta-value {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .meta-value {
    color: rgba(0, 0, 0, 0.85);
}

/* Path Footer */
.path-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.path-progress-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.path-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.path-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
}

.path-progress-fill[data-tier="foundation"] {
    background: linear-gradient(90deg, rgba(0, 230, 118, 0.8), rgba(0, 191, 165, 0.8));
}

.path-progress-fill[data-tier="intelligence"] {
    background: linear-gradient(90deg, rgba(66, 165, 245, 0.8), rgba(33, 150, 243, 0.8));
}

.path-progress-fill[data-tier="mastery"] {
    background: linear-gradient(90deg, rgba(156, 39, 176, 0.8), rgba(123, 31, 162, 0.8));
}

.path-progress-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    direction: rtl;
    unicode-bidi: plaintext;
}

[data-theme="light"] .path-progress-label {
    color: rgba(0, 0, 0, 0.6);
}

.path-cta {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Tajawal', sans-serif;
    text-align: center;
}

.path-cta:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-2px);
}

[data-theme="light"] .path-cta {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.9);
}

[data-theme="light"] .path-cta:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.2);
}

.path-cta[data-state="completed"] {
    background: rgba(0, 230, 118, 0.1);
    border-color: rgba(0, 230, 118, 0.3);
    color: rgba(0, 230, 118, 0.9);
}

/* ============================================ */
/* END PATH CARD SYSTEM */
/* ============================================ */

/* Legacy course-grid compatibility */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* Course Card: Premium Glassmorphism */
.course-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-5px);
    background: var(--accent-glow);
    border-color: var(--primary-green);
}

.course-icon {
    font-size: 32px;
    background: rgba(255, 255, 255, 0.03);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    margin-bottom: 0px;
}

.course-title-group p {
    margin: 0 0 4px 0;
    color: var(--primary-green);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.course-title-group h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: var(--text-white);
}

.course-desc {
    color: var(--text-gray);
    font-size: 15px;
    margin: 0;
    margin-bottom: 20px;
}

/* Progress Section in Card */
.course-card-progress {
    margin-top: auto;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00e676, #00bfa5);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
}

.progress-info.completed {
    color: var(--primary-green);
}

/* Tags & Badges */
.tag {
    background: rgba(0, 230, 118, 0.12);
    color: var(--primary-green);
    padding: 0 16px;
    height: 28px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(0, 230, 118, 0.15);
    white-space: nowrap;
}

.level-badge {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0 12px;
    height: 28px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    display: inline-flex;
    align-items: center;
    color: var(--text-gray);
    white-space: nowrap;
}

.level-badge.Beginner {
    color: #00e676;
    border-color: rgba(0, 230, 118, 0.3);
}

.level-badge.Intermediate {
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.level-badge.Advanced {
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

/* Article Card */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.02);
}

.card h3 {
    margin: 10px 0 20px 0;
    font-size: 19px;
    font-weight: 800;
}

.card-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-dim);
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card.is-read {
    opacity: 0.95;
    background: rgba(0, 230, 118, 0.03);
}

[data-theme="light"] .card.is-read {
    background: rgba(0, 230, 118, 0.05);
}

.status-badge {
    font-size: 11px;
    background: var(--primary-green);
    color: #000;
    padding: 0 16px;
    height: 28px;
    border-radius: 50px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.3);
    white-space: nowrap;
}

/* Article Reader View */
.single-article {
    display: none;
    max-width: 680px;
    margin: 0 auto;
    animation: slideIn 0.5s ease-out;
}

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

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

/* Reading Progress Indicator */
.reading-progress {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1999;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 230, 118, 0.6), rgba(0, 191, 165, 0.6));
    width: 0%;
    transition: width 0.1s ease;
}

/* PRIMARY READING LAYER - Bloomberg-grade Typography */
.article-body {
    font-size: 17px;
    line-height: 1.65;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.01em;
}

[data-theme="light"] .article-body {
    color: rgba(0, 0, 0, 0.85);
}

.article-body p {
    margin-bottom: 24px;
}

.article-body p:last-child {
    margin-bottom: 0;
}

.article-body strong {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .article-body strong {
    color: rgba(0, 0, 0, 0.95);
}

/* SECTION HEADERS */
.article-body h2 {
    color: var(--text-white);
    font-size: 26px;
    font-weight: 800;
    margin-top: 56px;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

/* Legacy support - keeping highlight-box but improving it */
.highlight-box {
    background: rgba(255, 255, 255, 0.02);
    border-right: 3px solid rgba(0, 230, 118, 0.6);
    padding: 24px 28px;
    margin: 32px 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 3px solid rgba(0, 230, 118, 0.6);
}

[data-theme="light"] .highlight-box {
    background: rgba(0, 230, 118, 0.04);
    border-color: rgba(0, 230, 118, 0.15);
}

.highlight-box h4 {
    margin-top: 0;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(0, 230, 118, 0.8);
    margin-bottom: 16px;
}

.highlight-box ul {
    margin: 0;
    padding-right: 20px;
}

.highlight-box li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.highlight-box li:last-child {
    margin-bottom: 0;
}

/* ============================================ */
/* INSTITUTIONAL INSIGHT SYSTEM */
/* ============================================ */

/* Key Insight Block */
.insight-key {
    background: rgba(0, 230, 118, 0.04);
    border-right: 3px solid rgba(0, 230, 118, 0.6);
    padding: 24px 28px;
    margin: 32px 0;
    border-radius: 8px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 3px solid rgba(0, 230, 118, 0.6);
}

.insight-key::before {
    content: "💡 مفتاح";
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(0, 230, 118, 0.8);
    margin-bottom: 12px;
}

.insight-key p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .insight-key {
    background: rgba(0, 230, 118, 0.06);
}

[data-theme="light"] .insight-key p {
    color: rgba(0, 0, 0, 0.9);
}

/* Warning / Misconception Block */
.insight-warning {
    background: rgba(255, 152, 0, 0.05);
    border-right: 3px solid rgba(255, 152, 0, 0.6);
    padding: 24px 28px;
    margin: 32px 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 3px solid rgba(255, 152, 0, 0.6);
}

.insight-warning::before {
    content: "⚠️ خرافة شائعة";
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 152, 0, 0.8);
    margin-bottom: 12px;
}

.insight-warning p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .insight-warning {
    background: rgba(255, 152, 0, 0.08);
}

[data-theme="light"] .insight-warning p {
    color: rgba(0, 0, 0, 0.9);
}

/* Definition Block */
.insight-definition {
    background: rgba(66, 165, 245, 0.06);
    border-right: 3px solid rgba(66, 165, 245, 0.6);
    padding: 20px 24px;
    margin: 32px 0;
    border-radius: 8px;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 3px solid rgba(66, 165, 245, 0.6);
}

.insight-definition::before {
    content: "📖 تعريف";
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: rgba(66, 165, 245, 0.8);
    margin-bottom: 10px;
}

.insight-definition p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .insight-definition {
    background: rgba(66, 165, 245, 0.08);
}

[data-theme="light"] .insight-definition p {
    color: rgba(0, 0, 0, 0.85);
}

/* Practical Takeaway */
.insight-action {
    background: rgba(156, 39, 176, 0.06);
    border-right: 3px solid rgba(156, 39, 176, 0.6);
    padding: 24px 28px;
    margin: 32px 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 3px solid rgba(156, 39, 176, 0.6);
}

.insight-action::before {
    content: "🎯 تطبيق عملي";
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: rgba(156, 39, 176, 0.8);
    margin-bottom: 12px;
}

.insight-action p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .insight-action {
    background: rgba(156, 39, 176, 0.08);
}

[data-theme="light"] .insight-action p {
    color: rgba(0, 0, 0, 0.9);
}

/* ============================================ */
/* ARTICLE METADATA GRID */
/* ============================================ */

.article-metadata {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    margin: 32px 0;
}

[data-theme="light"] .article-metadata {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .meta-label {
    color: rgba(0, 0, 0, 0.4);
}

.meta-value {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .meta-value {
    color: rgba(0, 0, 0, 0.85);
}

.meta-difficulty-beginner {
    color: #00e676;
}

.meta-difficulty-intermediate {
    color: #ff9800;
}

.meta-difficulty-advanced {
    color: #f44336;
}

/* ============================================ */
/* PRODUCT BRIDGING SYSTEM */
/* ============================================ */

.product-hint {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 48px 0;
    transition: all 0.3s;
    text-decoration: none;
}

.product-hint:hover {
    background: rgba(0, 230, 118, 0.03);
    border-color: rgba(0, 230, 118, 0.2);
}

[data-theme="light"] .product-hint {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .product-hint:hover {
    background: rgba(0, 230, 118, 0.04);
    border-color: rgba(0, 230, 118, 0.3);
}

.hint-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.hint-content {
    flex: 1;
}

.hint-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
}

[data-theme="light"] .hint-label {
    color: rgba(0, 0, 0, 0.4);
}

.hint-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 6px;
}

.hint-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin-bottom: 12px;
}

[data-theme="light"] .hint-desc {
    color: rgba(0, 0, 0, 0.6);
}

.hint-link {
    font-size: 13px;
    font-weight: 700;
    color: rgba(0, 230, 118, 0.9);
    text-decoration: none;
    transition: color 0.2s;
}

.hint-link:hover {
    color: rgba(0, 230, 118, 1);
}

/* ============================================ */
/* ARTICLE PATHWAY FOOTER */
/* ============================================ */

.article-pathway {
    margin-top: 80px;
    padding: 32px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .article-pathway {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.pathway-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 16px;
}

[data-theme="light"] .pathway-label {
    color: rgba(0, 0, 0, 0.4);
}

.pathway-next {
    display: block;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.pathway-next:hover {
    background: rgba(0, 230, 118, 0.04);
    border-color: rgba(0, 230, 118, 0.3);
    transform: translateX(-4px);
}

[data-theme="light"] .pathway-next {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .pathway-next:hover {
    background: rgba(0, 230, 118, 0.05);
    border-color: rgba(0, 230, 118, 0.3);
}

.pathway-next-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pathway-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(0, 230, 118, 0.8);
}

.pathway-next h4 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.4;
}

.pathway-arrow {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: rgba(0, 230, 118, 0.6);
    transition: transform 0.3s;
}

.pathway-next:hover .pathway-arrow {
    transform: translateY(-50%) translateX(-4px);
}

/* Back Button Enhancement */
.back-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    margin-bottom: 32px;
    font-family: 'Tajawal', sans-serif;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-white);
    transform: translateX(4px);
}

[data-theme="light"] .back-btn {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .back-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.9);
}

.back-btn span {
    font-size: 18px;
}

/* ============================================ */
/* END INSTITUTIONAL COMPONENTS */
/* ============================================ */


/* Floating Action CTA - Now Hidden on Article Pages */
.floating-cta {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: auto;
    background: transparent;
    border: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.floating-cta.show {
    opacity: 1;
    pointer-events: all;
}

.btn-action {
    background: var(--primary-green);
    color: #000;
    padding: 18px 40px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 900;
    font-size: 17px;
    box-shadow: 0 10px 30px rgba(0, 230, 118, 0.4);
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-action:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 230, 118, 0.6);
}

@media (max-width: 600px) {
    .container {
        margin: 8px auto;
        padding: 0 12px;
    }

    .btn-action {
        padding: 12px 24px;
        font-size: 13px;
    }

    .breadcrumb {
        font-size: 10px;
        padding: 5px 12px;
        margin-bottom: 16px;
    }

    /* Extra compact modal for small screens */
    .modal-overlay {
        padding: 8px;
        padding-top: 30px;
    }

    .modal-content {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .modal-close {
        width: 28px;
        height: 28px;
        font-size: 18px;
        top: 12px;
        left: 12px;
    }

    .methodology-modal h2 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .modal-intro {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .methodology-stage {
        padding: 14px;
        gap: 10px;
        margin-bottom: 16px;
    }

    .stage-number {
        font-size: 22px;
    }

    .stage-content h3 {
        font-size: 15px;
    }

    .stage-content p {
        font-size: 12px;
    }

    .methodology-footer {
        margin-top: 20px;
        padding-top: 16px;
        font-size: 12px;
    }
}

/* Academy Footer */
.academy-footer {
    margin-top: 20px;
    padding: 25px 20px 30px 20px;
    border-top: 1px solid var(--glass-border);
    background: rgba(var(--bg-color-rgb), 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 2;
    margin: 0;
    opacity: 0.8;
}

[data-theme="light"] .academy-footer {
    background: rgba(var(--bg-color-rgb), 0.3);
}

@media (max-width: 768px) {
    .academy-footer {
        padding: 16px 16px 32px 16px;
    }

    .footer-content p {
        font-size: 11px;
        line-height: 1.6;
    }

    /* Article improvements for mobile */
    .single-article {
        max-width: 100%;
        padding: 16px;
    }

    .article-body {
        font-size: 15px;
        line-height: 1.65;
    }

    .article-body h2 {
        font-size: 20px;
        margin-top: 32px;
    }

    .article-body h3 {
        font-size: 17px;
    }

    .article-metadata {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 14px;
    }

    .product-hint {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .hint-icon {
        font-size: 24px;
    }

    .pathway-arrow {
        font-size: 18px;
    }

    .insight-key,
    .insight-warning,
    .insight-definition,
    .insight-action,
    .highlight-box {
        padding: 16px;
        margin: 20px 0;
        font-size: 14px;
    }

    /* Academy System Mobile */
    .academy-system-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .system-title h1 {
        font-size: 22px;
    }

    .system-subtitle {
        font-size: 10px;
    }

    .system-controls {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .system-methodology {
        width: 100%;
        justify-content: center;
        padding: 8px 14px;
        font-size: 12px;
    }

    .system-progress {
        align-items: center;
        text-align: center;
    }

    .progress-count {
        font-size: 16px;
    }

    .progress-label {
        font-size: 10px;
    }

    .tier-label {
        font-size: 11px;
        gap: 8px;
        margin-bottom: 14px;
        padding-bottom: 8px;
    }

    .tier-number {
        font-size: 16px;
    }

    .path-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .path-card {
        min-height: auto;
        padding: 18px;
    }

    .path-card[data-tier="foundation"] {
        min-height: auto;
    }

    .path-title {
        font-size: 17px;
    }

    .path-desc {
        font-size: 13px;
    }

    .path-tier {
        margin-bottom: 32px;
    }

    /* Modal adjustments */
    .modal-overlay {
        padding: 12px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .modal-content {
        padding: 24px 20px;
        max-height: 85vh;
        border-radius: 16px;
    }

    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
        top: 16px;
        left: 16px;
    }

    .methodology-modal h2 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .modal-intro {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .methodology-stage {
        flex-direction: column;
        padding: 16px;
        gap: 12px;
        margin-bottom: 20px;
    }

    .stage-number {
        font-size: 24px;
    }

    .stage-content h3 {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .stage-content p {
        font-size: 13px;
        line-height: 1.5;
    }

    .methodology-footer {
        margin-top: 24px;
        padding-top: 20px;
        font-size: 13px;
    }
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 1rem;
    color: var(--text-gray);
}

.loading-state.hidden {
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    font-size: 1rem;
    margin: 0;
}