/**
 * Bridgette Frontend Styles
 * =========================
 * 
 * This CSS file contains all the styling for the Bridgette financial data processing platform.
 * It implements a modern, responsive design with a focus on usability and accessibility.
 * 
 * Design Philosophy:
 * - Clean, professional appearance suitable for financial applications
 * - Responsive design that works on desktop, tablet, and mobile
 * - Clear visual hierarchy to guide users through the workflow
 * - Consistent color scheme and typography
 * - Accessibility considerations (contrast, focus states, etc.)
 * 
 * Key Design Decisions:
 * - Fixed header for easy navigation
 * - Card-based layout for content organization
 * - Gradient backgrounds for visual appeal
 * - Hover effects for interactive feedback
 * - Mobile-first responsive design approach
 * 
 * Color Scheme Rationale:
 * - Primary: Blue gradient (#667eea to #764ba2) - professional, trustworthy
 * - Secondary: Light gray (#f8f9fa) - clean, neutral background
 * - Accent: Green for success states, red for errors
 * - Text: Dark gray (#333) for optimal readability
 */

/* Reset and base styles */
/* CSS reset ensures consistent rendering across browsers */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Border-box model for easier sizing calculations */
}

/* Base typography and layout */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Modern, readable font stack */
    line-height: 1.6; /* Improved readability */
    color: #333; /* High contrast for accessibility */
    background-color: #f8f9fa; /* Light, neutral background */
}

/* Container for consistent content width */
.container {
    max-width: 1200px; /* Optimal reading width */
    margin: 0 auto; /* Center content */
    padding: 0 20px; /* Side padding for mobile */
}

/* Header and Navigation */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Makes logo white */
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255,255,255,0.3));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    color: #ffd700;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    background: #ffd700;
    color: #333;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.cta-button:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* About Section */
.about {
    padding: 80px 0;
    background: white;
    scroll-margin-top: 80px;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

.about p {
    font-size: 1.1rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: #666;
    line-height: 1.8;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: #f8f9fa;
    scroll-margin-top: 80px;
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* Upload Section */
.upload {
    padding: 80px 0;
    background: white;
    scroll-margin-top: 80px;
}

/* Schema and Data Sections */
.schema-section, .data-section {
    margin-bottom: 4rem;
}

.schema-title, .data-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.schema-description, .data-description {
    text-align: center;
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}



.data-title {
    color: #667eea; /* Blue for regular data */
}

.upload h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.upload p {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.upload-areas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.upload-area {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    border: 2px solid #e9ecef;
}

.upload-area-title {
    text-align: center;
    color: #667eea;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.upload-box {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 2rem;
}

.upload-box:hover {
    border-color: #5a67d8;
    background: #e9ecef;
    transform: translateY(-2px);
}

.upload-box.dragover {
    border-color: #5a67d8;
    background: #e9ecef;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.upload-box h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.upload-box p {
    color: #666;
    margin-bottom: 1.5rem;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
}

.file-list {
    margin-top: 2rem;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.file-list h4 {
    color: #333;
    margin-bottom: 1rem;
}

.file-list ul {
    list-style: none;
    padding: 0;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
}

.file-name {
    font-weight: 500;
    color: #333;
}

.file-size {
    color: #666;
    font-size: 0.9rem;
}

.remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 0.8rem;
}

.upload-actions {
    margin-top: 2rem;
    text-align: center;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.process-btn {
    background: #28a745;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.process-btn:hover {
    transform: translateY(-2px);
}

.clear-btn {
    background: #6c757d;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.clear-btn:hover {
    transform: translateY(-2px);
}

.upload-info {
    margin-top: 3rem;
    text-align: center;
}

.upload-info h4 {
    color: #333;
    margin-bottom: 1rem;
}

.file-types {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.file-type {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.upload-note {
    color: #666;
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: white;
    scroll-margin-top: 80px;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: #666;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.contact-form button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.contact-form button:hover {
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-areas {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .about, .services, .contact {
        padding: 60px 0;
    }
    
    .about h2, .services h2, .contact h2 {
        font-size: 2rem;
    }
}

/* Merge Widget Styles */
.merge-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0;
}

.merge-widget h2 {
    color: white;
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
}

.merge-container {
    max-width: 800px;
    margin: 0 auto;
}

.merge-widget-box {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.merge-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.merge-header h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.merge-header p {
    color: #666;
    font-size: 1.1rem;
}

.uploaded-files-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.bank-section h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.file-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    min-height: 120px;
}

.no-files {
    color: #999;
    font-style: italic;
    text-align: center;
    margin-top: 40px;
}

.file-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.file-details {
    font-size: 0.9rem;
    color: #666;
}

.merge-actions {
    text-align: center;
    margin: 30px 0;
}

.merge-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.merge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.merge-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.merge-status {
    margin-top: 20px;
    padding: 20px;
    background: #e3f2fd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.merge-results {
    background: #e8f5e8;
    border: 2px solid #4caf50;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
}

.merge-results h4 {
    color: #2e7d32;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.download-btn {
    background: #4caf50;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    margin: 10px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.merge-info {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #666;
}

@media (max-width: 768px) {
    .uploaded-files-summary {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .merge-widget-box {
        padding: 20px;
    }
}