/**
 * Legal Center Styles
 * Extracted from inline styles for better performance and maintainability
 */

/* ==========================================================================
   Legal Center Header
   ========================================================================== */
.legal-center-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-3xl) auto;
}

.legal-center-header h1 {
    background: linear-gradient(135deg, var(--neural-white) 0%, var(--neural-soft-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-center-header p {
    color: var(--neural-light-grey);
}

/* ==========================================================================
   Legal Center Layout
   ========================================================================== */
.neural-section {
    background: var(--neural-black);
    position: relative;
    overflow: visible;
    padding: var(--space-3xl) 0;
    min-height: auto;
}

.neural-section:first-of-type {
    padding-top: var(--header-height);
}

.legal-center-section {
    width: 100%;
    position: relative;
}

.legal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.legal-center-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    min-height: 60vh;
    position: relative;
}

.legal-content-area {
    width: 100%;
    min-height: 400px;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg, 12px);
}

.neural-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(60, 19, 97, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(217, 119, 6, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(116, 238, 221, 0.01) 0%, transparent 50%);
    animation: subtleFloat 30s ease-in-out infinite;
}

@keyframes subtleFloat {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.05) rotate(0.5deg); }
}

/* ==========================================================================
   Legal Center Container
   ========================================================================== */
.legal-center {
    display: flex;
    gap: var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */
.legal-sidebar {
    flex: 0 0 300px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    height: fit-content;
    position: relative; /* Changed from sticky to relative */
    top: 0;
}

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

.legal-nav li {
    margin-bottom: var(--space-sm);
}

.legal-nav-group {
    margin-bottom: 2rem;
}

.legal-nav-group-title {
    color: rgba(255, 255, 255, 0.95); /* High contrast for titles */
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-left: var(--space-md);
}

.legal-nav a,
.legal-nav-item {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: rgba(255, 255, 255, 0.9); /* Increased opacity for better readability */
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 400; /* Reduced weight for better readability */
    font-family: var(--font-primary);
    font-size: 0.875rem; /* Reduced from 0.95rem for smaller text */
}

.legal-nav a:hover,
.legal-nav-item:hover,
.legal-nav a.active,
.legal-nav-item.active {
    background: linear-gradient(135deg, var(--neural-purple) 0%, var(--neural-orange) 100%);
    color: white;
    transform: translateX(4px);
}

/* ==========================================================================
   Content Area
   ========================================================================== */
.legal-content {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    min-height: 600px;
}

/* Fix button text visibility in Legal Center */
#legal-content-area .neural-btn--primary {
    background: linear-gradient(135deg, var(--neural-purple) 0%, var(--neural-orange) 100%);
    color: var(--neural-white) !important;
    border: 2px solid transparent;
    padding: var(--space-md) var(--space-xl);
    font-weight: var(--font-weight-medium);
    transition: all 0.3s ease;
}

#legal-content-area .neural-btn--primary:hover {
    background: linear-gradient(135deg, var(--neural-orange) 0%, var(--neural-purple) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(116, 238, 221, 0.3);
}

/* Fix secondary button text visibility on all legal pages */
.legal-center-section .neural-btn--secondary,
.legal-content-area .neural-btn--secondary,
main .neural-btn--secondary {
    background: var(--neural-orange);
    color: var(--neural-white) !important;
    border: 2px solid var(--neural-orange);
    padding: var(--space-md) var(--space-xl);
    font-weight: var(--font-weight-medium);
    transition: all 0.3s ease;
}

.legal-center-section .neural-btn--secondary:hover,
.legal-content-area .neural-btn--secondary:hover,
main .neural-btn--secondary:hover {
    background: rgba(217, 119, 6, 0.9);
    color: var(--neural-white) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.legal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-primary);
}

/* ==========================================================================
   Typography Styles for Dynamic Content
   ========================================================================== */
.neural-h2 {
    color: var(--neural-white);
    font-family: var(--font-primary);
    font-weight: var(--font-weight-light);
    font-size: clamp(1.5rem, 2.5vw, 1.75rem);
    margin: 2.5rem 0 1rem 0;
    line-height: 1.3;
    position: relative;
}

.neural-h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 3rem;
    height: 2px;
    background: linear-gradient(90deg, var(--neural-purple) 0%, var(--neural-orange) 100%);
    border-radius: 1px;
}

.neural-h3 {
    color: var(--neural-white);
    font-family: var(--font-primary);
    font-weight: var(--font-weight-medium);
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    margin: 2rem 0 0.75rem 0;
    line-height: 1.4;
}

#legal-content-area p {
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-primary);
    font-weight: var(--font-weight-light);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

#legal-content-area ul, 
#legal-content-area ol {
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-primary);
    font-weight: var(--font-weight-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

#legal-content-area li {
    margin-bottom: 0.5rem;
}

#legal-content-area a {
    color: var(--neural-purple);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: var(--font-weight-medium);
}

#legal-content-area a:hover {
    color: var(--neural-orange);
}

/* Enhanced link visibility for grid sections */
#legal-content-area div[style*="grid"] a {
    color: var(--neural-white);
    background: linear-gradient(135deg, rgba(60, 19, 97, 0.3) 0%, rgba(217, 119, 6, 0.2) 100%);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(116, 238, 221, 0.2);
    display: inline-block;
    margin: 0.125rem 0;
    transition: all 0.3s ease;
}

#legal-content-area div[style*="grid"] a:hover {
    color: var(--neural-white);
    background: linear-gradient(135deg, var(--neural-purple) 0%, var(--neural-orange) 100%);
    border-color: var(--neural-soft-blue);
    transform: translateY(-1px);
}

#legal-content-area strong {
    color: var(--neural-white);
    font-weight: var(--font-weight-medium);
}

/* ==========================================================================
   Mobile Responsive Styles
   ========================================================================== */
@media (max-width: 768px) {
    .legal-header {
        padding: var(--header-height) 0 1rem 0;
    }
    
    .legal-header__title {
        font-size: 1.5rem;
    }
    
    .legal-header__subtitle {
        font-size: 0.9rem;
    }

    .legal-center {
        flex-direction: column;
        gap: var(--space-lg);
    }
    
    .legal-sidebar {
        flex: none;
        position: static;
    }

    .neural-h2 {
        margin: 2rem 0 0.75rem 0;
    }

    .neural-h3 {
        margin: 1.5rem 0 0.5rem 0;
    }
}

/* ==========================================================================
   Accessibility - Reduced Motion Support
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .subtleFloat {
        animation: none;
    }

    .legal-nav a:hover {
        transform: none;
    }
}