/* Legal Pages Styling */

/* Hero Section - adjust for floating navbar */
.legal-hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 87, 255, 0.1), rgba(0, 184, 255, 0.05));
    position: relative;
    overflow: hidden;
    margin-top: 100px; /* Adjusted to account for floating navbar */
    padding: 3rem 1rem;
}

.legal-hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%230057ff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
}

.legal-hero-content {
    text-align: center;
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.legal-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--genz-purple), var(--genz-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-secondary);
    margin-bottom: 1rem;
}

/* Legal Content Layout */
.legal-content {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.legal-content .container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Table of Contents */
.legal-toc {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding: 2rem;
}

.legal-toc h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
    font-weight: 700;
}

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

.legal-toc ul li {
    margin-bottom: 0.75rem;
}

.legal-toc ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    display: block;
    padding: 0.5rem;
    border-radius: 6px;
}

.legal-toc ul li a:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

/* Legal Main Content */
.legal-main {
    padding: 0 1rem;
}

.legal-section {
    margin-bottom: 3.5rem;
    animation: fadeIn 0.6s ease-out;
}

.legal-section:last-child {
    margin-bottom: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.legal-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--accent-secondary);
}

.legal-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

.legal-section ul, .legal-section ol {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.legal-section ul li, .legal-section ol li {
    margin-bottom: 0.75rem;
}

.legal-section a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-section a:hover {
    text-decoration: underline;
}

/* Contact Info List */
.contact-info {
    list-style: none;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.contact-info li {
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.contact-info li:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .legal-content .container {
        grid-template-columns: 1fr;
    }
    
    .legal-toc {
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .legal-hero h1 {
        font-size: 2.8rem;
    }
    
    .legal-hero {
        min-height: 30vh;
        margin-top: 80px;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .legal-section h2 {
        font-size: 1.8rem;
    }
    
    .legal-section h3 {
        font-size: 1.3rem;
    }
    
    .legal-section p, .legal-section ul, .legal-section ol {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .legal-hero h1 {
        font-size: 2.2rem;
    }
    
    .legal-hero {
        min-height: 25vh;
        margin-top: 70px;
        padding: 2rem 1rem;
    }
    
    .legal-section {
        margin-bottom: 2.5rem;
    }
    
    .legal-section h2 {
        font-size: 1.6rem;
    }
    
    .legal-toc {
        padding: 1.5rem;
    }
    
    .legal-toc h2 {
        font-size: 1.5rem;
    }
}

/* Light Theme Adjustments */
body.light-theme .legal-section h2 {
    color: var(--text-primary);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .legal-section h3 {
    color: #0057ff;
}

body.light-theme .legal-section p,
body.light-theme .legal-section ul,
body.light-theme .legal-section ol {
    color: var(--text-secondary);
}

body.light-theme .legal-toc ul li a {
    color: var(--text-secondary);
}

body.light-theme .legal-toc ul li a:hover {
    color: var(--accent-color);
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .contact-info {
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .legal-section a {
    color: #0057ff;
}

/* Enhanced Light Theme Adjustments for Legal Pages */
body.light-theme .legal-hero {
    background: linear-gradient(135deg, rgba(0, 87, 255, 0.05), rgba(0, 184, 255, 0.02)) !important;
}

body.light-theme .legal-hero h1 {
    background: linear-gradient(45deg, #0057ff, #00b8ff) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
}

body.light-theme .hero-subtitle {
    color: var(--text-secondary) !important;
}

body.light-theme .legal-toc {
    background: rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .legal-section h2 {
    color: var(--text-primary) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .legal-section h3 {
    color: #0057ff !important;
}

body.light-theme .legal-section p,
body.light-theme .legal-section ul,
body.light-theme .legal-section ol {
    color: var(--text-secondary) !important;
}

body.light-theme .legal-toc ul li a {
    color: var(--text-secondary) !important;
}

body.light-theme .legal-toc ul li a:hover {
    color: var(--accent-color) !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .contact-info {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .legal-section a {
    color: #0057ff !important;
    font-weight: 500 !important;
}

body.light-theme .legal-section a:hover {
    color: #003cb3 !important;
}

/* CRITICAL LIGHT THEME FIXES FOR LEGAL PAGES */
html.light-theme,
body.light-theme {
    background-color: #f5f7fa !important;
    color: #202842 !important;
}

/* Force all critical elements to have proper light theme colors */
body.light-theme .legal-hero {
    background: linear-gradient(135deg, rgba(0, 87, 255, 0.05), rgba(0, 184, 255, 0.02)) !important;
}

body.light-theme .legal-hero h1 {
    background: linear-gradient(45deg, #0057ff, #00b8ff) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
}

body.light-theme .hero-subtitle {
    color: #4d5a7a !important;
}

body.light-theme .legal-toc {
    background: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .legal-toc h2 {
    color: #202842 !important;
}

body.light-theme .legal-toc ul li a {
    color: #4d5a7a !important;
}

body.light-theme .legal-toc ul li a:hover {
    color: #0057ff !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .legal-section h2 {
    color: #202842 !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .legal-section h3 {
    color: #0057ff !important;
}

body.light-theme .legal-section p,
body.light-theme .legal-section ul,
body.light-theme .legal-section ol,
body.light-theme .legal-section li {
    color: #4d5a7a !important;
}

body.light-theme .contact-info {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .legal-section a {
    color: #0057ff !important;
    font-weight: 500 !important;
}

body.light-theme .legal-section a:hover {
    color: #003cb3 !important;
}

/* Fix footer in light mode */
body.light-theme .footer-enhanced {
    background: linear-gradient(to bottom, #e8eef9, #dbe5f2) !important;
}

body.light-theme .footer-logo {
    color: #202842 !important;
}

body.light-theme .footer-column h4 {
    color: #202842 !important;
}

body.light-theme .footer-link,
body.light-theme .legal-link {
    color: #4d5a7a !important;
}

body.light-theme .footer-link:hover,
body.light-theme .legal-link:hover {
    color: #0057ff !important;
}

body.light-theme .location-info h5 {
    color: #202842 !important;
}

body.light-theme .location-info p {
    color: #4d5a7a !important;
}

body.light-theme .company-desc {
    color: #4d5a7a !important;
}

body.light-theme .footer-copyright {
    color: #4d5a7a !important;
}

body.light-theme .social-link-premium {
    color: #4d5a7a !important;
}

body.light-theme .social-link-premium:hover {
    color: #0057ff !important;
}

/* Fix floating action buttons */
body.light-theme .floating-actions .fab-button {
    background: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    color: #202842 !important;
}

body.light-theme .floating-actions .fab-button:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

body.light-theme .theme-toggle i {
    color: #0057ff !important;
}
