/* ═══════════════════════════════════════════════════════════
   style-en.css  ·  Shared styles for indexen.html & indexar.html
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Noto+Kufi+Arabic:wght@400;600;700;800&display=swap');

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #090912;
    --surface:   #101020;
    --surface2:  #171730;
    --card-bg:   #141428;
    --accent1:   #ff6b6b;
    --accent2:   #ffd93d;
    --accent3:   #6bcb77;
    --accent4:   #4d96ff;
    --accent5:   #c77dff;
    --text:      #eeeef8;
    --text-dim:  #7777aa;
    --border:    rgba(255,255,255,0.07);
    --border2:   rgba(255,255,255,0.12);
    --radius:    16px;
    --shadow:    0 8px 40px rgba(0,0,0,0.5);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Syne', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Arabic font override for RTL pages */
[lang="ar"] body,
body.rtl {
    font-family: 'Noto Kufi Arabic', sans-serif;
}

/* ── Noise grain ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* ── Background orbs ── */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.1;
    pointer-events: none;
    animation: orbDrift 25s ease-in-out infinite alternate;
    z-index: 0;
}
.orb-a { width: 700px; height: 700px; background: #4d96ff; top: -300px; left: -200px; }
.orb-b { width: 500px; height: 500px; background: #c77dff; top: 50%; right: -150px; animation-delay: -8s; }
.orb-c { width: 450px; height: 450px; background: #ff6b6b; bottom: -100px; left: 25%; animation-delay: -16s; }

@keyframes orbDrift {
    from { transform: translate(0,0) scale(1); }
    to   { transform: translate(50px,40px) scale(1.08); }
}

/* ── Page layout ── */
.page-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

/* ── Back button ── */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.8rem 0 0;
    padding: 0.55rem 1.2rem;
    border-radius: 100px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border2);
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.25s ease;
}
.back-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text);
    transform: translateX(-3px);
}

/* ── Page title ── */
h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 2rem 0 0;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Page subtitle / header ── */
header {
    margin: 1.2rem 0 2.5rem;
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 700px;
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.03);
    border-left: 3px solid var(--accent4);
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* ── Sidebar nav ── */
.side-bar {
    position: sticky;
    top: 1.5rem;
    float: left;
    width: 230px;
    margin-right: 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border2) transparent;
}
.side-bar h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 1rem;
    background: none;
    -webkit-text-fill-color: initial;
    font-weight: 600;
}
.side-bar nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.side-bar nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1.4;
}
.side-bar nav a:hover {
    background: rgba(255,255,255,0.07);
    color: var(--text);
    padding-left: 1rem;
}

/* ── Main content ── */
main {
    overflow: hidden;
    padding-top: 0.5rem;
}

/* ── Lesson containers ── */
.Lesson-1-What-is-Programming,
.Lesson-2-Programming-Languages,
.Lesson-3-Code-Editors,
.Lesson-Compiler-vs-Interpreter,
.Lesson-5-Programming-Fields-and-Learning-Roadmap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}
.Lesson-1-What-is-Programming::before,
.Lesson-2-Programming-Languages::before,
.Lesson-3-Code-Editors::before,
.Lesson-Compiler-vs-Interpreter::before,
.Lesson-5-Programming-Fields-and-Learning-Roadmap::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent4), var(--accent5), transparent);
    border-radius: 20px 20px 0 0;
}

/* ── Headings ── */
h2 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
    background: none;
    -webkit-text-fill-color: var(--text);
}

h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent4);
    margin: 2rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
h3::before { content: '▸'; color: var(--accent5); font-size: 0.9em; }

/* ── Sections ── */
section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.2rem 0;
    transition: border-color 0.25s;
}
section:hover { border-color: var(--border2); }

/* ── P tags ── */
p {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}
p strong, p > b { color: var(--text); }

/* Highlighted label paragraphs */
.Core-Fundamentals, .Key-Frameworks-Libraries, .Supporting-Tools,
.Primary-Languages-Frameworks-Back-End, .Databases, .Essential-Tools-back-end,
.Additional-Required-Skills, .sql-vs-nosql, .programming-fields {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent3) !important;
    background: rgba(107,203,119,0.1) !important;
    border: 1px solid rgba(107,203,119,0.2) !important;
    border-radius: 8px !important;
    padding: 0.4rem 0.9rem !important;
    margin: 1rem 0 0.5rem !important;
    box-shadow: none !important;
}
.sql-vs-nosql { color: var(--accent2) !important; background: rgba(255,217,61,0.1) !important; border-color: rgba(255,217,61,0.2) !important; }
.programming-fields { color: var(--accent1) !important; background: rgba(255,107,107,0.1) !important; border-color: rgba(255,107,107,0.2) !important; font-size: 1rem !important; }

.Front-End-Development, .Back-End-Development,
.Advanced-Topics-Title, .Deployment-Hosting-Title, .Portfolio-Title {
    color: var(--accent5) !important;
    background: rgba(199,125,255,0.1) !important;
    border: 1px solid rgba(199,125,255,0.2) !important;
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
    box-shadow: none !important;
    display: block !important;
    font-size: 1.05rem !important;
}

