/* Legal Pages Specific Styles */

.legal-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.last-updated {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.legal-content {
    line-height: 1.8;
    color: #374151;
}

.legal-content h2 {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #8b5cf6;
}

.legal-content h3 {
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    margin-bottom: 1rem;
    text-align: justify;
}

.legal-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    list-style-type: disc;
}

.legal-content a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.legal-content a:hover {
    color: #7c3aed;
    text-decoration: underline;
}

.legal-content strong {
    font-weight: 700;
    color: #1f2937;
}

/* Cookies Table */
.cookies-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cookies-table thead {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
}

.cookies-table th,
.cookies-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.cookies-table th {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookies-table tbody tr:hover {
    background: #f8fafc;
}

.cookies-table td:first-child {
    font-weight: 600;
    color: #1f2937;
    font-family: 'Courier New', monospace;
    background: #f1f5f9;
}

/* Highlighted sections */
.legal-content h2:first-of-type {
    margin-top: 0;
}

.legal-content > h2:nth-child(2) {
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    padding: 1rem;
    border-radius: 8px;
    border: none;
    margin: 2rem 0 1rem 0;
}

/* Contact information styling */
.legal-content ul:has(li:contains("Email:")) {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #8b5cf6;
}

/* Important notices */
.legal-content p:has(strong:contains("Important")) {
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #dc2626;
}

.legal-content p:has(strong:contains("Important")) strong {
    color: #dc2626;
}

/* Code and technical terms */
.legal-content code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #1e40af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .legal-section {
        padding: 1rem;
        margin: 1rem;
    }
    
    .legal-content h2 {
        font-size: clamp(1.3rem, 3vw, 1.5rem);
        line-height: 1.3;
    }
    
    .legal-content h3 {
        font-size: clamp(1.1rem, 2.5vw, 1.25rem);
        line-height: 1.4;
    }
    
    .legal-content p {
        font-size: clamp(0.9rem, 2vw, 1rem);
        line-height: 1.6;
        text-align: left;
    }
    
    .legal-content ul {
        padding-left: 1.5rem;
    }
    
    .legal-content li {
        font-size: clamp(0.9rem, 2vw, 1rem);
        line-height: 1.6;
        margin-bottom: 0.75rem;
    }
    
    .cookies-table {
        font-size: 0.9rem;
        margin: 1rem 0;
    }
    
    .cookies-table th,
    .cookies-table td {
        padding: 0.75rem 0.5rem;
        word-wrap: break-word;
    }
    
    .last-updated {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: clamp(1.8rem, 4vw, 2.5rem);
    }
}

@media (max-width: 480px) {
    .legal-section {
        padding: 0.75rem;
        margin: 0.5rem;
    }
    
    .legal-content h2 {
        font-size: clamp(1.2rem, 3vw, 1.3rem);
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.25rem;
    }
    
    .legal-content h3 {
        font-size: clamp(1rem, 2.5vw, 1.1rem);
        margin-top: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .legal-content p {
        font-size: clamp(0.85rem, 2vw, 0.95rem);
        line-height: 1.5;
        margin-bottom: 0.75rem;
    }
    
    .legal-content ul {
        padding-left: 1.25rem;
        margin: 0.75rem 0;
    }
    
    .legal-content li {
        font-size: clamp(0.85rem, 2vw, 0.95rem);
        line-height: 1.5;
        margin-bottom: 0.5rem;
    }
    
    .cookies-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 0.8rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .cookies-table th,
    .cookies-table td {
        padding: 0.5rem 0.25rem;
        min-width: 80px;
    }
    
    .cookies-table td:first-child {
        font-size: 0.75rem;
    }
    
    .last-updated {
        font-size: 0.8rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
    }
    
    .section-title {
        font-size: clamp(1.5rem, 3.5vw, 2rem);
        line-height: 1.2;
    }
    
    .legal-content strong {
        font-size: inherit;
    }
    
    .legal-content code {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 320px) {
    .legal-section {
        padding: 0.5rem;
        margin: 0.25rem;
    }
    
    .legal-content h2 {
        font-size: 1.1rem;
        margin-top: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .legal-content h3 {
        font-size: 0.95rem;
        margin-top: 1rem;
        margin-bottom: 0.4rem;
    }
    
    .legal-content p {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 0.6rem;
    }
    
    .legal-content ul {
        padding-left: 1rem;
        margin: 0.6rem 0;
    }
    
    .legal-content li {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 0.4rem;
    }
    
    .cookies-table {
        font-size: 0.7rem;
    }
    
    .cookies-table th,
    .cookies-table td {
        padding: 0.4rem 0.2rem;
    }
    
    .last-updated {
        font-size: 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
}

/* Landscape orientation for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .legal-section {
        padding: 1rem;
    }
    
    .legal-content h2 {
        font-size: 1.2rem;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .legal-content h3 {
        font-size: 1rem;
        margin-top: 0.75rem;
        margin-bottom: 0.4rem;
    }
    
    .legal-content p {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
    
    .last-updated {
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }
}

/* Print optimization */
@media print {
    .legal-section {
        padding: 1rem;
        margin: 0;
        box-shadow: none;
        background: white;
    }
    
    .legal-content h2 {
        page-break-after: avoid;
        font-size: 1.2rem;
    }
    
    .legal-content h3 {
        page-break-after: avoid;
        font-size: 1rem;
    }
    
    .legal-content p,
    .legal-content li {
        orphans: 3;
        widows: 3;
    }
    
    .cookies-table {
        page-break-inside: avoid;
        font-size: 0.8rem;
    }
    
    .legal-content a {
        color: #000 !important;
        text-decoration: underline !important;
    }
}

/* Print styles */
@media print {
    .legal-section {
        box-shadow: none;
        background: white;
    }
    
    .legal-content a {
        color: #000;
        text-decoration: underline;
    }
    
    .cookies-table {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .legal-content h2 {
        border-bottom: 1px solid #000;
    }
}

/* Accessibility improvements */
.legal-content a:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

.cookies-table th {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Smooth scrolling for internal links */
html {
    scroll-behavior: smooth;
}

/* Table of contents styling (if needed) */
.toc {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.toc h3 {
    margin-top: 0;
    color: #1f2937;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.3s ease;
}

.toc a:hover {
    color: #8b5cf6;
}

/* Legal notice specific styling */
.legal-content > h2:first-child {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    padding: 1rem;
    border-radius: 8px;
    border: none;
    margin: 0 0 2rem 0;
    text-align: center;
}

/* Highlight important legal terms */
.legal-content p:contains("governed by") {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #059669;
}
