/* Compact Hero for Landing Page */
.hero-compact {
    padding: 2.5rem 0 2rem !important;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%) !important;
}

.hero-compact .hero-landing-grid {
    gap: 2rem;
    align-items: center;
}

.hero-compact .hero-landing-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white !important;
}

.hero-compact .hero-landing-content .hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95) !important;
}

.hero-compact .hero-landing-content .hero-subtitle strong {
    color: white;
}

.hero-compact .document-preview {
    max-width: 300px;
    margin: 0 auto;
}

/* Tool Section Inline */
.tool-section-inline {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.tool-content-inline {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 1000px;
    margin: 0 auto;
}

.tool-app-main {
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.tool-header p {
    font-size: 1.125rem;
    color: #666;
}

.tool-content {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.upload-section {
    max-width: 900px;
    margin: 0 auto;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.upload-box {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.upload-box:hover {
    border-color: #0066cc;
    background: #f8f9fa;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: #0066cc;
}

.upload-icon svg {
    width: 100%;
    height: 100%;
}

.upload-box h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

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

.btn-upload {
    background: #0066cc;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-upload:hover {
    background: #0052a3;
    transform: translateY(-2px);
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.file-name {
    font-size: 0.875rem;
    color: #0c4a6e;
    font-weight: 500;
    flex: 1;
    text-align: left;
    word-break: break-all;
}

.btn-remove {
    background: #ef4444;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.btn-remove:hover {
    background: #dc2626;
}

.action-buttons {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.btn-primary {
    background: #0066cc;
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

.btn-primary svg {
    width: 20px;
    height: 20px;
}

.btn-secondary {
    background: white;
    color: #0066cc;
    border: 2px solid #0066cc;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #0066cc;
    color: white;
}

.loading-section {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 64px;
    height: 64px;
    border: 4px solid #e5e7eb;
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.loading-section p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Progress Bar */
.progress-bar-container {
    max-width: 500px;
    margin: 0 auto;
    background: #e5e7eb;
    border-radius: 12px;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066cc, #0052a3, #0066cc);
    background-size: 200% 100%;
    border-radius: 12px;
    animation: progressAnimation 2s ease-in-out infinite;
    width: 0%;
    transition: width 0.3s ease;
}

@keyframes progressAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.progress-status {
    font-size: 0.875rem;
    color: #666;
    margin-top: 1rem;
    font-weight: 500;
}

.results-section {
    max-width: 1000px;
    margin: 0 auto;
    margin-top: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.results-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
}

.result-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
}

.result-summary h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.result-summary pre {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.no-differences {
    text-align: center;
    padding: 3rem 2rem;
}

/* Risk Analysis Results */
.risk-category-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #8B5CF6;
}

.risk-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #F3F4F6;
}

.risk-category-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.risk-count {
    background: #8B5CF6;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.risk-trechos {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.risk-trecho {
    background: #F9FAFB;
    border-radius: 8px;
    padding: 16px;
    border-left: 3px solid #8B5CF6;
}

.risk-trecho-header {
    margin-bottom: 12px;
}

.risk-trecho-location {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6B7280;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.risk-trecho-content p {
    margin: 0;
    color: #374151;
    line-height: 1.6;
    font-size: 0.95rem;
}

.no-trechos {
    color: #9CA3AF;
    font-style: italic;
    margin: 0;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.no-differences h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.no-differences p {
    color: #666;
}

.differences-summary {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.differences-summary p {
    margin: 0;
    color: #0c4a6e;
    font-size: 1rem;
}

.difference-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.difference-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.difference-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.difference-title {
    flex: 1;
}

.clause-number {
    display: inline-block;
    background: #e5e7eb;
    color: #4b5563;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.difference-title h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-modified {
    background: #fef3c7;
    color: #92400e;
}

.status-added {
    background: #d1fae5;
    color: #065f46;
}

.status-removed {
    background: #fee2e2;
    color: #991b1b;
}

.document-section {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.document-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.document-text {
    color: #1f2937;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.difference-detail {
    margin-top: 1rem;
    padding: 1rem;
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 4px;
}

.difference-detail h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.difference-detail p {
    color: #1e3a8a;
    margin: 0;
    line-height: 1.6;
}

.difference-summary-box {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.difference-summary-box h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.difference-summary-box p {
    color: white;
    margin: 0;
    line-height: 1.7;
    font-size: 0.95rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.document-section.base-doc,
.document-section.compared-doc {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
}

.document-section.base-doc {
    border-left: 4px solid #3b82f6;
}

.document-section.compared-doc {
    border-left: 4px solid #10b981;
}

.document-section.empty {
    background: #f9fafb;
    border-style: dashed;
}

.document-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.document-content {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.empty-text {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.875rem;
    margin: 0;
    text-align: center;
    padding: 1rem;
}

@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

.error-section {
    text-align: center;
    padding: 4rem 2rem;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.error-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 0.5rem;
}

.error-section p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

.user-info {
    color: #666;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

/* Summary Container Styles */
.summary-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.summary-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #0066cc;
}

.summary-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.summary-content ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.summary-content li {
    margin-bottom: 0.5rem;
}

.summary-content strong {
    color: #0066cc;
    font-weight: 600;
}

.upload-box-single {
    background: white;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.upload-box-single:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.upload-box-single h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 1rem 0;
}

@media (max-width: 768px) {
    .hero-compact .hero-landing-content h1 {
        font-size: 1.5rem;
    }

    .hero-compact .hero-landing-content .hero-subtitle {
        font-size: 0.875rem;
    }

    .hero-compact .hero-landing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hero-compact .document-preview {
        max-width: 250px;
    }

    .tool-content-inline {
        padding: 1.5rem;
    }

    .tool-content {
        padding: 1.5rem;
    }

    .upload-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .tool-header h1 {
        font-size: 1.75rem;
    }

    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .summary-section {
        padding: 1rem;
    }
    
    .summary-section h3 {
        font-size: 1rem;
    }
}
