/* Modern CSS styling for Interactive Flow Diagram */
/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styling */
.main-header {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.main-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}
.subtitle {
    font-size: 1.2rem;
    color: #666;
    font-weight: 300;
}
/* Flow Connector Line Styling - UPDATED */
.flow-connector {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 0;
    padding: 0;
    height: 60px;
    position: relative;
}
.connector-line {
    width: 4px;
    height: 50px;
    background: white;
    border-radius: 2px;
    position: relative;
    animation: flowPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}
.connector-line::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #764ba2;
    animation: arrowPulse 2s ease-in-out infinite;
}
@keyframes flowPulse {
    0%, 100% {
        opacity: 0.8;
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    }
}
@keyframes arrowPulse {
    0%, 100% {
        opacity: 0.8;
        transform: translateX(-50%) translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(2px);
    }
}
/* Flow diagram container */
.flow-diagram {
    display: flex;
    flex-direction: column;
    gap: 0;
}
/* Flow section styling */
.flow-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0;
}
.flow-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}
.section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    user-select: none;
}
.section-header:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}
.section-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}
.toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}
.flow-section.expanded .toggle-icon {
    transform: rotate(180deg);
}
.section-content {
    padding: 25px;
    display: none;
    animation: fadeIn 0.3s ease;
}
.flow-section.expanded .section-content {
    display: block;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Process box styling */
.process-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    position: relative;
}
.process-box:last-child {
    margin-bottom: 0;
}
.process-box:hover {
    background: #e9ecef;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.process-box h3 {
    color: #495057;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}
.process-box ul {
    list-style: none;
    padding-left: 0;
}
.process-box li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #6c757d;
    transition: color 0.3s ease;
}
.process-box li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
}
.process-box li:hover {
    color: #495057;
}
/* Footer styling */
.main-footer {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.results-summary h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.metric {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.metric:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
.metric-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.metric-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}
/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main-header {
        padding: 30px 20px;
    }
    
    .main-header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .flow-connector {
        margin: 15px 0;
        height: 40px;
    }
    
    .connector-line {
        height: 35px;
        width: 3px;
    }
    
    .connector-line::before {
        border-left-width: 6px;
        border-right-width: 6px;
        border-top-width: 10px;
        bottom: -6px;
    }
    
    .section-header {
        padding: 15px 20px;
    }
    
    .section-header h2 {
        font-size: 1.2rem;
    }
    
    .section-content {
        padding: 20px;
    }
    
    .process-box {
        padding: 15px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .metric {
        padding: 20px 15px;
    }
    
    .metric-value {
        font-size: 2rem;
    }
    
    .results-summary h2 {
        font-size: 1.5rem;
    }
}
@media (max-width: 480px) {
    .main-header h1 {
        font-size: 1.8rem;
    }
    
    .connector-line {
        height: 30px;
        width: 2px;
    }
    
    .connector-line::before {
        border-left-width: 5px;
        border-right-width: 5px;
        border-top-width: 8px;
        bottom: -5px;
    }
    
    .section-header h2 {
        font-size: 1.1rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-value {
        font-size: 1.8rem;
    }
}
/* Loading animation */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}
/* Accessibility improvements */
.section-header:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.process-box:focus-within {
    border-left-color: #28a745;
    background: #e8f5e8;
}
.flow-connector:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .container {
        max-width: none;
    }
    
    .flow-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .section-content {
        display: block !important;
    }
    
    .toggle-icon {
        display: none;
    }
    
    .flow-connector {
        box-shadow: none;
        border: none;
    }
    
    .connector-line {
        background: #333;
        box-shadow: none;
        animation: none;
    }
    
    .connector-line::before {
        border-top-color: #333;
        animation: none;
    }
}
