/* ============================================================
   W3Teach – Main Stylesheet  (Light Theme · Modern Cards)
   ============================================================ */

/* ── Design tokens ──────────────────────────────────────────── */
:root {
    /* Brand */
    --purple:      #7c3aed;
    --purple-dark: #5b21b6;
    --cyan:        #06b6d4;
    --cyan-dark:   #0891b2;
    --green:       #10b981;
    --green-dark:  #059669;
    --green-light: #d1fae5;
    --amber:       #f59e0b;
    --amber-dark:  #d97706;

    /* Neutrals */
    --dark:   #1e293b;
    --body:   #334155;
    --gray:   #64748b;
    --muted:  #94a3b8;
    --border: #e2e8f0;
    --bg:     #f8fafc;
    --card:   #ffffff;

    /* Typography */
    --font: 'Source Sans Pro', Arial, sans-serif;

    /* Elevation */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
    --shadow:    0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);

    /* Purple glows */
    --p08: rgba(124,58,237,.08);
    --p12: rgba(124,58,237,.12);
    --p15: rgba(124,58,237,.15);
    --p20: rgba(124,58,237,.20);
    --p30: rgba(124,58,237,.30);
    --p40: rgba(124,58,237,.40);
    --p50: rgba(124,58,237,.50);
    --p60: rgba(124,58,237,.60);

    /* Cyan glows */
    --c07: rgba(6,182,212,.07);
    --c12: rgba(6,182,212,.12);
    --c20: rgba(6,182,212,.20);
    --c40: rgba(6,182,212,.40);

    /* Green glows */
    --g08: rgba(16,185,129,.08);
    --g10: rgba(16,185,129,.10);
    --g15: rgba(16,185,129,.15);
    --g30: rgba(16,185,129,.30);
    --g40: rgba(16,185,129,.40);
    --g60: rgba(16,185,129,.60);

    /* Amber glows */
    --a10: rgba(245,158,11,.10);
    --a15: rgba(245,158,11,.15);
    --a30: rgba(245,158,11,.30);
    --a40: rgba(245,158,11,.40);

    /* Aliases used by header.css */
    --purple-08: rgba(124,58,237,.08);
    --purple-30: rgba(124,58,237,.30);
    --purple-40: rgba(124,58,237,.40);
}

/* ── Base reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font);
    color: var(--body);
    line-height: 1.65;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* Header lives in header.css */

/* ============================================================
   SECTION HELPERS
   ============================================================ */
.section-py   { padding: 72px 0; }
.section-py-sm { padding: 48px 0; }

.section-head { margin-bottom: 44px; }
.section-head.centered { text-align: center; }

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--purple);
    margin-bottom: 10px;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 10px;
    line-height: 1.15;
}
.section-sub {
    font-size: 16px;
    color: var(--gray);
    margin: 0;
    line-height: 1.6;
}

/* ── "Browse all" text-link ─────────────────────────────────── */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 700;
    color: var(--purple);
    text-decoration: none;
    transition: gap 0.15s;
}
.link-arrow:hover { gap: 9px; color: var(--purple-dark); }

/* ============================================================
   CARD BASE  (shared by course, feature, exam, etc.)
   ============================================================ */
.card-base {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card-base:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px var(--p12);
    border-color: var(--p20);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
#hero-particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.hero-section {
    background: linear-gradient(135deg, #faf5ff 0%, #f0f9ff 55%, #ecfdf5 100%);
    padding: 80px 0 72px;
    position: relative;
    overflow: hidden;
}
/* purple radial glow */
.hero-section::before {
    content: '';
    position: absolute;
    top: -180px; right: -120px;
    width: 640px; height: 640px;
    background: radial-gradient(circle at center, var(--p12), transparent 70%);
    pointer-events: none; z-index: 0;
}
/* cyan radial glow */
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -120px; left: -80px;
    width: 480px; height: 480px;
    background: radial-gradient(circle at center, var(--c07), transparent 70%);
    pointer-events: none; z-index: 0;
}
.hero-section .container { position: relative; z-index: 1; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--p08);
    color: var(--purple);
    border: 1px solid var(--p20);
    border-radius: 100px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 56px;
    font-weight: 900;
    color: var(--dark);
    line-height: 1.08;
    letter-spacing: -1px;
    margin-bottom: 18px;
}
.hero-title span { color: var(--purple); }

