/* Legal Documents Public Styling */

/* Full width page header wrapper */
.legal-page-header {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    padding: 3rem 0;
    margin-bottom: 2rem;
}

/* Full width contact section wrapper */
.legal-contact-wrapper {
    width: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 3rem 0;
    margin-top: 2rem;
}

.legal-contact-wrapper .contact-info {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: none;
    border: none;
    border-radius: 0;
}

.legal-page-header .legal-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    color: white;
    position: relative;
    background: none;
    border-radius: 0;
}

.legal-document {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    line-height: 1.7;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header Section (standalone) */
.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 16px;
    color: white;
    position: relative;
    overflow: hidden;
}

.legal-header::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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.legal-header h1 {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.legal-meta {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.legal-meta i {
    margin-right: 0.5rem;
}

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 1.75rem;
    background: white;
    color: #374151;
    text-decoration: none;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.back-button:hover {
    background: #f8fafc;
    color: #1e293b;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.back-button i {
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

/* Content Styling */
.legal-content {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 2rem;
}

.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content h4,
.legal-content h5,
.legal-content h6 {
    color: #1e293b;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.legal-content h1:first-child,
.legal-content h2:first-child,
.legal-content h3:first-child {
    margin-top: 0;
}

.legal-content h1 { 
    font-size: 2.25rem; 
    border-bottom: 3px solid #3b82f6;
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
}

.legal-content h2 { 
    font-size: 1.875rem;
    color: #3b82f6;
}

.legal-content h3 { 
    font-size: 1.5rem; 
}

.legal-content h4 { 
    font-size: 1.25rem; 
}

.legal-content p {
    margin-bottom: 1.75rem;
    line-height: 1.8;
}

.legal-content ul,
.legal-content ol {
    margin-bottom: 1.75rem;
    padding-left: 2.5rem;
}

.legal-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.legal-content li::marker {
    color: #3b82f6;
    font-weight: 600;
}

.legal-content strong {
    font-weight: 600;
    color: #1e293b;
}

.legal-content em {
    font-style: italic;
    color: #4b5563;
}

.legal-content a {
    color: #3b82f6;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.legal-content a:hover {
    color: #1e40af;
    text-decoration: none;
}

.legal-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #4b5563;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
}

.legal-content code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: #e11d48;
}

/* Contact Information Card */
.contact-info {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.contact-info h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.contact-info p {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.contact-info a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.contact-info a:hover {
    color: #1e40af;
    text-decoration: underline;
}

.contact-details {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-item i {
    color: #3b82f6;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Footer */
.legal-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
    text-align: center;
}

.legal-footer p {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
}

/* Document Type Badge */
.document-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.document-type-badge i {
    margin-right: 0.5rem;
}

/* Table of Contents (if needed) */
.table-of-contents {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.table-of-contents h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #1e293b;
    font-size: 1.25rem;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: #4b5563;
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    border-radius: 6px;
    padding-left: 1rem;
    transition: all 0.2s ease;
}

.table-of-contents a:hover {
    background: white;
    color: #3b82f6;
    padding-left: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .legal-document {
        padding: 1rem;
    }
    
    .legal-header {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
    
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .legal-content {
        padding: 2rem 1.5rem;
        font-size: 1rem;
    }
    
    .legal-content h1 {
        font-size: 1.875rem;
    }
    
    .legal-content h2 {
        font-size: 1.5rem;
    }
    
    .legal-content h3 {
        font-size: 1.25rem;
    }
    
    .contact-info {
        padding: 1.5rem;
    }
    
    .contact-details {
        flex-direction: column;
        gap: 1rem;
    }
    
    .back-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .legal-document {
        padding: 0.5rem;
    }
    
    .legal-header {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }
    
    .legal-content {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }
    
    .contact-info {
        padding: 1rem;
        border-radius: 12px;
    }
}

/* Print Styles */
@media print {
    .back-button,
    .contact-info {
        display: none;
    }
    
    .legal-document {
        max-width: none;
        padding: 0;
    }
    
    .legal-header {
        background: none !important;
        color: black !important;
        border: 2px solid #000;
    }
    
    .legal-content {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .legal-content a {
        color: black;
        text-decoration: underline;
    }
}
