/* Legal Document Specific Styles */
body.legal-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    color: #1a202c;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Reset particles and dark theme elements for legal pages */
body.legal-page .particles {
    display: none;
}

/* Navigation - Light theme for legal pages */
body.legal-page nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.legal-page .logo {
    color: #2d3748;
}

body.legal-page .logo-icon {
    /* Fix logo visibility - use a proper logo or create a styled placeholder */
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

body.legal-page .logo-icon::after {
    content: 'AD';
}

body.legal-page .nav-links a {
    color: #4a5568;
    font-weight: 500;
}

body.legal-page .nav-links a:hover {
    color: #667eea;
}

/* Legal Document Container */
body.legal-page .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 120px 40px 80px;
    background: white;
    min-height: 100vh;
}

/* Typography for Legal Documents */
body.legal-page h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
    border-bottom: 3px solid #667eea;
    padding-bottom: 20px;
}

body.legal-page h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
    line-height: 1.3;
}

body.legal-page h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4a5568;
    margin: 30px 0 15px 0;
    line-height: 1.4;
}

body.legal-page p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 16px;
    color: #2d3748;
}

/* Meta Information Box */
body.legal-page .meta-info {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin: 30px 0 40px 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body.legal-page .meta-info strong {
    color: #2d3748;
    font-weight: 600;
}

/* Lists */
body.legal-page ul,
body.legal-page ol {
    margin: 16px 0 20px 0;
    padding-left: 30px;
}

body.legal-page li {
    margin-bottom: 8px;
    color: #4a5568;
    line-height: 1.6;
}

body.legal-page li strong {
    color: #2d3748;
    font-weight: 600;
}

/* Highlight Boxes */
body.legal-page .highlight {
    background: linear-gradient(135deg, #f0fff4, #e6fffa);
    border-left: 4px solid #38b2ac;
    border-radius: 0 8px 8px 0;
    padding: 20px 24px;
    margin: 25px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

body.legal-page .highlight h3 {
    color: #234e52;
    margin-top: 0;
}

body.legal-page .highlight ul {
    margin-bottom: 0;
}

body.legal-page .highlight li {
    color: #2d3748;
}

/* Contact Information Box */
body.legal-page .contact-info {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin: 40px 0;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

body.legal-page .contact-info h2 {
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    margin-top: 0;
}

body.legal-page .contact-info p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 12px;
}

body.legal-page .contact-info strong {
    color: white;
    font-weight: 600;
}

/* Back Link */
body.legal-page .back-link {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

body.legal-page .back-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    padding: 12px 24px;
    border: 2px solid #667eea;
    border-radius: 8px;
    transition: all 0.3s ease;
}

body.legal-page .back-link a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Important/Warning Boxes */
body.legal-page .important {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    padding: 20px 24px;
    margin: 25px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

body.legal-page .warning {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-left: 4px solid #ef4444;
    border-radius: 0 8px 8px 0;
    padding: 20px 24px;
    margin: 25px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Acceptance Notice */
body.legal-page .acceptance-notice {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 24px;
    margin: 40px 0;
    text-align: center;
    font-weight: 600;
    color: #1e40af;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.1);
}

/* Table of Contents (if needed) */
body.legal-page .toc {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

body.legal-page .toc h3 {
    margin-top: 0;
    color: #2d3748;
}

body.legal-page .toc ul {
    margin: 0;
    padding-left: 20px;
}

body.legal-page .toc a {
    color: #667eea;
    text-decoration: none;
}

body.legal-page .toc a:hover {
    text-decoration: underline;
}

/* Responsive Design for Legal Pages */
@media (max-width: 768px) {
    body.legal-page .container {
        padding: 100px 20px 60px;
    }

    body.legal-page h1 {
        font-size: 2rem;
    }

    body.legal-page h2 {
        font-size: 1.5rem;
    }

    body.legal-page h3 {
        font-size: 1.2rem;
    }

    body.legal-page .meta-info {
        padding: 16px;
        margin: 20px 0;
    }

    body.legal-page .highlight,
    body.legal-page .contact-info,
    body.legal-page .important,
    body.legal-page .warning {
        padding: 16px 20px;
        margin: 20px 0;
    }

    body.legal-page ul,
    body.legal-page ol {
        padding-left: 20px;
    }
}

@media (max-width: 480px) {
    body.legal-page .container {
        padding: 90px 15px 50px;
    }

    body.legal-page h1 {
        font-size: 1.8rem;
    }

    body.legal-page .nav-links {
        display: none;
    }
}

/* Print Styles for Legal Documents */
@media print {
    body.legal-page {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.5;
    }

    body.legal-page nav {
        display: none;
    }

    body.legal-page .container {
        padding: 0;
        margin: 0;
        max-width: none;
    }

    body.legal-page .back-link {
        display: none;
    }

    body.legal-page h1 {
        page-break-after: avoid;
        font-size: 18pt;
    }

    body.legal-page h2 {
        page-break-after: avoid;
        font-size: 14pt;
    }

    body.legal-page .highlight,
    body.legal-page .contact-info,
    body.legal-page .important,
    body.legal-page .warning {
        border: 1px solid #ccc;
        background: #f9f9f9;
        page-break-inside: avoid;
    }
}

/* Accessibility Improvements */
body.legal-page *:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

body.legal-page a {
    color: #667eea;
    transition: color 0.2s ease;
}

body.legal-page a:hover {
    color: #5a67d8;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    body.legal-page {
        background: white;
        color: black;
    }

    body.legal-page h1,
    body.legal-page h2,
    body.legal-page h3 {
        color: black;
    }

    body.legal-page .highlight,
    body.legal-page .contact-info,
    body.legal-page .important,
    body.legal-page .warning {
        border: 2px solid black;
        background: white;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    body.legal-page * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}