.hero-subtitle {
    font-size: 18px;
    color: var(--gray);
    line-height: 1.7;
    max-width: 540px;
    margin: 0 auto 32px;
}

/* Search form inside hero */
.hero-search-group {
    display: flex;
    max-width: 520px;
    margin: 0 auto 24px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-search-group:focus-within {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px var(--p12);
}
.hero-search-group .form-control {
    border: none;
    padding: 14px 18px;
    font-size: 15px;
    background: transparent;
    color: var(--dark);
    outline: none;
    box-shadow: none;
    flex: 1;
    min-width: 0;
}
.hero-search-group .form-control:focus { box-shadow: none; }
.hero-search-group .form-control::placeholder { color: var(--muted); }
.hero-search-group .btn-hero-search {
    padding: 0 22px;
    background: var(--purple);
    color: white;
    border: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 7px;
}
.hero-search-group .btn-hero-search:hover { background: var(--purple-dark); }

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.hero-tags .tag-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}
.hero-tags .badge-tag {
    background: var(--p08);
    color: var(--purple);
    border: 1px solid var(--p20);
    padding: 5px 13px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
}
.hero-tags .badge-tag:hover {
    background: var(--purple);
    color: white;
    border-color: var(--purple);
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
    background: white;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 20px;
}
.stat-item + .stat-item {
    border-left: 1px solid var(--border);
}
.stat-ico {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.stat-ico.purple { background: var(--p08); color: var(--purple); }
.stat-ico.cyan   { background: var(--c07); color: var(--cyan);   }
.stat-ico.green  { background: var(--g08); color: var(--green);  }
.stat-ico.amber  { background: var(--a10); color: var(--amber);  }

.stat-num   { font-size: 28px; font-weight: 800; color: var(--dark); line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* ============================================================
   COURSES SECTION
   ============================================================ */
.courses-section { background: var(--bg); }

.course-card-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.course-card {
    background: var(--card);
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 36px var(--p15);
    border-color: var(--p20);
}
.course-icon {
    height: 78px;
    background: var(--course-color, var(--purple));
    background-image: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.14) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: white;
    flex-shrink: 0;
    position: relative;
}
.course-icon::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    height: 1px;
    background: rgba(0,0,0,0.08);
}
.course-info {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.course-title { font-size: 15px; font-weight: 700; color: var(--dark); margin-bottom: 6px; line-height: 1.3; }
.course-desc  { font-size: 12px; color: var(--gray); margin-bottom: 14px; line-height: 1.5; flex: 1; }
.course-meta  {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.btn-start {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--purple);
    font-weight: 700;
    font-size: 12px;
    transition: gap 0.15s;
}
.course-card:hover .btn-start { gap: 7px; }

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.features-section { background: white; }

.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 34px 28px;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 36px var(--p12);
    border-color: var(--p20);
}
.feature-card-ico {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 22px;
    flex-shrink: 0;
}
.feature-card-ico.purple { background: var(--p08); color: var(--purple); }
.feature-card-ico.amber  { background: var(--a10); color: var(--amber); }
.feature-card-ico.cyan   { background: var(--c07); color: var(--cyan); }
.feature-card-ico.green  { background: var(--g08); color: var(--green); }

.feature-card h5 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}
.feature-card p {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.65;
    margin: 0 0 20px;
    flex: 1;
}
.feature-card .btn-feature {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    margin-top: auto;
    transition: gap 0.15s;
}
.feature-card .btn-feature.purple { color: var(--purple); }
.feature-card .btn-feature.amber  { color: var(--amber); }
.feature-card .btn-feature.cyan   { color: var(--cyan); }
.feature-card .btn-feature.green  { color: var(--green); }
.feature-card .btn-feature:hover  { gap: 9px; }

/* ============================================================
   EDITOR PREVIEW SECTION
   ============================================================ */
.tryit-section { background: var(--bg); }

.tryit-feature-list { list-style: none; padding: 0; margin: 0 0 28px; }
.tryit-feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    font-size: 15px;
    color: var(--body);
}
.tryit-feature-list li i { color: var(--green); font-size: 15px; }

