/* Base Styles & Variables */
:root {
    --primary: #2563EB; /* Bright Blue */
    --primary-hover: #1D4ED8;
    --secondary: #1E40AF; /* Dark Blue */
    --accent: #F59E0B; /* Amber/Gold */
    --success: #10B981;
    --danger: #EF4444;
    --bg-light: #F8FAFC; /* Slate 50 */
    --bg-white: #FFFFFF;
    --text-main: #334155; /* Slate 700 */
    --text-dark: #0F172A; /* Slate 900 */
    --text-muted: #64748B; /* Slate 500 */
    --border: #E2E8F0;
    
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

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

/* Utilities */
.text-center { text-align: center; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.bg-light { background-color: var(--bg-light); }
.hidden { display: none !important; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--primary);
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    font-size: 2rem;
    color: var(--primary);
}

.nav-brand h1 {
    font-size: 1.25rem;
    margin: 0;
}

.nav-brand span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    color: var(--text-main);
    font-weight: 500;
}

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

/* Hero Section */
.hero {
    padding: 8rem 0 5rem;
    position: relative;
    background-color: var(--bg-light);
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #bfdbfe; /* Light Blue */
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #fef08a; /* Light Yellow/Amber */
    bottom: 50px;
    left: -50px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #DBEAFE;
    color: var(--primary);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.stat-item i {
    color: var(--accent);
}

.hero-image {
    flex: 1;
}

.mockup-card {
    padding: 1.5rem;
}

.mockup-header {
    margin-bottom: 1rem;
}

.dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.course-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.play-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--border);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--success);
    border-radius: 99px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Sections */
.section {
    padding: 6rem 0;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem 2rem;
    text-align: left;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.icon-wrapper {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.bg-blue { background-color: var(--primary); }
.bg-amber { background-color: var(--accent); }
.bg-green { background-color: var(--success); }

/* Split Layout */
.split-layout {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.split-content {
    flex: 1;
}

.split-content h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.split-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.syllabus-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.syllabus-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.syllabus-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.2;
    font-family: var(--font-heading);
    line-height: 1;
}

/* Dashboard Layout (course.html) */
.dashboard-body {
    background-color: var(--bg-light);
}

.dashboard-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 320px;
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.back-link:hover {
    color: var(--primary);
}

.course-progress {
    margin-top: 1rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.module-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.module-item {
    padding: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.module-item:hover {
    background-color: var(--bg-light);
}

.module-item.active {
    background-color: #EFF6FF;
    border-color: #BFDBFE;
}

.module-item.completed h4 {
    color: var(--success);
}

.module-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    height: 70px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 2rem;
}

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

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.video-overlay-text {
    position: absolute;
    text-align: center;
    z-index: 2;
}

.video-overlay-text i {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.video-overlay-text i:hover {
    transform: scale(1.1);
}

.article-content {
    padding: 2rem;
}

.article-content h2 {
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.article-content p {
    margin-bottom: 1rem;
    color: var(--text-main);
}

.article-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.content-footer {
    height: 80px;
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    padding: 2.5rem;
    max-height: 90vh;
    overflow-y: auto;
}

.quiz-option {
    display: block;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.quiz-option:hover {
    border-color: var(--primary);
    background-color: var(--bg-light);
}

.quiz-option.selected {
    border-color: var(--primary);
    background-color: #EFF6FF;
}

.quiz-option.correct {
    border-color: var(--success);
    background-color: #D1FAE5;
}

.quiz-option.wrong {
    border-color: var(--danger);
    background-color: #FEE2E2;
}

.cert-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1rem;
}

.cert-box {
    background-image: url('assets/cert_frame.png');
    background-size: 100% 100%; 
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    position: relative;
    padding: 6rem 5rem 4rem 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1.414 / 1; 
    width: 100%;
    margin: 0 auto;
    color: #0F172A; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

@media print {
    @page { size: A4 landscape; margin: 0; }
    body * { visibility: hidden; }
    #cert-modal, #cert-modal * { visibility: visible; }
    #cert-modal { position: absolute; left: 0; top: 0; width: 100%; background: none; }
    .modal-content.cert-card { padding: 0 !important; box-shadow: none !important; border: none !important; max-width: none !important; }
    .cert-icon, .modal-content > h2, .modal-content > p { display: none !important; }
    .cert-box {
        position: absolute;
        top: 0; left: 0;
        width: 297mm !important;
        height: 210mm !important;
        box-shadow: none !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        margin: 0 !important;
    }
    .cert-print-btn, .cert-close-btn { display: none !important; }
}

/* Responsive */
@media (max-width: 992px) {
    .split-layout { flex-direction: column; }
    .hero-content { flex-direction: column; text-align: center; }
    .hero-actions { align-items: center; }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -320px;
        transition: left 0.3s ease;
    }
    .sidebar.open {
        left: 0;
    }
    .mobile-menu-btn {
        display: block;
    }
    .nav-links { display: none; }
}