/* ── Lists ── */
ol, ul { padding-left: 0; margin: 0.75rem 0; list-style: none; }

li {
    position: relative;
    padding: 0.7rem 0.9rem 0.7rem 2.4rem;
    margin: 0.4rem 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.5;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    box-shadow: none;
}
li::before {
    content: '›';
    position: absolute;
    left: 0.9rem;
    color: var(--accent4);
    font-weight: 700;
}
li:hover {
    background: rgba(77,150,255,0.06);
    border-color: rgba(77,150,255,0.2);
    transform: translateX(3px);
}

ol li { counter-increment: list; }
ol li::before {
    content: counter(list);
    font-size: 0.75rem;
    background: var(--accent4);
    color: var(--bg);
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    top: 50%; transform: translateY(-50%);
    font-weight: 700;
}
ol { counter-reset: list; }

/* ── Images (icons) ── */
img {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin: 0 3px;
    position: relative;
    top: -2px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
    transition: transform 0.2s;
}
img:hover { transform: scale(1.15); }

/* Large images */
.sqlimg, .nativevshybridimg, .Room-Database, .CoreData,
.REST-GraphQL-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    top: 0;
}

/* ── Section type coloring ── */
.What-is-a-web-Development,
.Front-end,
.Back-End,
.Advanced-Topics,
.Deployment-Hosting,
.Portfolio {
    border-left: 3px solid var(--accent4) !important;
}

.Fundamentals-mobile, .Specialization-mobile,
.Essential-Tools-mobile, .Advanced-Skills-mobile,
.Deployment-Optimization-mobile, .Career-Growth-mobile {
    border-left: 3px solid var(--accent3) !important;
}

.Fundamentals-ai, .Specialization-ai, .Essential-Tools-ai,
.Advanced-Skills-ai, .Deployment-Optimization-ai, .Career-Growth-ai {
    border-left: 3px solid var(--accent5) !important;
}

.Fundamentals-game, .Game-Engines-game, .Core-Skills-game,
.Specializations-game, .Assets-Tools-game, .Game-Production-game,
.Advanced-Skills-game, .Testing-QA-game, .Team-Roles-Collaboration-game,
.Version-Control-Collaboration-game, .Career-Growth-game {
    border-left: 3px solid var(--accent2) !important;
}

.Fundamentals-cyber, .Essential-Tools-Skills-cyber,
.Intermediate-Security-Networking-cyber, .Specializations-cyber,
.Advanced-Tools-Techniques-cyber, .Threat-Intelligence-Incident-Response-cyber,
.Compliance-Governance-cyber, .Labs-Projects-CTFs-cyber,
.Certifications-Credentials-cyber, .Emerging-Technologies-Trends-cyber,
.Career-Growth-Mastery-cyber {
    border-left: 3px solid var(--accent1) !important;
}

.Fundamentals-data, .Essential-Tools-Skills-data,
.Intermediate-Data-Engineering-data, .Specializations-data,
.Advanced-Tools-Techniques-data, .Real-Time-Data-Streaming-data,
.Security-Compliance-data, .Labs-Projects-Practice-data,
.Certifications-Credentials-data, .Emerging-Technologies-Trends-data,
.Career-Growth-Mastery-data {
    border-left: 3px solid #ff9f43 !important;
}

/* section title pills */
.Fundamentals-title-mobile, .Specialization-title-mobile,
.Essential-Tools-title-mobile, .Advanced-Skills-title-mobile,
.Deployment-Optimization-title-mobile, .Career-Growth-title-mobile,
.Fundamentals-title-ai, .Specialization-title-ai, .Essential-Tools-title-ai,
.Advanced-Skills-title-ai, .Deployment-Optimization-title-ai, .Career-Growth-title-ai,
.Fundamentals-title-game, .Game-Engines-title-game, .Core-Skills-title-game,
.Specializations-title-game, .Assets-Tools-title-game, .Game-Production-title-game,
.Advanced-Skills-title-game, .Testing-QA-title-game,
.Team-Roles-Collaboration-title-game, .Version-Control-Collaboration-title-game,
.Career-Growth-title-game,
.Fundamentals-title-cyber, .Essential-Tools-Skills-title-cyber,
.Intermediate-Security-Networking-title-cyber, .Specializations-title-cyber,
.Advanced-Tools-Techniques-title-cyber, .Threat-Intelligence-Incident-Response-title-cyber,
.Compliance-Governance-title-cyber, .Labs-Projects-CTFs-title-cyber,
.Certifications-Credentials-title-cyber, .Emerging-Technologies-Trends-title-cyber,
.Career-Growth-Mastery-title-cyber,
.Fundamentals-title-data, .Essential-Tools-Skills-title-data,
.Intermediate-Data-Engineering-title-data, .Specializations-title-data,
.Advanced-Tools-Techniques-title-data, .Real-Time-Data-Streaming-title-data,
.Security-Compliance-title-data, .Labs-Projects-Practice-title-data,
.Certifications-Credentials-title-data, .Emerging-Technologies-Trends-title-data,
.Career-Growth-Mastery-title-data {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 8px;
    padding: 0.45rem 1rem;
    margin-bottom: 0.8rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border2);
    color: var(--text);
    box-shadow: none;
}

