/* ==========================================================================
   Finologi - Legal Pages Styles
   Privacy Policy & Terms of Service
   ========================================================================== */

:root {
    --primary-green: #10b981;
    --primary-blue: #3b82f6;
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border: #e5e7eb;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.legal-hero {
    background: var(--gradient-primary);
    padding: 8rem 2rem 4rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.legal-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg width="100" height="100" xmlns="http://www.w3.org/2000/svg"%3E%3Ccircle cx="50" cy="50" r="2" fill="white" opacity="0.1"/%3E%3C/svg%3E');
    opacity: 0.3;
}

.legal-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.legal-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.legal-hero p {
    font-size: 1.125rem;
    opacity: 0.95;
    line-height: 1.7;
}

.last-updated {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* ==========================================================================
   Container & Content
   ========================================================================== */

.legal-container {
    max-width: 1000px;
    margin: -3rem auto 0;
    padding: 0 2rem 4rem;
    position: relative;
    z-index: 10;
}

.legal-content {
    background: var(--white);
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    padding: 3rem;
}

/* ==========================================================================
   Table of Contents
   ========================================================================== */

.toc {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-blue);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 3rem;
}

.toc h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.toc a:hover {
    color: var(--primary-green);
    transform: translateX(4px);
}

.toc a::before {
    content: '→';
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toc a:hover::before {
    opacity: 1;
}

/* ==========================================================================
   Legal Sections
   ========================================================================== */

.legal-section {
    margin-bottom: 3rem;
    scroll-margin-top: 100px;
}

.legal-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.legal-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

.legal-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
}

.legal-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.legal-section ul,
.legal-section ol {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
}

.legal-section li::marker {
    color: var(--primary-blue);
}

.legal-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-section a {
    color: var(--primary-blue);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.legal-section a:hover {
    color: var(--primary-green);
}

/* ==========================================================================
   Highlight Boxes
   ========================================================================== */

.highlight-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-left: 4px solid var(--primary-blue);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.highlight-box p {
    margin: 0;
    color: var(--text-primary);
}

.highlight-box strong {
    color: var(--primary-blue);
}

.highlight-box a {
    color: var(--primary-blue);
    text-decoration: underline;
    font-weight: 500;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Warning Box */
.warning-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(251, 191, 36, 0.05) 100%);
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.warning-box .info-icon {
    background: #f59e0b;
}

/* Success Box */
.success-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(52, 211, 153, 0.05) 100%);
    border-left: 4px solid var(--primary-green);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.success-box .info-icon {
    background: var(--primary-green);
}

/* ==========================================================================
   Contact CTA
   ========================================================================== */

.contact-cta {
    background: var(--gradient-primary);
    padding: 3rem;
    border-radius: 1.5rem;
    text-align: center;
    color: white;
    margin-top: 3rem;
}

.contact-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    border: none;
    padding: 0;
}

.contact-cta p {
    font-size: 1.125rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    color: white;
}

.btn-white {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: white;
    color: var(--primary-blue);
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* ==========================================================================
   Contact Info Box
   ========================================================================== */

.contact-info-box {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 1rem;
    margin-top: 1.5rem;
}

.contact-info-box p {
    margin-bottom: 1rem;
}

.contact-info-box strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* ==========================================================================
   Special Elements
   ========================================================================== */

/* Definition List */
.legal-section dl {
    margin: 1.5rem 0;
}

.legal-section dt {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1rem;
}

.legal-section dd {
    margin-left: 2rem;
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

/* Code/Technical Terms */
.legal-section code {
    background: var(--bg-light);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary-blue);
}

/* Blockquote */
.legal-section blockquote {
    border-left: 4px solid var(--primary-blue);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

/* Table */
.legal-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.legal-section th,
.legal-section td {
    padding: 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}

.legal-section th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-primary);
}

.legal-section td {
    color: var(--text-secondary);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .legal-hero {
        padding: 6rem 1rem 3rem;
    }
    
    .legal-hero h1 {
        font-size: 2rem;
    }
    
    .legal-hero p {
        font-size: 1rem;
    }
    
    .legal-container {
        padding: 0 1rem 3rem;
    }
    
    .legal-content {
        padding: 2rem;
        border-radius: 1rem;
    }
    
    .toc {
        padding: 1.5rem;
    }
    
    .legal-section h2 {
        font-size: 1.5rem;
    }
    
    .legal-section h3 {
        font-size: 1.25rem;
    }
    
    .legal-section ul,
    .legal-section ol {
        padding-left: 1.5rem;
    }
    
    .contact-cta {
        padding: 2rem;
    }
    
    .contact-cta h2 {
        font-size: 1.5rem;
    }
    
    .contact-cta p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .legal-hero h1 {
        font-size: 1.75rem;
    }
    
    .legal-content {
        padding: 1.5rem;
    }
    
    .toc {
        padding: 1rem;
    }
    
    .legal-section h2 {
        font-size: 1.25rem;
    }
    
    .highlight-box,
    .warning-box,
    .success-box {
        padding: 1rem;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .legal-hero {
        background: white;
        color: var(--text-primary);
        padding: 2rem 0;
    }
    
    .legal-hero::before {
        display: none;
    }
    
    .last-updated {
        background: transparent;
        border: 1px solid var(--border);
        color: var(--text-primary);
    }
    
    .legal-container {
        margin: 0;
        padding: 0;
    }
    
    .legal-content {
        box-shadow: none;
        border: 1px solid var(--border);
    }
    
    .toc {
        page-break-after: always;
    }
    
    .legal-section {
        page-break-inside: avoid;
    }
    
    .contact-cta {
        background: var(--bg-light);
        color: var(--text-primary);
        border: 1px solid var(--border);
    }
    
    .btn-white {
        display: none;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.875rem;
        color: var(--text-tertiary);
    }
}

/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */

/* Focus Styles */
.toc a:focus,
.legal-section a:focus,
.btn-white:focus {
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .highlight-box,
    .warning-box,
    .success-box {
        border-width: 3px;
    }
    
    .legal-section a {
        text-decoration: underline;
        text-decoration-thickness: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed in the future */
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.hidden {
    display: none !important;
}