/* --- CSS VARIABLES --- */
:root {
    --brand-dark: #0f172a;
    --brand-card: #1e293b;
    --brand-primary: #2dd4bf;
    --brand-secondary: #fbbf24;
    --text-white: #f8fafc;
    --text-gray: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(15, 23, 42, 0.85);
    --transition: all 0.3s ease;
}

/* --- BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}
body {
    background-color: var(--brand-dark);
    color: var(--text-white);
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.font-mono {
    font-family: "JetBrains Mono", monospace;
}
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.hidden {
    display: none !important;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: var(--brand-dark);
}

.btn-primary:hover {
    background-color: white;
    transform: translateY(-2px);
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    cursor: pointer;
}
.btn-primary {
    background-color: var(--brand-primary);
    color: var(--brand-dark);
    border: 1px solid var(--brand-primary);
}
.btn-primary:hover {
    background-color: white;
    border-color: white;
    transform: translateY(-2px);
}
.btn-outline {
    background-color: transparent;
    color: white;
    border: 1px solid #475569;
}
.btn-outline:hover {
    border-color: white;
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* --- NAVBAR --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    z-index: 100;
    background-color: var(--brand-dark);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

nav.scrolled {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
}
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: -1px;
}

.nav-links,
.desktop-only {
    display: none;
}

@media (min-width: 880px) {
    .nav-links {
        display: flex;
        gap: 2rem;
        font-size: 0.875rem;
    }
    .desktop-only {
        display: block !important;
    }
}

.nav-links a {
    padding: 0.5rem 0.75rem;
}

.nav-links a:hover {
    color: var(--brand-primary);
}

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (min-width: 880px) {
    .mobile-menu-btn,
    .mobile-menu-panel {
        display: none !important;
    }
}

.mobile-menu-panel {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--brand-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    display: none;
}

.mobile-menu-panel.active {
    display: block;
}

.mobile-menu-panel a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 6px;
}

.mobile-menu-panel a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* --- BREADCRUMB --- */
.breadcrumb {
    padding-bottom: 1.5rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-gray);
    text-align: left;
    width: 100%;
}
.breadcrumb a:hover {
    color: white;
}
.breadcrumb .active {
    color: var(--brand-secondary);
    font-weight: 600;
}

/* --- HERO SECTION --- */
.course-hero {
    padding: 120px 0 60px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to bottom, rgba(30, 41, 59, 0.3), transparent);
}

.badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.badge {
    font-size: 0.7rem;
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}
.badge.free {
    background: rgba(45, 212, 191, 0.15);
    color: var(--brand-primary);
    border: 1px solid var(--brand-primary);
}
.badge.jupyter {
    background: rgba(243, 118, 38, 0.1);
    color: #f37626;
    border: 1px solid rgba(243, 118, 38, 0.3);
}
.badge.math {
    background: rgba(251, 191, 36, 0.1);
    color: var(--brand-secondary);
    border: 1px solid rgba(251, 191, 36, 0.3);
}
.badge.advanced {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.course-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white;
}

.course-desc {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 750px;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    color: var(--text-gray);
    font-size: 0.875rem;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.meta-item i {
    color: var(--brand-primary);
}

.instructor {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-right: 1.5rem;
    border-right: 1px solid var(--border-color);
}
.instructor-img {
    width: 32px;
    height: 32px;
    background: var(--brand-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}
.instructor-name {
    color: white;
    font-weight: 600;
}

/* --- LAYOUT MAIN & SIDEBAR --- */
.course-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 4rem 1.5rem;
}
@media (min-width: 1024px) {
    .course-layout {
        grid-template-columns: 2fr 1fr;
    } /* 2/3 and 1/3 split */
}

/* --- MAIN CONTENT (LEFT) --- */
.content-section {
    margin-bottom: 3rem;
}
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.prose p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}
.prose strong {
    color: white;
    font-weight: 600;
}

