/* Legal Pages Styling */

:root {
    /* Match main site colors - Light Theme */
    --legal-primary: #7e22ce;
    --legal-secondary: #9333ea;
    --legal-text: #334155;
    --legal-bg: #faf5ff;
    --legal-border: #e9d5ff;
    --legal-highlight: #f3e8ff;
    --legal-success: #10B981;
    --legal-warning: #F59E0B;
    --legal-card-bg: rgba(255, 255, 255, 0.9);
    --legal-hover-bg: rgba(248, 245, 255, 0.95);
    
    /* Typography enhancements */
    --font-primary: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Legal Page Container */
.legal-page {
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 50%, #f3e8ff 100%);
    min-height: 100vh;
    padding: 120px 0 60px 0;
}

/* Legal Header */
.legal-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--legal-border);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

.legal-header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #7e22ce 0%, #be185d 50%, #db2777 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.legal-meta {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 20px;
    font-weight: 500;
}

.legal-intro {
    font-size: 1.35rem;
    color: var(--legal-text);
    max-width: 800px;
    margin: 0 auto 20px auto;
    line-height: 1.7;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.legal-badges {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.legal-badges .badge {
    background: var(--legal-highlight);
    border: 2px solid var(--legal-border);
    color: var(--legal-primary);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

/* Legal Content Layout */
.legal-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Table of Contents */
.legal-toc {
    position: sticky;
    top: 100px;
    background: var(--legal-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--legal-border);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    height: fit-content;
}

.legal-toc h3 {
    font-size: 1.25rem;
    color: var(--legal-primary);
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

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

.legal-toc ul li {
    margin-bottom: 12px;
}

.legal-toc ul li a {
    color: var(--legal-text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: block;
    padding: 5px 0;
    letter-spacing: 0.2px;
}

.legal-toc ul li a:hover {
    color: var(--legal-primary);
    padding-left: 10px;
}

/* Legal Sections */
.legal-section {
    background: var(--legal-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--legal-border);
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.4);
    scroll-margin-top: 100px;
}

.legal-section h2 {
    font-size: 2.25rem;
    color: var(--legal-primary);
    margin-bottom: 25px;
    font-weight: 800;
    letter-spacing: -0.5px;
    border-bottom: 3px solid var(--legal-secondary);
    padding-bottom: 15px;
}

.legal-section h3 {
    font-size: 1.75rem;
    color: var(--legal-secondary);
    margin: 30px 0 20px 0;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.legal-section h4 {
    font-size: 1.2rem;
    color: var(--legal-secondary);
    margin: 20px 0 15px 0;
    font-weight: 600;
}

.legal-section p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--legal-text);
    margin-bottom: 20px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.legal-section ul,
.legal-section ol {
    margin: 15px 0 20px 20px;
    line-height: 1.8;
}

.legal-section ul li,
.legal-section ol li {
    margin-bottom: 10px;
    color: var(--legal-text);
}

.legal-section strong {
    color: var(--legal-primary);
    font-weight: 600;
}

.legal-section em {
    color: #94a3b8;
    font-style: italic;
}

/* Highlight Boxes */
.highlight-box {
    background: rgba(139, 92, 246, 0.15);
    border-left: 5px solid var(--legal-primary);
    border: 1px solid rgba(139, 92, 246, 0.4);
    padding: 25px 30px;
    border-radius: 10px;
    margin: 25px 0;
}

.highlight-box h3,
.highlight-box h4 {
    color: var(--legal-primary);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.highlight-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.highlight-box ul li {
    padding: 8px 0;
    position: relative;
    padding-left: 30px;
}

.highlight-box ul li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--legal-success);
    font-weight: bold;
    font-size: 1.2rem;
}

.highlight-box.warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-left-color: var(--legal-warning);
}

.highlight-box.warning h4 {
    color: var(--legal-warning);
}

.highlight-box.warning ul li:before {
    content: '✗';
    color: var(--legal-warning);
}

/* Tables */
.pricing-table-legal,
.retention-table,
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: rgba(248, 245, 255, 0.9);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--legal-border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.pricing-table-legal th,
.retention-table th,
.cookie-table th {
    background: var(--legal-primary);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.pricing-table-legal td,
.retention-table td,
.cookie-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--legal-text);
}

.pricing-table-legal tr:last-child td,
.retention-table tr:last-child td,
.cookie-table tr:last-child td {
    border-bottom: none;
}

.pricing-table-legal tr:hover,
.retention-table tr:hover,
.cookie-table tr:hover {
    background: var(--legal-hover-bg);
}

/* Security Grid */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.security-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--legal-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.security-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.security-item h4 {
    color: var(--legal-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.security-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.security-item ul li {
    padding: 8px 0;
    color: var(--legal-text);
    font-size: 0.95rem;
}

/* Rights Grid */
.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.right-item {
    background: white;
    border: 2px solid var(--legal-secondary);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.right-item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(107, 70, 193, 0.2);
}

.right-item h4 {
    color: var(--legal-primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.right-item p {
    font-size: 0.9rem;
    color: var(--legal-text);
    margin: 0;
}

/* Contact Info */
.contact-info {
    background: var(--legal-bg);
    border: 2px solid var(--legal-border);
    border-radius: 10px;
    padding: 30px;
    margin: 25px 0;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1rem;
}

.contact-info strong {
    color: var(--legal-primary);
    display: inline-block;
    min-width: 150px;
}

/* Legal Footer Note */
.legal-footer-note {
    background: var(--legal-highlight);
    border: 1px solid var(--legal-border);
    border-radius: 10px;
    padding: 20px 30px;
    margin-top: 40px;
    text-align: center;
}

.legal-footer-note p {
    margin: 5px 0;
    color: var(--legal-text);
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .legal-content {
        grid-template-columns: 1fr;
    }

    .legal-toc {
        position: static;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .legal-page {
        padding: 100px 0 40px 0;
    }

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

    .legal-intro {
        font-size: 1rem;
    }

    .legal-section {
        padding: 25px 20px;
    }

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

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

    .security-grid,
    .rights-grid {
        grid-template-columns: 1fr;
    }

    .pricing-table-legal,
    .retention-table,
    .cookie-table {
        font-size: 0.85rem;
    }

    .pricing-table-legal th,
    .pricing-table-legal td,
    .retention-table th,
    .retention-table td,
    .cookie-table th,
    .cookie-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .legal-header h1 {
        font-size: 1.75rem;
    }

    .legal-badges {
        flex-direction: column;
        align-items: center;
    }

    .legal-badges .badge {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }

    .legal-section {
        padding: 20px 15px;
    }

    .highlight-box {
        padding: 20px 15px;
    }

    .contact-info {
        padding: 20px 15px;
    }

    .contact-info strong {
        display: block;
        margin-bottom: 5px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .mobile-menu,
    .footer,
    .legal-toc {
        display: none;
    }

    .legal-page {
        padding: 0;
    }

    .legal-content {
        grid-template-columns: 1fr;
    }

    .legal-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .highlight-box {
        break-inside: avoid;
    }
}
