/* Complex Analysis Visualization Styles */

/* Light background with dark text theme - WCAG AA compliant */
body {
    background-color: #f8f9fa; /* Light background */
    color: #333; /* Dark text with good contrast */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px; /* Base font size for readability */
    line-height: 1.5; /* Adequate line spacing */
}

/* Ensure proper heading hierarchy */
h1, h2, h3, h4, h5, h6 {
    color: #2c3e50; /* Dark color for headings */
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* Focus indicators for keyboard navigation */
a:focus, button:focus, input:focus, select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #667eea;
    color: white;
    padding: 8px;
    z-index: 1000;
    text-decoration: none;
}

.skip-link:focus {
    top: 6px;
}

/* Hero section with gradient background */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.hero-section::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"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Breadcrumb navigation */
.breadcrumb-nav {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.breadcrumb {
    background: transparent;
    margin: 0;
}

/* Content sections */
.definition-section {
    padding: 80px 0;
    background: white;
}

.examples-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 60px 0;
}

.types-section {
    padding: 80px 0;
    background: white;
}

.comparison-section {
    background: linear-gradient(135deg, #fff5f5 0%, #f0f4f8 100%);
    padding: 80px 0;
}

/* Cards and containers */
.definition-card {
    background: #f8f9fa;
    border-left: 5px solid #667eea;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.example-item {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.visualization-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.calculator-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.export-import-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Section titles */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: block;
    margin: 20px auto 0;
    border-radius: 2px;
}

/* Interactive cards */
.ds-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    padding: 40px 30px;
    margin-bottom: 30px;
    cursor: pointer;
    height: 100%;
    border: 2px solid transparent;
    position: relative;
}

.ds-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.ds-card:hover::before {
    transform: scaleX(1);
}

.ds-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.ds-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ds-card h3 {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.ds-card p {
    color: #7f8c8d;
    font-size: 1rem;
    line-height: 1.6;
}

/* Buttons */
.btn-explore {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    font-weight: 600;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-explore:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    color: white;
}

.btn-learn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    font-weight: 600;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-learn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    color: white;
}

.simulation-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.simulation-btn:hover {
    background: #5a6fd8;
}

.simulation-btn.active {
    background: #ff6b6b;
}

.export-btn, .import-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.export-btn {
    background: #28a745;
    color: white;
}

.import-btn {
    background: #17a2b8;
    color: white;
}

.export-btn:hover {
    background: #218838;
}

.import-btn:hover {
    background: #138496;
}

/* Controls container */
.controls-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.control-group {
    margin-bottom: 15px;
}

.control-label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

/* Canvas container */
.canvas-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

/* Result containers */
.result-container {
    background: #e8f4f8;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    min-height: 50px;
    border-left: 4px solid #667eea;
}

/* Comparison table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.comparison-table th {
    background: #667eea;
    color: white;
    padding: 15px;
    text-align: left;
}

.comparison-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:nth-child(even) {
    background: #f8f9fa;
}

/* Form elements */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-control-range {
    width: 100%;
}

/* Badges */
.badge {
    font-size: 0.9rem;
    padding: 10px 15px;
    border-radius: 20px;
    margin-right: 10px;
    margin-bottom: 10px;
    display: inline-block;
}

.badge-primary {
    background-color: #667eea;
}

.badge-success {
    background-color: #28a745;
}

.badge-info {
    background-color: #17a2b8;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-danger {
    background-color: #dc3545;
}

.badge-secondary {
    background-color: #6c757d;
}

/* Accordion styles */
.accordion .card {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.accordion .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
    border-radius: 8px 8px 0 0 !important;
}

.accordion .btn-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    text-align: left;
    width: 100%;
}

.accordion .btn-link:hover {
    color: #5a6fd8;
    text-decoration: none;
}

.accordion .card-body {
    background-color: white;
}

/* MCQ styles */
.card {
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-title {
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.form-check {
    margin-bottom: 8px;
}

.form-check-input {
    margin-top: 0.25rem;
}

.answer-text {
    background-color: #e8f4f8;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-weight: 500;
}

.show-answer {
    background-color: #667eea;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
}

.show-answer:hover {
    background-color: #5a6fd8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .ds-card {
        padding: 30px 20px;
    }
    
    .canvas-container {
        height: 300px;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .simulation-btn {
        margin-bottom: 10px;
    }
    
    .badge {
        font-size: 0.8rem;
        padding: 8px 12px;
        margin-right: 5px;
        margin-bottom: 5px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .canvas-container {
        height: 250px;
    }
    
    .ds-card {
        padding: 20px 15px;
    }
    
    .ds-card h3 {
        font-size: 1.2rem;
    }
}