/* academy.nespocash.com/css/academy.css */

/* Academy Colors */
:root {
    --academy-primary: #3498db;
    --academy-secondary: #2ecc71;
    --academy-accent: #9b59b6;
    --academy-dark: #2c3e50;
    --academy-light: #ecf0f1;
    --academy-warning: #f1c40f;
    --academy-danger: #e74c3c;
}

/* Hero Section */
.academy-hero {
    background: linear-gradient(135deg, var(--academy-dark) 0%, var(--academy-primary) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.academy-hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
}

/* Course Cards */
.course-card {
    border: 2px solid var(--academy-light);
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    background: white;
}

.course-card:hover {
    border-color: var(--academy-primary);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(52, 152, 219, 0.15);
}

.course-thumbnail {
    height: 180px;
    background: var(--academy-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--academy-primary);
}

.course-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

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

.badge-certification {
    background: var(--academy-accent);
    color: white;
}

.badge-level {
    background: var(--academy-light);
    color: var(--academy-dark);
}

/* Lesson Layout */
.lesson-container {
    display: flex;
    gap: 30px;
    min-height: calc(100vh - 200px);
}

.lesson-content {
    flex: 1;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.lesson-sidebar {
    /*width: 320px;*/
    position: sticky;
    top: 20px;
    height: fit-content;
}

.lesson-nav-list {
    max-height: 500px;
    overflow-y: auto;
}

.lesson-nav-item {
    padding: 12px 15px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.lesson-nav-item:hover {
    background: #f8f9fa;
    border-left-color: var(--academy-light);
}

.lesson-nav-item.active {
    background: rgba(52, 152, 219, 0.1);
    border-left-color: var(--academy-primary);
    font-weight: 600;
}

.lesson-nav-item.completed {
    color: var(--academy-secondary);
}

.lesson-nav-item.completed:before {
    content: '✓ ';
    color: var(--academy-secondary);
}

/* Exercise Widget */
.exercise-widget {
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--academy-secondary);
    padding: 25px;
    margin: 30px 0;
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.exercise-title {
    color: var(--academy-dark);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.exercise-try-button {
    background: var(--academy-secondary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}

.exercise-try-button:hover {
    background: #27ae60;
    transform: scale(1.05);
}

.exercise-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.exercise-option {
    padding: 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.exercise-option:hover {
    border-color: var(--academy-primary);
    background: rgba(52, 152, 219, 0.05);
}

.exercise-option.selected {
    border-color: var(--academy-secondary);
    background: rgba(46, 204, 113, 0.1);
}

.exercise-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.feedback-correct {
    background: rgba(46, 204, 113, 0.1);
    border-left: 4px solid var(--academy-secondary);
    color: #27ae60;
}

.feedback-incorrect {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--academy-danger);
    color: #c0392b;
}

/* Progress Indicators */
.progress-ring {
    width: 80px;
    height: 80px;
}

.progress-ring svg {
    width: 100%;
    height: 100%;
}

.progress-ring circle {
    fill: none;
    stroke-width: 4;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 0.3s;
}

.progress-bg {
    stroke: var(--academy-light);
}

.progress-fill {
    stroke: var(--academy-secondary);
    stroke-linecap: round;
}

/* Code Examples */
.code-example {
    background: var(--academy-dark);
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    margin: 20px 0;
    position: relative;
}

.code-example-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #95a5a6;
    font-size: 14px;
}

.copy-code-btn {
    background: rgba(255,255,255,0.1);
    color: #ecf0f1;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-code-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Certificate Preview */
.certificate-preview {
    background: white;
    border: 3px solid var(--academy-dark);
    padding: 50px;
    text-align: center;
    position: relative;
    min-height: 500px;
    background-image: url('data:image/svg+xml,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(52, 152, 219, 0.05)"/></svg>');
    background-size: 200px;
}

.certificate-border {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px dashed var(--academy-primary);
    pointer-events: none;
}

.certificate-title {
    color: var(--academy-dark);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.certificate-recipient {
    color: var(--academy-primary);
    font-size: 28px;
    margin: 30px 0;
    font-weight: 600;
}

.certificate-details {
    color: var(--academy-dark);
    font-size: 16px;
    line-height: 1.6;
    margin: 20px 0;
}

.certificate-code {
    font-family: monospace;
    font-size: 18px;
    color: var(--academy-accent);
    margin: 25px 0;
    padding: 10px;
    background: #f8f9fa;
    display: inline-block;
    border-radius: 4px;
}

.certificate-actions {
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .lesson-container {
        flex-direction: column;
    }
    
    .lesson-sidebar {
        width: 100%;
        position: static;
    }
    
    .course-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .academy-hero {
        padding: 40px 0;
    }
    
    .certificate-preview {
        padding: 20px;
        min-height: 400px;
    }
    
    .certificate-title {
        font-size: 24px;
    }
    
    .certificate-recipient {
        font-size: 20px;
    }
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Utility Classes */
.text-academy-primary { color: var(--academy-primary); }
.text-academy-secondary { color: var(--academy-secondary); }
.bg-academy-light { background: var(--academy-light); }
.border-academy-primary { border-color: var(--academy-primary); }