/* Learning Center Specific Styles - Extends Calculate.co.nz styles.css */

/* Progress Bar */
.learning-progress {
    background: #f8f9fa;
    border-bottom: 2px solid #28a745;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 99;
}

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

.progress-title {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-percentage {
    font-weight: bold;
    font-size: 16px;
    color: #28a745;
}

.progress-bar-track {
    height: 8px;
    background: #e2e2e2;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar-fill {
    height: 100%;
    background: #28a745;
    transition: width 0.3s ease;
    width: 0%;
}

.nav-buttons-learning {
    display: flex;
    gap: 10px;
}

.nav-btn-learning {
    padding: 7px 20px;
    border: 2px solid #28a745;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 1px;
    transition: all 0.2s;
    font-family: 'Lato', sans-serif;
}

.nav-btn-learning:hover:not(:disabled) {
    background: #28a745;
    color: #fff;
}

.nav-btn-learning:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Section Management */
.learning-section {
    display: none;
}

.learning-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Content Boxes */
.learning-content {
    background: #fff;
    border: 2px solid #28a745;
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 30px;
}

.learning-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 36px;
    margin-bottom: 25px;
    color: #000;
}

.learning-content h3 {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 28px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #000;
}

.learning-content h4 {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 22px;
    margin-top: 25px;
    margin-bottom: 12px;
    color: #333;
}

.learning-content p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 15px;
    color: #333;
}

.learning-content ul,
.learning-content ol {
    margin: 15px 0 15px 30px;
    font-size: 16px;
    line-height: 1.7;
}

.learning-content li {
    margin-bottom: 10px;
}

/* Info Boxes */
.highlight-box {
    background: #f8f9fa;
    border-left: 4px solid #28a745;
    padding: 20px;
    border-radius: 4px;
    margin: 25px 0;
}

.highlight-box strong {
    color: #28a745;
    font-weight: 700;
}

.info-box {
    background: rgba(94, 186, 0, 0.05);
    border: 2px solid #5eba00;
    border-radius: 4px;
    padding: 20px;
    margin: 25px 0;
}

.info-box-title {
    font-weight: 700;
    color: #5eba00;
    margin-bottom: 10px;
    font-size: 18px;
}

.warning-box {
    background: rgba(255, 193, 7, 0.1);
    border: 2px solid #ffc107;
    border-radius: 4px;
    padding: 20px;
    margin: 25px 0;
}

.warning-box-title {
    font-weight: 700;
    color: #f57c00;
    margin-bottom: 10px;
    font-size: 18px;
}

/* Tables */
.learning-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: #fff;
    border: 2px solid #28a745;
}

.learning-content th,
.learning-content td {
    padding: 12px;
    text-align: left;
    border: 1px solid #e2e2e2;
}

.learning-content th {
    background: #28a745;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.learning-content tr:hover {
    background: #f8f9fa;
}

/* Example Cards */
.example-card {
    background: #ffffff;
    border: 2px solid #28a745;
    border-radius: 4px;
    padding: 25px;
    margin: 30px 0;
}

.example-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.example-number {
    width: 50px;
    height: 50px;
    background: #28a745;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 24px;
    flex-shrink: 0;
    font-family: 'Montserrat', sans-serif;
}

.example-title {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
}

.calculation-box {
    background: #fff;
    border: 2px solid #e2e2e2;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 15px;
}

.calculation-step {
    margin: 10px 0;
    color: #333;
}

.calculation-result {
    background: #28a745;
    color: #fff;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    font-weight: 700;
    font-size: 18px;
}

/* Quiz Styles */
.quiz-container {
    background: #fff;
    border: 2px solid #28a745;
    border-radius: 4px;
    padding: 40px;
}

.quiz-header {
    text-align: center;
    margin-bottom: 40px;
}

.quiz-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 40px;
    color: #000;
    margin-bottom: 10px;
}

.quiz-progress-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.quiz-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e2e2e2;
    transition: all 0.3s ease;
}

.quiz-dot.active {
    background: #28a745;
    transform: scale(1.3);
}

.quiz-dot.correct {
    background: #5eba00;
}

.quiz-dot.incorrect {
    background: #dc3545;
}

.question-card {
    display: none;
}