/* Dark code window – intentionally dark */
.editor-preview-box {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,0.16);
    background: #1e2127;
    border: 1px solid rgba(255,255,255,0.05);
}
.editor-header {
    background: #282c34;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.editor-filename { font-size: 12px; color: rgba(255,255,255,0.35); margin-left: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }
.editor-code {
    padding: 24px;
    color: #abb2bf;
    font-size: 14px;
    font-family: 'Fira Code', 'Consolas', monospace;
    line-height: 1.8;
    margin: 0;
}
.editor-code .kw   { color: #c678dd; }
.editor-code .prop { color: #61dafb; }
.editor-code .attr { color: #98c379; }
.editor-code .val  { color: #e5c07b; }

/* ============================================================
   CERT / CTA SECTION
   ============================================================ */
.cert-section {
    background: linear-gradient(135deg, var(--purple) 0%, #4c1d95 100%);
    color: white;
    padding: 72px 0;
    position: relative;
    overflow: hidden;
}
.cert-section::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 70%);
    pointer-events: none;
}
.cert-section::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,0.15), transparent 70%);
    pointer-events: none;
}
.cert-section .container { position: relative; z-index: 1; }

.cert-title { font-size: 36px; font-weight: 800; margin-bottom: 12px; }
.cert-sub   { font-size: 16px; opacity: 0.8; margin-bottom: 40px; }

.cert-steps { display: flex; justify-content: center; gap: 0; margin-bottom: 40px; }
.cert-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 180px;
    position: relative;
}
.cert-step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px;
    left: calc(50% + 24px);
    right: calc(-50% + 24px);
    height: 1px;
    background: rgba(255,255,255,0.2);
}
.cert-step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 12px;
}
.cert-step-text { font-size: 14px; font-weight: 600; opacity: 0.9; text-align: center; }

.btn-cert {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--purple);
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-cert:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.2);
    color: var(--purple-dark);
}

/* ============================================================
   FOOTER  (Dark – purple / cyan / amber theme)
   ============================================================ */
.site-footer {
    background: #0f0b1e;
    position: relative;
    overflow: hidden;
    color: rgba(255,255,255,0.65);
}

/* 3-colour top accent stripe */
.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--purple) 0%, var(--cyan) 55%, var(--amber) 100%);
    z-index: 2;
}

/* purple radial glow – bottom-left */
.site-footer::after {
    content: '';
    position: absolute;
    bottom: -120px; left: -120px;
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(124,58,237,0.13), transparent 70%);
    pointer-events: none;
}

.footer-top {
    border-bottom: 1px solid rgba(255,255,255,0.07);
    position: relative;
}
/* cyan radial glow – top-right */
.footer-top::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 440px; height: 440px;
    background: radial-gradient(circle, rgba(6,182,212,0.09), transparent 70%);
    pointer-events: none;
}
.footer-top .container { position: relative; z-index: 1; }

/* Brand */
.footer-brand {
    display: inline-flex; align-items: center; gap: 3px;
    text-decoration: none; margin-bottom: 12px;
}
.footer-brand-badge {
    background: var(--purple); color: white;
    padding: 3px 9px; border-radius: 8px;
    font-size: 20px; font-weight: 800;
}
.footer-brand-text { color: white; font-size: 20px; font-weight: 700; }
.footer-tagline { color: rgba(255,255,255,0.42); font-size: 13px; line-height: 1.65; }

/* Column headings with gradient underline */
.footer-heading {
    font-weight: 700; color: white;
    font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 18px;
    position: relative; padding-bottom: 10px;
}
.footer-heading::after {
    content: '';
    position: absolute; bottom: 0; left: 0;
    width: 28px; height: 2px;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
    border-radius: 2px;
}

/* Links */
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-links a {
    color: rgba(255,255,255,0.50);
    text-decoration: none; font-size: 14px;
    transition: color 0.15s, padding-left 0.15s;
    display: inline-block;
}
.footer-links a:hover { color: rgba(255,255,255,0.92); padding-left: 5px; }

/* Contact list */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li {
    display: flex; align-items: center; gap: 10px;
    color: rgba(255,255,255,0.50); font-size: 13px; margin-bottom: 10px;
}
.contact-ico {
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; flex-shrink: 0;
}
.contact-ico-purple { background: var(--p20); color: var(--purple); }
.contact-ico-cyan   { background: rgba(6,182,212,.20); color: var(--cyan); }
.contact-ico-amber  { background: var(--a15); color: var(--amber); }

