/* Legal Pages Specific Styles */

.main-content {
    min-height: calc(100vh - 140px);
}

/* Legal Hero */
.legal-hero {
    background: linear-gradient(135deg, var(--light-bg) 0%, #e2e8f0 100%);
    text-align: center;
    padding: 3rem 0;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.last-updated {
    font-size: 0.9rem;
    color: var(--text-light);
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid #e2e8f0;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 2rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    padding: 1rem 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    background: var(--primary-color);
    transform: translateX(10px);
}

.mobile-nav-link .nav-icon {
    font-size: 1.8rem;
}

/* Legal Content Layout */
.legal-content {
    background: var(--white);
    position: relative;
    z-index: 1;
    width: 100%;
    overflow: visible;
}

.legal-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
    width: 100%;
    overflow: visible;
    padding: 0 2rem;
}

/* Legal Sidebar */
.legal-sidebar {
    position: sticky;
    top: 2rem;
    background: var(--light-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    height: fit-content;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

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

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

.nav-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--white);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--primary-color);
    color: var(--white);
    border-left-color: var(--secondary-color);
}

/* Legal Main Content */
.legal-main {
    min-height: 600px;
    width: 100%;
    overflow: visible;
    position: relative;
    z-index: 1;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.legal-document {
    background: var(--white, #ffffff);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-soft, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
    width: 100%;
    max-width: none;
    position: relative;
    z-index: 1;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.legal-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark, #1e293b);
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    scroll-margin-top: 2rem;
}

.legal-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark, #1e293b);
    margin: 2rem 0 1rem;
}

.legal-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-light, #64748b);
    margin-bottom: 1.5rem;
}

.legal-section ul,
.legal-section ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.legal-section li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-light, #64748b);
    margin-bottom: 0.75rem;
}

.legal-section li strong {
    color: var(--text-dark, #1e293b);
    font-weight: 600;
}

.legal-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* Contact Details */
.contact-details {
    background: var(--light-teal);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
}

.contact-item {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
}

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

.contact-item strong {
    color: var(--text-dark);
    font-weight: 600;
    display: inline-block;
    min-width: 120px;
}

/* Highlight Boxes */
.highlight-box {
    background: linear-gradient(135deg, var(--light-teal) 0%, #e2e8f0 100%);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
}

.highlight-box p {
    margin-bottom: 0;
    font-weight: 500;
}

.warning-box {
    background: linear-gradient(135deg, #fef3cd 0%, #fde68a 100%);
    border-left-color: #f59e0b;
}

.info-box {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left-color: #3b82f6;
}

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

@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .legal-sidebar {
        position: static;
        max-height: none;
        order: 2;
        margin-top: 2rem;
    }
    
    .legal-main {
        order: 1;
    }
    
    .legal-document {
        padding: 1rem;
    }
    
    .legal-section h2 {
        font-size: 1.5rem;
    }
    
    .legal-section h3 {
        font-size: 1.2rem;
    }
    
    .nav-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .legal-hero {
        padding: 2rem 0;
    }
    
    .legal-sidebar {
        padding: 1rem;
    }
    
    .legal-document {
        padding: 0.75rem;
    }
    
    .legal-section {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
    
    .legal-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .legal-section h3 {
        font-size: 1.1rem;
        margin: 1.5rem 0 0.75rem;
    }
    
    .legal-section ul,
    .legal-section ol {
        padding-left: 1.5rem;
    }
    
    .contact-details {
        padding: 1rem;
    }
    
    .contact-item strong {
        display: block;
        margin-bottom: 0.25rem;
        min-width: auto;
    }
}

/* Print Styles */
@media print {
    .legal-sidebar {
        display: none !important;
    }
    
    .legal-layout {
        grid-template-columns: 1fr;
    }
    
    .legal-document {
        box-shadow: none !important;
        padding: 0;
    }
    
    .legal-section {
        break-inside: avoid;
        margin-bottom: 2rem;
    }
    
    .legal-section h2,
    .legal-section h3 {
        color: #000 !important;
    }
    
    .legal-section p,
    .legal-section li {
        color: #333 !important;
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .contact-details,
    .highlight-box {
        background: #f5f5f5 !important;
        border-left: 4px solid #333 !important;
    }
    
    .nav-item {
        color: #000 !important;
    }
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.nav-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading animation for sidebar */
.legal-sidebar.loading {
    opacity: 0.6;
}

.legal-sidebar.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Scroll indicator for long documents */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(45, 212, 191, 0.2);
    z-index: 1000;
}

.scroll-indicator-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

/* Fallback for slide-in animations - ensure content is visible even if JS fails */
.legal-main.slide-in-right,
.legal-sidebar.slide-in-left {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* Additional fallback - show content after 2 seconds regardless of JS */
.legal-main,
.legal-sidebar {
    animation: showContent 0.1s ease 2s forwards;
}

@keyframes showContent {
    to {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
}