.question-card.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.question-text {
    font-size: 22px;
    font-weight: 700;
    color: #000;
    margin-bottom: 30px;
    line-height: 1.5;
    font-family: 'Lato', sans-serif;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    padding: 18px 20px;
    border: 2px solid #e2e2e2;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    font-size: 16px;
}

.option:hover:not(.selected):not(.disabled) {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.option.selected {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    font-weight: 700;
}

.option.correct {
    border-color: #5eba00;
    background: rgba(94, 186, 0, 0.1);
    font-weight: 700;
}

.option.incorrect {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.option.disabled {
    cursor: not-allowed;
}

.feedback {
    margin-top: 25px;
    padding: 20px;
    border-radius: 4px;
    display: none;
}

.feedback.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.feedback.correct {
    background: rgba(94, 186, 0, 0.1);
    border: 2px solid #5eba00;
}

.feedback.incorrect {
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid #dc3545;
}

.feedback-title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 10px;
}

.feedback.correct .feedback-title {
    color: #5eba00;
}

.feedback.incorrect .feedback-title {
    color: #dc3545;
}

.quiz-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.quiz-btn {
    padding: 12px 30px;
    border: 2px solid #28a745;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    font-family: 'Lato', sans-serif;
}

.quiz-btn-primary {
    background: #28a745;
    color: #fff;
}

.quiz-btn-primary:hover:not(:disabled) {
    background: #218838;
}

.quiz-btn-secondary {
    background: #fff;
    color: #28a745;
}

.quiz-btn-secondary:hover:not(:disabled) {
    background: #28a745;
    color: #fff;
}

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

/* Results */
.results-card {
    text-align: center;
    display: none;
}

.results-card.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.score-circle {
    width: 220px;
    height: 220px;
    margin: 40px auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    font-weight: 900;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
}

.score-excellent {
    background: #28a745;
}

.score-good {
    background: #5eba00;
}

.score-fair {
    background: #ffc107;
}

.score-poor {
    background: #dc3545;
}

.results-message {
    font-size: 24px;
    font-weight: 700;
    margin: 20px 0;
    font-family: 'Lato', sans-serif;
}

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 15px 35px;
    border: 2px solid #28a745;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    font-family: 'Lato', sans-serif;
}

.action-btn-primary {
    background: #28a745;
    color: #fff;
}

.action-btn-primary:hover {
    background: #218838;
    color: #fff;
    text-decoration: none;
}

.action-btn-secondary {
    background: #5eba00;
    color: #fff;
}

.action-btn-secondary:hover {
    background: #4a9100;
    color: #fff;
    text-decoration: none;
}

/* Module Cards on Index */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.module-card {
    background: #fff;
    border: 2px solid #28a745;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.module-card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.module-card.coming-soon:hover {
    transform: none;
}

.module-header-card {
    background: #333333;
    padding: 30px;
    color: #fff;
}

.module-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.module-title-card {
    font-size: 26px;
    font-weight: 900;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 8px;
}

.module-category {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.module-body-card {
    padding: 25px;
}

.module-description {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #333;
}

.module-meta {
    display: flex;
    gap: 20px;
    padding-top: 20px;
    border-top: 2px solid #e2e2e2;
    font-size: 14px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-level {
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-beginner {
    background: #d4edda;
    color: #155724;
}

.badge-intermediate {
    background: #fff3cd;
    color: #856404;
}

.badge-advanced {
    background: #f8d7da;
    color: #721c24;
}

.badge-soon {
    background: #ffc107;
    color: #000;
}

/* Mobile Responsive */
@media only screen and (max-width: 700px) {
    .learning-content {
        padding: 20px;
    }

    .learning-content h2 {
        font-size: 28px;
    }

    .learning-content h3 {
        font-size: 22px;
    }

    .quiz-container {
        padding: 25px;
    }

    .quiz-header h2 {
        font-size: 28px;
    }

    .question-text {
        font-size: 18px;
    }

    .quiz-nav-buttons {
        flex-direction: column;
    }

    .results-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

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

    .score-circle {
        width: 180px;
        height: 180px;
        font-size: 48px;
    }

    .nav-buttons-learning {
        flex-direction: column;
    }

    .nav-btn-learning {
        width: 100%;
    }
}