/* Social buttons */
.social-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 9px;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    margin-right: 6px; margin-bottom: 6px;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.15s;
}
.social-btn:hover {
    background: var(--purple); color: white;
    border-color: var(--purple);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px var(--p40);
}

/* Newsletter */
.newsletter-group {
    display: flex;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; overflow: hidden;
    transition: border-color 0.2s;
}
.newsletter-group:focus-within { border-color: var(--purple); }
.newsletter-input {
    flex: 1; min-width: 0;
    background: transparent; border: none;
    padding: 10px 14px; color: white;
    font-size: 13px; outline: none;
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.28); }
.newsletter-btn {
    background: var(--purple); color: white;
    border: none; padding: 10px 16px;
    font-size: 13px; font-weight: 700;
    cursor: pointer; transition: background 0.15s;
    white-space: nowrap; flex-shrink: 0;
}
.newsletter-btn:hover { background: var(--purple-dark); }

/* Bottom bar */
.footer-bottom {
    background: rgba(0,0,0,0.28);
    border-top: 1px solid rgba(255,255,255,0.06);
    position: relative; z-index: 1;
}
.footer-bottom p { color: rgba(255,255,255,0.35); margin: 0; font-size: 13px; }
.footer-bottom a {
    color: rgba(255,255,255,0.35); font-size: 13px;
    text-decoration: none; transition: color 0.15s;
}
.footer-bottom a:hover { color: var(--purple) !important; }

/* ============================================================
   AUTH PAGES  (standalone – no shared header)
   ============================================================ */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #faf5ff 0%, #f0f9ff 60%, #f0fdf9 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 16px;
    position: relative;
    overflow: hidden;
}
.auth-page::before {
    content: '';
    position: absolute;
    top: -150px; right: -100px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--p12), transparent 70%);
    pointer-events: none;
}
.auth-page::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -80px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--c07), transparent 70%);
    pointer-events: none;
}

.auth-wrap {
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}
.auth-wrap.wide { max-width: 500px; }

.auth-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-bottom: 28px;
}
.auth-logo-badge {
    background: var(--purple);
    color: white;
    padding: 3px 10px;
    border-radius: 7px;
    font-size: 22px;
    font-weight: 800;
}
.auth-logo-text { color: var(--dark); font-size: 22px; font-weight: 700; margin-left: 3px; }

.auth-tagline {
    text-align: center;
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 24px;
}

.auth-card {
    background: white;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 32px var(--p08), var(--shadow-md);
    overflow: hidden;
}
.auth-card-stripe {
    height: 5px;
    background: linear-gradient(90deg, var(--purple) 0%, var(--cyan) 100%);
}
.auth-card-body { padding: 36px; }

.auth-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
}
.auth-subtitle {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 24px;
}

/* Form overrides inside auth */
.auth-card .form-label { font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 5px; }
.auth-card .form-control,
.auth-card .form-select {
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-size: 14px;
    padding: 10px 14px;
    color: var(--dark);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-card .form-control:focus,
.auth-card .form-select:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--p12);
    outline: none;
}
.auth-card .input-group-text {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 9px 0 0 9px;
    color: var(--muted);
}
.auth-card .input-group .form-control {
    border-left: none;
    border-radius: 0 9px 9px 0;
}
.auth-card .input-group .form-control:focus { border-left: none; box-shadow: none; }
.auth-card .input-group:focus-within .input-group-text {
    border-color: var(--purple);
}
.auth-card .input-group:focus-within .form-control {
    border-color: var(--purple);
}

.btn-auth-submit {
    width: 100%;
    padding: 12px;
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 10px var(--p30);
}
.btn-auth-submit:hover {
    background: var(--purple-dark);
    box-shadow: 0 4px 18px var(--p40);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--muted);
    font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

.auth-footer-link { color: var(--gray); font-size: 14px; text-align: center; margin-top: 20px; }
.auth-footer-link a { color: var(--purple); font-weight: 700; text-decoration: none; }
.auth-footer-link a:hover { text-decoration: underline; }

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray);
    font-size: 13px;
    text-decoration: none;
    margin-top: 18px;
    justify-content: center;
    width: 100%;
    transition: color 0.15s;
}
.auth-back-link:hover { color: var(--purple); }

