/* OptiX Theme Specific Styles - Modern Design System */

/* Logo and branding */
.optix-logo {
    max-width: 220px;
    height: auto;
    margin: 2rem auto;
    display: block;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.1));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Custom sections for different problem types */
.problem-type-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 2.5rem 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.problem-type-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.problem-type-section.csp::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

.problem-type-section.lp::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%);
}

.problem-type-section.gp::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #43e97b 0%, #38f9d7 100%);
}

/* Solver badges */
.solver-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 6px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.solver-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.solver-badge.ortools {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.solver-badge.gurobi {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.solver-badge.extensible {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Feature cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin: 3rem 0;
    padding: 1rem 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 6px;
    background: var(--optix-gradient-accent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.feature-card h3 {
    color: var(--optix-dark);
    margin-top: 0;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-card p {
    color: var(--optix-gray);
    line-height: 1.7;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Mathematics styling */
.math {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    font-size: 1.05em;
}

.math.display {
    display: block;
    text-align: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.05) 0%, rgba(0, 242, 254, 0.03) 100%);
    border-radius: 16px;
    border: 1px solid rgba(79, 172, 254, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Performance metrics table */
.performance-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 3rem 0;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.performance-table th {
    background: var(--optix-gradient-dark);
    color: white;
    padding: 1.25rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.performance-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
}

.performance-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(79, 172, 254, 0.05) 0%, rgba(0, 242, 254, 0.03) 100%);
    transition: background 0.3s ease;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3); }
    70% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3); }
}

.status-indicator.optimal {
    background: var(--optix-success);
}

.status-indicator.feasible {
    background: var(--optix-warning);
}

.status-indicator.infeasible {
    background: var(--optix-danger);
}

/* Code example containers */
.code-example {
    position: relative;
    margin: 2.5rem 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.code-example-header {
    background: var(--optix-gradient-dark);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-example-header::before {
    content: "💻";
    margin-right: 12px;
    font-size: 1.2em;
}

.code-example .highlight {
    margin: 0;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
}

/* Installation steps */
.install-steps {
    counter-reset: step;
    margin: 3rem 0;
}

.install-step {
    counter-increment: step;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 2rem 0;
    position: relative;
    padding-left: 5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.install-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.install-step::before {
    content: counter(step);
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--optix-gradient-accent);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.install-step h3 {
    margin-top: 0;
    color: var(--optix-dark);
    font-weight: 700;
    font-size: 1.25rem;
}

/* API reference styling */
.api-section {
    background: linear-gradient(135deg, rgba(247, 249, 252, 0.9) 0%, rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2.5rem;
    margin: 2.5rem 0;
    border-left: 6px solid transparent;
    border-image: var(--optix-gradient-primary) 1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.api-section h4 {
    color: var(--optix-dark);
    margin-top: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Navigation breadcrumbs */
.wy-breadcrumbs {
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--optix-gray-light);
}

.wy-breadcrumbs li {
    background: none;
    font-size: 0.875rem;
}

.wy-breadcrumbs li a {
    color: var(--optix-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.wy-breadcrumbs li a:hover {
    color: var(--optix-secondary);
    text-decoration: none;
}

/* Search highlighting */
.highlighted {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.3) 0%, rgba(255, 107, 107, 0.15) 100%);
    padding: 3px 6px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--optix-dark);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .install-step {
        padding: 1.5rem;
        padding-left: 3rem;
    }
    
    .install-step::before {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.9rem;
    }
    
    .problem-type-section {
        padding: 1.5rem;
    }
}

/* Print styles */
@media print {
    .wy-nav-side,
    .wy-nav-content-wrap .wy-breadcrumbs,
    .rst-footer-buttons,
    .copybtn {
        display: none !important;
    }
    
    .wy-nav-content {
        margin-left: 0 !important;
        max-width: none !important;
    }
    
    .rst-content {
        color: black !important;
    }
    
    .feature-card,
    .problem-type-section,
    .code-example {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
}