/* Legal Pages Styling */
.legal-page {
    padding: 2rem 0;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    background-color: #f9fafb;
}

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.legal-header h1 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 700;
}

.last-updated {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
    font-style: italic;
}

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

/* Table of Contents */
.legal-toc {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.legal-toc h3 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

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

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

.legal-toc a {
    color: #6b7280;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.3s ease;
    border-left: 3px solid transparent;
    padding-left: 1rem;
    margin-left: -1rem;
}

.legal-toc a:hover {
    color: #3b82f6;
    border-left-color: #3b82f6;
}

/* Main Legal Content */
.legal-text {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.legal-text section {
    margin-bottom: 3rem;
    scroll-margin-top: 120px;
}

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

.legal-text h2 {
    color: #1f2937;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.legal-text h3 {
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.legal-text h4 {
    color: #4b5563;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.legal-text p {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.legal-text ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.legal-text li {
    color: #4b5563;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.legal-text li strong {
    color: #374151;
    font-weight: 600;
}

.legal-text a {
    color: #3b82f6;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.legal-text a:hover {
    color: #2563eb;
}

/* Contact Info Boxes */
.contact-info {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border-left: 4px solid #3b82f6;
    margin: 1.5rem 0;
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: #374151;
}

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

/* Cookie Tables */
.cookie-table {
    margin: 1.5rem 0;
    overflow-x: auto;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cookie-table table {
    width: 100%;
    border-collapse: collapse;
}

.cookie-table th,
.cookie-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.cookie-table td {
    color: #4b5563;
    font-size: 0.9rem;
    vertical-align: top;
}

.cookie-table tr:last-child td {
    border-bottom: none;
}

.cookie-table tr:hover {
    background-color: #f9fafb;
}

/* Cookie Settings Button */
.cookie-settings-link {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1rem;
}

.cookie-settings-link button {
    background: white;
    color: #3b82f6;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cookie-settings-link button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Footer adjustments for legal pages */
.legal-page .footer {
    margin-top: 2rem;
    background-color: #1f2937;
}

.footer-links-inline {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.footer-links-inline a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links-inline a:hover {
    color: #3b82f6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .legal-content {
        grid-template-columns: 250px 1fr;
        gap: 2rem;
    }
    
    .legal-toc {
        padding: 1.5rem;
    }
    
    .legal-text {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .legal-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .legal-toc {
        position: static;
        order: 2;
        margin-top: 2rem;
    }
    
    .legal-text {
        order: 1;
        padding: 1.5rem;
    }
    
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .cookie-table {
        font-size: 0.8rem;
    }
    
    .cookie-table th,
    .cookie-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .footer-links-inline {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .legal-text h2 {
        font-size: 1.5rem;
    }
    
    .legal-text h3 {
        font-size: 1.125rem;
    }
    
    .legal-toc {
        padding: 1rem;
    }
    
    .legal-text {
        padding: 1rem;
    }
    
    .contact-info {
        padding: 1rem;
    }
    
    .cookie-settings-link {
        padding: 1.5rem;
    }
    
    .cookie-settings-link button {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .legal-page {
        background: white;
        margin-top: 0;
        padding: 0;
    }
    
    .header,
    .footer,
    .legal-toc,
    .cookie-settings-link {
        display: none;
    }
    
    .legal-content {
        grid-template-columns: 1fr;
        gap: 0;
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .legal-text {
        box-shadow: none;
        border-radius: 0;
        padding: 0;
    }
    
    .legal-text h2 {
        page-break-after: avoid;
    }
    
    .legal-text section {
        page-break-inside: avoid;
    }
}