:root {
      --primary: #1a1a2e;
      --accent: #e63946;
      --accent2: #457b9d;
      --light: #f8f9fa;
      --white: #ffffff;
      --gray: #6c757d;
      --border: #e9ecef;
      --card-shadow: 0 2px 20px rgba(0,0,0,0.07);
      --card-hover: 0 8px 40px rgba(0,0,0,0.13);
    }
    * { margin: 0; padding: 0; box-sizing: border-box; }
    body { font-family: 'DM Sans', sans-serif; color: var(--primary); background: var(--white); }

    /* NAVBAR */
    .navbar { background: var(--white); border-bottom: 1px solid var(--border); padding: 0.3rem 0; position: sticky; top: 0; z-index: 100; }
    .navbar-brand { font-family: 'DM Serif Display', serif; font-size: 1.6rem; color: var(--primary) !important; letter-spacing: -0.5px; }
    .navbar-brand span { color: var(--accent); }
    .nav-link { font-weight: 500; color: var(--primary) !important; font-size: 0.9rem; padding: 0.4rem 1rem !important; transition: color 0.2s; }
    .nav-link:hover { color: var(--accent) !important; }
    .btn-nav-login { border: 1.5px solid var(--primary); border-radius: 50px; padding: 0.4rem 1.3rem !important; font-size: 0.88rem !important; }
    .btn-nav-login:hover { background: var(--primary); color: var(--white) !important; }
    .btn-nav-daftar { background: var(--accent); color: var(--white) !important; border-radius: 50px; padding: 0.4rem 1.3rem !important; font-size: 0.88rem !important; border: none; }
    .btn-nav-daftar:hover { background: #c1121f; color: var(--white) !important; }

    /* HERO */
    .hero { background: linear-gradient(135deg, #f8f9fa 0%, #e9f2f8 100%); padding: 80px 0 60px; position: relative; overflow: hidden; }
    .hero::before { content: ''; position: absolute; right: -80px; top: -80px; width: 400px; height: 400px; border-radius: 50%; background: rgba(230,57,70,0.06); }
    .hero::after { content: ''; position: absolute; left: -60px; bottom: -60px; width: 300px; height: 300px; border-radius: 50%; background: rgba(69,123,157,0.07); }
    .hero-label { display: inline-block; background: rgba(230,57,70,0.1); color: var(--accent); font-size: 0.78rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; padding: 0.3rem 0.9rem; border-radius: 50px; margin-bottom: 1.2rem; }
    .hero h1 { font-family: 'DM Serif Display', serif; font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.15; margin-bottom: 1.2rem; }
    .hero h1 em { color: var(--accent); font-style: italic; }
    .hero p { font-size: 1.05rem; color: var(--gray); max-width: 500px; line-height: 1.7; margin-bottom: 2rem; }
    .hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 2rem; }
    .hero-stat strong { display: block; font-size: 1.5rem; font-family: 'DM Serif Display', serif; color: var(--primary); }
    .hero-stat span { font-size: 0.82rem; color: var(--gray); }
    .hero-img-wrap { position: relative; }
    .hero-img-wrap img { width: 100%; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
    .hero-badge { position: absolute; bottom: -20px; left: -20px; background: var(--white); border-radius: 16px; padding: 1rem 1.4rem; box-shadow: 0 8px 30px rgba(0,0,0,0.12); display: flex; align-items: center; gap: 0.8rem; }
    .hero-badge i { font-size: 1.5rem; color: var(--accent); }
    .hero-badge strong { display: block; font-size: 0.95rem; }
    .hero-badge span { font-size: 0.78rem; color: var(--gray); }

    /* CATEGORIES */
    .section-title { font-family: 'DM Serif Display', serif; font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 0.5rem; }
    .section-sub { color: var(--gray); font-size: 0.95rem; margin-bottom: 2.5rem; }
    .cat-btn { display: inline-block; padding: 0.4rem 1.1rem; border-radius: 50px; font-size: 0.82rem; font-weight: 500; border: 1.5px solid var(--border); color: var(--gray); background: var(--white); margin: 0.2rem; cursor: pointer; transition: all 0.2s; }
    .cat-btn:hover, .cat-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

    /* COURSE CARDS */
    .course-card { background: var(--white); border-radius: 18px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--card-shadow); transition: all 0.3s; cursor: pointer; height: 100%; text-decoration: none; color: inherit; display: block; }
    .course-card:hover { box-shadow: var(--card-hover); transform: translateY(-4px); color: inherit; }
    .course-cover { width: 100%; height: 180px; object-fit: cover; display: block; }
    .course-cover-placeholder { width: 100%; height: 180px; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
    .course-body { padding: 1.4rem; }
    .course-tag { display: inline-block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; padding: 0.2rem 0.7rem; border-radius: 50px; margin-bottom: 0.7rem; }
    .tag-html { background: #fff3cd; color: #856404; }
    .tag-css { background: #cfe2ff; color: #084298; }
    .tag-php { background: #d1e7dd; color: #0a3622; }
    .tag-js { background: #fff3cd; color: #664d03; }
    .tag-python { background: #e2d9f3; color: #432874; }
    .course-title { font-family: 'DM Serif Display', serif; font-size: 1.15rem; margin-bottom: 0.5rem; line-height: 1.3; }
    .course-desc { font-size: 0.83rem; color: var(--gray); line-height: 1.5; margin-bottom: 1rem; }
    .course-meta { display: flex; align-items: center; justify-content: space-between; padding-top: 0.8rem; border-top: 1px solid var(--border); }
    .course-meta span { font-size: 0.78rem; color: var(--gray); display: flex; align-items: center; gap: 0.3rem; }
    .course-arrow { width: 32px; height: 32px; background: var(--primary); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; transition: background 0.2s; }
    .course-card:hover .course-arrow { background: var(--accent); }

    /* CTA BANNER */
    .cta-banner { background: var(--primary); border-radius: 24px; padding: 60px 40px; position: relative; overflow: hidden; }
    .cta-banner::before { content: ''; position: absolute; right: -50px; top: -50px; width: 250px; height: 250px; border-radius: 50%; background: rgba(255,255,255,0.04); }
    .cta-banner h2 { font-family: 'DM Serif Display', serif; color: var(--white); font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 1rem; }
    .cta-banner p { color: rgba(255,255,255,0.65); font-size: 0.95rem; margin-bottom: 1.8rem; }
    .btn-cta { background: var(--accent); color: var(--white); border: none; border-radius: 50px; padding: 0.75rem 2rem; font-weight: 600; font-size: 0.95rem; transition: all 0.2s; }
    .btn-cta:hover { background: #c1121f; color: var(--white); transform: translateY(-2px); }

    /* FOOTER */
    footer { background: var(--light); border-top: 1px solid var(--border); padding: 50px 0 30px; }
    .footer-brand { font-family: 'DM Serif Display', serif; font-size: 1.5rem; margin-bottom: 0.5rem; }
    .footer-brand span { color: var(--accent); }
    footer p { font-size: 0.85rem; color: var(--gray); }
    .footer-link { color: var(--gray); text-decoration: none; font-size: 0.85rem; display: block; margin-bottom: 0.5rem; transition: color 0.2s; }
    .footer-link:hover { color: var(--accent); }
    .footer-bottom { border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 1.5rem; font-size: 0.8rem; color: var(--gray); }



    /* Halaman Materi */
     /* BREADCRUMB */
    .breadcrumb-wrap { background: var(--light); padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
    .breadcrumb { margin: 0; font-size: 0.83rem; }
    .breadcrumb-item a { color: var(--gray); text-decoration: none; }
    .breadcrumb-item a:hover { color: var(--accent); }
    .breadcrumb-item.active { color: var(--primary); font-weight: 500; }

    /* HERO MATERI */
    .materi-hero { background: linear-gradient(135deg, var(--primary) 0%, #2d2d5e 100%); padding: 50px 0; position: relative; overflow: hidden; }
    .materi-hero::before { content:''; position:absolute; right:-60px; top:-60px; width:300px; height:300px; border-radius:50%; background:rgba(255,255,255,0.04); }
    .materi-tag { display: inline-block; background: rgba(230,57,70,0.85); color: var(--white); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; padding: 0.25rem 0.8rem; border-radius: 50px; margin-bottom: 1rem; }
    .materi-hero h1 { font-family: 'DM Serif Display', serif; color: var(--white); font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 1rem; line-height: 1.2; }
    .materi-hero p { color: rgba(255,255,255,0.7); font-size: 0.95rem; line-height: 1.7; max-width: 1000px; text-align: justify; }
    .hero-meta-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: rgba(255,255,255,0.7); }
    .hero-meta-item i { color: var(--accent); }
    .hero-emoji { font-size: 5rem; opacity: 0.2; position: absolute; right: 80px; top: 50%; transform: translateY(-50%); }

    /* MAIN LAYOUT */
    .main-wrap { padding: 40px 0 60px; }

    /* SIDEBAR */
    .sidebar { position: sticky; top: 80px; }
    .sidebar-card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--card-shadow); }
    .sidebar-header { background: var(--primary); color: var(--white); padding: 1rem 1.3rem; }
    .sidebar-header h6 { font-weight: 600; margin: 0; font-size: 0.88rem; letter-spacing: 0.5px; }
    .sidebar-header span { font-size: 0.75rem; opacity: 0.6; }
    .sub-list { list-style: none; padding: 0.5rem 0; margin: 0; }
    .sub-item { display: flex; align-items: center; padding: 0.75rem 1.3rem; border-bottom: 1px solid var(--border); gap: 0.75rem; transition: background 0.2s; cursor: pointer; }
    .sub-item:last-child { border-bottom: none; }
    .sub-item:hover { background: var(--light); }
    .sub-item.locked { opacity: 0.55; cursor: not-allowed; }
    .sub-item.active { background: #fff5f5; border-left: 3px solid var(--accent); }
    .sub-num { width: 26px; height: 26px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; color: var(--gray); flex-shrink: 0; }
    .sub-item.active .sub-num { background: var(--accent); color: var(--white); }
    .sub-name { font-size: 0.83rem; flex: 1; font-weight: 500; }
    .sub-lock { font-size: 0.8rem; color: var(--gray); }
    .sub-item.unlocked .sub-lock { color: #198754; }
    .sidebar-progress { padding: 1rem 1.3rem; border-top: 1px solid var(--border); background: var(--light); }
    .progress { height: 6px; border-radius: 10px; }
    .progress-bar { background: var(--accent); border-radius: 10px; }

    /* CONTENT AREA */
    .content-card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; box-shadow: var(--card-shadow); }
    .content-card h2 { font-family: 'DM Serif Display', serif; font-size: 1.6rem; margin-bottom: 1rem; }
    .content-card p { color: #444; line-height: 1.75; font-size: 0.95rem; margin-bottom: 1rem; }
    .content-card h4 { font-weight: 600; font-size: 1rem; margin: 1.5rem 0 0.5rem; }

    /* LOCKED OVERLAY */
    .locked-overlay { background: linear-gradient(135deg, #f8f9fa, #fff); border: 1.5px dashed var(--border); border-radius: 16px; padding: 3rem 2rem; text-align: center; }
    .locked-icon { width: 70px; height: 70px; background: var(--light); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 1.5rem; border: 2px solid var(--border); }
    .locked-overlay h5 { font-family: 'DM Serif Display', serif; font-size: 1.4rem; margin-bottom: 0.7rem; }
    .locked-overlay p { color: var(--gray); font-size: 0.9rem; margin-bottom: 1.5rem; }

    /* INFO BOX */
    .info-box { background: #e8f4fd; border-left: 4px solid var(--accent2); border-radius: 0 10px 10px 0; padding: 1rem 1.2rem; margin: 1.2rem 0; font-size: 0.88rem; color: #1d4e6f; }
    .info-box i { margin-right: 0.4rem; }

    /* MOBILE SIDEBAR TOGGLE */
    .sidebar-toggle-btn { display: none; }
    @media (max-width: 991px) {
      .sidebar-toggle-btn { display: flex; }
      .sidebar { position: relative; top: 0; margin-bottom: 1.5rem; }
      .hero-emoji { display: none; }
      .materi-hero { padding: 35px 0; }
    }

    /* CODE BLOCK */
    .code-block { background: #1a1a2e; color: #a8ff78; font-family: 'Courier New', monospace; font-size: 0.83rem; border-radius: 10px; padding: 1.2rem 1.5rem; margin: 1rem 0; overflow-x: auto; line-height: 1.6; }

    @media (max-width: 768px) {
      .hero { padding: 50px 0 40px; }
      .hero-img-wrap { margin-top: 3rem; }
      .hero-badge { left: 10px; bottom: -15px; }
      .cta-banner { padding: 40px 24px; }
      .hero-stats { gap: 1.2rem; }
    }