/* ML Model Relationships Tutorial - Enhanced CSS */
/* File location: static/css/tutorials/ml-model-relationships/ml-model-relationships.css */

/* ===== SECTION NAVIGATION SYSTEM ===== */
.section-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.section-nav button {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #374151 !important;
    font-size: 0.9rem;
    white-space: nowrap;
}

.section-nav button:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    color: #667eea !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.section-nav button.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

/* ===== PROGRESS TRACKER SYSTEM ===== */
.progress-tracker {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
}

.progress-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e5e7eb;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.progress-dot.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.progress-dot.completed {
    background: #22c55e;
    transform: scale(1.1);
}

.progress-dot.completed::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
}

/* Connect progress dots with lines */
.progress-tracker .progress-dot:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    width: 16px;
    height: 2px;
    background: #e5e7eb;
    transform: translateY(-50%);
    z-index: -1;
}

.progress-tracker .progress-dot.completed:not(:last-child)::before,
.progress-tracker .progress-dot.active:not(:last-child)::before {
    background: #667eea;
}

/* ===== CONTENT SECTION MANAGEMENT ===== */
.content-section {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

.content-section.active {
    display: block !important;
}

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

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Universal text color override for all ML Model Relationships content */
body,
body *,
main,
main *,
.azbn-section,
.azbn-section *,
.azbn-container,
.azbn-container *,
h1, h2, h3, h4, h5, h6,
p, label, span, div, li, ul, ol, strong, em {
    color: #333 !important;
}

/* Ensure proper background for content areas */
.azbn-section,
.azbn-container {
    background: white !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
}

/* Add subtle background pattern overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/static/images/tutorials/ml-model-relationships/ml-background.png') no-repeat center center fixed;
    background-size: cover;
    opacity: 0.1;
    z-index: -1;
}

/* Main content styling */
main {
    padding-top: 100px;
    position: relative;
    z-index: 1;
}

.azbn-section {
    padding: 2rem 0;
}

.azbn-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== ENHANCED QUIZ SYSTEM ===== */
.enhanced-quiz-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 2px solid #e5e7eb;
}

.enhanced-quiz-question h4 {
    color: #1f2937 !important;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.enhanced-quiz-option {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: #374151 !important;
}

.enhanced-quiz-option:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.enhanced-quiz-option.selected {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af !important;
    font-weight: 600;
}

.enhanced-quiz-option.correct {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #15803d !important;
    font-weight: 600;
}

.enhanced-quiz-option.incorrect {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #dc2626 !important;
    font-weight: 600;
}

.enhanced-quiz-explanation {
    display: none;
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    color: #0c4a6e !important;
    font-size: 0.95rem;
}

.enhanced-quiz-explanation.show {
    display: block !important;
    animation: fadeIn 0.3s ease;
}

/* ===== INTERACTIVE COMPONENTS ===== */
.interactive-demo {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.connection-node {
    display: inline-block;
    padding: 1rem 1.5rem;
    margin: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white !important;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border: none;
}

.connection-node:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    color: white !important;
}

.connection-node.active {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    transform: scale(1.1);
}

.connection-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 2px solid #e9ecef;
    display: none;
    animation: fadeIn 0.3s ease;
}

.connection-details.active {
    display: block;
}

/* ===== CHAPTER CARDS STYLING ===== */
.azbn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.azbn-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.azbn-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.azbn-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.azbn-card:hover::before {
    opacity: 1;
}

.azbn-card h3 {
    color: #2c3e50 !important;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.3;
}

/* ===== BUTTON STYLING ===== */
.azbn-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.azbn-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.azbn-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    filter: brightness(1.1);
    color: white !important;
}

.azbn-btn:hover::before {
    left: 100%;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .section-nav {
        flex-wrap: wrap;
        gap: 0.25rem;
        padding: 0.75rem;
    }
    
    .section-nav button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        flex: 1;
        min-width: calc(50% - 0.125rem);
    }
    
    .progress-tracker {
        gap: 0.5rem;
        margin: 1rem 0;
    }
    
    .progress-dot {
        width: 12px;
        height: 12px;
    }
    
    .progress-tracker .progress-dot:not(:last-child)::before {
        width: 8px;
        right: -4px;
    }
    
    .azbn-container {
        padding: 1rem;
        margin: 10px;
    }
    
    .azbn-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .connection-node {
        display: block;
        margin: 0.25rem 0;
        text-align: center;
        padding: 0.75rem 1rem;
    }
    
    .enhanced-quiz-container {
        padding: 1.5rem;
    }
    
    .interactive-demo {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .section-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .section-nav button {
        min-width: auto;
        width: 100%;
    }
    
    .progress-tracker {
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .enhanced-quiz-option {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.loading {
    animation: pulse 2s infinite;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .content-section {
        animation: none;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .section-nav button {
        border-width: 3px;
    }
    
    .enhanced-quiz-option {
        border-width: 3px;
    }
    
    .progress-dot {
        border: 2px solid #000;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .section-nav,
    .progress-tracker {
        display: none;
    }
    
    .content-section {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .azbn-container {
        background: white !important;
        box-shadow: none;
    }
}