/* Demo buttons */
.demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: white;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.15s;
}
.demo-btn:hover { border-color: var(--purple); color: var(--purple); background: var(--p08); }

/* ============================================================
   INNER PAGE HERO  (courses, exams, profile headers)
   ============================================================ */
.page-hero {
    padding: 28px 0;
    position: relative;
    overflow: hidden;
    color: white;
}
.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.18) 100%);
    pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero-icon {
    width: 60px; height: 60px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: white;
}
.page-hero-title {
    font-size: 26px; font-weight: 800; color: white; margin-bottom: 4px;
}
.page-hero-desc { font-size: 15px; color: rgba(255,255,255,0.8); margin: 0; }

/* ============================================================
   COURSE CONTENT (lesson sidebar + lesson view)
   ============================================================ */
.sidebar-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.sidebar-panel-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
}
.sidebar-panel-header i { color: var(--purple); }

.sidebar-lesson-link {
    display: flex;
    align-items: center;
    padding: 9px 18px 9px 15px; /* 3px compensation for border */
    color: var(--gray);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.15s;
    border-left: 3px solid transparent;
    border-bottom: 1px solid var(--border);
}
.sidebar-lesson-link:last-child { border-bottom: none; }
.sidebar-lesson-link:hover {
    background: var(--p08);
    color: var(--purple-dark);
    border-left-color: var(--purple);
}
.sidebar-lesson-link.active {
    background: var(--p08);
    color: var(--purple-dark);
    font-weight: 700;
    border-left-color: var(--purple);
}
.sidebar-lesson-link.read   { color: var(--green); }
.sidebar-lesson-link.read i { color: var(--green); }

/* Lesson content */
.lesson-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}
.lesson-panel-body { padding: 32px; }
.lesson-header  { border-bottom: 1px solid var(--border); padding-bottom: 18px; margin-bottom: 28px; }
.lesson-title   { font-size: 28px; font-weight: 800; color: var(--dark); margin: 4px 0 0; }

.lesson-text h2 { font-size: 22px; font-weight: 700; margin-top: 30px; margin-bottom: 12px; color: var(--dark); }
.lesson-text h3 { font-size: 18px; font-weight: 700; margin-top: 24px; margin-bottom: 10px; color: var(--dark); }
.lesson-text p  { margin-bottom: 14px; line-height: 1.75; }
.lesson-text code {
    background: var(--p08);
    padding: 2px 7px;
    border-radius: 5px;
    font-family: 'Fira Code', Consolas, monospace;
    font-size: 13px;
    color: var(--purple-dark);
    border: 1px solid var(--p15);
}
.lesson-text ul, .lesson-text ol { margin-bottom: 14px; padding-left: 24px; }
.lesson-text li { margin-bottom: 5px; }
.lesson-text .note {
    background: var(--c07);
    border-left: 4px solid var(--cyan);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin: 18px 0;
    color: var(--dark);
    font-size: 14px;
}

/* Code example box */
.code-example-box {
    background: #1e2127;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
    border: 1px solid rgba(255,255,255,0.04);
}
.example-header {
    background: #282c34;
    color: #6b7280;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.code-pre {
    margin: 0; padding: 18px;
    color: #abb2bf;
    font-family: 'Fira Code', Consolas, monospace;
    font-size: 13px;
    line-height: 1.7;
    overflow-x: auto;
    max-height: 350px;
}
.example-result-bar {
    background: var(--green);
    color: white; padding: 8px 16px;
    cursor: pointer; font-size: 13px; font-weight: 600;
    display: flex; align-items: center; user-select: none;
}
.example-result-bar:hover { background: var(--green-dark); }
.example-result-preview { border-top: 2px solid var(--green); background: white; }

