/* ========================================
   EngineeringCourses - Main Styles
   Dark theme matching EngineeringSheet.com
   ======================================== */

/* CSS Variables */
:root {
    /* Colors */
    --primary: #00D4FF;
    --primary-dark: #00A8CC;
    --primary-light: #33DDFF;
    --primary-glow: rgba(0, 212, 255, 0.3);

    --secondary: #FFD700;
    --secondary-glow: rgba(255, 215, 0, 0.3);

    --bg-dark: #0a0e14;
    --bg-card: #12181f;
    --bg-card-hover: #1a222d;
    --bg-input: #1a222d;
    --bg-sidebar: #0d1117;

    --text-white: #ffffff;
    --text-light: #e0e0e0;
    --text-muted: #8899a6;
    --text-dim: #5c6b7a;

    --border-color: #2a3441;
    --border-light: #3a4451;

    --success: #00c853;
    --success-glow: rgba(0, 200, 83, 0.3);
    --warning: #ffc107;
    --error: #ff5252;
    --sale: #ff4757;

    /* Typography */
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --container-max: 1400px;
    --nav-height: 70px;
    --section-padding: 80px;
    --sidebar-width: 300px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--primary-glow);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Grid Paper Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-white);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

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

a:hover { color: var(--primary-light); }

strong { color: var(--text-white); }

code {
    font-family: var(--font-mono);
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 20, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-white);
}

.nav-logo:hover { color: var(--text-white); }

.nav-logo .sigma {
    font-size: 1.8rem;
    color: var(--primary);
    font-family: var(--font-mono);
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

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

.nav-link svg {
    width: 14px;
    height: 14px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: var(--text-light);
    transition: all var(--transition-fast);
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-action:hover {
    background: var(--bg-card);
    color: var(--primary);
}

.nav-action svg {
    width: 22px;
    height: 22px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-light);
}

/* User Dropdown */
.nav-user-dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-lg);
}

.nav-user-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
}

.dropdown-content .dropdown-email {
    display: block;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.dropdown-content a {
    display: block;
    padding: 10px 12px;
    color: var(--text-light);
    border-radius: 6px;
}

.dropdown-content a:hover {
    background: var(--bg-dark);
    color: var(--primary);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--bg-dark);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px var(--primary-glow);
    color: var(--bg-dark);
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-light);
    color: var(--text-white);
}

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

.btn-success:hover {
    background: #00a844;
    color: white;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

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

/* ========================================
   Cards
   ======================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all var(--transition-normal);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.card-clickable:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   Badges
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--primary-glow);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.badge-success {
    background: var(--success-glow);
    color: var(--success);
}

.badge-sale {
    background: var(--sale);
    color: white;
}

.badge-free {
    background: var(--success);
    color: white;
}

.badge-locked {
    background: var(--bg-input);
    color: var(--text-muted);
}

/* ========================================
   Form Elements
   ======================================== */
input, select, textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    transition: border-color var(--transition-fast);
    width: 100%;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

input::placeholder {
    color: var(--text-dim);
}

/* ========================================
   Progress Bar
   ======================================== */
.progress-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width var(--transition-normal);
}

.progress-bar-sm {
    height: 4px;
}

/* ========================================
   Price Styling
   ======================================== */
.price {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.price-original {
    font-size: 1rem;
    color: var(--text-dim);
    text-decoration: line-through;
    margin-right: 8px;
}

.price-lg {
    font-size: 2.5rem;
}

/* ========================================
   Section Styling
   ======================================== */
.section {
    padding: var(--section-padding) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    margin-bottom: 16px;
}

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

/* ========================================
   Hero Section
   ======================================== */
.hero {
    padding: calc(var(--nav-height) + 60px) 0 80px;
    text-align: center;
}

.hero-title {
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-white), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 32px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-mono);
}

.hero-stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

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

.course-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.course-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.course-card-image {
    height: 180px;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.course-card-image svg {
    width: 80px;
    height: 80px;
    color: var(--primary);
    opacity: 0.6;
}

.course-card-image img.course-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-course-image img.featured-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.course-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
}

.course-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-card-discipline {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.course-card-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.course-card-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex: 1;
}

.course-card-stats {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.course-card-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.course-card-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

/* ========================================
   Featured Course
   ======================================== */
.featured-course {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 48px;
}

.featured-course-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.featured-course-image {
    background: var(--bg-dark);
    border-radius: 12px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.featured-course-image svg {
    width: 120px;
    height: 120px;
    color: var(--primary);
}

.featured-course-badge {
    margin-bottom: 16px;
}

.featured-course-title {
    font-size: 2rem;
    margin-bottom: 12px;
}

.featured-course-subtitle {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.featured-course-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.featured-course-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.featured-course-stat svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.featured-course-price {
    margin-bottom: 24px;
}

.featured-course-actions {
    display: flex;
    gap: 12px;
}

/* ========================================
   How It Works
   ======================================== */
.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.how-step {
    text-align: center;
    padding: 24px;
}

.how-step-number {
    width: 48px;
    height: 48px;
    background: var(--primary-glow);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--primary);
    margin: 0 auto 16px;
}

.how-step-title {
    font-size: 1rem;
    margin-bottom: 8px;
}

.how-step-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    margin-top: 80px;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 16px;
}

.footer-logo .sigma {
    color: var(--primary);
    font-family: var(--font-mono);
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.footer-social svg {
    width: 18px;
    height: 18px;
}

.footer-links h4 {
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

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

.footer-bottom p {
    color: var(--text-dim);
    font-size: 0.875rem;
    margin: 0;
}

.footer-badges {
    display: flex;
    gap: 24px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.trust-badge svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

/* ========================================
   Breadcrumbs
   ======================================== */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

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

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs .separator {
    color: var(--text-dim);
}

/* ========================================
   Utilities
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-white { color: var(--text-white); }
.text-success { color: var(--success); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.hidden { display: none !important; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1200px) {
    .how-it-works-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .nav-menu {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

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

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

    .how-it-works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 48px;
    }

    .hero {
        padding: calc(var(--nav-height) + 40px) 0 60px;
    }

    .hero-stats {
        gap: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .featured-course {
        padding: 24px;
    }

    .how-it-works-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

::selection {
    background: var(--primary);
    color: var(--bg-dark);
}
