/* ==========================================================================
   ACS — Amit Computer Skills
   Design System & Main Stylesheet (Vanilla CSS)
   LEARN • PRACTICE • GROW
   ========================================================================== */

:root {
    /* Brand Palette - Light Mode */
    --color-bg: #F8FAFC;
    --color-surface: #FFFFFF;
    --color-surface-hover: #F1F5F9;
    --color-surface-alt: #EDF2F7;
    --color-border: #E2E8F0;
    --color-border-focus: #2563EB;
    
    --color-text-main: #0F172A;
    --color-text-muted: #64748B;
    --color-text-light: #94A3B8;

    --brand-navy: #0B1220;
    --brand-blue: #2563EB;
    --brand-blue-hover: #1D4ED8;
    --brand-blue-light: #EFF6FF;
    --brand-cyan: #38BDF8;
    --brand-gold: #F5C451;

    --color-success: #10B981;
    --color-success-bg: #ECFDF5;
    --color-warning: #F59E0B;
    --color-warning-bg: #FFFBEB;
    --color-danger: #EF4444;
    --color-danger-bg: #FEF2F2;

    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;

    --container-max: 1200px;
    --header-height: 72px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    
    
    
        /* Header compatibility variables */
    --bg-header: var(--color-surface);
    --bg-surface: var(--color-surface);
    --bg-surface-subtle: var(--color-surface-hover);
    --text-color: var(--color-text-main);
    --text-muted: var(--color-text-muted);
    --border-color: var(--color-border);
    --bg-hover: var(--color-surface-hover);
    --secondary-bg: var(--color-surface);
    --secondary-hover: var(--color-surface-hover);
    --nav-hover-bg: var(--color-surface-hover);
    --nav-active-bg: var(--color-surface-hover);
    --primary-color: var(--brand-blue);
    --primary-hover: var(--brand-blue-hover);
    --border-hover: var(--color-text-muted);
}





/* Dark Mode Variables */
[data-theme="dark"] {
    --color-bg: #0B1220;
    --color-surface: #111C30;
    --color-surface-hover: #182642;
    --color-surface-alt: #1A2844;
    --color-border: #1E293B;
    --color-border-focus: #38BDF8;

    --color-text-main: #F1F5F9;
    --color-text-muted: #94A3B8;
    --color-text-light: #64748B;

    --brand-blue-light: rgba(37, 99, 235, 0.15);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);

    --color-success-bg: rgba(16, 185, 129, 0.15);
    --color-warning-bg: rgba(245, 158, 11, 0.15);
    --color-danger-bg: rgba(239, 68, 68, 0.15);
    
    
    
        /* Header compatibility variables - Dark Mode */
    --bg-header: var(--color-surface);
    --bg-surface: var(--color-surface);
    --bg-surface-subtle: var(--color-surface-hover);
    --text-color: var(--color-text-main);
    --text-muted: var(--color-text-muted);
    --border-color: var(--color-border);
    --bg-hover: var(--color-surface-hover);
    --secondary-bg: var(--color-surface);
    --secondary-hover: var(--color-surface-hover);
    --nav-hover-bg: var(--color-surface-hover);
    --nav-active-bg: var(--color-surface-hover);
    --primary-color: var(--brand-blue);
    --primary-hover: var(--brand-blue-hover);
    --border-hover: var(--color-text-muted);
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-main);
    background-color: var(--color-bg);
    transition: background-color 0.2s ease, color 0.2s ease;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--brand-blue);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--brand-blue-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* ==========================================================================
   Layout Containers & Grid
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.main-content {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-inner {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--color-text-main);
}

.brand-badge {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
    color: #FFFFFF;
    font-weight: 800;
    font-size: 1.15rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.brand-details {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--brand-blue);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    padding: 0.4rem 0.1rem;
    position: relative;
    transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--brand-blue);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--brand-blue);
    border-radius: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
    color: var(--color-text-main);
    border-color: var(--color-text-muted);
    background-color: var(--color-surface-hover);
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.925rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    line-height: 1.25;
}

.btn-primary {
    background-color: var(--brand-blue);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: var(--brand-blue-hover);
    color: #FFFFFF;
}

.btn-secondary {
    background-color: var(--color-surface);
    color: var(--color-text-main);
    border-color: var(--color-border);
}

.btn-secondary:hover {
    background-color: var(--color-surface-hover);
    border-color: var(--color-text-muted);
    color: var(--color-text-main);
}

.btn-outline {
    background-color: transparent;
    color: var(--brand-blue);
    border-color: var(--brand-blue);
}

.btn-outline:hover {
    background-color: var(--brand-blue-light);
    color: var(--brand-blue);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
}

.btn-danger {
    background-color: var(--color-danger);
    color: #FFFFFF;
}