/* Nav buttons */
.lesson-nav { border-top: 1px solid var(--border); padding-top: 22px; margin-top: 22px; }
.btn-nav { font-weight: 600; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Quiz CTA box */
.quiz-cta-box {
    background: linear-gradient(135deg, var(--p08), white);
    border: 1px solid var(--p20);
    border-radius: 12px;
    padding: 22px;
}

/* ============================================================
   EXAM STYLES
   ============================================================ */
.badge-filter {
    display: inline-block; padding: 5px 16px;
    border-radius: 100px;
    border: 1.5px solid var(--border);
    color: var(--gray); text-decoration: none;
    font-size: 13px; font-weight: 600;
    transition: all 0.15s;
}
.badge-filter:hover, .badge-filter.active {
    background: var(--purple); color: white; border-color: var(--purple);
}

.exam-card {
    background: var(--card); border-radius: 14px;
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.exam-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px var(--p12); border-color: var(--p20); }
.exam-card-header { padding: 20px; }
.exam-card-body   { padding: 18px; border-top: 1px solid var(--border); }
.exam-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.exam-meta-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray); }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-hero {
    background: linear-gradient(135deg, var(--p08) 0%, var(--c07) 100%);
    border-bottom: 1px solid var(--border);
    padding: 36px 0;
}
.info-stat { padding: 16px; }
.stat-big  { font-size: 36px; font-weight: 800; color: var(--purple); }

/* ============================================================
   COURSE PAGE HERO  (courses/index.php)
   ============================================================ */
.course-page-hero {
    padding: 32px 0;
    background: var(--chero-color, var(--purple));
    position: relative;
    overflow: hidden;
    color: white;
}
.course-page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.22) 100%);
    pointer-events: none;
}
.course-page-hero .container { position: relative; z-index: 1; }

.course-page-icon {
    width: 68px; height: 68px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(4px);
    border: 1.5px solid rgba(255,255,255,0.28);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; color: white;
    flex-shrink: 0;
}
.course-page-title {
    font-size: 26px; font-weight: 800;
    color: white; margin-bottom: 6px;
    line-height: 1.2;
}
.course-page-desc {
    font-size: 14px; color: rgba(255,255,255,0.82);
    margin-bottom: 12px; line-height: 1.55;
}
.course-page-meta {
    display: flex; flex-wrap: wrap; gap: 16px;
    font-size: 13px; color: rgba(255,255,255,0.85);
}
.btn-course-start {
    display: inline-flex; align-items: center; gap: 8px;
    background: white;
    color: var(--dark) !important;
    padding: 11px 22px;
    border-radius: 10px;
    font-size: 14px; font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-course-start:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.course-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    overflow: hidden;
    max-width: 400px;
    margin-top: 12px;
}
.course-progress-fill { height: 100%; background: white; border-radius: 3px; }
.course-progress-label { font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 4px; }

/* ============================================================
   COURSE OVERVIEW STATS
   ============================================================ */
