/* Legal Pages Styles */

.legal-content {
    min-height: calc(100vh - 120px);
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.legal-document {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto;
}

.legal-document h1 {
    color: #2d3748;
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 3px solid #667eea;
    padding-bottom: 20px;
}

.legal-meta {
    background: #f7fafc;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.legal-meta p {
    margin: 5px 0;
    color: #4a5568;
    font-size: 0.95rem;
}

.legal-intro {
    background: #edf2f7;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.legal-intro p {
    line-height: 1.8;
    color: #2d3748;
}

/* Table of Contents */
.toc {
    background: #f7fafc;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 40px;
    border: 1px solid #e2e8f0;
}

.toc h2 {
    color: #2d3748;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.toc ol {
    counter-reset: toc-counter;
    list-style: none;
    padding-left: 0;
}

.toc ol li {
    counter-increment: toc-counter;
    margin-bottom: 10px;
    position: relative;
    padding-left: 30px;
}

.toc ol li::before {
    content: counter(toc-counter) ".";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: 600;
}

.toc a {
    color: #4a5568;
    text-decoration: none;
    transition: color 0.3s ease;
}

.toc a:hover {
    color: #667eea;
    text-decoration: underline;
}

/* Legal Sections */
.legal-section {
    margin-bottom: 40px;
    padding-top: 20px;
}

.legal-section h2 {
    color: #2d3748;
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.legal-section h3 {
    color: #4a5568;
    font-size: 1.3rem;
    margin-top: 25px;
    margin-bottom: 15px;
}

.legal-section h4 {
    color: #718096;
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

.legal-section p {
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 15px;
}

.legal-section ol,
.legal-section ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.legal-section li {
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 8px;
}

/* Info Boxes */
.info-box {
    background: #f7fafc;
    border-left: 4px solid #667eea;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.info-box h4 {
    color: #2d3748;
    margin-top: 0;
    margin-bottom: 10px;
}

.info-box ul {
    margin: 10px 0;
    padding-left: 20px;
}

/* Purpose Cards */
.purpose-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

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

.purpose-card h3 {
    color: #667eea;
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.purpose-card ul {
    margin: 0;
    padding-left: 20px;
}

/* Security Measures */
.security-measures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.measure-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e2e8f0;
}

.measure-icon {
    font-size: 1.5rem;
}

/* Data Retention Table */
.data-retention-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.data-retention-table thead {
    background: #667eea;
    color: #ffffff;
}

.data-retention-table th,
.data-retention-table td {
    padding: 15px;
    text-align: left;
}

.data-retention-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
}

.data-retention-table tbody tr:hover {
    background: #f7fafc;
}

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

.right-card {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.right-card h3 {
    color: #667eea;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.right-card p {
    margin: 0;
    font-size: 0.95rem;
}

/* Contact Box */
.contact-box {
    background: #edf2f7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.contact-box h3 {
    color: #2d3748;
    margin-top: 0;
    margin-bottom: 15px;
}

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

.contact-box li {
    margin-bottom: 10px;
}

.contact-box a {
    color: #667eea;
    text-decoration: none;
}

.contact-box a:hover {
    text-decoration: underline;
}

/* Contact Info */
.contact-info {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.contact-info p {
    margin: 10px 0;
}

.contact-info a {
    color: #667eea;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Legal Appendix */
.legal-appendix {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.legal-appendix h2 {
    color: #2d3748;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.legal-appendix h3 {
    color: #4a5568;
    font-size: 1.2rem;
    margin-top: 25px;
    margin-bottom: 15px;
}

.legal-appendix ul {
    margin-left: 20px;
}

.legal-appendix a {
    color: #667eea;
    text-decoration: none;
}

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

/* Legal Footer */
.legal-footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.legal-footer p {
    color: #718096;
    margin: 5px 0;
}

/* Footer Links */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Navigation Active State */
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .legal-document {
        padding: 20px;
    }

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

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

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

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

    .data-retention-table {
        font-size: 0.9rem;
    }

    .data-retention-table th,
    .data-retention-table td {
        padding: 10px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Back to Top Button (optional) */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #667eea;
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #764ba2;
    transform: translateY(-3px);
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .toc,
    .back-to-top {
        display: none;
    }

    .legal-content {
        padding: 0;
        background: none;
    }

    .legal-document {
        box-shadow: none;
        border-radius: 0;
        padding: 0;
    }

    .legal-section {
        page-break-inside: avoid;
    }
}