.btn-danger:hover {
    background-color: #DC2626;
    color: #FFFFFF;
}

.btn-success {
    background-color: var(--color-success);
    color: #FFFFFF;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   Cards & Surfaces
   ========================================================================== */
.card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: var(--shadow-md);
}

.card-body {
    padding: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    background-color: var(--color-surface-hover);
}

/* Course Grid & Cards */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

.course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--color-surface-alt);
    overflow: hidden;
}

.course-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-thumbnail {
    transform: scale(1.03);
}

.course-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(8px);
}

.badge-free {
    background-color: rgba(16, 185, 129, 0.9);
    color: #FFFFFF;
}

.badge-paid {
    background-color: rgba(37, 99, 235, 0.9);
    color: #FFFFFF;
}

.course-card-content {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.course-category {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.course-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.6rem;
    color: var(--color-text-main);
}

.course-card-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex: 1;
}

.course-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.course-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.price-current {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-text-main);
}

.price-original {
    font-size: 0.9rem;
    color: var(--color-text-light);
    text-decoration: line-through;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    padding: 4.5rem 0 3.5rem;
    text-align: center;
    background: radial-gradient(circle at 50% 20%, var(--brand-blue-light) 0%, transparent 60%);
}

.hero-tagline {
    display: inline-block;
    font-size: 0.825rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--brand-blue);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--color-text-main);
    max-width: 800px;
    margin: 0 auto 1.25rem;
}

.hero-description {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    max-width: 680px;
    margin: 0 auto 2.25rem;
}

.hero-cta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Category Pills */
.category-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 2.5rem 0 1rem;
}

.category-chip {
    padding: 0.5rem 1rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.category-chip:hover, .category-chip.active {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #FFFFFF;
}

/* ==========================================================================
   Forms & Controls
   ========================================================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--color-text-main);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-main);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.35rem;
}

/* Form Box / Auth Card */
.auth-box {
    max-width: 440px;
    margin: 2rem auto;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 2.25rem;
    box-shadow: var(--shadow-md);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Alerts & Notifications */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.925rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.5;
}

.alert-success {
    background-color: var(--color-success-bg);
    color: #065F46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-danger {
    background-color: var(--color-danger-bg);
    color: #991B1B;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-warning {
    background-color: var(--color-warning-bg);
    color: #92400E;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-info {
    background-color: var(--brand-blue-light);
    color: #1E40AF;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

[data-theme="dark"] .alert-success { color: #34D399; }
[data-theme="dark"] .alert-danger { color: #F87171; }
[data-theme="dark"] .alert-warning { color: #FBBF24; }
[data-theme="dark"] .alert-info { color: #60A5FA; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

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

.footer-col-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    color: var(--color-text-muted);
}

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

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
}




/* --- Brand Logo Styling --- */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.brand-img {
    height: 44px;
    width: auto;
    object-fit: contain;
}
.brand-img-sm {
    height: 32px;
    width: auto;
    object-fit: contain;
}
.brand-details {
    display: flex;
    flex-direction: column;
}
.brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.brand-tagline {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    opacity: 0.7;
    text-transform: uppercase;
}

/* --- Theme Icon Visibility --- */
[data-theme="dark"] .theme-icon-sun { display: block; }
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }
.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
}

/* --- Hamburger Button --- */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
}
.hamburger-bar {
    width: 100%;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* --- Mobile Drawer & Backdrop --- */
.mobile-nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1040;
}
.mobile-nav-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: var(--bg-surface, #ffffff);
    color: var(--text-color, #1e293b);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1050;
}
.mobile-nav-drawer.open {
    right: 0;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
}
.mobile-drawer-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
}

.mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}
.mobile-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mobile-link {
    display: block;
    padding: 12px 24px;
    font-weight: 500;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease, color 0.2s ease;
}
.mobile-link:hover,
.mobile-link.active {
    background: var(--nav-active-bg, #eff6ff);
    color: var(--primary-color, #2563eb);
}

.drawer-divider {
    height: 1px;
    background: var(--border-color, #f1f5f9);
    margin: 12px 20px;
}
.drawer-section-label {
    padding: 6px 24px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
}

.mobile-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color, #f1f5f9);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mobile-user-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mobile-user-name {
    font-size: 0.85rem;
    opacity: 0.8;
}
.btn-block {
    width: 100%;
    text-align: center;
}

/* --- Responsive Breakpoint --- */
@media (max-width: 868px) {
    .desktop-nav,
    .desktop-auth {
        display: none;
    }
    .mobile-nav-toggle {
        display: flex;
    }
}



/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .nav-menu {
        display: none;
    }

    .nav-menu.mobile-active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        padding: 1.5rem;
        box-shadow: var(--shadow-lg);
        gap: 1.25rem;
        z-index: 49;
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
}