/* What You Will Learn Box */
.learning-box {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}
.learning-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 640px) {
    .learning-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.learning-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.learning-item i {
    color: var(--brand-primary);
    margin-top: 4px;
}
.learning-item p {
    margin: 0;
    font-size: 0.95rem;
    color: #cbd5e1;
}

/* Curriculum Accordion */
.curriculum-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.module-item {
    background: var(--brand-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.module-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--brand-card);
    transition: var(--transition);
}
.module-header:hover {
    background: rgba(255, 255, 255, 0.02);
}
.module-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.module-title {
    font-weight: 600;
    color: white;
    font-size: 1.05rem;
}
.module-meta {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-family: "JetBrains Mono", monospace;
}
.module-icon {
    color: #64748b;
    transition: transform 0.3s ease;
}
.module-item.active .module-icon {
    transform: rotate(180deg);
}

.module-content {
    display: none;
    border-top: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.3);
}
.lesson-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.lesson-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #cbd5e1;
}
.lesson-item:last-child {
    border-bottom: none;
}
.lesson-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.lesson-left i {
    color: #64748b;
    width: 16px;
    text-align: center;
}
.lesson-left i.fa-book-open {
    color: #34d399;
}
.lesson-left i.fa-lock {
    color: #f87171;
}
.lesson-type {
    font-size: 0.7rem;
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.lesson-status {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 0.5rem;
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

/* 1. Status: Tersedia (Hijau Emerald) */
.status-ready {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 2. Status: Update Baru (Kuning/Amber) */
.status-new {
    background: rgba(251, 191, 36, 0.15);
    color: var(--brand-secondary);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* 3. Status: Segera Hadir (Merah) */
.status-coming {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.lesson-item.disabled .lesson-left {
    opacity: 0.5;
} /* Membuat teks judul agak redup jika belum tersedia */

/* Prerequisites */
.prereq-list {
    list-style: none;
    padding: 0;
}

/* Prerequisites */
.prereq-list {
    list-style: none;
    padding: 0;
}
.prereq-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-gray);
}
.prereq-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--brand-secondary);
    font-family: "JetBrains Mono", monospace;
    font-weight: bold;
}

/* --- SIDEBAR (RIGHT) --- */
.sidebar {
    position: sticky;
    top: 100px;
}

.enroll-card {
    background: var(--brand-card);
    border: 1px solid var(--brand-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(45, 212, 191, 0.1);
}

.card-thumbnail {
    width: 100%;
    height: 200px;
    background: #161e2e;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}
.card-thumbnail::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        circle at 2px 2px,
        rgba(45, 212, 191, 0.1) 1px,
        transparent 0
    );
    background-size: 20px 20px;
}
.card-thumbnail i {
    font-size: 4rem;
    color: var(--brand-primary);
    z-index: 10;
    margin-bottom: 10px;
}
.card-thumbnail span {
    font-size: 1.2rem;
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    color: white;
    z-index: 10;
}

.card-body {
    padding: 2rem;
}

.price-wrapper {
    margin-bottom: 1.5rem;
    text-align: center;
}
.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-primary);
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 0.5rem;
}

.btn-enroll {
    display: block;
    width: 100%;
    padding: 1rem;
    background: var(--brand-primary);
    color: var(--brand-dark);
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
    border-radius: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-enroll:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(45, 212, 191, 0.2);
}

.includes-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.includes-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.includes-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #cbd5e1;
    line-height: 1.4;
}
.includes-item i {
    color: var(--brand-secondary);
    width: 16px;
    text-align: center;
    margin-top: 2px;
}

/* --- FOOTER --- */
footer {
    background-color: #080808;
    padding: 50px 0 40px;
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    display: block;
}

.footer-text {
    color: var(--text-gray);
    font-size: 0.875rem;
    max-width: 350px;
}

.footer-title {
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

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

.social-row {
    display: flex;
    gap: 1rem;
}

.social-row a {
    font-size: 1.25rem;
    color: var(--text-gray);
    transition: var(--transition);
}

.social-row a:hover {
    color: var(--icon-color);
    transform: translateY(-2px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

.footer-bottom p {
    font-size: 0.75rem;
    color: #4b5563;
}