/* Nested sub-labels */
.Natural-Language-Processing-ai,
.Computer-Vision-ai,
.Generative-Models-ai {
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent5) !important;
    background: rgba(199,125,255,0.08) !important;
    border: 1px solid rgba(199,125,255,0.2) !important;
    border-radius: 6px !important;
    padding: 0.3rem 0.7rem !important;
    margin: 0.5rem 0 !important;
    box-shadow: none !important;
}
.Natural-Language-Processing-li-ai,
.Computer-Vision-li-ai,
.Generative-Models-li-ai {
    border-left: 2px solid var(--accent5) !important;
}

.Key-Libraries-mobile {
    font-size: 0.82rem !important;
    font-weight: 700;
    color: var(--accent2) !important;
    background: rgba(255,217,61,0.08) !important;
    border: 1px solid rgba(255,217,61,0.2) !important;
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
    margin: 0.5rem 0;
    display: inline-block;
    box-shadow: none;
}

/* ── Market share chart ── */
.market-share {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}
.market-share > p {
    font-weight: 700;
    color: var(--text) !important;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}
.pie-chart {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(
        #4d96ff 0% 45%,
        #6bcb77 45% 70%,
        #ff6b6b 70% 90%,
        #ffd93d 90% 100%
    );
    box-shadow: 0 0 30px rgba(77,150,255,0.3);
}
.legend { display: flex; flex-direction: column; gap: 6px; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text); }
.legend span {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 3px;
}
.react   { background: #4d96ff; }
.vue     { background: #6bcb77; }
.angular { background: #ff6b6b; }
.others  { background: #ffd93d; }

/* ── Dividers ── */
hr, .hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 2.5rem 0;
}

/* ── About section ── */
.about {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    margin: 3rem 0;
}
.about > p {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent4) !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin-bottom: 1rem !important;
}
.about-s {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius);
    color: var(--text) !important;
    font-size: 1rem;
    line-height: 1.7;
}
.instagram {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: rgba(199,125,255,0.08) !important;
    border: 1px solid rgba(199,125,255,0.2) !important;
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-top: 1rem;
}
.instagram img { width: 36px; height: 36px; top: 0; }
.instagram hr { display: none; }
.insta-a {
    color: var(--accent4) !important;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.insta-a:hover { color: var(--accent5) !important; }

/* ── Field sections ── */
.Web-Development,
.Mobile-Development,
.AI-Machine-Learning,
.Data-Engineering,
.Cybersecurity,
.Game-Development {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}
.Web-Development::after     { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent4), transparent); }
.Mobile-Development::after  { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent3), transparent); }
.AI-Machine-Learning::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent5), transparent); }
.Data-Engineering::after    { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, #ff9f43, transparent); }
.Cybersecurity::after       { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent1), transparent); }
.Game-Development::after    { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent2), transparent); }

/* ── Anchor links inside nav ── */
a {
    color: var(--accent4);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

/* Internal nav links (ol inside lesson 5) */
.Lesson-5-Programming-Fields-and-Learning-Roadmap ol a {
    display: inline-block;
    padding: 0.2rem 0;
}

/* ── Scroll-reveal animation ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.Lesson-1-What-is-Programming,
.Lesson-2-Programming-Languages,
.Lesson-3-Code-Editors,
.Lesson-Compiler-vs-Interpreter,
.Lesson-5-Programming-Fields-and-Learning-Roadmap,
.Web-Development, .Mobile-Development, .AI-Machine-Learning,
.Data-Engineering, .Cybersecurity, .Game-Development {
    animation: fadeIn 0.5s ease both;
}

/* ── Responsive ── */
@media (max-width: 860px) {
    .side-bar {
        float: none;
        position: static;
        width: 100%;
        max-height: none;
        margin-right: 0;
        margin-bottom: 2rem;
        overflow: visible;
    }
    .side-bar nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .side-bar nav a { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
    main { overflow: visible; }
}

@media (max-width: 600px) {
    h1 { font-size: 1.8rem; }
    .Lesson-1-What-is-Programming,
    .Lesson-2-Programming-Languages,
    .Lesson-3-Code-Editors,
    .Lesson-Compiler-vs-Interpreter,
    .Lesson-5-Programming-Fields-and-Learning-Roadmap,
    section { padding: 1rem; }
    li { font-size: 0.88rem; }
    img { width: 22px; height: 22px; }
    .sqlimg, .nativevshybridimg, .Room-Database, .CoreData, .REST-GraphQL-img { max-width: 100%; }
}