/* Legal Pages Styles - Impressive Bar Design */
.legal-header {
    text-align: center;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
}

.legal-title {
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
    margin: 0 0 20px 0;
    letter-spacing: -0.6px;
    padding: 30px 0 20px 0;
    position: relative;
    display: inline-block;
}

.legal-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--g) 0%, var(--g-dk) 100%);
    border-radius: 2px;
}

.legal-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--g);
    border-radius: 1px;
    opacity: 0.6;
}

.legal-subtitle {
    font-size: 0.95rem;
    color: var(--white);
    margin: 24px 0 0 0;
    font-weight: 500;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--g) 0%, var(--g-dk) 100%);
    border-radius: var(--r-md);
    display: inline-block;
    border: none;
    box-shadow: 0 4px 16px rgba(46, 208, 110, 0.25);
    position: relative;
    overflow: hidden;
}

.legal-subtitle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.legal-subtitle:hover::before {
    left: 100%;
}

.legal-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Table of Contents */
.legal-toc {
    position: sticky;
    top: 80px;
    background: var(--white);
    border-radius: var(--r-lg);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(46, 208, 110, 0.08);
    max-height: fit-content;
    transition: all 0.3s ease;
}

.legal-toc:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(46, 208, 110, 0.15);
}

.legal-toc h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 20px 0;
    padding: 12px 0;
    border-bottom: 2px solid var(--g);
    position: relative;
}

.legal-toc h3::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--g-dk);
}

.legal-toc ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.legal-toc li {
    margin-bottom: 8px;
    padding: 0;
}

.legal-toc a {
    color: var(--mid);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 10px 14px;
    border-radius: var(--r-md);
    display: block;
    position: relative;
    overflow: hidden;
}

.legal-toc a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--g);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    border-radius: 0 2px 2px 0;
}

.legal-toc a:hover {
    color: var(--g);
    background: linear-gradient(135deg, rgba(46, 208, 110, 0.08) 0%, rgba(46, 208, 110, 0.04) 100%);
    transform: translateX(4px);
}

.legal-toc a:hover::before {
    transform: scaleY(1);
}

.legal-toc a::after {
    display: none;
}

/* Main Content */
.legal-main {
    min-width: 0;
}

.legal-content h2 {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 700;
    color: var(--ink);
    margin: 40px 0 24px 0;
    padding: 16px 0 8px 0;
    border-bottom: 2px solid var(--border);
    letter-spacing: -0.4px;
    position: relative;
}

.legal-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--g) 0%, var(--g-dk) 100%);
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    margin: 28px 0 12px 0;
    padding-left: 16px;
    position: relative;
}

.legal-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: linear-gradient(135deg, var(--g) 0%, var(--g-dk) 100%);
    border-radius: 2px;
}

.legal-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
    color: var(--ink);
    font-weight: 400;
}

.legal-content ul {
    margin: 16px 0 16px 24px;
    padding: 0;
}

.legal-content li {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--ink);
    line-height: 1.6;
    position: relative;
    padding-left: 8px;
}

.legal-content li::marker {
    color: var(--g);
    font-weight: bold;
    font-size: 0.9rem;
}

.legal-content a {
    color: var(--g);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.legal-content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--g-dk);
    transition: width 0.3s ease;
}

.legal-content a:hover {
    color: var(--g-dk);
}

.legal-content a:hover::after {
    width: 100%;
}

.legal-content strong {
    color: var(--ink);
    font-weight: 700;
}

.legal-section {
    margin-bottom: 40px;
    padding: 32px;
    background: var(--white);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(46, 208, 110, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.legal-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--g) 0%, var(--g-dk) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.legal-section:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(46, 208, 110, 0.1);
    transform: translateY(-2px);
}

.legal-section:hover::before {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 968px) {
    .legal-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .legal-toc {
        position: static;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .legal-header {
        margin-bottom: 10px;
        padding: 32px 24px;
    }
    
    .legal-title {
        font-size: 2rem;
    }
    
    .legal-subtitle {
        font-size: 0.9rem;
    }
    
    .legal-content h2 {
        font-size: 1.4rem;
        margin: 32px 0 20px 0;
    }
    
    .legal-content h3 {
        font-size: 1.05rem;
        margin: 24px 0 10px 0;
        padding-left: 12px;
    }
    
    .legal-content h3::before {
        width: 2px;
        height: 12px;
    }
    
    .legal-content p {
        font-size: 0.9rem;
        margin-bottom: 14px;
    }
    
    .legal-content ul {
        margin: 14px 0 14px 20px;
    }
    
    .legal-content li {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .legal-section {
        margin-bottom: 30px;
        padding: 24px 20px;
    }
    
    .legal-toc {
        padding: 20px;
    }
    
    .legal-toc a {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .legal-header {
        margin-bottom: 10px;
        padding: 24px 20px;
    }
    
    .legal-title {
        font-size: 1.8rem;
    }
    
    .legal-content h2 {
        font-size: 1.3rem;
    }
    
    .legal-content h3 {
        font-size: 1rem;
        padding-left: 10px;
    }
    
    .legal-content h3::before {
        width: 2px;
        height: 10px;
    }
    
    .legal-section {
        padding: 20px 16px;
        margin-bottom: 24px;
    }
    
    .legal-toc {
        padding: 16px;
    }
}