.course-info-stat { text-align: center; padding: 8px; }
.course-info-ico {
    width: 52px; height: 52px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin: 0 auto 8px;
}
.course-info-val   { font-size: 22px; font-weight: 800; color: var(--dark); line-height: 1.1; }
.course-info-label { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ============================================================
   BADGE + PURPLE BUTTONS
   ============================================================ */
.badge-lesson-count {
    background: var(--p08);
    color: var(--purple);
    border: 1px solid var(--p20);
    font-size: 11px; font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    flex-shrink: 0;
}
.btn-purple {
    background: var(--purple);
    color: white !important;
    border: 1.5px solid var(--purple);
    border-radius: 10px;
    padding: 10px 22px;
    font-weight: 700; font-size: 14px;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 7px;
    transition: background 0.15s, border-color 0.15s;
    cursor: pointer;
}
.btn-purple:hover { background: var(--purple-dark); border-color: var(--purple-dark); }
.btn-outline-purple {
    background: white;
    color: var(--purple) !important;
    border: 1.5px solid var(--p30);
    border-radius: 10px;
    padding: 10px 22px;
    font-weight: 700; font-size: 14px;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 7px;
    transition: all 0.15s;
    cursor: pointer;
}
.btn-outline-purple:hover { background: var(--p08); border-color: var(--purple); }

/* ============================================================
   SIDEBAR ACCORDION OVERRIDES
   ============================================================ */
.sidebar-panel .accordion-button {
    background: white;
    color: var(--dark);
    font-size: 13px; font-weight: 600;
    padding: 12px 16px;
    box-shadow: none;
}
.sidebar-panel .accordion-button:not(.collapsed) {
    color: var(--purple);
    background: var(--p08);
    box-shadow: none;
}
.sidebar-panel .accordion-button::after { opacity: 0.5; }
.sidebar-panel .accordion-button:not(.collapsed)::after { opacity: 1; }
.sidebar-panel .accordion-item { background: white; }

/* ============================================================
   CURRICULUM  (courses/index.php)
   ============================================================ */
.curriculum-chapter {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.curriculum-chapter-head {
    display: flex; align-items: center;
    padding: 13px 18px;
    font-size: 14px; font-weight: 700;
    color: var(--dark);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.curriculum-lesson-list { list-style: none; margin: 0; padding: 0; }
.curriculum-lesson-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 18px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.curriculum-lesson-item:last-child { border-bottom: none; }
.curriculum-lesson-item:hover { background: var(--p08); }
.curriculum-lesson-item a {
    flex: 1; text-decoration: none;
    font-size: 14px; color: var(--dark);
    transition: color 0.15s;
}
.curriculum-lesson-item a:hover { color: var(--purple); }
.curriculum-lesson-ico { font-size: 14px; flex-shrink: 0; }
.curriculum-lesson-item.is-read .curriculum-lesson-ico { color: var(--green); }
.curriculum-lesson-item:not(.is-read) .curriculum-lesson-ico { color: var(--muted); }
.curriculum-read-badge {
    font-size: 11px; font-weight: 700;
    background: var(--g08); color: var(--green-dark);
    border: 1px solid var(--g30);
    padding: 2px 8px; border-radius: 100px; flex-shrink: 0;
}

/* ============================================================
   GENERAL COURSE LISTING  (courses/index sidebar list)
   ============================================================ */
.course-icon-sm {
    width: 38px; height: 38px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; flex-shrink: 0;
}
.lesson-link       { text-decoration: none; color: var(--gray); }
.lesson-link:hover { color: var(--purple); }
.lesson-read       { color: var(--green); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fadeInUp 0.4s ease; }

/* ============================================================
   BOOTSTRAP OVERRIDES  (utilities that pages depend on)
   ============================================================ */
/* btn-success → purple (removes green from UI buttons) */
.btn-success           { background-color: var(--purple) !important; border-color: var(--purple) !important; color: white !important; }
.btn-success:hover     { background-color: var(--purple-dark) !important; border-color: var(--purple-dark) !important; }
.btn-outline-success   { color: var(--purple) !important; border-color: var(--purple) !important; }
.btn-outline-success:hover { background: var(--purple) !important; color: white !important; }

/* Semantic pass/fail uses cyan (passed) / red (failed) */
.text-success          { color: var(--cyan)   !important; }
.bg-success            { background-color: var(--cyan) !important; }
.border-success        { border-color: var(--cyan) !important; }

.btn-primary           { background-color: var(--purple) !important; border-color: var(--purple) !important; }
.btn-primary:hover     { background-color: var(--purple-dark) !important; border-color: var(--purple-dark) !important; }
.btn-outline-primary   { color: var(--purple) !important; border-color: var(--purple) !important; }
.btn-outline-primary:hover { background: var(--purple) !important; color: white !important; }

.alert-success { background: var(--c07); border-color: var(--cyan); color: var(--cyan-dark); }
.alert-info    { background: var(--c07); border-color: var(--cyan);  color: var(--cyan-dark);  }
.alert-warning { background: var(--a10); border-color: var(--amber); color: var(--amber-dark); }

.form-control:focus,
.form-select:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--p12);
    outline: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .stat-item + .stat-item { border-left: none; border-top: 1px solid var(--border); }
}

@media (max-width: 768px) {
    .hero-title   { font-size: 38px; }
    .section-title { font-size: 26px; }
    .cert-title   { font-size: 28px; }
    .lesson-title { font-size: 22px; }
    .lesson-panel-body { padding: 20px; }
    .hero-search-group .form-control { min-width: unset; width: 100%; }
    .cert-steps { flex-wrap: wrap; gap: 24px; }
    .cert-step-item::after { display: none; }
}

@media (max-width: 576px) {
    .hero-section  { padding: 56px 0 48px; }
    .hero-title    { font-size: 32px; }
    .auth-card-body { padding: 24px; }
    .feature-card  { padding: 24px 20px; }
}
