/**
 * Legal pages styles (Terms of Service & Privacy Policy)
 * Maintains the futuristic glassmorphic design with enhanced readability
 */

/* Legal main layout */
.legal-main {
    min-height: 100vh;
    position: relative;
    padding-top: 6rem;
    padding-bottom: 2rem;
}

.legal-bg {
    position: absolute;
    inset: 0;
}

.legal-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
}

.legal-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(17, 24, 39, 0.8));
}

.legal-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header section */
.legal-header {
    text-align: center;
    margin-bottom: 3rem;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
}

.legal-icon {
    width: 4rem;
    height: 4rem;
    color: #22d3ee;
    margin: 0 auto 1.5rem;
}

.legal-title {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #22d3ee, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.legal-subtitle {
    font-size: 1.125rem;
    color: #9ca3af;
}

/* Legal content */
.legal-content {
    position: relative;
}

.legal-border {
    position: absolute;
    inset: -1px;
    background: linear-gradient(to right, #0891b2, #3b82f6);
    border-radius: 1rem;
    filter: blur(1px);
    opacity: 0.2;
}

.legal-card {
    position: relative;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 0.75rem;
    padding: 3rem;
    line-height: 1.7;
}

/* Table of Contents */
.toc-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(34, 211, 238, 0.2);
}

.toc-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-align: center;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.toc-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 0.5rem;
    text-decoration: none;
    color: #d1d5db;
    transition: all 0.3s ease;
}

.toc-item:hover {
    background: rgba(34, 211, 238, 0.2);
    border-color: #22d3ee;
    transform: translateY(-2px);
}

.toc-number {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.toc-text {
    font-weight: 500;
}

/* Terms content */
.terms-content {
    max-width: none;
}

.legal-section {
    margin-bottom: 0.5rem;
    scroll-margin-top: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(34, 211, 238, 0.3);
}

.subsection-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #22d3ee;
    margin: 2rem 0 1rem 0;
}

.section-content {
    color: #d1d5db;
    font-size: 1rem;
    line-height: 1.7;
}

.section-content p {
    margin-bottom: 1.5rem;
}

.section-content p:last-child {
    margin-bottom: 0;
}

/* Lists */
.legal-list {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
}

.legal-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
    color: #d1d5db;
}

.legal-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 0.5rem;
    height: 0.5rem;
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    border-radius: 50%;
}

.legal-list li strong {
    color: #ffffff;
}

/* Highlight boxes */
.highlight-box,
.info-box,
.warning-box {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.highlight-box {
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
}

.info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.warning-box {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.highlight-icon,
.info-icon,
.warning-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.highlight-icon {
    color: #22d3ee;
}

.info-icon {
    color: #3b82f6;
}

.warning-icon {
    color: #fbbf24;
}

.highlight-box p,
.info-box p,
.warning-box p {
    margin: 0;
    color: #ffffff;
}

/* Links */
.legal-link {
    color: #22d3ee;
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-link:hover {
    color: #06b6d4;
    text-decoration: underline;
}

/* Contact section */
.contact-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-top: 3rem;
    border: 1px solid rgba(34, 211, 238, 0.2);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #d1d5db;
}

.contact-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #22d3ee;
    flex-shrink: 0;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .legal-card {
        padding: 1rem;
    }
    
    .toc-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .legal-title {
        font-size: 2.5rem;
    }
    
    .legal-card {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .subsection-title {
        font-size: 1.125rem;
    }
    
    .toc-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .highlight-box,
    .info-box,
    .warning-box {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 575px) {
    .legal-container {
        padding: 0 0.5rem;
    }
    
    .legal-title {
        font-size: 2rem;
    }
    
    .legal-card {
        padding: 1rem;
    }
    
    .legal-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .contact-info {
        gap: 0.75rem;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Print styles */
@media print {
    .legal-bg,
    .legal-border,
    .nav-container {
        display: none;
    }
    
    .legal-main {
        padding-top: 0;
    }
    
    .legal-card {
        background: white;
        color: black;
        border: none;
        box-shadow: none;
    }
    
    .section-title {
        color: black;
        border-bottom-color: #ccc;
    }
    
    .subsection-title {
        color: #333;
    }
    
    .highlight-box,
    .info-box,
    .warning-box {
        background: #f5f5f5;
        border: 1px solid #ccc;
    }
    
    .legal-link {
        color: #0066cc;
    }
}

/* Focus styles for accessibility */
.toc-item:focus {
    outline: 2px solid #22d3ee;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .legal-card {
        background: rgba(0, 0, 0, 0.95);
        border-color: #ffffff;
    }
    
    .section-title {
        color: #ffffff;
        border-bottom-color: #ffffff;
    }
    
    .subsection-title {
        color: #ffffff;
    }
    
    .highlight-box,
    .info-box,
    .warning-box {
        border-color: #ffffff;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .toc-item {
        transition: none;
    }
    
    .toc-item:hover {
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}